diff options
author | james <> | 2008-03-07 14:17:01 +0000 |
---|---|---|
committer | james <> | 2008-03-07 14:17:01 +0000 |
commit | aff494fd2b799a5a06bdbac86e5ddfa7a20b74de (patch) | |
tree | bf2d3697795139ca335f4918b95464c2c9361cfc /src/util.c | |
parent | 79ba927ea0d883d505f6f7aa5aed6f7fa902d19d (diff) | |
download | sympathy-aff494fd2b799a5a06bdbac86e5ddfa7a20b74de.tar.gz sympathy-aff494fd2b799a5a06bdbac86e5ddfa7a20b74de.tar.bz2 sympathy-aff494fd2b799a5a06bdbac86e5ddfa7a20b74de.zip |
*** empty log message ***
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 44 |
1 files changed, 28 insertions, 16 deletions
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$"; /* * $Log$ + * Revision 1.11 2008/03/07 14:13:40 james + * *** empty log message *** + * * Revision 1.10 2008/03/07 13:16:02 james * *** empty log message *** * @@ -170,28 +173,37 @@ fput_cp (FILE * f, uint32_t ch) return fwrite (buf, i, 1, f); } -void crash_out(char *why) +void +crash_out (char *why) { -terminal_atexit(); -fprintf(stderr,"sympathy is aborting: %s\n",why ? why:""); -exit(1); + terminal_atexit (); + fprintf (stderr, "sympathy is aborting: %s\n", why ? why : ""); + exit (1); } -void *xmalloc(size_t s) +void * +xmalloc (size_t s) { -void *ret=malloc(s); -if (!ret) crash_out("malloc failed"); -return ret; + void *ret = malloc (s); + if (!ret) + crash_out ("malloc failed"); + return ret; } -void *xrealloc(void *p,size_t s) + +void * +xrealloc (void *p, size_t s) { -p=realloc(p,s); -if (!p) crash_out("realloc failed"); -return p; + p = realloc (p, s); + if (!p) + crash_out ("realloc failed"); + return p; } -char *xstrdup(const char *s) + +char * +xstrdup (const char *s) { -char *ret=strdup(s); -if (!ret) crash_out("strdup failed"); -return ret; + char *ret = strdup (s); + if (!ret) + crash_out ("strdup failed"); + return ret; } |