]> git.pld-linux.org Git - packages/mutt.git/blob - patch-0.95.4.vikas.print_index.1
dd20ef44117a48f7ca6b579c8f8ef8643a7d57f4
[packages/mutt.git] / patch-0.95.4.vikas.print_index.1
1 --- mutt-0.95.4/patchlist.c.orig        Mon Mar 22 18:11:49 1999
2 +++ mutt-0.95.4/patchlist.c     Tue Mar 23 13:19:30 1999
3 @@ -16,6 +16,8 @@
4  
5  
6  
7 +  printf("Feature patch: print_index          0.95.4 by Vikas Agnihotri\n");
8 +
9  
10  
11    /* DO NOT MODIFY AFTER THIS LINE */
12 diff -bu mutt-0.95.4.orig/OPS mutt-0.95.4/OPS
13 --- mutt-0.95.4.orig/OPS        Sat Dec 12 09:05:35 1998
14 +++ mutt-0.95.4/OPS     Tue Mar 23 13:43:00 1999
15 @@ -148,6 +148,7 @@
16  OP_VERSION "show the Mutt version number and date"
17  OP_VIEW_ATTACH "view attachment using mailcap entry if necessary"
18  OP_VIEW_ATTACHMENTS "show MIME attachments"
19 +OP_MAIN_PRINT_INDEX "print message index"
20  OP_MAIN_SHOW_LIMIT "show currently active limit pattern"
21  OP_MAIN_COLLAPSE_THREAD "collapse/uncollapse current thread"
22  OP_MAIN_COLLAPSE_ALL "collapse/uncollapse all threads"
23 diff -bu mutt-0.95.4.orig/commands.c mutt-0.95.4/commands.c
24 --- mutt-0.95.4.orig/commands.c Tue Feb  9 21:53:38 1999
25 +++ mutt-0.95.4/commands.c      Tue Mar 23 13:43:08 1999
26 @@ -639,6 +639,54 @@
27    mutt_copy_message (fp, ctx, h, M_CM_DECODE, CH_WEED | CH_DECODE | CH_REORDER);
28  }
29  
30 +void mutt_print_index (MUTTMENU *menu)
31 +{
32 +  int i;
33 +  pid_t thepid;
34 +  FILE *fp;
35 +  char buf[STRING];
36 +  static char AsciiChars[M_TREE_MAX] = " ,|-| >*&";
37 +
38 +  if (query_quadoption (OPT_PRINT,"Print message index?") != M_YES)
39 +    return;
40 +
41 +  endwin ();
42 +  if ((thepid = mutt_create_filter (PrintCmd, &fp, NULL, NULL)) == -1)
43 +    return;
44 +
45 +  menu_status_line (buf, sizeof (buf), menu, NONULL (Status));
46 +  fprintf(fp,"%s\n",buf);
47 +
48 +  for (i = 0; i<menu->max; i++)
49 +  {
50 +   char *s;
51 +   menu->make_entry(buf,sizeof(buf),menu,i);
52 +   s = buf;
53 +   while (*s)
54 +   {
55 +    if ((unsigned char) *s < M_TREE_MAX)
56 +    {
57 +      while (*s && (unsigned char) *s < M_TREE_MAX)
58 +      {
59 +       fputc (AsciiChars[*s], fp);
60 +       s++;
61 +      }
62 +    }
63 +    else
64 +    {
65 +      fputc(*s,fp);
66 +      s++;
67 +    }
68 +   }
69 +   fprintf(fp,"\n");
70 +  }
71 +
72 +  fclose (fp);
73 +  if (mutt_wait_filter (thepid) || option (OPTWAITKEY))
74 +    mutt_any_key_to_continue (NULL);
75 +  mutt_message ("Message index printed.");
76 +}
77 +
78  void mutt_print_message (HEADER *h)
79  {
80    int i, count = 0;
81 diff -bu mutt-0.95.4.orig/curs_main.c mutt-0.95.4/curs_main.c
82 --- mutt-0.95.4.orig/curs_main.c        Wed Mar  3 20:36:41 1999
83 +++ mutt-0.95.4/curs_main.c     Tue Mar 23 13:43:01 1999
84 @@ -1572,6 +1572,12 @@
85         MAYBE_REDRAW (menu->redraw);
86         break;
87  
88 +      case OP_MAIN_PRINT_INDEX:
89 +
90 +        CHECK_MSGCOUNT;
91 +       mutt_print_index(menu);
92 +       break;
93 +
94        case OP_PRINT:
95  
96         CHECK_MSGCOUNT;
97 diff -Nru mutt-1.1.11.orig/functions.h mutt-1.1.11/functions.h
98 --- mutt-1.1.11.orig/functions.h        Sun Apr  2 23:33:12 2000
99 +++ mutt-1.1.11/functions.h     Sun Apr  2 23:34:45 2000
100 @@ -130,6 +130,7 @@
101    { "previous-new",            OP_MAIN_PREV_NEW,               "\033\t" },
102    { "next-unread",             OP_MAIN_NEXT_UNREAD,            NULL },
103    { "previous-unread",         OP_MAIN_PREV_UNREAD,            NULL },
104 +  { "print-index",             OP_MAIN_PRINT_INDEX,            "P"},
105    { "parent-message",          OP_MAIN_PARENT_MESSAGE,         "P" },
106  
107  
108 diff -bu mutt-0.95.4.orig/mutt_menu.h mutt-0.95.4/mutt_menu.h
109 --- mutt-0.95.4.orig/mutt_menu.h        Thu Jan  7 10:14:43 1999
110 +++ mutt-0.95.4/mutt_menu.h     Tue Mar 23 13:43:02 1999
111 @@ -90,6 +90,7 @@
112  void menu_current_bottom (MUTTMENU *);
113  void menu_check_recenter (MUTTMENU *);
114  void menu_status_line (char *, size_t, MUTTMENU *, const char *);
115 +void mutt_print_index (MUTTMENU *);
116  
117  MUTTMENU *mutt_new_menu (void);
118  void mutt_menuDestroy (MUTTMENU **);
This page took 0.058396 seconds and 2 git commands to generate.