shm_clean(&scanline_shm, scanline); shm_clean(&fullscreen_shm, fullscreen);  for(i=1; i<=ntiles_x; i++) { shm_clean(&tile_row_shm[i], tile_row[i]); if (single_copytile && i >= single_copytile) { break; } }
clean_shm(0);
void clean_up_exit (int ret) {	int i;	exit_flag = 1;	/* remove the shm areas: */	shm_clean(&scanline_shm, scanline);	shm_clean(&fullscreen_shm, fullscreen);	for(i=1; i<=ntiles_x; i++) {		shm_clean(&tile_row_shm[i], tile_row[i]);		if (single_copytile && i >= single_copytile) {			break;		}	}	/* X keyboard cleanups */	delete_added_keycodes();	if (clear_mods == 1) {		clear_modifiers(0);	} else if (clear_mods == 2) {		clear_keys();	}	if (no_autorepeat) {		autorepeat(1);	}	X_LOCK;	XTestDiscard_wr(dpy);	XCloseDisplay(dpy);	X_UNLOCK;	fflush(stderr);	exit(ret);}