- textfile_sizes(file, &linemax, &lines);
- err = "Trouble in init_cmds() with malloc().";
- char * line = malloc(linemax);
- exit_err(NULL == line, world, err);
- struct Command * cmds = malloc(lines * sizeof(struct Command));
- exit_err(NULL == line, world, err);
+ uint8_t test = textfile_sizes(file, &linemax, &lines);
+ exit_trouble(test, f_name, "textfile_sizes()");
+ char line[linemax + 1];
+
+ struct Command * cmds = try_malloc(lines * sizeof(struct Command), f_name);