postcommands { return TYPE_POSTCMDQUEUE; }
encoding { return TYPE_ENCODING; }
locale { return TYPE_LOCALE; }
+utf8esc { return TYPE_UTF8ESC; }
yes { yylval.i = 1; return TYPE_BOOL; }
no { yylval.i = 0; return TYPE_BOOL; }
dglstart { yylval.i = DGLTIME_DGLSTART; return TYPE_CMDQUEUENAME; }
%token TYPE_CMDQUEUE TYPE_DEFINE_MENU TYPE_BANNER_FILE TYPE_CURSOR
%token TYPE_POSTCMDQUEUE
%token TYPE_MAX_IDLE_TIME TYPE_MENU_MAX_IDLE_TIME TYPE_EXTRA_INFO_FILE
-%token TYPE_ENCODING TYPE_LOCALE
+%token TYPE_ENCODING TYPE_LOCALE TYPE_UTF8ESC
%token <s> TYPE_VALUE
%token <i> TYPE_NUMBER TYPE_CMDQUEUENAME
%type <kt> KeyType
case TYPE_ALLOW_REGISTRATION:
globalconfig.allow_registration = $<i>3;
break;
+ case TYPE_UTF8ESC:
+ globalconfig.utf8esc = $<i>3;
+ break;
default:
fprintf(stderr, "%s:%d: token %s does not take a boolean, bailing out\n",
config, line, lookup_token($1));
| TYPE_PATH_INPROGRESS { $$ = TYPE_PATH_INPROGRESS; }
| TYPE_ENCODING { $$ = TYPE_ENCODING; }
| TYPE_LOCALE { $$ = TYPE_LOCALE; }
+ | TYPE_UTF8ESC { $$ = TYPE_UTF8ESC; }
| TYPE_RC_FMT { $$ = TYPE_RC_FMT; }
| TYPE_WATCH_SORTMODE { $$ = TYPE_WATCH_SORTMODE; }
| TYPE_SERVER_ID { $$ = TYPE_SERVER_ID; }
case TYPE_WATCH_COLUMNS: return "watch_columns";
case TYPE_SERVER_ID: return "server_id";
case TYPE_LOCALE: return "locale";
+ case TYPE_UTF8ESC: return "utf8esc";
default: abort();
}
}
break;
case 12: case 18: /* ^L, ^R */
- write(1, "\033%G", 3);
+ if (globalconfig.utf8esc) write(1, "\033%G", 3);
clear ();
break;
clear ();
refresh ();
endwin ();
- write(1, "\033%G", 3);
+ if (globalconfig.utf8esc) write(1, "\033%G", 3);
#ifdef USE_SHMEM
signals_block();
if (games[idx]->is_in_shm) {
use_default_colors();
init_pair(1, -1, -1);
init_pair(2, COLOR_RED, -1);
- write(1, "\033%G", 3);
+ if (globalconfig.utf8esc) write(1, "\033%G", 3);
#endif
clear();
refresh();
term_resize_check();
if (doclear) {
doclear = 0;
- write(1, "\033%G", 3);
+ if (globalconfig.utf8esc) write(1, "\033%G", 3);
clear();
}
drawbanner(&ban, 1, 0);
int sortmode; /* default watching-screen sortmode */
char *server_id; /* string for the server name or whatever */
char *locale;
+ int utf8esc; /* send select-utf8-charset escape code */
struct dg_cmdpart *cmdqueue[NUM_DGLTIMES];
globalconfig.shed_gid = (gid_t)-1;
globalconfig.sortmode = SORTMODE_USERNAME;
+ globalconfig.utf8esc = 0;
if (config)
{
# Locale. Leaving this out, dgamelaunch will not explicitly set locale.
locale = "en_US.UTF-8"
+# Should dgl send select-UTF8-charset escape code? (that is: ESC % G)
+# default is no.
+#utf8esc = yes
+
# Maximum time in seconds user can idle in the dgamelaunch menus
# before dgl exits. Default value is 0, which disables the idling timer.
# Does not apply to external programs or config editors.