Changeset 21929 for trunk/tools
- Timestamp:
- Dec 29, 2011, 5:11:20 PM (14 years ago)
- Location:
- trunk/tools/wrc
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/wrc/utils.c
r21551 r21929 237 237 #endif 238 238 return strcpy(s, str); 239 } 240 241 char *xtempnam(const char *dir, const char *prefix) 242 { 243 char *res = tempnam(dir, prefix); 244 if (!res) 245 { 246 fprintf (stderr, "Virtual memory exhausted.\n"); 247 exit (1); 248 } 249 return res; 239 250 } 240 251 -
trunk/tools/wrc/utils.h
r8596 r21929 26 26 void *xrealloc(void *, size_t); 27 27 char *xstrdup(const char *str); 28 char *xtempnam(const char *dir, const char *prefix); 28 29 #endif 29 30 -
trunk/tools/wrc/wrc.c
r21916 r21929 645 645 else 646 646 { 647 if(!(temp_name = tmpnam(NULL))) 648 error("Could nor generate a temp-name\n"); 649 temp_name = xstrdup(temp_name); 647 temp_name = xtempnam(NULL, NULL); 650 648 if(!(ppout = fopen(temp_name, "wb"))) 651 649 error("Could not create a temp-file\n");
Note:
See TracChangeset
for help on using the changeset viewer.