Latest changes
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
char ge_beos_title[GMAXTITLE] = "";
|
||||
char ge_beos_title[GMAXTITLE+1] = "";
|
||||
int ge_beos_ext_title;
|
||||
|
||||
static BClipboard g_clipboard("system", true);
|
||||
@@ -63,8 +63,7 @@ void g_deinit_os(void) {
|
||||
|
||||
void g_init_title(char *tasktitle, int titlestatus) {
|
||||
|
||||
strncpy(ge_beos_title, tasktitle, GMAXTITLE);
|
||||
ge_beos_title[GMAXTITLE-1] = '\0';
|
||||
strxcpy(ge_beos_title, tasktitle, GMAXTITLE);
|
||||
ge_beos_ext_title = titlestatus;
|
||||
}
|
||||
|
||||
@@ -164,15 +163,14 @@ void g_get_ostitle_name(char* title) {
|
||||
void g_set_ostitle_name(char* title, int mode) {
|
||||
|
||||
if(mode == 0) {
|
||||
char fulltitle[GMAXTITLE];
|
||||
char fulltitle[GMAXTITLE+1];
|
||||
strcpy(fulltitle, ge_beos_title);
|
||||
if(ge_beos_ext_title) {
|
||||
int len = strlen(fulltitle);
|
||||
if(len < GMAXTITLE-4) {
|
||||
if(len < GMAXTITLE-3) {
|
||||
if(len)
|
||||
strcat(fulltitle, " - ");
|
||||
strncpy(fulltitle+len+3, title, GMAXTITLE-len-3);
|
||||
fulltitle[GMAXTITLE-1] = '\0';
|
||||
strxcpy(fulltitle+len+3, title, GMAXTITLE-len-3);
|
||||
}
|
||||
}
|
||||
g_set_ostitle(fulltitle);
|
||||
|
@@ -49,8 +49,8 @@ enum OSAPI {
|
||||
};
|
||||
|
||||
OSAPI winapi;
|
||||
char ge_win_oldtitle[GMAXTITLE] = "";
|
||||
char ge_win_title[GMAXTITLE] = "";
|
||||
char ge_win_oldtitle[GMAXTITLE+1] = "";
|
||||
char ge_win_title[GMAXTITLE+1] = "";
|
||||
int ge_win_ext_title;
|
||||
|
||||
|
||||
|
@@ -77,9 +77,9 @@ HMODULE ge_os2_mdmHandle = 0;
|
||||
SWCNTRL ge_os2_swolddata;
|
||||
SWCNTRL ge_os2_swdata;
|
||||
SZ ge_os2_loaderr[256];
|
||||
char ge_os2_coldtitle[GMAXTITLE] = "";
|
||||
char ge_os2_coldtitle[GMAXTITLE+1] = "";
|
||||
HPOINTER ge_os2_coldicon;
|
||||
char ge_os2_title[GMAXTITLE] = "";
|
||||
char ge_os2_title[GMAXTITLE+1] = "";
|
||||
int ge_os2_ext_title;
|
||||
ULONG ge_os2_oldicon;
|
||||
|
||||
@@ -290,11 +290,11 @@ void g_get_ostitle_name(char *currtitle) {
|
||||
void g_set_ostitle_name(char *title, int mode) {
|
||||
|
||||
if(mode == 0) {
|
||||
char fulltitle[80];
|
||||
char fulltitle[GMAXTITLE+1];
|
||||
strcpy(fulltitle, ge_os2_title);
|
||||
if(ge_os2_ext_title) {
|
||||
int len = strlen(fulltitle);
|
||||
if(len < GMAXTITLE-4) {
|
||||
if(len < GMAXTITLE-3) {
|
||||
if(len)
|
||||
strcat(fulltitle, " - ");
|
||||
strxcpy(fulltitle+len+3, title, GMAXTITLE-len-3);
|
||||
|
@@ -42,8 +42,8 @@
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
OSVERSIONINFO WinVer;
|
||||
char ge_win_coldtitle[GMAXTITLE] = "";
|
||||
char ge_win_title[GMAXTITLE] = "";
|
||||
char ge_win_coldtitle[GMAXTITLE+1] = "";
|
||||
char ge_win_title[GMAXTITLE+1] = "";
|
||||
int ge_win_ext_title;
|
||||
|
||||
char tu[256] = {
|
||||
@@ -196,8 +196,7 @@ void g_deinit_os(void) {
|
||||
|
||||
void g_init_title(char* tasktitle, int titlestatus) {
|
||||
|
||||
strncpy(ge_win_title, tasktitle, GMAXTITLE);
|
||||
ge_win_title[GMAXTITLE-1] = '\0';
|
||||
strxcpy(ge_win_title, tasktitle, GMAXTITLE);
|
||||
ge_win_ext_title = titlestatus;
|
||||
}
|
||||
|
||||
@@ -339,15 +338,14 @@ void g_get_ostitle_name(char *title) {
|
||||
void g_set_ostitle_name(char *title, int mode) {
|
||||
|
||||
if(mode == 0) {
|
||||
char fulltitle[GMAXTITLE];
|
||||
char fulltitle[GMAXTITLE+1];
|
||||
strcpy(fulltitle, ge_win_title);
|
||||
if(ge_win_ext_title) {
|
||||
int len = strlen(fulltitle);
|
||||
if(len < GMAXTITLE-4) {
|
||||
if(len < GMAXTITLE-3) {
|
||||
if(len)
|
||||
strcat(fulltitle, " - ");
|
||||
strncpy(fulltitle+len+3, title, GMAXTITLE-len-3);
|
||||
fulltitle[GMAXTITLE-1] = '\0';
|
||||
strxcpy(fulltitle+len+3, title, GMAXTITLE-len-3);
|
||||
}
|
||||
}
|
||||
g_set_ostitle(fulltitle);
|
||||
|
@@ -75,7 +75,7 @@ bool gareafile::jbstrcpy(char *dest, char *src, size_t maxlen, size_t *jbc) {
|
||||
|
||||
void gareafile::ReadCrashmailCfg(const char* file) {
|
||||
|
||||
FILE* fp = fsopen(file, "rb", sharemode);
|
||||
FILE* fp = fsopen(file, "rt", sharemode);
|
||||
if(fp) {
|
||||
setvbuf(fp, NULL, _IOFBF, 8192);
|
||||
|
||||
|
Reference in New Issue
Block a user