remove old lib.[hc]
authorPierre Habouzit <madcoder@debian.org>
Mon, 9 Apr 2007 23:15:43 +0000 (01:15 +0200)
committerPierre Habouzit <madcoder@debian.org>
Mon, 9 Apr 2007 23:15:43 +0000 (01:15 +0200)
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Makefile.am
crypt.c
handler.c
lib-sys/mutt_socket.h
lib.c [deleted file]
lib.h [deleted file]
main.c
protos.h

index afcc023..7cbb665 100644 (file)
@@ -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 \
 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
        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 \
        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
        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 (file)
--- a/crypt.c
+++ b/crypt.c
@@ -22,7 +22,6 @@
 #include <lib-mx/mx.h>
 
 #include "crypt.h"
 #include <lib-mx/mx.h>
 
 #include "crypt.h"
-#include "lib.h"
 #include "alias.h"
 #include "handler.h"
 #include "copy.h"
 #include "alias.h"
 #include "handler.h"
 #include "copy.h"
index 28739c1..da10849 100644 (file)
--- a/handler.c
+++ b/handler.c
@@ -25,8 +25,6 @@
 #include "crypt.h"
 #include "state.h"
 #include "attach.h"
 #include "crypt.h"
 #include "state.h"
 #include "attach.h"
-#include "lib.h"
-
 
 typedef int handler_f (BODY *, STATE *);
 typedef handler_f *handler_t;
 
 typedef int handler_f (BODY *, STATE *);
 typedef handler_f *handler_t;
index 25ad7c0..0d3daf3 100644 (file)
@@ -12,7 +12,7 @@
 #define _MUTT_SOCKET_H_ 1
 
 #include "account.h"
 #define _MUTT_SOCKET_H_ 1
 
 #include "account.h"
-#include "lib.h"
+#include "mutt.h"
 
 /* logging levels */
 #define M_SOCK_LOG_CMD  2
 
 /* logging levels */
 #define M_SOCK_LOG_CMD  2
diff --git a/lib.c b/lib.c
deleted file mode 100644 (file)
index 2bc65ce..0000000
--- a/lib.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright notice from original mutt:
- * Copyright (C) 1996-2000 Michael R. Elkins <me@mutt.org>
- * Copyright (C) 1999-2000 Thomas Roessler <roessler@does-not-exist.org>
- *
- * 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 <lib-lib/lib-lib.h>
-
-#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 (file)
index 247a1f3..0000000
--- a/lib.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Copyright notice from original mutt:
- * Copyright (C) 1996-2000 Michael R. Elkins <me@mutt.org>
- * Copyright (C) 1999-2000 Thomas Roessler <roessler@does-not-exist.org>
- *
- * 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 (file)
--- a/main.c
+++ b/main.c
@@ -397,6 +397,17 @@ static void start_curses (void)
 #define M_NEWS    (1<<5)        /* -g and -G */
 #endif
 
 #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] = "";
 int main (int argc, char **argv)
 {
   char folder[_POSIX_PATH_MAX] = "";
@@ -435,8 +446,7 @@ int main (int argc, char **argv)
 
   setlocale (LC_CTYPE, "");
 
 
   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);
 
   srand48 (time (NULL));
   umask (077);
 
index 376128f..57a0446 100644 (file)
--- 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));
 /* 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 != '#')
 
 
 #define MoreArgs(p) (*p->dptr && *p->dptr != ';' && *p->dptr != '#')