comparison src/util.c @ 298:96a35a4245f3

reading files implemented
author lost
date Wed, 21 Jan 2009 03:15:49 +0000
parents 14d835cf02d9
children 48945dac8178
comparison
equal deleted inserted replaced
297:c52ad3135bd3 298:96a35a4245f3
71 71
72 char *lw_strdup(const char *s) 72 char *lw_strdup(const char *s)
73 { 73 {
74 char *d; 74 char *d;
75 75
76 if (!s)
77 return NULL;
78
76 d = strdup(s); 79 d = strdup(s);
77 if (!d) 80 if (!d)
78 { 81 {
79 fprintf(stderr, "lw_strdup(): memory allocation error\n"); 82 fprintf(stderr, "lw_strdup(): memory allocation error\n");
80 exit(1); 83 exit(1);