Mercurial > emacs
comparison lib-src/fakemail.c @ 72034:ca1a855f01ae
(fatal): Drop second parameter and treat first
parameter as a plain string. Callers changed.
author | Andreas Schwab <schwab@suse.de> |
---|---|
date | Thu, 20 Jul 2006 13:33:48 +0000 |
parents | 8e7233f487a3 |
children | 6d19c76d81c5 858cb33ae39d |
comparison
equal
deleted
inserted
replaced
72033:a77b2ac7cfec | 72034:ca1a855f01ae |
---|---|
173 } | 173 } |
174 | 174 |
175 /* Print error message and exit. */ | 175 /* Print error message and exit. */ |
176 | 176 |
177 static void | 177 static void |
178 fatal (s1, s2) | 178 fatal (s1) |
179 char *s1, *s2; | 179 char *s1; |
180 { | 180 { |
181 error (s1, s2); | 181 error ("%s", s1); |
182 exit (EXIT_FAILURE); | 182 exit (EXIT_FAILURE); |
183 } | 183 } |
184 | 184 |
185 /* Like malloc but get fatal error if memory is exhausted. */ | 185 /* Like malloc but get fatal error if memory is exhausted. */ |
186 | 186 |
188 xmalloc (size) | 188 xmalloc (size) |
189 int size; | 189 int size; |
190 { | 190 { |
191 long *result = (long *) malloc (((unsigned) size)); | 191 long *result = (long *) malloc (((unsigned) size)); |
192 if (result == ((long *) NULL)) | 192 if (result == ((long *) NULL)) |
193 fatal ("virtual memory exhausted", 0); | 193 fatal ("virtual memory exhausted"); |
194 return result; | 194 return result; |
195 } | 195 } |
196 | 196 |
197 static long * | 197 static long * |
198 xrealloc (ptr, size) | 198 xrealloc (ptr, size) |
375 Don't use 'ctime', as that might dump core if the hardware clock | 375 Don't use 'ctime', as that might dump core if the hardware clock |
376 is set to a bizarre value. */ | 376 is set to a bizarre value. */ |
377 tm = localtime (&idiotic_interface); | 377 tm = localtime (&idiotic_interface); |
378 if (! (tm && TM_YEAR_IN_ASCTIME_RANGE (tm->tm_year) | 378 if (! (tm && TM_YEAR_IN_ASCTIME_RANGE (tm->tm_year) |
379 && (the_date = asctime (tm)))) | 379 && (the_date = asctime (tm)))) |
380 fatal ("current time is out of range", 0); | 380 fatal ("current time is out of range"); |
381 /* the_date has an unwanted newline at the end */ | 381 /* the_date has an unwanted newline at the end */ |
382 date_length = strlen (the_date) - 1; | 382 date_length = strlen (the_date) - 1; |
383 the_date[date_length] = '\0'; | 383 the_date[date_length] = '\0'; |
384 temp = cuserid ((char *) NULL); | 384 temp = cuserid ((char *) NULL); |
385 user_length = strlen (temp); | 385 user_length = strlen (temp); |