Instance globals changes needed for X11 and gem ports.

This commit is contained in:
Bart House
2018-12-24 16:58:32 -08:00
parent 63628796c1
commit 198e44216e
2 changed files with 8 additions and 9 deletions

View File

@@ -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

View File

@@ -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;
}