Consolidate handling of some fopen failures.

This commit is contained in:
Matt Kraai
2000-09-27 02:43:35 +00:00
parent e0bcce09ba
commit bbaef66b3f
14 changed files with 32 additions and 73 deletions

View File

@ -472,9 +472,7 @@ static void load_cmd_file(char *filename)
char *line;
char *nextline;
cmdfile = fopen(filename, "r");
if (cmdfile == NULL)
fatalError(strerror(errno));
cmdfile = xfopen(filename, "r");
while ((line = get_line_from_file(cmdfile)) != NULL) {
/* if a line ends with '\' it needs the next line appended to it */