- copy_tokenized_string(line, &world.commandDB.cmds[i].dsc_short, delim);
- copy_tokenized_string(NULL, &world.commandDB.cmds[i].server_msg, delim);
- if (!strcmp("0", world.commandDB.cmds[i].server_msg))
- { /*.server_msg==0 detects*/
- free(world.commandDB.cmds[i].server_msg); /* non-server commands */
- world.commandDB.cmds[i].server_msg = NULL;/* in try_key() / */
- } /* try_server_command().*/
- char * arg_string = strtok(NULL, delim);
- world.commandDB.cmds[i].arg = arg_string[0];
- copy_tokenized_string(NULL, &world.commandDB.cmds[i].dsc_long, "\n");
+ exit_trouble(EOF == ungetc(test_for_end, file), f_name, "ungetc()");
+ struct Command cmd;
+ memset(&cmd, 0, sizeof(struct Command));
+ err_try_fgets(line, linemax, file, context, "nf");
+ write_line_to_target(&cmd.dsc_short, line);
+ err_try_fgets(line, linemax, file, context, "0nf");
+ write_line_to_target(&cmd.dsc_long, line);
+ err_try_fgets(line, linemax, file, context, "0nf");
+ if (strcmp(world.delim, line))
+ {
+ write_line_to_target(&cmd.server_msg, line);
+ err_try_fgets(line, linemax, file, context, "0nfs");
+ cmd.arg = line[0];
+ err_try_fgets(line, linemax, file, context, "d");
+ }
+ array_append(i, sizeof(struct Command), (void *) &cmd,
+ (void **) &world.commandDB.cmds);