remove done finaly
authorPhilipp Takacs <philipp@bureaucracy.de>
Sat, 17 Jan 2015 22:46:30 +0000 (23:46 +0100)
committerPhilipp Takacs <philipp@bureaucracy.de>
Sat, 17 Jan 2015 23:49:51 +0000 (00:49 +0100)
removed the used of done in sbr and the dafinition
in the header. Also the source file is removed.

h/mh.h
sbr/Makefile.in
sbr/done.c [deleted file]
sbr/error.c
sbr/m_draft.c

diff --git a/h/mh.h b/h/mh.h
index 9d22c2b..6b8f4a9 100644 (file)
--- a/h/mh.h
+++ b/h/mh.h
@@ -268,6 +268,4 @@ extern char *version_num;
 extern char *version_str;
 extern char *whatnowproc;
 
 extern char *version_str;
 extern char *whatnowproc;
 
-extern void (*done) (int) NORETURN;
-
 #include <h/prototypes.h>
 #include <h/prototypes.h>
index 9729346..e5d8ffd 100644 (file)
@@ -50,7 +50,7 @@ SRCS = addrsbr.c ambigsw.c brkstring.c  \
        context_find.c context_read.c  \
        context_replace.c context_save.c \
        cpydata.c cpydgst.c crawl_folders.c  \
        context_find.c context_read.c  \
        context_replace.c context_save.c \
        cpydata.c cpydgst.c crawl_folders.c  \
-       discard.c done.c dtime.c dtimep.c  \
+       discard.c dtime.c dtimep.c  \
        error.c execprog.c ext_hook.c folder_addmsg.c folder_delmsgs.c  \
        folder_free.c folder_read.c  \
        folder_realloc.c gans.c getans.c getanswer.c  \
        error.c execprog.c ext_hook.c folder_addmsg.c folder_delmsgs.c  \
        folder_free.c folder_read.c  \
        folder_realloc.c gans.c getans.c getanswer.c  \
diff --git a/sbr/done.c b/sbr/done.c
deleted file mode 100644 (file)
index 3545d10..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-/*
-** done.c -- terminate the program
-**
-** This code is Copyright (c) 2002, by the authors of nmh.  See the
-** COPYRIGHT file in the root directory of the nmh distribution for
-** complete copyright information.
-*/
-
-#include <h/mh.h>
-
-void (*done) (int) NORETURN = exit;
index d8313ce..599b91d 100644 (file)
@@ -35,7 +35,7 @@ adios(char *what, char *fmt, ...)
        va_start(ap, fmt);
        advertise(what, NULL, fmt, ap);
        va_end(ap);
        va_start(ap, fmt);
        advertise(what, NULL, fmt, ap);
        va_end(ap);
-       done(1);
+       exit(1);
 }
 
 
 }
 
 
index 3659ff3..e97dd1e 100644 (file)
@@ -23,7 +23,7 @@ m_draft(char *which)
        char *folder;
 
        folder = getcpy(toabsdir(draftfolder));
        char *folder;
 
        folder = getcpy(toabsdir(draftfolder));
-       create_folder(folder, 0, done);
+       create_folder(folder, 0, exit);
        if (!(mp = folder_read(folder))) {
                adios(NULL, "unable to read folder %s", folder);
        }
        if (!(mp = folder_read(folder))) {
                adios(NULL, "unable to read folder %s", folder);
        }
@@ -51,7 +51,7 @@ m_draft(char *which)
        ** (to start a new draft).
        */
        if (!m_convert(mp, which))
        ** (to start a new draft).
        */
        if (!m_convert(mp, which))
-               done(1);
+               exit(1);
        seq_setprev(mp);
 
        snprintf(buffer, sizeof(buffer), "%s/%s", mp->foldpath,
        seq_setprev(mp);
 
        snprintf(buffer, sizeof(buffer), "%s/%s", mp->foldpath,