From fa591538beda05e6ce89323128705beabe4f543f Mon Sep 17 00:00:00 2001 From: Philipp Takacs Date: Sat, 17 Jan 2015 23:46:30 +0100 Subject: [PATCH] remove done finaly removed the used of done in sbr and the dafinition in the header. Also the source file is removed. --- h/mh.h | 2 -- sbr/Makefile.in | 2 +- sbr/done.c | 11 ----------- sbr/error.c | 2 +- sbr/m_draft.c | 4 ++-- 5 files changed, 4 insertions(+), 17 deletions(-) delete mode 100644 sbr/done.c diff --git a/h/mh.h b/h/mh.h index 9d22c2b..6b8f4a9 100644 --- a/h/mh.h +++ b/h/mh.h @@ -268,6 +268,4 @@ extern char *version_num; extern char *version_str; extern char *whatnowproc; -extern void (*done) (int) NORETURN; - #include diff --git a/sbr/Makefile.in b/sbr/Makefile.in index 9729346..e5d8ffd 100644 --- a/sbr/Makefile.in +++ b/sbr/Makefile.in @@ -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 \ - 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 \ diff --git a/sbr/done.c b/sbr/done.c deleted file mode 100644 index 3545d10..0000000 --- a/sbr/done.c +++ /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 - -void (*done) (int) NORETURN = exit; diff --git a/sbr/error.c b/sbr/error.c index d8313ce..599b91d 100644 --- a/sbr/error.c +++ b/sbr/error.c @@ -35,7 +35,7 @@ adios(char *what, char *fmt, ...) va_start(ap, fmt); advertise(what, NULL, fmt, ap); va_end(ap); - done(1); + exit(1); } diff --git a/sbr/m_draft.c b/sbr/m_draft.c index 3659ff3..e97dd1e 100644 --- a/sbr/m_draft.c +++ b/sbr/m_draft.c @@ -23,7 +23,7 @@ m_draft(char *which) 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); } @@ -51,7 +51,7 @@ m_draft(char *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, -- 1.7.10.4