From 9f9bfa91d88b3ca4cd9206c1f2b17c6d13ebcaba Mon Sep 17 00:00:00 2001 From: markus schnalke Date: Wed, 25 Jan 2012 22:00:58 +0100 Subject: [PATCH] Removed several `#if 0' fragments. We better don't carry dead code with us, it might start smelling. --- sbr/dtime.c | 14 -------------- sbr/lock_file.c | 17 ----------------- sbr/m_getfld.c | 4 ---- uip/ali.c | 5 ----- uip/burst.c | 7 ------- uip/mhbuildsbr.c | 5 ----- uip/scan.c | 14 +------------- uip/scansbr.c | 6 ------ uip/whatnowsbr.c | 11 ----------- 9 files changed, 1 insertion(+), 82 deletions(-) diff --git a/sbr/dtime.c b/sbr/dtime.c index 737f998..b427dfd 100644 --- a/sbr/dtime.c +++ b/sbr/dtime.c @@ -478,20 +478,6 @@ void twscopy(struct tws *tb, struct tws *tw) { *tb = *tw; /* struct copy */ - -#if 0 - tb->tw_sec = tw->tw_sec; - tb->tw_min = tw->tw_min; - tb->tw_hour = tw->tw_hour; - tb->tw_mday = tw->tw_mday; - tb->tw_mon = tw->tw_mon; - tb->tw_year = tw->tw_year; - tb->tw_wday = tw->tw_wday; - tb->tw_yday = tw->tw_yday; - tb->tw_zone = tw->tw_zone; - tb->tw_clock = tw->tw_clock; - tb->tw_flags = tw->tw_flags; -#endif } diff --git a/sbr/lock_file.c b/sbr/lock_file.c index 34d743e..e065c93 100644 --- a/sbr/lock_file.c +++ b/sbr/lock_file.c @@ -479,10 +479,6 @@ lockname(char *file, struct lockinfo *li, int isnewlock) int bplen, tmplen; char *bp, *cp; -#if 0 - struct stat st; -#endif - if ((cp = strrchr(file, '/')) == NULL || *++cp == 0) cp = file; @@ -502,19 +498,6 @@ lockname(char *file, struct lockinfo *li, int isnewlock) } #endif -#if 0 - /* - ** mmdf style dot locking. Currently not supported. - ** If we start supporting mmdf style dot locking, - ** we will need to change the return value of lockname - */ - if (stat(file, &st) == -1) - return -1; - - snprintf(bp, sizeof(li->curlock) - bplen, "LCK%05d.%05d", - st.st_dev, st.st_ino); -#endif - snprintf(bp, sizeof(li->curlock) - bplen, "%s.lock", cp); #if !defined(HAVE_LIBLOCKFILE) diff --git a/sbr/m_getfld.c b/sbr/m_getfld.c index 1ff8e32..8fd8364 100644 --- a/sbr/m_getfld.c +++ b/sbr/m_getfld.c @@ -724,10 +724,6 @@ m_Eom(int c, FILE *iob) */ return 1; -#if 0 - fseek(iob, pos, SEEK_SET); -#endif - fseek(iob, (long)(pos-1), SEEK_SET); getc(iob); /* should be OK */ return 0; diff --git a/uip/ali.c b/uip/ali.c index e07c847..3d450d7 100644 --- a/uip/ali.c +++ b/uip/ali.c @@ -244,12 +244,7 @@ print_usr(char *s, int list, int norm) } mnfree(mp); -#if 0 - printf("%s: ", s); - print_aka(vp ? vp : s, list, pos += strlen(s) + 1); -#else print_aka(vp ? vp : s, list, 0); -#endif if (vp) free(vp); diff --git a/uip/burst.c b/uip/burst.c index 4c50485..725abec 100644 --- a/uip/burst.c +++ b/uip/burst.c @@ -229,13 +229,6 @@ find_delim(int msgnum, struct smsg *smsgs) smsgs[msgp++].s_stop = (c == '\n' && wasdlm) ? pos - 1 : pos; if (feof(in)) { -#if 0 - if (wasdlm) { - smsgs[msgp - 1].s_stop -= - ((long) strlen(buffer) + 1); - msgp++; /* fake "End of XXX Digest" */ - } -#endif break; } pos += (long) strlen(buffer); diff --git a/uip/mhbuildsbr.c b/uip/mhbuildsbr.c index f65b6e3..4358606 100644 --- a/uip/mhbuildsbr.c +++ b/uip/mhbuildsbr.c @@ -1562,11 +1562,6 @@ skip_headers: switch (ct->c_encoding) { case CE_7BIT: /* Nothing to output */ -#if 0 - np = getcpy(ENCODING_FIELD); - vp = concat(" ", "7bit", "\n", NULL); - add_header(ct, np, vp); -#endif break; case CE_8BIT: diff --git a/uip/scan.c b/uip/scan.c index 478e4a6..f3e5a4f 100644 --- a/uip/scan.c +++ b/uip/scan.c @@ -262,15 +262,7 @@ main(int argc, char **argv) msgnum += (revflag ? -1 : 1)) { if (is_selected(mp, msgnum)) { if ((in = fopen(cp = m_name(msgnum), "r")) == NULL) { -#if 0 - if (errno != EACCES) -#endif - admonish(cp, "unable to open message"); -#if 0 - else - printf("%*d unreadable\n", - DMAXFOLDER, msgnum); -#endif + admonish(cp, "unable to open message"); continue; } @@ -304,11 +296,7 @@ main(int argc, char **argv) adios(NULL, "scan() botch(%d)", state); case SCNEOF: -#if 0 - printf("%*d empty\n", DMAXFOLDER, msgnum); -#else advise(NULL, "message %d: empty", msgnum); -#endif break; } hdrflag = 0; diff --git a/uip/scansbr.c b/uip/scansbr.c index 6eca931..8e02e57 100644 --- a/uip/scansbr.c +++ b/uip/scansbr.c @@ -348,12 +348,6 @@ finished: fmt_scan(fmt, scanl, slwidth, dat); -#if 0 - fmt = fmt_scan(fmt, scanl, slwidth, dat); - if (!fmt) - fmt = fmt_top; /* reset for old format files */ -#endif - if (bodycomp) bodycomp->c_text = saved_c_text; diff --git a/uip/whatnowsbr.c b/uip/whatnowsbr.c index e958ef3..4e93a1a 100644 --- a/uip/whatnowsbr.c +++ b/uip/whatnowsbr.c @@ -608,9 +608,6 @@ editfile(char **ed, char **arg, char *file, int use, struct msgs *mp, #ifdef HAVE_LSTAT int slinked = 0; -#if 0 - int oumask; /* PJS: for setting permissions on symlinks. */ -#endif #endif /* HAVE_LSTAT */ /* Was there a previous edit session? */ @@ -648,15 +645,7 @@ editfile(char **ed, char **arg, char *file, int use, struct msgs *mp, unlink(linkpath); #ifdef HAVE_LSTAT if (link(altpath, linkpath) == NOTOK) { -#if 0 - /* I don't think permission on symlinks matters /JLR */ - /* PJS: else symlinks are world 'r' */ - oumask = umask(0044); -#endif symlink(altpath, linkpath); -#if 0 - umask(oumask); /* PJS: else symlinks are world 'r' */ -#endif slinked = 1; } else { slinked = 0; -- 1.7.10.4