summaryrefslogtreecommitdiff
path: root/src/sbuf.c
diff options
context:
space:
mode:
authorrcyeske <rcyeske>2001-03-02 06:06:23 +0000
committerrcyeske <rcyeske>2001-03-02 06:06:23 +0000
commit46d33884f2f1061ae1a77c26928f97d573e57c6c (patch)
tree39c8a9fe54a29d761a797cc9124f945ded2ecc3c /src/sbuf.c
parent58e95be4eab6d82257214d76414c9eef901c5915 (diff)
downloadratpoison-46d33884f2f1061ae1a77c26928f97d573e57c6c.zip
* ratpoison.h (xmalloc, xrealloc, fatal): Prototype.
* main.c (xmalloc): Move here from sbuf.c. (xrealloc): Likewise. (fatal): Likewise. * number.c (find_empty_cell): Use xrealloc, remove error check. (init_numbers): Likewise. * manage.c (get_window_name): Likewise. * main.c (main): Likewise. * list.c (add_to_window_list): Likewise. (add_to_window_list): Likewise. * events.c (handle_key): Likewise. * input.c (keysym_to_string): Likewise. (get_more_input): Use xrealloc, remove error check. * main.c (read_rc_file): Take a file pointer rather than a filename. (read_startup_files): If ~/.ratpoisonrc is not readable try /etc/ratpoisonrc.
Diffstat (limited to 'src/sbuf.c')
-rw-r--r--src/sbuf.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/sbuf.c b/src/sbuf.c
index 2bc2d03..bd77d7c 100644
--- a/src/sbuf.c
+++ b/src/sbuf.c
@@ -22,37 +22,6 @@
#include "ratpoison.h"
#include "sbuf.h"
-/* ------------------------------------ move to separate file */
-#include <stdlib.h>
-#include <stdio.h>
-
-void
-fatal (const char *msg)
-{
- fprintf (stderr, "%s", msg);
- abort ();
-}
-
-void *
-xmalloc (size_t size)
-{
- register void *value = malloc (size);
- if (value == 0)
- fatal ("virtual memory exhausted");
- return value;
-}
-
-void *
-xrealloc (void *ptr, size_t size)
-{
- register void *value = realloc (ptr, size);
- if (value == 0)
- fatal ("Virtual memory exhausted");
- PRINT_DEBUG("realloc: %d\n", size);
- return value;
-}
-/*------------------------------------------------------------*/
-
struct sbuf *
sbuf_new (size_t initsz)
{