diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 1997-08-07 11:19:32 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 1997-08-07 11:19:32 -0400 |
commit | a93eca0b83e4d890c28d271eb3293f08666c613e (patch) | |
tree | a17895d165fc2719770037b07ac6dad61233f850 /WWW/Library/Implementation/HTFile.c | |
parent | 3aee60ca50a415525b4719cc30cf66fcff069775 (diff) | |
download | lynx-snapshots-a93eca0b83e4d890c28d271eb3293f08666c613e.tar.gz |
snapshot of project "lynx", label v2-7-1ac_0-46
Diffstat (limited to 'WWW/Library/Implementation/HTFile.c')
-rw-r--r-- | WWW/Library/Implementation/HTFile.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/WWW/Library/Implementation/HTFile.c b/WWW/Library/Implementation/HTFile.c index 60c71e9a..99f0cc41 100644 --- a/WWW/Library/Implementation/HTFile.c +++ b/WWW/Library/Implementation/HTFile.c @@ -446,6 +446,8 @@ PRIVATE void do_readme ARGS2(HTStructured *, target, CONST char *, localname) FILE * fp; char * readme_file_name = malloc(strlen(localname)+ 1 + strlen(HT_DIR_README_FILE) + 1); + if (readme_file_name == NULL) + outofmem(__FILE__, "do_readme"); strcpy(readme_file_name, localname); strcat(readme_file_name, "/"); strcat(readme_file_name, HT_DIR_README_FILE); @@ -1413,6 +1415,7 @@ PUBLIC int HTLoadFile ARGS4( char * nodename = NULL; char * newname = NULL; /* Simplified name of file */ HTAtom * encoding; /* @@ not used yet */ + int status; #ifdef VMS struct stat stat_info; #else @@ -1489,6 +1492,8 @@ PUBLIC int HTLoadFile ARGS4( char * enable_file_name = malloc(strlen(filename)+ 1 + strlen(HT_DIR_ENABLE_FILE) + 1); + if (enable_file_name == NULL) + outofmem(__FILE__, "HTLoadFile"); strcpy(enable_file_name, filename); strcat(enable_file_name, "/"); strcat(enable_file_name, HT_DIR_ENABLE_FILE); @@ -1593,7 +1598,7 @@ PUBLIC int HTLoadFile ARGS4( FREE(nodename); status = HTParseFile(format, format_out, anchor, fp, sink); fclose(fp); - return status; + return status; } /* If successfull open */ FREE(filename); } @@ -1756,6 +1761,8 @@ forget_multi: char * enable_file_name = malloc(strlen(localname)+ 1 + strlen(HT_DIR_ENABLE_FILE) + 1); + if (enable_file_name == NULL) + outofmem(__FILE__, "HTLoadFile"); strcpy(enable_file_name, localname); strcat(enable_file_name, "/"); strcat(enable_file_name, HT_DIR_ENABLE_FILE); |