diff --git a/win/X11/winX.c b/win/X11/winX.c index 6e3232b68..89cbc631e 100644 --- a/win/X11/winX.c +++ b/win/X11/winX.c @@ -946,8 +946,8 @@ const char *str; switch (wp->type) { case NHW_MESSAGE: - (void) strncpy(toplines, str, TBUFSZ); /* for Norep(). */ - toplines[TBUFSZ - 1] = 0; + (void) strncpy(g.toplines, str, TBUFSZ); /* for Norep(). */ + g.toplines[TBUFSZ - 1] = 0; append_message(wp, str); break; #ifndef STATUS_HILITES diff --git a/win/gem/wingem1.c b/win/gem/wingem1.c index 368aff27e..08473853f 100644 --- a/win/gem/wingem1.c +++ b/win/gem/wingem1.c @@ -119,7 +119,6 @@ static const struct pad { #define TBUFSZ 300 #define BUFSZ 256 extern int yn_number; /* from decl.c */ -extern char toplines[TBUFSZ]; /* from decl.c */ extern char mapped_menu_cmds[]; /* from options.c */ extern int mar_iflags_numpad(void); /* from wingem.c */ extern void Gem_raw_print(const char *); /* from wingem.c */ @@ -1647,13 +1646,13 @@ const char *str; } message_line[mesg_hist - 1] = tmp; } - strcpy(toplines, str); + strcpy(g.toplines, str); messages_pro_zug++; msg_max++; - if ((int) strlen(toplines) >= msg_width) { + if ((int) strlen(g.toplines) >= msg_width) { int pos = msg_width; - tmp = toplines + msg_width; + tmp = g.toplines + msg_width; while (*tmp != ' ' && pos >= 0) { tmp--; pos--; @@ -1661,12 +1660,12 @@ const char *str; if (pos <= 0) pos = msg_width; /* Mar -- Oops, what a word :-) */ message_age[msg_max] = TRUE; - strncpy(message_line[msg_max], toplines, pos); + strncpy(message_line[msg_max], g.toplines, pos); message_line[msg_max][pos] = 0; - rest = strcpy(buf, toplines + pos); + rest = strcpy(buf, g.toplines + pos); } else { message_age[msg_max] = TRUE; - strncpy(message_line[msg_max], toplines, msg_width); + strncpy(message_line[msg_max], g.toplines, msg_width); rest = 0; }