change guser to user

This commit is contained in:
Andrew Pamment 2017-04-23 12:31:51 +10:00
parent db59e0e4b2
commit d76ac1e151

View File

@ -309,10 +309,10 @@ void runexternal(struct user_record *user, char *cmd, int stdio, char *argv[], c
} }
} }
} }
if (codepage == NULL || (strcmp(codepage, "CP437") == 0 && gUser->codepage == 0) || (strcmp(codepage, "UTF-8") == 0 && gUser->codepage == 1)) { if (codepage == NULL || (strcmp(codepage, "CP437") == 0 && user->codepage == 0) || (strcmp(codepage, "UTF-8") == 0 && user->codepage == 1)) {
write(master, outbuf, g); write(master, outbuf, g);
} else { } else {
if (gUser->codepage == 0) { if (user->codepage == 0) {
ic = iconv_open("CP437", codepage); ic = iconv_open("CP437", codepage);
} else { } else {
ic = iconv_open("UTF-8", codepage); ic = iconv_open("UTF-8", codepage);
@ -344,10 +344,10 @@ void runexternal(struct user_record *user, char *cmd, int stdio, char *argv[], c
} }
outbuf[g++] = c; outbuf[g++] = c;
} }
if (codepage == NULL || (strcmp(codepage, "CP437") == 0 && gUser->codepage == 0) || (strcmp(codepage, "UTF-8") == 0 && gUser->codepage == 1)) { if (codepage == NULL || (strcmp(codepage, "CP437") == 0 && user->codepage == 0) || (strcmp(codepage, "UTF-8") == 0 && user->codepage == 1)) {
write(door_out, outbuf, g); write(door_out, outbuf, g);
} else { } else {
if (gUser->codepage == 0) { if (user->codepage == 0) {
ic = iconv_open(codepage, "CP437"); ic = iconv_open(codepage, "CP437");
} else { } else {
ic = iconv_open(codepage, "UTF-8"); ic = iconv_open(codepage, "UTF-8");