diff options
-rw-r--r-- | source/lib/charset.c | 14 | ||||
-rw-r--r-- | source/lib/cmd_interp.c | 15 |
2 files changed, 19 insertions, 10 deletions
diff --git a/source/lib/charset.c b/source/lib/charset.c index 4772de66cb1..8a245713584 100644 --- a/source/lib/charset.c +++ b/source/lib/charset.c @@ -30,7 +30,7 @@ extern int DEBUGLEVEL; #if !defined(KANJI) /* lower->upper mapping for IBM Code Page 850 - MS-DOS Latin 1 */ -static unsigned char cp_850[][4] = { +unsigned char cp_850[][4] = { /* dec col/row oct hex description */ /* 133 08/05 205 85 a grave */ /* 183 11/07 267 B7 A grave */ {0x85,0xB7,1,1}, @@ -98,14 +98,14 @@ static unsigned char cp_850[][4] = { }; #else /* KANJI */ /* lower->upper mapping for IBM Code Page 932 - MS-DOS Japanese SJIS */ -static unsigned char cp_932[][4] = { +unsigned char cp_932[][4] = { {0,0,0,0} }; #endif /* KANJI */ -static char xx_dos_char_map[256]; -static char xx_upper_char_map[256]; -static char xx_lower_char_map[256]; +char xx_dos_char_map[256]; +char xx_upper_char_map[256]; +char xx_lower_char_map[256]; char *dos_char_map = xx_dos_char_map; char *upper_char_map = xx_upper_char_map; @@ -320,8 +320,9 @@ clean_and_exit: } /**************************************************************************** -initialise the client codepage. + Initialise the client codepage. ****************************************************************************/ + void codepage_initialise(int client_codepage) { int i; @@ -369,6 +370,7 @@ for code page %d failed. Using default client codepage 850\n", for(i = 0; !((cp[i][0] == '\0') && (cp[i][1] == '\0')); i++) add_dos_char(cp[i][0], (BOOL)cp[i][2], cp[i][1], (BOOL)cp[i][3]); } + } /******************************************************************* diff --git a/source/lib/cmd_interp.c b/source/lib/cmd_interp.c index 8cae983ecbf..b19186125bd 100644 --- a/source/lib/cmd_interp.c +++ b/source/lib/cmd_interp.c @@ -1078,6 +1078,7 @@ static void cmd_set(struct client_info *info, int argc, char *argv[]) BOOL interactive = True; char *cmd_str = NULL; int opt; + int i; extern FILE *dbf; extern char *optarg; static pstring servicesf = CONFIGFILE; @@ -1420,9 +1421,15 @@ int command_main(int argc, char *argv[]) extern struct user_creds *usr_creds; mode_t myumask = 0755; char progname[255], path[255], *s; + int i; DEBUGLEVEL = 2; + for (i = 0; i < argc; i++) + { + DEBUG(2, ("arg %d: %s\n", i, argv[i])); + } + add_command_set(general_commands); copy_user_creds(&usr, NULL); @@ -1433,11 +1440,11 @@ int command_main(int argc, char *argv[]) out_hnd = stdout; strncpy(path, argv[0], 255); - for(s = strtok(path,"/");s;s = strtok(NULL,"/")) - fstrcpy(progname, s); + for (s = strtok(path, "/"); s; s = strtok(NULL, "/")) + fstrcpy(progname, s); slprintf(debugf, sizeof(debugf) - 1, - "%s/log.%s", LOGFILEBASE, progname); + "%s/log.%s", LOGFILEBASE, progname); pstrcpy(usr.ntc.domain, ""); pstrcpy(usr.ntc.user_name, ""); @@ -1496,7 +1503,7 @@ int command_main(int argc, char *argv[]) free_cmd_set_array(num_commands, commands); num_commands = 0; - commands = NULL; + commands = NULL; return (0); } |