diff --git a/src/syncterm/syncterm.c b/src/syncterm/syncterm.c index a6c377132aeaacf52403ed6824a3f441fc9897f1..b62f2d51a4f69bb8c07eafe35784cb9c4732a320 100644 --- a/src/syncterm/syncterm.c +++ b/src/syncterm/syncterm.c @@ -1238,6 +1238,7 @@ void load_settings(struct syncterm_settings *set) set->scaling_factor=iniReadInteger(inifile,"SyncTERM","ScalingFactor",0); set->window_width=iniReadInteger(inifile,"SyncTERM","WindowWidth",0); set->window_height=iniReadInteger(inifile,"SyncTERM","WindowHeight",0); + set->left_just=iniReadBool(inifile,"SyncTERM","LeftJustify",FALSE); /* Modem settings */ iniReadString(inifile, "SyncTERM", "ModemInit", "AT&F&C1&D2", set->mdm.init_string); diff --git a/src/syncterm/syncterm.h b/src/syncterm/syncterm.h index a28bedf886449cb286bfe146cb8e5ab89be911cf..2e7b48353d9e0491f466e6b76d7c00f1427e6d08 100644 --- a/src/syncterm/syncterm.h +++ b/src/syncterm/syncterm.h @@ -64,6 +64,7 @@ struct syncterm_settings { int custom_fontheight; int window_width; int window_height; + int left_just; }; extern char *inpath; diff --git a/src/syncterm/window.c b/src/syncterm/window.c index f76c7640e955d106a1d2e4372515f701baf5c41b..ba23d62ca54eeaa683d85e5f44f79a3aa6a80f64 100644 --- a/src/syncterm/window.c +++ b/src/syncterm/window.c @@ -14,7 +14,7 @@ int drawwin(void) char str[32]; int x,y,c; - gettextinfo(&txtinfo); + gettextinfo(&txtinfo); strcpy(str," "); @@ -33,15 +33,17 @@ int drawwin(void) term.height=24; term.nostatus=1; } - term.x=(txtinfo.screenwidth-term.width)/2+2; + if (settings.left_just) + term.x = 2; + else + term.x=(txtinfo.screenwidth-term.width)/2+2; term.y=(txtinfo.screenheight-term.height)/2+2; if((winbuf=(char *)alloca(txtinfo.screenheight*txtinfo.screenwidth*2))==NULL) { uifcmsg("Cannot allocate memory for terminal buffer", "`Memory error`\n\n" - "Either your system is dangerously low on resources or your\n" - "window is farking huge!"); + "Either your system is dangerously low on resources or your\n" + "window is farking huge!"); return(-1); } - c=0; for(y=0;y<txtinfo.screenheight;y++) { p=str; @@ -54,7 +56,10 @@ int drawwin(void) winbuf[c++]=*(p++); if(!*p) p=str; - winbuf[c++]=YELLOW|(BLUE<<4); + if (settings.left_just) + winbuf[c++]=0; + else + winbuf[c++]=YELLOW|(BLUE<<4); } } puttext(1,1,txtinfo.screenwidth,txtinfo.screenheight,winbuf);