comparison lib-src/etags.c @ 30231:5b3608e3adaf

(xmalloc, xrealloc): Make externally visible, for use by alloca.o.
author Gerd Moellmann <gerd@gnu.org>
date Fri, 14 Jul 2000 17:59:42 +0000
parents 75826102199c
children 1ccc2bce4062
comparison
equal deleted inserted replaced
30230:9828723e6f50 30231:5b3608e3adaf
306 static char *absolute_filename P_((char *, char *)); 306 static char *absolute_filename P_((char *, char *));
307 static char *absolute_dirname P_((char *, char *)); 307 static char *absolute_dirname P_((char *, char *));
308 static bool filename_is_absolute P_((char *f)); 308 static bool filename_is_absolute P_((char *f));
309 static void canonicalize_filename P_((char *)); 309 static void canonicalize_filename P_((char *));
310 static void grow_linebuffer P_((linebuffer *, int)); 310 static void grow_linebuffer P_((linebuffer *, int));
311 static long *xmalloc P_((unsigned int)); 311 long *xmalloc P_((unsigned int));
312 static long *xrealloc P_((char *, unsigned int)); 312 long *xrealloc P_((char *, unsigned int));
313 313
314 314
315 char searchar = '/'; /* use /.../ searches */ 315 char searchar = '/'; /* use /.../ searches */
316 316
317 char *tagfile; /* output file */ 317 char *tagfile; /* output file */
5506 lbp->size *= 2; 5506 lbp->size *= 2;
5507 lbp->buffer = xrnew (lbp->buffer, lbp->size, char); 5507 lbp->buffer = xrnew (lbp->buffer, lbp->size, char);
5508 } 5508 }
5509 5509
5510 /* Like malloc but get fatal error if memory is exhausted. */ 5510 /* Like malloc but get fatal error if memory is exhausted. */
5511 static long * 5511 long *
5512 xmalloc (size) 5512 xmalloc (size)
5513 unsigned int size; 5513 unsigned int size;
5514 { 5514 {
5515 long *result = (long *) malloc (size); 5515 long *result = (long *) malloc (size);
5516 if (result == NULL) 5516 if (result == NULL)
5517 fatal ("virtual memory exhausted", (char *)NULL); 5517 fatal ("virtual memory exhausted", (char *)NULL);
5518 return result; 5518 return result;
5519 } 5519 }
5520 5520
5521 static long * 5521 long *
5522 xrealloc (ptr, size) 5522 xrealloc (ptr, size)
5523 char *ptr; 5523 char *ptr;
5524 unsigned int size; 5524 unsigned int size;
5525 { 5525 {
5526 long *result = (long *) realloc (ptr, size); 5526 long *result = (long *) realloc (ptr, size);