From 1d2617e5d89468db7cd1b93fd2b31af73cd7c8ff Mon Sep 17 00:00:00 2001 From: Pierre Habouzit Date: Tue, 10 Apr 2007 01:15:43 +0200 Subject: [PATCH] remove old lib.[hc] Signed-off-by: Pierre Habouzit --- Makefile.am | 4 ++-- crypt.c | 1 - handler.c | 2 -- lib-sys/mutt_socket.h | 2 +- lib.c | 23 ----------------------- lib.h | 18 ------------------ main.c | 14 ++++++++++++-- protos.h | 1 + 8 files changed, 16 insertions(+), 49 deletions(-) delete mode 100644 lib.c delete mode 100644 lib.h diff --git a/Makefile.am b/Makefile.am index afcc023..7cbb665 100644 --- a/Makefile.am +++ b/Makefile.am @@ -18,7 +18,7 @@ DISTCLEANFILES = $(BUILT_SOURCES) bin_PROGRAMS = madmutt madmutt_dotlock smime_keysng madmutt_SOURCES = $(BUILT_SOURCES) \ alias.c attach.c base64.c browser.c buffy.c charset.c commands.c \ - compose.c copy.c crypt.c editmsg.c init.c keymap.c lib.c \ + compose.c copy.c crypt.c editmsg.c init.c keymap.c \ flags.c from.c handler.c headers.c help.c hook.c \ main.c muttlib.c mutt_idna.c pager.c pattern.c postpone.c recvattach.c recvcmd.c \ score.c send.c sendlib.c sort.c state.c thread.c account.c remailer.c @@ -76,7 +76,7 @@ EXTRA_DIST = config.rpath COPYRIGHT GPL OPS TODO \ recvattach.h handler.h thread.h globals.h init.h keymap.h \ mime.h mutt.h mutt_sasl.h pager.h protos.h \ sort.h autogen.sh remailer.c remailer.h browser.h state.h \ - lib.h smime_keys.pl Madmuttrc.head Madmuttrc \ + smime_keys.pl Madmuttrc.head Madmuttrc \ makedoc.c stamp-doc-rc README.SSL depcomp mutt_idna.h mutt_libesmtp.h madmutt_dotlock_SOURCES = dotlock.c diff --git a/crypt.c b/crypt.c index b9a5122..e137f2c 100644 --- a/crypt.c +++ b/crypt.c @@ -22,7 +22,6 @@ #include #include "crypt.h" -#include "lib.h" #include "alias.h" #include "handler.h" #include "copy.h" diff --git a/handler.c b/handler.c index 28739c1..da10849 100644 --- a/handler.c +++ b/handler.c @@ -25,8 +25,6 @@ #include "crypt.h" #include "state.h" #include "attach.h" -#include "lib.h" - typedef int handler_f (BODY *, STATE *); typedef handler_f *handler_t; diff --git a/lib-sys/mutt_socket.h b/lib-sys/mutt_socket.h index 25ad7c0..0d3daf3 100644 --- a/lib-sys/mutt_socket.h +++ b/lib-sys/mutt_socket.h @@ -12,7 +12,7 @@ #define _MUTT_SOCKET_H_ 1 #include "account.h" -#include "lib.h" +#include "mutt.h" /* logging levels */ #define M_SOCK_LOG_CMD 2 diff --git a/lib.c b/lib.c deleted file mode 100644 index 2bc65ce..0000000 --- a/lib.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright notice from original mutt: - * Copyright (C) 1996-2000 Michael R. Elkins - * Copyright (C) 1999-2000 Thomas Roessler - * - * This file is part of mutt-ng, see http://www.muttng.org/. - * It's licensed under the GNU General Public License, - * please see the file GPL in the top level source directory. - */ - -#include - -#include "lib.h" - -void mutt_nocurses_error (const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - vfprintf(stderr, fmt, ap); - va_end(ap); - fputc('\n', stderr); -} diff --git a/lib.h b/lib.h deleted file mode 100644 index 247a1f3..0000000 --- a/lib.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright notice from original mutt: - * Copyright (C) 1996-2000 Michael R. Elkins - * Copyright (C) 1999-2000 Thomas Roessler - * - * This file is part of mutt-ng, see http://www.muttng.org/. - * It's licensed under the GNU General Public License, - * please see the file GPL in the top level source directory. - */ - -#ifndef _LIB_H -# define _LIB_H - -void mutt_exit (int); -void mutt_nocurses_error(const char *, ...) - __attribute__((format(printf, 1, 2))); - -#endif diff --git a/main.c b/main.c index 4a1fe59..eecea74 100644 --- a/main.c +++ b/main.c @@ -397,6 +397,17 @@ static void start_curses (void) #define M_NEWS (1<<5) /* -g and -G */ #endif +__attribute__((format(printf, 1, 0))) +static void mutt_nocurses_error (const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + vfprintf(stderr, fmt, ap); + va_end(ap); + fputc('\n', stderr); +} + int main (int argc, char **argv) { char folder[_POSIX_PATH_MAX] = ""; @@ -435,8 +446,7 @@ int main (int argc, char **argv) setlocale (LC_CTYPE, ""); - mutt_error = mutt_nocurses_error; - mutt_message = mutt_nocurses_error; + mutt_error = mutt_message = mutt_nocurses_error; srand48 (time (NULL)); umask (077); diff --git a/protos.h b/protos.h index 376128f..57a0446 100644 --- a/protos.h +++ b/protos.h @@ -11,6 +11,7 @@ /* use the m_temp{fd,file} functions instead */ void mutt_adv_mktemp (const char*, char*, ssize_t) __attribute__((deprecated)); void mutt_mktemp (char *) __attribute__((deprecated)); +void mutt_exit (int); #define MoreArgs(p) (*p->dptr && *p->dptr != ';' && *p->dptr != '#') -- 2.20.1