From 64571368dc19219fc1ef9b6c20034ee143cbed0d Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 18 Nov 2015 13:06:54 +0000 Subject: Sync the entire xmalloc.[ch] with the other users, but with the addition of xrealloc, xvasprintf, xvsnprintf. --- tmux.h | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index b81bbfcd..421f2369 100644 --- a/tmux.h +++ b/tmux.h @@ -45,6 +45,8 @@ struct session; struct tmuxpeer; struct tmuxproc; +#include "xmalloc.h" + /* Default global configuration file. */ #define TMUX_CONF "/etc/tmux.conf" @@ -67,10 +69,6 @@ struct tmuxproc; #define READ_BACKOFF 512 #define READ_TIME 100 -/* Fatal errors. */ -#define fatal(msg) log_fatal("%s: %s", __func__, msg); -#define fatalx(msg) log_fatalx("%s: %s", __func__, msg); - /* Definition to shut gcc up about unused arguments. */ #define unused __attribute__ ((unused)) @@ -2214,19 +2212,8 @@ char *get_proc_name(int, char *); void log_open(const char *); void log_close(void); void printflike(1, 2) log_debug(const char *, ...); -__dead void printflike(1, 2) log_fatal(const char *, ...); -__dead void printflike(1, 2) log_fatalx(const char *, ...); - -/* xmalloc.c */ -char *xstrdup(const char *); -void *xcalloc(size_t, size_t); -void *xmalloc(size_t); -void *xrealloc(void *, size_t); -void *xreallocarray(void *, size_t, size_t); -int printflike(2, 3) xasprintf(char **, const char *, ...); -int xvasprintf(char **, const char *, va_list); -int printflike(3, 4) xsnprintf(char *, size_t, const char *, ...); -int xvsnprintf(char *, size_t, const char *, va_list); +__dead void printflike(1, 2) fatal(const char *, ...); +__dead void printflike(1, 2) fatalx(const char *, ...); /* style.c */ int style_parse(const struct grid_cell *, -- cgit