- Timestamp:
- Feb 11, 2011, 4:31:33 PM (13 years ago)
- Branches:
- master, release-1.10, release-1.8, release-1.9
- Children:
- 35b6eb9
- Parents:
- 9518a85
- git-author:
- Anders Kaseorg <andersk@mit.edu> (08/27/09 00:51:45)
- git-committer:
- Anders Kaseorg <andersk@mit.edu> (02/11/11 16:31:33)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
util.c
r6965867 r96828e4 41 41 struct passwd *pw; 42 42 43 out= owl_malloc(MAXPATHLEN+1);43 out=g_new(char, MAXPATHLEN+1); 44 44 out[0]='\0'; 45 45 j=strlen(in); … … 294 294 /* hooks for doing memory allocation et. al. in owl */ 295 295 296 void *owl_malloc(size_t size)297 {298 return(g_malloc(size));299 }300 301 296 void owl_free(void *ptr) 302 297 { … … 593 588 if (g_utf8_validate(in, -1, NULL)) { 594 589 const char *s, *p; 595 r = owl_malloc(strlen(in)+1);590 r = g_new(char, strlen(in)+1); 596 591 r[0] = '\0'; 597 592 s = in; … … 718 713 /* Read a line from fp, allocating memory to hold it, returning the number of 719 714 * byte read. *s should either be NULL or a pointer to memory allocated with 720 * owl_malloc; it will be owl_realloc'd as appropriate. The caller must715 * g_malloc; it will be owl_realloc'd as appropriate. The caller must 721 716 * eventually free it. (This is roughly the interface of getline in the gnu 722 717 * libc).
Note: See TracChangeset
for help on using the changeset viewer.