コード例 #1
0
ファイル: actions.c プロジェクト: rdebath/sgt
static void act_exit(void) {
    static char question[] = "File is modified. Save before quitting? [yn] ";
    if (modified) {
	int c;

	display_moveto (display_rows-1, 0);
	display_clear_to_eol ();
	display_set_colour (COL_MINIBUF);
	display_write_str (question);
	display_refresh();
	do {
#if defined(unix) && !defined(GO32)
	    if (update_required) {
		update();
		display_moveto (display_rows-1, 0);
		display_clear_to_eol ();
		display_set_colour (COL_MINIBUF);
		display_write_str (question);
		display_refresh();
	    }
	    safe_update = TRUE;
#endif
	    c = display_getkey();
#if defined(unix) && !defined(GO32)
	    safe_update = FALSE;
#endif
	    if (c >= 'a' && c <= 'z')
		c += 'A'-'a';
	} while (c != 'Y' && c != 'N' && c != '\007');
	if (c == 'Y') {
	    act_save();
	    if (modified)
		return;		       /* couldn't save, so don't quit */
	    draw_scr();		       /* update the ** on status line! */
	} else if (c == '\007') {
	    return;		       /* don't even quit */
	}
    }
    finished = TRUE;
}
コード例 #2
0
void sethomescreen(void)
{
   // titel setzen
   strcpy_P(titelbuffer, (PGM_P)pgm_read_word(&(TitelTable[0])));
   screen_x=0;
   screen_y = 1;
//   char_height_mul = 2;
//   char_width_mul = 2;
   //display_write_prop_str(char_y,char_x,0,(unsigned char*)titelbuffer);
   
   display_write_str(titelbuffer,1);

}