- err = "Trouble in init_cmds() with textfile_sizes().";
- exit_err(textfile_sizes(file, &linemax, &lines), world, err);
- 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);
+ exit_err(textfile_sizes(file, &linemax, &lines), world, err_s);
+ char line[linemax + 1];
+
+ struct Command * cmds = try_malloc(lines * sizeof(struct Command),
+ world, f_name);