Remove unused code
authorJulien Danjou <julien@danjou.info>
Sun, 26 Nov 2006 19:26:57 +0000 (20:26 +0100)
committerPierre Habouzit <madcoder@debian.org>
Sun, 26 Nov 2006 21:06:56 +0000 (22:06 +0100)
Signed-off-by: Julien Danjou <julien@danjou.info>
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
17 files changed:
commands.c
compose.c
copy.c
imap/imap.c
init.c
lib-crypt/pgp.c
lib-crypt/pgplib.c
lib-crypt/smime.c
lib-mx/mh.c
lib-sys/mutt_ssl.c
lib-ui/curs_main.c
makedoc.c
mutt.h
nntp/newsrc.c
pager.c
pattern.c
recvattach.c

index d24ba0c..4a40dc9 100644 (file)
@@ -134,16 +134,6 @@ int mutt_display_message (HEADER * cur)
       mutt_wait_filter (filterpid);
       m_fclose(&fpfilterout);
     }
       mutt_wait_filter (filterpid);
       m_fclose(&fpfilterout);
     }
-#if 0
-    /* this is maybe just plain wrong but it makes the pager display
-     * what we have; i.e. for the crypto stuff we only get
-     * 'Could not copy message' for invalid passphrases, no PGP output
-     * not nothing; so just display what we have...
-     * - pdmef
-     */
-    mutt_unlink (tempfile);
-    return 0;
-#endif
   }
 
   if (fpfilterout != NULL && mutt_wait_filter (filterpid) != 0)
   }
 
   if (fpfilterout != NULL && mutt_wait_filter (filterpid) != 0)
index 8a8d0c5..a604ca0 100644 (file)
--- a/compose.c
+++ b/compose.c
@@ -1069,14 +1069,6 @@ int mutt_compose_menu (HEADER * msg,    /* structure for new message */
       idx[menu->current]->content->unlink =
         !idx[menu->current]->content->unlink;
 
       idx[menu->current]->content->unlink =
         !idx[menu->current]->content->unlink;
 
-#if 0
-      /* OPTRESOLVE is otherwise ignored on this menu.
-       * Where's the bug?
-       */
-
-      if (option (OPTRESOLVE) && menu->current + 1 < menu->max)
-        menu->current++;
-# endif
       menu->redraw = REDRAW_INDEX;
       /* No send2hook since this doesn't change the message. */
       break;
       menu->redraw = REDRAW_INDEX;
       /* No send2hook since this doesn't change the message. */
       break;
diff --git a/copy.c b/copy.c
index d386400..5e0b7db 100644 (file)
--- a/copy.c
+++ b/copy.c
@@ -239,11 +239,6 @@ mutt_copy_hdr (FILE* in, FILE* out, off_t off_start, off_t off_end,
   /* Now output the headers in order */
   for (x = 0; x < hdr_count; x++) {
     if (headers[x]) {
   /* Now output the headers in order */
   for (x = 0; x < hdr_count; x++) {
     if (headers[x]) {
-#if 0
-      if (flags & CH_DECODE)
-        rfc2047_decode (&headers[x]);
-#endif
-
       /* We couldn't do the prefixing when reading because RFC 2047
        * decoding may have concatenated lines.
        */
       /* We couldn't do the prefixing when reading because RFC 2047
        * decoding may have concatenated lines.
        */
index e5cf4bf..b390b45 100644 (file)
@@ -178,7 +178,6 @@ int imap_read_literal (FILE * fp, IMAP_DATA * idata, long bytes, progress_t* bar
       return -1;
     }
 
       return -1;
     }
 
-#if 1
     if (r == 1 && c != '\n')
       fputc ('\r', fp);
 
     if (r == 1 && c != '\n')
       fputc ('\r', fp);
 
@@ -188,7 +187,7 @@ int imap_read_literal (FILE * fp, IMAP_DATA * idata, long bytes, progress_t* bar
     }
     else
       r = 0;
     }
     else
       r = 0;
-#endif
+
     fputc (c, fp);
     if (bar && !(pos % 1024))
       mutt_progress_bar (bar, pos);
     fputc (c, fp);
     if (bar && !(pos % 1024))
       mutt_progress_bar (bar, pos);
diff --git a/init.c b/init.c
index 842b282..03150af 100644 (file)
--- a/init.c
+++ b/init.c
@@ -2597,18 +2597,8 @@ void mutt_init (int skip_sys_rc, string_list_t * commands)
   mutt_init_history ();
 
   if (!Muttrc) {
   mutt_init_history ();
 
   if (!Muttrc) {
-#if 0
-    snprintf (buffer, sizeof(buffer), "%s/.madmuttrc-%s", NONULL (Homedir),
-              MUTT_VERSION);
-    if (access (buffer, F_OK) == -1)
-#endif
       snprintf (buffer, sizeof(buffer), "%s/.madmuttrc", NONULL (Homedir));
     if (access (buffer, F_OK) == -1)
       snprintf (buffer, sizeof(buffer), "%s/.madmuttrc", NONULL (Homedir));
     if (access (buffer, F_OK) == -1)
-#if 0
-      snprintf (buffer, sizeof(buffer), "%s/.madmutt/madmuttrc-%s",
-                NONULL (Homedir), MUTT_VERSION);
-    if (access (buffer, F_OK) == -1)
-#endif
       snprintf (buffer, sizeof(buffer), "%s/.madmutt/madmuttrc",
                 NONULL (Homedir));
 
       snprintf (buffer, sizeof(buffer), "%s/.madmutt/madmuttrc",
                 NONULL (Homedir));
 
index e27fba7..3c3e0f7 100644 (file)
@@ -1426,11 +1426,6 @@ int pgp_send_menu (HEADER * msg, int *redraw)
 
       crypt_pgp_void_passphrase ();     /* probably need a different passphrase */
     }
 
       crypt_pgp_void_passphrase ();     /* probably need a different passphrase */
     }
-#if 0
-    else {
-      msg->security &= ~SIGN;
-    }
-#endif
 
     *redraw = REDRAW_FULL;
     break;
 
     *redraw = REDRAW_FULL;
     break;
index 9213016..5e6e821 100644 (file)
@@ -34,30 +34,6 @@ const char *pgp_pkalgbytype (unsigned char type)
   }
 }
 
   }
 }
 
-
-
-/* unused */
-
-#if 0
-
-static const char *hashalgbytype (unsigned char type)
-{
-  switch (type) {
-  case 1:
-    return "MD5";
-  case 2:
-    return "SHA1";
-  case 3:
-    return "RIPE-MD/160";
-  case 4:
-    return "HAVAL";
-  default:
-    return "unknown";
-  }
-}
-
-#endif
-
 short pgp_canencrypt (unsigned char type)
 {
   switch (type) {
 short pgp_canencrypt (unsigned char type)
 {
   switch (type) {
index 218b442..5906f68 100644 (file)
@@ -1912,10 +1912,6 @@ int smime_send_menu (HEADER * msg, int *redraw)
       /* probably need a different passphrase */
       crypt_smime_void_passphrase ();
     }
       /* probably need a different passphrase */
       crypt_smime_void_passphrase ();
     }
-#if 0
-    else
-      msg->security &= ~SIGN;
-#endif
 
     *redraw = REDRAW_FULL;
     break;
 
     *redraw = REDRAW_FULL;
     break;
index c3b671b..7325b0c 100644 (file)
@@ -86,19 +86,6 @@ static short mhs_set (struct mh_sequences *mhs, int i, short f)
   return mhs->flags[i];
 }
 
   return mhs->flags[i];
 }
 
-#if 0
-
-/* unused */
-
-static short mhs_unset (struct mh_sequences *mhs, int i, short f)
-{
-  mhs_alloc (mhs, i);
-  mhs->flags[i] &= ~f;
-  return mhs->flags[i];
-}
-
-#endif
-
 static void mh_read_token (char *t, int *first, int *last)
 {
   char *p;
 static void mh_read_token (char *t, int *first, int *last)
 {
   char *p;
index 4c7137a..5d7c551 100644 (file)
@@ -333,9 +333,6 @@ static int ssl_socket_close (CONNECTION * conn)
 
   if (data) {
     SSL_shutdown (data->ssl);
 
   if (data) {
     SSL_shutdown (data->ssl);
-#if 0
-    X509_free (data->cert);
-#endif
     SSL_free (data->ssl);
     SSL_CTX_free (data->ctx);
     p_delete(&conn->sockdata);
     SSL_free (data->ssl);
     SSL_CTX_free (data->ctx);
     p_delete(&conn->sockdata);
index aa09235..780daf1 100644 (file)
@@ -2315,9 +2315,6 @@ int mutt_index_menu (void)
     if (menu->menu == MENU_PAGER) {
       menu->menu = MENU_MAIN;
       menu->redraw = REDRAW_FULL;
     if (menu->menu == MENU_PAGER) {
       menu->menu = MENU_MAIN;
       menu->redraw = REDRAW_FULL;
-#if 0
-      set_option (OPTWEED);     /* turn header weeding back on. */
-#endif
     }
 
     if (done)
     }
 
     if (done)
index 004d68b..b8a120f 100644 (file)
--- a/makedoc.c
+++ b/makedoc.c
@@ -557,28 +557,8 @@ static int sgml_fputc (int c)
     return add_s ("&lt;");
   case '>':
     return add_s ("&gt;");
     return add_s ("&lt;");
   case '>':
     return add_s ("&gt;");
-#if 0
-  case '$':
-    return add_s ("&dollar;");
-  case '_':
-    return add_s ("&lowbar;");
-  case '%':
-    return add_s ("&percnt;");
-#endif
   case '&':
     return add_s ("&amp;");
   case '&':
     return add_s ("&amp;");
-#if 0
-  case '\\':
-    return add_s ("&bsol;");
-  case '"':
-    return add_s ("&quot;");
-  case '[':
-    return add_s ("&lsqb;");
-  case ']':
-    return add_s ("&rsqb;");
-  case '~':
-    return add_s ("&tilde;");
-#endif
   default:
     return add_c (c);
   }
   default:
     return add_c (c);
   }
diff --git a/mutt.h b/mutt.h
index 7ddd8b1..d881e2b 100644 (file)
--- a/mutt.h
+++ b/mutt.h
@@ -391,9 +391,6 @@ enum {
   OPTPGPCHECKEXIT,
   OPTPGPLONGIDS,
   OPTPGPAUTODEC,
   OPTPGPCHECKEXIT,
   OPTPGPLONGIDS,
   OPTPGPAUTODEC,
-#if 0
-  OPTPGPENCRYPTSELF,
-#endif
   OPTPGPRETAINABLESIG,
   OPTPGPSTRICTENC,
   OPTFORWDECRYPT,
   OPTPGPRETAINABLESIG,
   OPTPGPSTRICTENC,
   OPTFORWDECRYPT,
index 349e3e7..134040c 100644 (file)
@@ -511,15 +511,6 @@ static void nntp_create_newsrc_line (NNTP_DATA * data, char **buf,
       len--;
     }
 
       len--;
     }
 
-#if 0
-    if (data->entries[x].first == data->entries[x].last)
-      snprintf (line, len, "%d%n", data->entries[x].first, &i);
-    else
-      snprintf (line, len, "%d-%d%n",
-                data->entries[x].first, data->entries[x].last, &i);
-    len -= i;
-    line += i;
-#else
     i = puti (line, data->entries[x].first);
     line += i;
     len -= i;
     i = puti (line, data->entries[x].first);
     line += i;
     len -= i;
@@ -530,7 +521,6 @@ static void nntp_create_newsrc_line (NNTP_DATA * data, char **buf,
       line += i;
       len -= i;
     }
       line += i;
       len -= i;
     }
-#endif
   }
   *line++ = '\n';
   *line = '\0';
   }
   *line++ = '\n';
   *line = '\0';
diff --git a/pager.c b/pager.c
index 9c2d797..4bbf96c 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -662,13 +662,8 @@ resolve_types (char *buf, char *rawbuf, struct line_t *lineInfo, int n, int last
   }
   else if (m_strncmp("\033[0m", rawbuf, 4) == 0)       /* a little hack... */
     lineInfo[n].type = MT_COLOR_NORMAL;
   }
   else if (m_strncmp("\033[0m", rawbuf, 4) == 0)       /* a little hack... */
     lineInfo[n].type = MT_COLOR_NORMAL;
-#if 0
-  else if (m_strncmp("[-- ", buf, 4) == 0)
-    lineInfo[n].type = MT_COLOR_ATTACHMENT;
-#else
   else if (check_attachment_marker ((char *) rawbuf) == 0)
     lineInfo[n].type = MT_COLOR_ATTACHMENT;
   else if (check_attachment_marker ((char *) rawbuf) == 0)
     lineInfo[n].type = MT_COLOR_ATTACHMENT;
-#endif
   else if (m_strcmp("-- \n", buf) == 0
            || m_strcmp("-- \r\n", buf) == 0) {
     i = n + 1;
   else if (m_strcmp("-- \n", buf) == 0
            || m_strcmp("-- \r\n", buf) == 0) {
     i = n + 1;
index 1eee48c..4db49bf 100644 (file)
--- a/pattern.c
+++ b/pattern.c
@@ -226,12 +226,6 @@ int eat_regexp (pattern_t * pat, BUFFER * s, BUFFER * err)
     return (-1);
   }
 
     return (-1);
   }
 
-#if 0
- /* If there are no RE metacharacters, use simple search anyway */
-  if (!pat->stringmatch && !strpbrk (buf.data, "|[{.*+?^$"))
-    pat->stringmatch = 1;
-#endif
-
   if (pat->stringmatch) {
     pat->str = m_strdup(buf.data);
     p_delete(&buf.data);
   if (pat->stringmatch) {
     pat->str = m_strdup(buf.data);
     p_delete(&buf.data);
index 74a59fa..0403bc5 100644 (file)
@@ -776,12 +776,6 @@ mutt_attach_display_loop (MUTTMENU * menu, int op, FILE * fp, HEADER * hdr,
 {
   ATTACHPTR **idx = *idxp;
 
 {
   ATTACHPTR **idx = *idxp;
 
-#if 0
-  int old_optweed = option (OPTWEED);
-
-  set_option (OPTWEED);
-#endif
-
   do {
     switch (op) {
     case OP_DISPLAY_HEADERS:
   do {
     switch (op) {
     case OP_DISPLAY_HEADERS:
@@ -837,10 +831,6 @@ mutt_attach_display_loop (MUTTMENU * menu, int op, FILE * fp, HEADER * hdr,
   }
   while (op != OP_NULL);
 
   }
   while (op != OP_NULL);
 
-#if 0
-  if (option (OPTWEED) != old_optweed)
-    toggle_option (OPTWEED);
-#endif
   return op;
 }
 
   return op;
 }