mutt stable branch with some hacks
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Change M_* symbols to MUTT_*

Changeset 23334e967dd7 created a workaround for a namespace conflict
with Solaris and derivatives. After some discussion, the team decided
it would be best to move away from using the "M_" prefix for macros.

This patch was automatically generated by running:
perl -wpi -e 's/\bM_(\w+)\b/MUTT_$1/g' `find . -name '*.[ch]' -print`
with the exception that sys_socket.h was exempted. (That file will
be backed out subsequent to this commit.)

Thanks to Andras Salamon for supplying the perl script used to make
this change.

+1594 -1594
+33 -33
account.c
··· 39 39 return 0; 40 40 41 41 #ifdef USE_IMAP 42 - if (a1->type == M_ACCT_TYPE_IMAP) 42 + if (a1->type == MUTT_ACCT_TYPE_IMAP) 43 43 { 44 44 if (ImapUser) 45 45 user = ImapUser; ··· 47 47 #endif 48 48 49 49 #ifdef USE_POP 50 - if (a1->type == M_ACCT_TYPE_POP && PopUser) 50 + if (a1->type == MUTT_ACCT_TYPE_POP && PopUser) 51 51 user = PopUser; 52 52 #endif 53 53 54 - if (a1->flags & a2->flags & M_ACCT_USER) 54 + if (a1->flags & a2->flags & MUTT_ACCT_USER) 55 55 return (!strcmp (a1->user, a2->user)); 56 - if (a1->flags & M_ACCT_USER) 56 + if (a1->flags & MUTT_ACCT_USER) 57 57 return (!strcmp (a1->user, user)); 58 - if (a2->flags & M_ACCT_USER) 58 + if (a2->flags & MUTT_ACCT_USER) 59 59 return (!strcmp (a2->user, user)); 60 60 61 61 return 1; ··· 73 73 if (url->user) 74 74 { 75 75 strfcpy (account->user, url->user, sizeof (account->user)); 76 - account->flags |= M_ACCT_USER; 76 + account->flags |= MUTT_ACCT_USER; 77 77 } 78 78 if (url->pass) 79 79 { 80 80 strfcpy (account->pass, url->pass, sizeof (account->pass)); 81 - account->flags |= M_ACCT_PASS; 81 + account->flags |= MUTT_ACCT_PASS; 82 82 } 83 83 if (url->port) 84 84 { 85 85 account->port = url->port; 86 - account->flags |= M_ACCT_PORT; 86 + account->flags |= MUTT_ACCT_PORT; 87 87 } 88 88 89 89 return 0; ··· 101 101 url->port = 0; 102 102 103 103 #ifdef USE_IMAP 104 - if (account->type == M_ACCT_TYPE_IMAP) 104 + if (account->type == MUTT_ACCT_TYPE_IMAP) 105 105 { 106 - if (account->flags & M_ACCT_SSL) 106 + if (account->flags & MUTT_ACCT_SSL) 107 107 url->scheme = U_IMAPS; 108 108 else 109 109 url->scheme = U_IMAP; ··· 111 111 #endif 112 112 113 113 #ifdef USE_POP 114 - if (account->type == M_ACCT_TYPE_POP) 114 + if (account->type == MUTT_ACCT_TYPE_POP) 115 115 { 116 - if (account->flags & M_ACCT_SSL) 116 + if (account->flags & MUTT_ACCT_SSL) 117 117 url->scheme = U_POPS; 118 118 else 119 119 url->scheme = U_POP; ··· 121 121 #endif 122 122 123 123 #ifdef USE_SMTP 124 - if (account->type == M_ACCT_TYPE_SMTP) 124 + if (account->type == MUTT_ACCT_TYPE_SMTP) 125 125 { 126 - if (account->flags & M_ACCT_SSL) 126 + if (account->flags & MUTT_ACCT_SSL) 127 127 url->scheme = U_SMTPS; 128 128 else 129 129 url->scheme = U_SMTP; ··· 131 131 #endif 132 132 133 133 url->host = account->host; 134 - if (account->flags & M_ACCT_PORT) 134 + if (account->flags & MUTT_ACCT_PORT) 135 135 url->port = account->port; 136 - if (account->flags & M_ACCT_USER) 136 + if (account->flags & MUTT_ACCT_USER) 137 137 url->user = account->user; 138 - if (account->flags & M_ACCT_PASS) 138 + if (account->flags & MUTT_ACCT_PASS) 139 139 url->pass = account->pass; 140 140 } 141 141 ··· 145 145 char prompt[SHORT_STRING]; 146 146 147 147 /* already set */ 148 - if (account->flags & M_ACCT_USER) 148 + if (account->flags & MUTT_ACCT_USER) 149 149 return 0; 150 150 #ifdef USE_IMAP 151 - else if ((account->type == M_ACCT_TYPE_IMAP) && ImapUser) 151 + else if ((account->type == MUTT_ACCT_TYPE_IMAP) && ImapUser) 152 152 strfcpy (account->user, ImapUser, sizeof (account->user)); 153 153 #endif 154 154 #ifdef USE_POP 155 - else if ((account->type == M_ACCT_TYPE_POP) && PopUser) 155 + else if ((account->type == MUTT_ACCT_TYPE_POP) && PopUser) 156 156 strfcpy (account->user, PopUser, sizeof (account->user)); 157 157 #endif 158 158 else if (option (OPTNOCURSES)) ··· 166 166 return -1; 167 167 } 168 168 169 - account->flags |= M_ACCT_USER; 169 + account->flags |= MUTT_ACCT_USER; 170 170 171 171 return 0; 172 172 } ··· 174 174 int mutt_account_getlogin (ACCOUNT* account) 175 175 { 176 176 /* already set */ 177 - if (account->flags & M_ACCT_LOGIN) 177 + if (account->flags & MUTT_ACCT_LOGIN) 178 178 return 0; 179 179 #ifdef USE_IMAP 180 - else if (account->type == M_ACCT_TYPE_IMAP) 180 + else if (account->type == MUTT_ACCT_TYPE_IMAP) 181 181 { 182 182 if (ImapLogin) 183 183 { 184 184 strfcpy (account->login, ImapLogin, sizeof (account->login)); 185 - account->flags |= M_ACCT_LOGIN; 185 + account->flags |= MUTT_ACCT_LOGIN; 186 186 } 187 187 } 188 188 #endif 189 189 190 - if (!(account->flags & M_ACCT_LOGIN)) 190 + if (!(account->flags & MUTT_ACCT_LOGIN)) 191 191 { 192 192 mutt_account_getuser (account); 193 193 strfcpy (account->login, account->user, sizeof (account->login)); 194 194 } 195 195 196 - account->flags |= M_ACCT_LOGIN; 196 + account->flags |= MUTT_ACCT_LOGIN; 197 197 198 198 return 0; 199 199 } ··· 203 203 { 204 204 char prompt[SHORT_STRING]; 205 205 206 - if (account->flags & M_ACCT_PASS) 206 + if (account->flags & MUTT_ACCT_PASS) 207 207 return 0; 208 208 #ifdef USE_IMAP 209 - else if ((account->type == M_ACCT_TYPE_IMAP) && ImapPass) 209 + else if ((account->type == MUTT_ACCT_TYPE_IMAP) && ImapPass) 210 210 strfcpy (account->pass, ImapPass, sizeof (account->pass)); 211 211 #endif 212 212 #ifdef USE_POP 213 - else if ((account->type == M_ACCT_TYPE_POP) && PopPass) 213 + else if ((account->type == MUTT_ACCT_TYPE_POP) && PopPass) 214 214 strfcpy (account->pass, PopPass, sizeof (account->pass)); 215 215 #endif 216 216 #ifdef USE_SMTP 217 - else if ((account->type == M_ACCT_TYPE_SMTP) && SmtpPass) 217 + else if ((account->type == MUTT_ACCT_TYPE_SMTP) && SmtpPass) 218 218 strfcpy (account->pass, SmtpPass, sizeof (account->pass)); 219 219 #endif 220 220 else if (option (OPTNOCURSES)) ··· 222 222 else 223 223 { 224 224 snprintf (prompt, sizeof (prompt), _("Password for %s@%s: "), 225 - account->flags & M_ACCT_LOGIN ? account->login : account->user, 225 + account->flags & MUTT_ACCT_LOGIN ? account->login : account->user, 226 226 account->host); 227 227 account->pass[0] = '\0'; 228 228 if (mutt_get_password (prompt, account->pass, sizeof (account->pass))) 229 229 return -1; 230 230 } 231 231 232 - account->flags |= M_ACCT_PASS; 232 + account->flags |= MUTT_ACCT_PASS; 233 233 234 234 return 0; 235 235 } 236 236 237 237 void mutt_account_unsetpass (ACCOUNT* account) 238 238 { 239 - account->flags &= ~M_ACCT_PASS; 239 + account->flags &= ~MUTT_ACCT_PASS; 240 240 }
+9 -9
account.h
··· 26 26 /* account types */ 27 27 enum 28 28 { 29 - M_ACCT_TYPE_NONE = 0, 30 - M_ACCT_TYPE_IMAP, 31 - M_ACCT_TYPE_POP, 32 - M_ACCT_TYPE_SMTP 29 + MUTT_ACCT_TYPE_NONE = 0, 30 + MUTT_ACCT_TYPE_IMAP, 31 + MUTT_ACCT_TYPE_POP, 32 + MUTT_ACCT_TYPE_SMTP 33 33 }; 34 34 35 35 /* account flags */ 36 - #define M_ACCT_PORT (1<<0) 37 - #define M_ACCT_USER (1<<1) 38 - #define M_ACCT_LOGIN (1<<2) 39 - #define M_ACCT_PASS (1<<3) 40 - #define M_ACCT_SSL (1<<4) 36 + #define MUTT_ACCT_PORT (1<<0) 37 + #define MUTT_ACCT_USER (1<<1) 38 + #define MUTT_ACCT_LOGIN (1<<2) 39 + #define MUTT_ACCT_PASS (1<<3) 40 + #define MUTT_ACCT_SSL (1<<4) 41 41 42 42 typedef struct 43 43 {
+1 -1
addrbook.c
··· 80 80 81 81 static void alias_entry (char *s, size_t slen, MUTTMENU *m, int num) 82 82 { 83 - mutt_FormatString (s, slen, 0, MuttIndexWindow->cols, NONULL (AliasFmt), alias_format_str, (unsigned long) ((ALIAS **) m->data)[num], M_FORMAT_ARROWCURSOR); 83 + mutt_FormatString (s, slen, 0, MuttIndexWindow->cols, NONULL (AliasFmt), alias_format_str, (unsigned long) ((ALIAS **) m->data)[num], MUTT_FORMAT_ARROWCURSOR); 84 84 } 85 85 86 86 static int alias_tag (MUTTMENU *menu, int n, int m)
+4 -4
alias.c
··· 269 269 270 270 if (mutt_check_alias_name (buf, fixed, sizeof (fixed))) 271 271 { 272 - switch (mutt_yesorno (_("Warning: This alias name may not work. Fix it?"), M_YES)) 272 + switch (mutt_yesorno (_("Warning: This alias name may not work. Fix it?"), MUTT_YES)) 273 273 { 274 - case M_YES: 274 + case MUTT_YES: 275 275 strfcpy (buf, fixed, sizeof (buf)); 276 276 goto retry_name; 277 277 case -1: ··· 326 326 buf[0] = 0; 327 327 rfc822_write_address (buf, sizeof (buf), new->addr, 1); 328 328 snprintf (prompt, sizeof (prompt), _("[%s = %s] Accept?"), new->name, buf); 329 - if (mutt_yesorno (prompt, M_YES) != M_YES) 329 + if (mutt_yesorno (prompt, MUTT_YES) != MUTT_YES) 330 330 { 331 331 mutt_free_alias (&new); 332 332 return; ··· 344 344 Aliases = new; 345 345 346 346 strfcpy (buf, NONULL (AliasFile), sizeof (buf)); 347 - if (mutt_get_field (_("Save to file: "), buf, sizeof (buf), M_FILE) != 0) 347 + if (mutt_get_field (_("Save to file: "), buf, sizeof (buf), MUTT_FILE) != 0) 348 348 return; 349 349 mutt_expand_path (buf, sizeof (buf)); 350 350 if ((rc = fopen (buf, "a+")))
+27 -27
attach.c
··· 94 94 int rc = 0; 95 95 96 96 snprintf (type, sizeof (type), "%s/%s", TYPE (a), a->subtype); 97 - if (rfc1524_mailcap_lookup (a, type, entry, M_COMPOSE)) 97 + if (rfc1524_mailcap_lookup (a, type, entry, MUTT_COMPOSE)) 98 98 { 99 99 if (entry->composecommand || entry->composetypecommand) 100 100 { ··· 110 110 a->filename, newfile)); 111 111 if (safe_symlink (a->filename, newfile) == -1) 112 112 { 113 - if (mutt_yesorno (_("Can't match nametemplate, continue?"), M_YES) != M_YES) 113 + if (mutt_yesorno (_("Can't match nametemplate, continue?"), MUTT_YES) != MUTT_YES) 114 114 goto bailout; 115 115 } 116 116 else ··· 229 229 int rc = 0; 230 230 231 231 snprintf (type, sizeof (type), "%s/%s", TYPE (a), a->subtype); 232 - if (rfc1524_mailcap_lookup (a, type, entry, M_EDIT)) 232 + if (rfc1524_mailcap_lookup (a, type, entry, MUTT_EDIT)) 233 233 { 234 234 if (entry->editcommand) 235 235 { ··· 242 242 a->filename, newfile)); 243 243 if (safe_symlink (a->filename, newfile) == -1) 244 244 { 245 - if (mutt_yesorno (_("Can't match nametemplate, continue?"), M_YES) != M_YES) 245 + if (mutt_yesorno (_("Can't match nametemplate, continue?"), MUTT_YES) != MUTT_YES) 246 246 goto bailout; 247 247 } 248 248 else ··· 350 350 if (WithCrypto && is_message && a->hdr && (a->hdr->security & ENCRYPT) && 351 351 !crypt_valid_passphrase(a->hdr->security)) 352 352 return (rc); 353 - use_mailcap = (flag == M_MAILCAP || 354 - (flag == M_REGULAR && mutt_needs_mailcap (a))); 353 + use_mailcap = (flag == MUTT_MAILCAP || 354 + (flag == MUTT_REGULAR && mutt_needs_mailcap (a))); 355 355 snprintf (type, sizeof (type), "%s/%s", TYPE (a), a->subtype); 356 356 357 357 if (use_mailcap) ··· 359 359 entry = rfc1524_new_entry (); 360 360 if (!rfc1524_mailcap_lookup (a, type, entry, 0)) 361 361 { 362 - if (flag == M_REGULAR) 362 + if (flag == MUTT_REGULAR) 363 363 { 364 364 /* fallback to view as text */ 365 365 rfc1524_free_entry (&entry); 366 366 mutt_error _("No matching mailcap entry found. Viewing as text."); 367 - flag = M_AS_TEXT; 367 + flag = MUTT_AS_TEXT; 368 368 use_mailcap = 0; 369 369 } 370 370 else ··· 397 397 /* send case: the file is already there */ 398 398 if (safe_symlink (a->filename, tempfile) == -1) 399 399 { 400 - if (mutt_yesorno (_("Can't match nametemplate, continue?"), M_YES) == M_YES) 400 + if (mutt_yesorno (_("Can't match nametemplate, continue?"), MUTT_YES) == MUTT_YES) 401 401 strfcpy (tempfile, a->filename, sizeof (tempfile)); 402 402 else 403 403 goto return_error; ··· 502 502 { 503 503 /* Don't use mailcap; the attachment is viewed in the pager */ 504 504 505 - if (flag == M_AS_TEXT) 505 + if (flag == MUTT_AS_TEXT) 506 506 { 507 507 /* just let me see the raw data */ 508 508 if (fp) ··· 524 524 goto return_error; 525 525 } 526 526 decode_state.fpin = fp; 527 - decode_state.flags = M_CHARCONV; 527 + decode_state.flags = MUTT_CHARCONV; 528 528 mutt_decode_attachment(a, &decode_state); 529 529 if (fclose(decode_state.fpout) == EOF) 530 530 dprint(1, (debugfile, "mutt_view_attachment:%d fclose errno=%d %s\n", __LINE__, pagerfile, errno, strerror(errno))); ··· 544 544 /* Use built-in handler */ 545 545 set_option (OPTVIEWATTACH); /* disable the "use 'v' to view this part" 546 546 * message in case of error */ 547 - if (mutt_decode_save_attachment (fp, a, pagerfile, M_DISPLAY, 0)) 547 + if (mutt_decode_save_attachment (fp, a, pagerfile, MUTT_DISPLAY, 0)) 548 548 { 549 549 unset_option (OPTVIEWATTACH); 550 550 goto return_error; ··· 576 576 info.hdr = hdr; 577 577 578 578 rc = mutt_do_pager (descrip, pagerfile, 579 - M_PAGER_ATTACHMENT | (is_message ? M_PAGER_MESSAGE : 0), &info); 579 + MUTT_PAGER_ATTACHMENT | (is_message ? MUTT_PAGER_MESSAGE : 0), &info); 580 580 *pagerfile = '\0'; 581 581 } 582 582 else ··· 691 691 static FILE * 692 692 mutt_save_attachment_open (char *path, int flags) 693 693 { 694 - if (flags == M_SAVE_APPEND) 694 + if (flags == MUTT_SAVE_APPEND) 695 695 return fopen (path, "a"); 696 - if (flags == M_SAVE_OVERWRITE) 696 + if (flags == MUTT_SAVE_OVERWRITE) 697 697 return fopen (path, "w"); /* __FOPEN_CHECKED__ */ 698 698 699 699 return safe_fopen (path, "w"); ··· 729 729 fseeko (fp, m->offset, 0); 730 730 if (fgets (buf, sizeof (buf), fp) == NULL) 731 731 return -1; 732 - if (mx_open_mailbox(path, M_APPEND | M_QUIET, &ctx) == NULL) 732 + if (mx_open_mailbox(path, MUTT_APPEND | MUTT_QUIET, &ctx) == NULL) 733 733 return -1; 734 - if ((msg = mx_open_new_message (&ctx, hn, is_from (buf, NULL, 0, NULL) ? 0 : M_ADD_FROM)) == NULL) 734 + if ((msg = mx_open_new_message (&ctx, hn, is_from (buf, NULL, 0, NULL) ? 0 : MUTT_ADD_FROM)) == NULL) 735 735 { 736 736 mx_close_mailbox(&ctx, NULL); 737 737 return -1; 738 738 } 739 - if (ctx.magic == M_MBOX || ctx.magic == M_MMDF) 739 + if (ctx.magic == MUTT_MBOX || ctx.magic == MUTT_MMDF) 740 740 chflags = CH_FROM | CH_UPDATE_LEN; 741 - chflags |= (ctx.magic == M_MAILDIR ? CH_NOSTATUS : CH_UPDATE); 741 + chflags |= (ctx.magic == MUTT_MAILDIR ? CH_NOSTATUS : CH_UPDATE); 742 742 if (_mutt_copy_message (msg->fp, fp, hn, hn->content, 0, chflags) == 0 743 743 && mx_commit_message (msg, &ctx) == 0) 744 744 r = 0; ··· 818 818 memset (&s, 0, sizeof (s)); 819 819 s.flags = displaying; 820 820 821 - if (flags == M_SAVE_APPEND) 821 + if (flags == MUTT_SAVE_APPEND) 822 822 s.fpout = fopen (path, "a"); 823 - else if (flags == M_SAVE_OVERWRITE) 823 + else if (flags == MUTT_SAVE_OVERWRITE) 824 824 s.fpout = fopen (path, "w"); /* __FOPEN_CHECKED__ */ 825 825 else 826 826 s.fpout = safe_fopen (path, "w"); ··· 861 861 mutt_parse_part (s.fpin, m); 862 862 863 863 if (m->noconv || is_multipart (m)) 864 - s.flags |= M_CHARCONV; 864 + s.flags |= MUTT_CHARCONV; 865 865 } 866 866 else 867 867 { 868 868 s.fpin = fp; 869 - s.flags |= M_CHARCONV; 869 + s.flags |= MUTT_CHARCONV; 870 870 } 871 871 872 872 mutt_body_handler (m, &s); ··· 905 905 906 906 snprintf (type, sizeof (type), "%s/%s", TYPE (a), a->subtype); 907 907 908 - if (rfc1524_mailcap_lookup (a, type, NULL, M_PRINT)) 908 + if (rfc1524_mailcap_lookup (a, type, NULL, MUTT_PRINT)) 909 909 { 910 910 char command[_POSIX_PATH_MAX+STRING]; 911 911 rfc1524_entry *entry; ··· 914 914 dprint (2, (debugfile, "Using mailcap...\n")); 915 915 916 916 entry = rfc1524_new_entry (); 917 - rfc1524_mailcap_lookup (a, type, entry, M_PRINT); 917 + rfc1524_mailcap_lookup (a, type, entry, MUTT_PRINT); 918 918 if (rfc1524_expand_filename (entry->nametemplate, a->filename, 919 919 newfile, sizeof (newfile))) 920 920 { ··· 922 922 { 923 923 if (safe_symlink(a->filename, newfile) == -1) 924 924 { 925 - if (mutt_yesorno (_("Can't match nametemplate, continue?"), M_YES) != M_YES) 925 + if (mutt_yesorno (_("Can't match nametemplate, continue?"), MUTT_YES) != MUTT_YES) 926 926 { 927 927 rfc1524_free_entry (&entry); 928 928 return 0; ··· 996 996 fpout = NULL; 997 997 998 998 mutt_mktemp (newfile, sizeof (newfile)); 999 - if (mutt_decode_save_attachment (fp, a, newfile, M_PRINTING, 0) == 0) 999 + if (mutt_decode_save_attachment (fp, a, newfile, MUTT_PRINTING, 0) == 0) 1000 1000 { 1001 1001 1002 1002 dprint (2, (debugfile, "successfully decoded %s type attachment to %s\n",
+10 -10
browser.c
··· 152 152 FOLDER *folder = (FOLDER *) data; 153 153 struct passwd *pw; 154 154 struct group *gr; 155 - int optional = (flags & M_FORMAT_OPTIONAL); 155 + int optional = (flags & MUTT_FORMAT_OPTIONAL); 156 156 157 157 switch (op) 158 158 { ··· 318 318 319 319 if (optional) 320 320 mutt_FormatString (dest, destlen, col, cols, ifstring, folder_format_str, data, 0); 321 - else if (flags & M_FORMAT_OPTIONAL) 321 + else if (flags & MUTT_FORMAT_OPTIONAL) 322 322 mutt_FormatString (dest, destlen, col, cols, elsestring, folder_format_str, data, 0); 323 323 324 324 return (src); ··· 516 516 folder.num = num; 517 517 518 518 mutt_FormatString (s, slen, 0, MuttIndexWindow->cols, NONULL(FolderFormat), folder_format_str, 519 - (unsigned long) &folder, M_FORMAT_ARROWCURSOR); 519 + (unsigned long) &folder, MUTT_FORMAT_ARROWCURSOR); 520 520 } 521 521 522 522 static void init_menu (struct browser_state *state, MUTTMENU *menu, char *title, ··· 579 579 MUTTMENU *menu; 580 580 struct stat st; 581 581 int i, killPrefix = 0; 582 - int multiple = (flags & M_SEL_MULTI) ? 1 : 0; 583 - int folder = (flags & M_SEL_FOLDER) ? 1 : 0; 584 - int buffy = (flags & M_SEL_BUFFY) ? 1 : 0; 582 + int multiple = (flags & MUTT_SEL_MULTI) ? 1 : 0; 583 + int folder = (flags & MUTT_SEL_FOLDER) ? 1 : 0; 584 + int buffy = (flags & MUTT_SEL_BUFFY) ? 1 : 0; 585 585 586 586 buffy = buffy && folder; 587 587 ··· 964 964 } 965 965 snprintf (msg, sizeof (msg), _("Really delete mailbox \"%s\"?"), 966 966 mx.mbox); 967 - if (mutt_yesorno (msg, M_NO) == M_YES) 967 + if (mutt_yesorno (msg, MUTT_NO) == MUTT_YES) 968 968 { 969 969 if (!imap_delete_mailbox (Context, mx)) 970 970 { ··· 1001 1001 buf[len]='/'; 1002 1002 } 1003 1003 1004 - if (mutt_get_field (_("Chdir to: "), buf, sizeof (buf), M_FILE) == 0 && 1004 + if (mutt_get_field (_("Chdir to: "), buf, sizeof (buf), MUTT_FILE) == 0 && 1005 1005 buf[0]) 1006 1006 { 1007 1007 buffy = 0; ··· 1205 1205 case OP_BROWSER_NEW_FILE: 1206 1206 1207 1207 snprintf (buf, sizeof (buf), "%s/", LastDir); 1208 - if (mutt_get_field (_("New file name: "), buf, sizeof (buf), M_FILE) == 0) 1208 + if (mutt_get_field (_("New file name: "), buf, sizeof (buf), MUTT_FILE) == 0) 1209 1209 { 1210 1210 strfcpy (f, buf, flen); 1211 1211 destroy_state (&state); ··· 1248 1248 b = mutt_make_file_attach (buf); 1249 1249 if (b != NULL) 1250 1250 { 1251 - mutt_view_attachment (NULL, b, M_REGULAR, NULL, NULL, 0); 1251 + mutt_view_attachment (NULL, b, MUTT_REGULAR, NULL, NULL, 0); 1252 1252 mutt_free_body (&b); 1253 1253 menu->redraw = REDRAW_FULL; 1254 1254 }
+11 -11
buffy.c
··· 124 124 125 125 typ = mx_get_magic (path); 126 126 127 - if (typ != M_MBOX && typ != M_MMDF) 127 + if (typ != MUTT_MBOX && typ != MUTT_MMDF) 128 128 return 0; 129 129 130 130 if ((f = fopen (path, "rb"))) ··· 223 223 mutt_extract_token (path, s, 0); 224 224 strfcpy (buf, path->data, sizeof (buf)); 225 225 226 - if(data == M_UNMAILBOXES && mutt_strcmp(buf,"*") == 0) 226 + if(data == MUTT_UNMAILBOXES && mutt_strcmp(buf,"*") == 0) 227 227 { 228 228 for (tmp = &Incoming; *tmp;) 229 229 { ··· 251 251 } 252 252 } 253 253 254 - if(data == M_UNMAILBOXES) 254 + if(data == MUTT_UNMAILBOXES) 255 255 { 256 256 if(*tmp) 257 257 { ··· 421 421 #endif 422 422 423 423 /* check device ID and serial number instead of comparing paths */ 424 - if (!Context || Context->magic == M_IMAP || Context->magic == M_POP 424 + if (!Context || Context->magic == MUTT_IMAP || Context->magic == MUTT_POP 425 425 || stat (Context->path, &contex_sb) != 0) 426 426 { 427 427 contex_sb.st_dev=0; ··· 430 430 431 431 for (tmp = Incoming; tmp; tmp = tmp->next) 432 432 { 433 - if (tmp->magic != M_IMAP) 433 + if (tmp->magic != MUTT_IMAP) 434 434 { 435 435 tmp->new = 0; 436 436 #ifdef USE_POP 437 437 if (mx_is_pop (tmp->path)) 438 - tmp->magic = M_POP; 438 + tmp->magic = MUTT_POP; 439 439 else 440 440 #endif 441 441 if (stat (tmp->path, &sb) != 0 || (S_ISREG(sb.st_mode) && sb.st_size == 0) || ··· 453 453 /* check to see if the folder is the currently selected folder 454 454 * before polling */ 455 455 if (!Context || !Context->path || 456 - (( tmp->magic == M_IMAP || tmp->magic == M_POP ) 456 + (( tmp->magic == MUTT_IMAP || tmp->magic == MUTT_POP ) 457 457 ? mutt_strcmp (tmp->path, Context->path) : 458 458 (sb.st_dev != contex_sb.st_dev || sb.st_ino != contex_sb.st_ino))) 459 459 { 460 460 switch (tmp->magic) 461 461 { 462 - case M_MBOX: 463 - case M_MMDF: 462 + case MUTT_MBOX: 463 + case MUTT_MMDF: 464 464 if (buffy_mbox_hasnew (tmp, &sb) > 0) 465 465 BuffyCount++; 466 466 break; 467 467 468 - case M_MAILDIR: 468 + case MUTT_MAILDIR: 469 469 if (buffy_maildir_hasnew (tmp) > 0) 470 470 BuffyCount++; 471 471 break; 472 472 473 - case M_MH: 473 + case MUTT_MH: 474 474 mh_buffy(tmp); 475 475 if (tmp->new) 476 476 BuffyCount++;
+2 -2
buffy.h
··· 17 17 */ 18 18 19 19 /*parameter to mutt_parse_mailboxes*/ 20 - #define M_MAILBOXES 1 21 - #define M_UNMAILBOXES 2 20 + #define MUTT_MAILBOXES 1 21 + #define MUTT_UNMAILBOXES 2 22 22 23 23 typedef struct buffy_t 24 24 {
+5 -5
charset.c
··· 349 349 /* 350 350 * Like iconv_open, but canonicalises the charsets, applies 351 351 * charset-hooks, recanonicalises, and finally applies iconv-hooks. 352 - * Parameter flags=0 skips charset-hooks, while M_ICONV_HOOK_FROM 352 + * Parameter flags=0 skips charset-hooks, while MUTT_ICONV_HOOK_FROM 353 353 * applies them to fromcode. Callers should use flags=0 when fromcode 354 354 * can safely be considered true, either some constant, or some value 355 - * provided by the user; M_ICONV_HOOK_FROM should be used only when 355 + * provided by the user; MUTT_ICONV_HOOK_FROM should be used only when 356 356 * fromcode is unsure, taken from a possibly wrong incoming MIME label, 357 - * or such. Misusing M_ICONV_HOOK_FROM leads to unwanted interactions 357 + * or such. Misusing MUTT_ICONV_HOOK_FROM leads to unwanted interactions 358 358 * in some setups. Note: By design charset-hooks should never be, and 359 359 * are never, applied to tocode. Highlight note: The top-well-named 360 - * M_ICONV_HOOK_FROM acts on charset-hooks, not at all on iconv-hooks. 360 + * MUTT_ICONV_HOOK_FROM acts on charset-hooks, not at all on iconv-hooks. 361 361 */ 362 362 363 363 iconv_t mutt_iconv_open (const char *tocode, const char *fromcode, int flags) ··· 376 376 /* maybe apply charset-hooks and recanonicalise fromcode, 377 377 * but only when caller asked us to sanitize a potentialy wrong 378 378 * charset name incoming from the wild exterior. */ 379 - if ((flags & M_ICONV_HOOK_FROM) && (tmp = mutt_charset_hook (fromcode1))) 379 + if ((flags & MUTT_ICONV_HOOK_FROM) && (tmp = mutt_charset_hook (fromcode1))) 380 380 mutt_canonical_charset (fromcode1, sizeof (fromcode1), tmp); 381 381 382 382 /* always apply iconv-hooks to suit system's iconv tastes */
+2 -2
charset.h
··· 51 51 52 52 /* flags for charset.c:mutt_convert_string(), fgetconv_open(), and 53 53 * mutt_iconv_open(). Note that applying charset-hooks to tocode is 54 - * never needed, and sometimes hurts: Hence there is no M_ICONV_HOOK_TO 54 + * never needed, and sometimes hurts: Hence there is no MUTT_ICONV_HOOK_TO 55 55 * flag. 56 56 */ 57 - #define M_ICONV_HOOK_FROM 1 /* apply charset-hooks to fromcode */ 57 + #define MUTT_ICONV_HOOK_FROM 1 /* apply charset-hooks to fromcode */ 58 58 59 59 /* Check if given character set is valid (either officially assigned or 60 60 * known to local iconv implementation). If strict is non-zero, check
+1 -1
color.c
··· 549 549 550 550 strfcpy(buf, NONULL(s), sizeof(buf)); 551 551 mutt_check_simple (buf, sizeof (buf), NONULL(SimpleSearch)); 552 - if((tmp->color_pattern = mutt_pattern_comp (buf, M_FULL_MSG, err)) == NULL) 552 + if((tmp->color_pattern = mutt_pattern_comp (buf, MUTT_FULL_MSG, err)) == NULL) 553 553 { 554 554 mutt_free_color_line(&tmp, 1); 555 555 return -1;
+37 -37
commands.c
··· 60 60 { 61 61 char tempfile[_POSIX_PATH_MAX], buf[LONG_STRING]; 62 62 int rc = 0, builtin = 0; 63 - int cmflags = M_CM_DECODE | M_CM_DISPLAY | M_CM_CHARCONV; 63 + int cmflags = MUTT_CM_DECODE | MUTT_CM_DISPLAY | MUTT_CM_CHARCONV; 64 64 FILE *fpout = NULL; 65 65 FILE *fpfilterout = NULL; 66 66 pid_t filterpid = -1; ··· 70 70 cur->content->subtype); 71 71 72 72 mutt_parse_mime_message (Context, cur); 73 - mutt_message_hook (Context, cur, M_MESSAGEHOOK); 73 + mutt_message_hook (Context, cur, MUTT_MESSAGEHOOK); 74 74 75 75 /* see if crypto is needed for this message. if so, we should exit curses */ 76 76 if (WithCrypto && cur->security) ··· 82 82 if(!crypt_valid_passphrase(cur->security)) 83 83 return 0; 84 84 85 - cmflags |= M_CM_VERIFY; 85 + cmflags |= MUTT_CM_VERIFY; 86 86 } 87 87 else if (cur->security & SIGN) 88 88 { 89 89 /* find out whether or not the verify signature */ 90 - if (query_quadoption (OPT_VERIFYSIG, _("Verify PGP signature?")) == M_YES) 90 + if (query_quadoption (OPT_VERIFYSIG, _("Verify PGP signature?")) == MUTT_YES) 91 91 { 92 - cmflags |= M_CM_VERIFY; 92 + cmflags |= MUTT_CM_VERIFY; 93 93 } 94 94 } 95 95 } 96 96 97 - if (cmflags & M_CM_VERIFY || cur->security & ENCRYPT) 97 + if (cmflags & MUTT_CM_VERIFY || cur->security & ENCRYPT) 98 98 { 99 99 if (cur->security & APPLICATION_PGP) 100 100 { ··· 140 140 hfi.ctx = Context; 141 141 hfi.pager_progress = ExtPagerProgress; 142 142 hfi.hdr = cur; 143 - mutt_make_string_info (buf, sizeof (buf), NONULL(PagerFmt), &hfi, M_FORMAT_MAKEPRINT); 143 + mutt_make_string_info (buf, sizeof (buf), NONULL(PagerFmt), &hfi, MUTT_FORMAT_MAKEPRINT); 144 144 fputs (buf, fpout); 145 145 fputs ("\n\n", fpout); 146 146 } ··· 181 181 pager_t info; 182 182 183 183 if (WithCrypto 184 - && (cur->security & APPLICATION_SMIME) && (cmflags & M_CM_VERIFY)) 184 + && (cur->security & APPLICATION_SMIME) && (cmflags & MUTT_CM_VERIFY)) 185 185 { 186 186 if (cur->security & GOODSIGN) 187 187 { ··· 197 197 } 198 198 199 199 if (WithCrypto 200 - && (cur->security & APPLICATION_PGP) && (cmflags & M_CM_VERIFY)) 200 + && (cur->security & APPLICATION_PGP) && (cmflags & MUTT_CM_VERIFY)) 201 201 { 202 202 if (cur->security & GOODSIGN) 203 203 mutt_message (_("PGP signature successfully verified.")); ··· 211 211 memset (&info, 0, sizeof (pager_t)); 212 212 info.hdr = cur; 213 213 info.ctx = Context; 214 - rc = mutt_pager (NULL, tempfile, M_PAGER_MESSAGE, &info); 214 + rc = mutt_pager (NULL, tempfile, MUTT_PAGER_MESSAGE, &info); 215 215 } 216 216 else 217 217 { ··· 225 225 if (!option (OPTNOCURSES)) 226 226 keypad (stdscr, TRUE); 227 227 if (r != -1) 228 - mutt_set_flag (Context, cur, M_READ, 1); 228 + mutt_set_flag (Context, cur, MUTT_READ, 1); 229 229 if (r != -1 && option (OPTPROMPTAFTER)) 230 230 { 231 231 mutt_unget_event (mutt_any_key_to_continue _("Command: "), 0); ··· 275 275 else 276 276 strfcpy(prompt, _("Bounce tagged messages to: "), sizeof(prompt)); 277 277 278 - rc = mutt_get_field (prompt, buf, sizeof (buf), M_ALIAS); 278 + rc = mutt_get_field (prompt, buf, sizeof (buf), MUTT_ALIAS); 279 279 280 280 if (option (OPTNEEDREDRAW)) 281 281 { ··· 319 319 else 320 320 snprintf (prompt, sizeof (prompt), "%s?", scratch); 321 321 322 - if (query_quadoption (OPT_BOUNCE, prompt) != M_YES) 322 + if (query_quadoption (OPT_BOUNCE, prompt) != MUTT_YES) 323 323 { 324 324 rfc822_free_address (&adr); 325 325 mutt_window_clearline (MuttMessageWindow, 0); ··· 340 340 { 341 341 if (decode) 342 342 { 343 - *cmflags |= M_CM_DECODE | M_CM_CHARCONV; 343 + *cmflags |= MUTT_CM_DECODE | MUTT_CM_CHARCONV; 344 344 *chflags |= CH_DECODE | CH_REORDER; 345 345 346 346 if (option (OPTWEED)) 347 347 { 348 348 *chflags |= CH_WEED; 349 - *cmflags |= M_CM_WEED; 349 + *cmflags |= MUTT_CM_WEED; 350 350 } 351 351 } 352 352 353 353 if (print) 354 - *cmflags |= M_CM_PRINTING; 354 + *cmflags |= MUTT_CM_PRINTING; 355 355 356 356 } 357 357 ··· 398 398 if (h) 399 399 { 400 400 401 - mutt_message_hook (Context, h, M_MESSAGEHOOK); 401 + mutt_message_hook (Context, h, MUTT_MESSAGEHOOK); 402 402 403 403 if (WithCrypto && decode) 404 404 { ··· 426 426 for (i = 0; i < Context->vcount; i++) 427 427 if(Context->hdrs[Context->v2r[i]]->tagged) 428 428 { 429 - mutt_message_hook (Context, Context->hdrs[Context->v2r[i]], M_MESSAGEHOOK); 429 + mutt_message_hook (Context, Context->hdrs[Context->v2r[i]], MUTT_MESSAGEHOOK); 430 430 mutt_parse_mime_message(Context, Context->hdrs[Context->v2r[i]]); 431 431 if (Context->hdrs[Context->v2r[i]]->security & ENCRYPT && 432 432 !crypt_valid_passphrase(Context->hdrs[Context->v2r[i]]->security)) ··· 440 440 { 441 441 if (Context->hdrs[Context->v2r[i]]->tagged) 442 442 { 443 - mutt_message_hook (Context, Context->hdrs[Context->v2r[i]], M_MESSAGEHOOK); 443 + mutt_message_hook (Context, Context->hdrs[Context->v2r[i]], MUTT_MESSAGEHOOK); 444 444 mutt_endwin (NULL); 445 445 if ((thepid = mutt_create_filter (cmd, &fpout, NULL, NULL)) < 0) 446 446 { ··· 468 468 { 469 469 if (Context->hdrs[Context->v2r[i]]->tagged) 470 470 { 471 - mutt_message_hook (Context, Context->hdrs[Context->v2r[i]], M_MESSAGEHOOK); 471 + mutt_message_hook (Context, Context->hdrs[Context->v2r[i]], MUTT_MESSAGEHOOK); 472 472 pipe_msg (Context->hdrs[Context->v2r[i]], fpout, decode, print); 473 473 /* add the message separator */ 474 474 if (sep) fputs (sep, fpout); ··· 490 490 char buffer[LONG_STRING]; 491 491 492 492 buffer[0] = 0; 493 - if (mutt_get_field (_("Pipe to command: "), buffer, sizeof (buffer), M_CMD) 493 + if (mutt_get_field (_("Pipe to command: "), buffer, sizeof (buffer), MUTT_CMD) 494 494 != 0 || !buffer[0]) 495 495 return; 496 496 ··· 513 513 514 514 if (query_quadoption (OPT_PRINT, 515 515 h ? _("Print message?") : _("Print tagged messages?")) 516 - != M_YES) 516 + != MUTT_YES) 517 517 return; 518 518 519 519 if (_mutt_pipe_message (h, PrintCmd, ··· 592 592 char buf[LONG_STRING]; 593 593 594 594 buf[0] = 0; 595 - if (mutt_get_field (_("Shell command: "), buf, sizeof (buf), M_CMD) == 0) 595 + if (mutt_get_field (_("Shell command: "), buf, sizeof (buf), MUTT_CMD) == 0) 596 596 { 597 597 if (!buf[0] && Shell) 598 598 strfcpy (buf, Shell, sizeof (buf)); ··· 615 615 int r; 616 616 617 617 buffer[0] = 0; 618 - if (mutt_get_field (":", buffer, sizeof (buffer), M_COMMAND) != 0 || !buffer[0]) 618 + if (mutt_get_field (":", buffer, sizeof (buffer), MUTT_COMMAND) != 0 || !buffer[0]) 619 619 return; 620 620 mutt_buffer_init (&err); 621 621 err.dsize = STRING; ··· 670 670 && mutt_is_multipart_encrypted(hdr->content)) 671 671 { 672 672 *chflags = CH_NONEWLINE | CH_XMIT | CH_MIME; 673 - *cmflags = M_CM_DECODE_PGP; 673 + *cmflags = MUTT_CM_DECODE_PGP; 674 674 } 675 675 else if ((WithCrypto & APPLICATION_PGP) 676 676 && mutt_is_application_pgp (hdr->content) & ENCRYPT) ··· 679 679 && mutt_is_application_smime(hdr->content) & ENCRYPT) 680 680 { 681 681 *chflags = CH_NONEWLINE | CH_XMIT | CH_MIME; 682 - *cmflags = M_CM_DECODE_SMIME; 682 + *cmflags = MUTT_CM_DECODE_SMIME; 683 683 } 684 684 } 685 685 686 686 if (decode) 687 687 { 688 688 *chflags = CH_XMIT | CH_MIME | CH_TXTPLAIN; 689 - *cmflags = M_CM_DECODE | M_CM_CHARCONV; 689 + *cmflags = MUTT_CM_DECODE | MUTT_CM_CHARCONV; 690 690 691 691 if (!decrypt) /* If decode doesn't kick in for decrypt, */ 692 692 { ··· 695 695 if (option (OPTWEED)) 696 696 { 697 697 *chflags |= CH_WEED; /* and respect $weed. */ 698 - *cmflags |= M_CM_WEED; 698 + *cmflags |= MUTT_CM_WEED; 699 699 } 700 700 } 701 701 } ··· 716 716 717 717 if (delete) 718 718 { 719 - mutt_set_flag (Context, h, M_DELETE, 1); 719 + mutt_set_flag (Context, h, MUTT_DELETE, 1); 720 720 if (option (OPTDELETEUNTAG)) 721 - mutt_set_flag (Context, h, M_TAG, 0); 721 + mutt_set_flag (Context, h, MUTT_TAG, 0); 722 722 } 723 723 724 724 return 0; ··· 753 753 need_passphrase = h->security & ENCRYPT; 754 754 app = h->security; 755 755 } 756 - mutt_message_hook (Context, h, M_MESSAGEHOOK); 756 + mutt_message_hook (Context, h, MUTT_MESSAGEHOOK); 757 757 mutt_default_save (buf, sizeof (buf), h); 758 758 } 759 759 else ··· 772 772 773 773 if (h) 774 774 { 775 - mutt_message_hook (Context, h, M_MESSAGEHOOK); 775 + mutt_message_hook (Context, h, MUTT_MESSAGEHOOK); 776 776 mutt_default_save (buf, sizeof (buf), h); 777 777 if (WithCrypto) 778 778 { ··· 819 819 mutt_message (_("Copying to %s..."), buf); 820 820 821 821 #ifdef USE_IMAP 822 - if (Context->magic == M_IMAP && 822 + if (Context->magic == MUTT_IMAP && 823 823 !(decode || decrypt) && mx_is_imap (buf)) 824 824 { 825 825 switch (imap_copy_messages (Context, h, buf, delete)) ··· 834 834 } 835 835 #endif 836 836 837 - if (mx_open_mailbox (buf, M_APPEND, &ctx) != NULL) 837 + if (mx_open_mailbox (buf, MUTT_APPEND, &ctx) != NULL) 838 838 { 839 839 if (h) 840 840 { ··· 850 850 { 851 851 if (Context->hdrs[Context->v2r[i]]->tagged) 852 852 { 853 - mutt_message_hook (Context, Context->hdrs[Context->v2r[i]], M_MESSAGEHOOK); 853 + mutt_message_hook (Context, Context->hdrs[Context->v2r[i]], MUTT_MESSAGEHOOK); 854 854 if (_mutt_save_message(Context->hdrs[Context->v2r[i]], 855 855 &ctx, delete, decode, decrypt) != 0) 856 856 { ··· 861 861 } 862 862 } 863 863 864 - need_buffy_cleanup = (ctx.magic == M_MBOX || ctx.magic == M_MMDF); 864 + need_buffy_cleanup = (ctx.magic == MUTT_MBOX || ctx.magic == MUTT_MMDF); 865 865 866 866 mx_close_mailbox (&ctx, NULL); 867 867 ··· 935 935 snprintf (tmp, sizeof (tmp), _("Convert to %s upon sending?"), 936 936 mutt_get_parameter ("charset", b->parameter)); 937 937 if ((r = mutt_yesorno (tmp, !b->noconv)) != -1) 938 - b->noconv = (r == M_NO); 938 + b->noconv = (r == MUTT_NO); 939 939 } 940 940 941 941 /* inform the user */
+40 -40
compose.c
··· 101 101 { 102 102 mutt_FormatString (b, blen, 0, MuttIndexWindow->cols, NONULL (AttachFormat), mutt_attach_fmt, 103 103 (unsigned long)(((ATTACHPTR **) menu->data)[num]), 104 - M_FORMAT_STAT_FILE | M_FORMAT_ARROWCURSOR); 104 + MUTT_FORMAT_STAT_FILE | MUTT_FORMAT_ARROWCURSOR); 105 105 } 106 106 107 107 ··· 226 226 snprintf(msg, sizeof(msg), _("%s [#%d] modified. Update encoding?"), 227 227 pretty, i+1); 228 228 229 - if((r = mutt_yesorno(msg, M_YES)) == M_YES) 229 + if((r = mutt_yesorno(msg, MUTT_YES)) == MUTT_YES) 230 230 mutt_update_encoding(idx[i]->content); 231 231 else if(r == -1) 232 232 return -1; ··· 279 279 280 280 mutt_addrlist_to_local (*addr); 281 281 rfc822_write_address (buf, sizeof (buf), *addr, 0); 282 - if (mutt_get_field (Prompts[line], buf, sizeof (buf), M_ALIAS) == 0) 282 + if (mutt_get_field (Prompts[line], buf, sizeof (buf), MUTT_ALIAS) == 0) 283 283 { 284 284 rfc822_free_address (addr); 285 285 *addr = mutt_parse_adrlist (*addr, buf); ··· 424 424 unsigned long data, format_flag flags) 425 425 { 426 426 char fmt[SHORT_STRING], tmp[SHORT_STRING]; 427 - int optional = (flags & M_FORMAT_OPTIONAL); 427 + int optional = (flags & MUTT_FORMAT_OPTIONAL); 428 428 MUTTMENU *menu = (MUTTMENU *) data; 429 429 430 430 *buf = 0; ··· 462 462 463 463 if (optional) 464 464 compose_status_line (buf, buflen, col, cols, menu, ifstring); 465 - else if (flags & M_FORMAT_OPTIONAL) 465 + else if (flags & MUTT_FORMAT_OPTIONAL) 466 466 compose_status_line (buf, buflen, col, cols, menu, elsestring); 467 467 468 468 return (src); ··· 527 527 break; 528 528 case OP_COMPOSE_EDIT_FROM: 529 529 menu->redraw = edit_address_list (HDR_FROM, &msg->env->from); 530 - mutt_message_hook (NULL, msg, M_SEND2HOOK); 530 + mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); 531 531 break; 532 532 case OP_COMPOSE_EDIT_TO: 533 533 menu->redraw = edit_address_list (HDR_TO, &msg->env->to); ··· 536 536 crypt_opportunistic_encrypt (msg); 537 537 redraw_crypt_lines (msg); 538 538 } 539 - mutt_message_hook (NULL, msg, M_SEND2HOOK); 539 + mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); 540 540 break; 541 541 case OP_COMPOSE_EDIT_BCC: 542 542 menu->redraw = edit_address_list (HDR_BCC, &msg->env->bcc); ··· 545 545 crypt_opportunistic_encrypt (msg); 546 546 redraw_crypt_lines (msg); 547 547 } 548 - mutt_message_hook (NULL, msg, M_SEND2HOOK); 548 + mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); 549 549 break; 550 550 case OP_COMPOSE_EDIT_CC: 551 551 menu->redraw = edit_address_list (HDR_CC, &msg->env->cc); ··· 554 554 crypt_opportunistic_encrypt (msg); 555 555 redraw_crypt_lines (msg); 556 556 } 557 - mutt_message_hook (NULL, msg, M_SEND2HOOK); 557 + mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); 558 558 break; 559 559 case OP_COMPOSE_EDIT_SUBJECT: 560 560 if (msg->env->subject) ··· 570 570 else 571 571 mutt_window_clrtoeol(MuttIndexWindow); 572 572 } 573 - mutt_message_hook (NULL, msg, M_SEND2HOOK); 573 + mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); 574 574 break; 575 575 case OP_COMPOSE_EDIT_REPLY_TO: 576 576 menu->redraw = edit_address_list (HDR_REPLYTO, &msg->env->reply_to); 577 - mutt_message_hook (NULL, msg, M_SEND2HOOK); 577 + mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); 578 578 break; 579 579 case OP_COMPOSE_EDIT_FCC: 580 580 strfcpy (buf, fcc, sizeof (buf)); 581 - if (mutt_get_field ("Fcc: ", buf, sizeof (buf), M_FILE | M_CLEAR) == 0) 581 + if (mutt_get_field ("Fcc: ", buf, sizeof (buf), MUTT_FILE | MUTT_CLEAR) == 0) 582 582 { 583 583 strfcpy (fcc, buf, fcclen); 584 584 mutt_pretty_mailbox (fcc, fcclen); ··· 587 587 fccSet = 1; 588 588 } 589 589 MAYBE_REDRAW (menu->redraw); 590 - mutt_message_hook (NULL, msg, M_SEND2HOOK); 590 + mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); 591 591 break; 592 592 case OP_COMPOSE_EDIT_MESSAGE: 593 593 if (Editor && (mutt_strcmp ("builtin", Editor) != 0) && !option (OPTEDITHDRS)) ··· 595 595 mutt_edit_file (Editor, msg->content->filename); 596 596 mutt_update_encoding (msg->content); 597 597 menu->redraw = REDRAW_FULL; 598 - mutt_message_hook (NULL, msg, M_SEND2HOOK); 598 + mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); 599 599 break; 600 600 } 601 601 /* fall through */ ··· 641 641 } 642 642 643 643 menu->redraw = REDRAW_FULL; 644 - mutt_message_hook (NULL, msg, M_SEND2HOOK); 644 + mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); 645 645 break; 646 646 647 647 ··· 672 672 unset_option(OPTNEEDREDRAW); 673 673 } 674 674 675 - mutt_message_hook (NULL, msg, M_SEND2HOOK); 675 + mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); 676 676 break; 677 677 678 678 ··· 720 720 721 721 menu->redraw |= REDRAW_INDEX | REDRAW_STATUS; 722 722 } 723 - mutt_message_hook (NULL, msg, M_SEND2HOOK); 723 + mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); 724 724 break; 725 725 726 726 case OP_COMPOSE_ATTACH_MESSAGE: ··· 756 756 757 757 menu->redraw = REDRAW_FULL; 758 758 759 - ctx = mx_open_mailbox (fname, M_READONLY, NULL); 759 + ctx = mx_open_mailbox (fname, MUTT_READONLY, NULL); 760 760 if (ctx == NULL) 761 761 { 762 762 mutt_error (_("Unable to open mailbox %s"), fname); ··· 827 827 Sort = oldSort; 828 828 SortAux = oldSortAux; 829 829 } 830 - mutt_message_hook (NULL, msg, M_SEND2HOOK); 830 + mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); 831 831 break; 832 832 833 833 case OP_DELETE: ··· 849 849 msg->content = idx[0]->content; 850 850 851 851 menu->redraw |= REDRAW_STATUS; 852 - mutt_message_hook (NULL, msg, M_SEND2HOOK); 852 + mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); 853 853 break; 854 854 855 855 #define CURRENT idx[menu->current]->content ··· 868 868 else 869 869 mutt_message (_("The current attachment will be converted.")); 870 870 menu->redraw = REDRAW_CURRENT; 871 - mutt_message_hook (NULL, msg, M_SEND2HOOK); 871 + mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); 872 872 break; 873 873 } 874 874 #undef CURRENT ··· 885 885 mutt_str_replace (&idx[menu->current]->content->description, buf); 886 886 menu->redraw = REDRAW_CURRENT; 887 887 } 888 - mutt_message_hook (NULL, msg, M_SEND2HOOK); 888 + mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); 889 889 break; 890 890 891 891 case OP_COMPOSE_UPDATE_ENCODING: ··· 905 905 mutt_update_encoding(idx[menu->current]->content); 906 906 menu->redraw = REDRAW_CURRENT | REDRAW_STATUS; 907 907 } 908 - mutt_message_hook (NULL, msg, M_SEND2HOOK); 908 + mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); 909 909 break; 910 910 911 911 case OP_COMPOSE_TOGGLE_DISPOSITION: ··· 924 924 925 925 menu->redraw = REDRAW_CURRENT; 926 926 } 927 - mutt_message_hook (NULL, msg, M_SEND2HOOK); 927 + mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); 928 928 break; 929 929 930 930 case OP_COMPOSE_EDIT_ENCODING: ··· 943 943 else 944 944 mutt_error _("Invalid encoding."); 945 945 } 946 - mutt_message_hook (NULL, msg, M_SEND2HOOK); 946 + mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); 947 947 break; 948 948 949 949 case OP_COMPOSE_SEND_MESSAGE: ··· 969 969 if ((i = query_quadoption (OPT_COPY, 970 970 _("Save a copy of this message?"))) == -1) 971 971 break; 972 - else if (i == M_NO) 972 + else if (i == MUTT_NO) 973 973 *fcc = 0; 974 974 } 975 975 ··· 982 982 mutt_edit_file (NONULL(Editor), idx[menu->current]->content->filename); 983 983 mutt_update_encoding (idx[menu->current]->content); 984 984 menu->redraw = REDRAW_CURRENT | REDRAW_STATUS; 985 - mutt_message_hook (NULL, msg, M_SEND2HOOK); 985 + mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); 986 986 break; 987 987 988 988 case OP_COMPOSE_TOGGLE_UNLINK: ··· 1023 1023 CHECK_COUNT; 1024 1024 strfcpy (fname, idx[menu->current]->content->filename, sizeof (fname)); 1025 1025 mutt_pretty_mailbox (fname, sizeof (fname)); 1026 - if (mutt_get_field (_("Rename to: "), fname, sizeof (fname), M_FILE) 1026 + if (mutt_get_field (_("Rename to: "), fname, sizeof (fname), MUTT_FILE) 1027 1027 == 0 && fname[0]) 1028 1028 { 1029 1029 if (stat(idx[menu->current]->content->filename, &st) == -1) ··· 1045 1045 mutt_stamp_attachment(idx[menu->current]->content); 1046 1046 1047 1047 } 1048 - mutt_message_hook (NULL, msg, M_SEND2HOOK); 1048 + mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); 1049 1049 break; 1050 1050 1051 1051 case OP_COMPOSE_NEW_MIME: ··· 1057 1057 1058 1058 mutt_window_clearline (MuttMessageWindow, 0); 1059 1059 fname[0] = 0; 1060 - if (mutt_get_field (_("New file: "), fname, sizeof (fname), M_FILE) 1060 + if (mutt_get_field (_("New file: "), fname, sizeof (fname), MUTT_FILE) 1061 1061 != 0 || !fname[0]) 1062 1062 continue; 1063 1063 mutt_expand_path (fname, sizeof (fname)); ··· 1113 1113 menu->redraw = REDRAW_FULL; 1114 1114 } 1115 1115 } 1116 - mutt_message_hook (NULL, msg, M_SEND2HOOK); 1116 + mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); 1117 1117 break; 1118 1118 1119 1119 case OP_COMPOSE_EDIT_MIME: ··· 1123 1123 mutt_update_encoding (idx[menu->current]->content); 1124 1124 menu->redraw = REDRAW_FULL; 1125 1125 } 1126 - mutt_message_hook (NULL, msg, M_SEND2HOOK); 1126 + mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); 1127 1127 break; 1128 1128 1129 1129 case OP_VIEW_ATTACH: ··· 1154 1154 if (op == OP_FILTER) /* cte might have changed */ 1155 1155 menu->redraw = menu->tagprefix ? REDRAW_FULL : REDRAW_CURRENT; 1156 1156 menu->redraw |= REDRAW_STATUS; 1157 - mutt_message_hook (NULL, msg, M_SEND2HOOK); 1157 + mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); 1158 1158 break; 1159 1159 1160 1160 case OP_EXIT: 1161 - if ((i = query_quadoption (OPT_POSTPONE, _("Postpone this message?"))) == M_NO) 1161 + if ((i = query_quadoption (OPT_POSTPONE, _("Postpone this message?"))) == MUTT_NO) 1162 1162 { 1163 1163 for (i = 0; i < idxlen; i++) 1164 1164 if (idx[i]->unowned) 1165 1165 idx[i]->content->unlink = 0; 1166 1166 1167 - if (!(flags & M_COMPOSE_NOFREEHEADER)) 1167 + if (!(flags & MUTT_COMPOSE_NOFREEHEADER)) 1168 1168 { 1169 1169 while (idxlen-- > 0) 1170 1170 { ··· 1249 1249 if (msg->security & (ENCRYPT | SIGN)) 1250 1250 { 1251 1251 if (mutt_yesorno (_("S/MIME already selected. Clear & continue ? "), 1252 - M_YES) != M_YES) 1252 + MUTT_YES) != MUTT_YES) 1253 1253 { 1254 1254 mutt_clear_error (); 1255 1255 break; ··· 1263 1263 } 1264 1264 msg->security = crypt_pgp_send_menu (msg, &menu->redraw); 1265 1265 redraw_crypt_lines (msg); 1266 - mutt_message_hook (NULL, msg, M_SEND2HOOK); 1266 + mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); 1267 1267 break; 1268 1268 1269 1269 ··· 1282 1282 if (msg->security & (ENCRYPT | SIGN)) 1283 1283 { 1284 1284 if (mutt_yesorno (_("PGP already selected. Clear & continue ? "), 1285 - M_YES) != M_YES) 1285 + MUTT_YES) != MUTT_YES) 1286 1286 { 1287 1287 mutt_clear_error (); 1288 1288 break; ··· 1296 1296 } 1297 1297 msg->security = crypt_smime_send_menu(msg, &menu->redraw); 1298 1298 redraw_crypt_lines (msg); 1299 - mutt_message_hook (NULL, msg, M_SEND2HOOK); 1299 + mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); 1300 1300 break; 1301 1301 1302 1302 ··· 1304 1304 case OP_COMPOSE_MIX: 1305 1305 1306 1306 mix_make_chain (&msg->chain, &menu->redraw); 1307 - mutt_message_hook (NULL, msg, M_SEND2HOOK); 1307 + mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); 1308 1308 break; 1309 1309 #endif 1310 1310
+34 -34
copy.c
··· 466 466 * hdr header of message being copied 467 467 * body structure of message being copied 468 468 * flags 469 - * M_CM_NOHEADER don't copy header 470 - * M_CM_PREFIX quote header and body 471 - * M_CM_DECODE decode message body to text/plain 472 - * M_CM_DISPLAY displaying output to the user 473 - * M_CM_PRINTING printing the message 474 - * M_CM_UPDATE update structures in memory after syncing 475 - * M_CM_DECODE_PGP used for decoding PGP messages 476 - * M_CM_CHARCONV perform character set conversion 469 + * MUTT_CM_NOHEADER don't copy header 470 + * MUTT_CM_PREFIX quote header and body 471 + * MUTT_CM_DECODE decode message body to text/plain 472 + * MUTT_CM_DISPLAY displaying output to the user 473 + * MUTT_CM_PRINTING printing the message 474 + * MUTT_CM_UPDATE update structures in memory after syncing 475 + * MUTT_CM_DECODE_PGP used for decoding PGP messages 476 + * MUTT_CM_CHARCONV perform character set conversion 477 477 * chflags flags to mutt_copy_header() 478 478 */ 479 479 ··· 486 486 LOFF_T new_offset = -1; 487 487 int rc = 0; 488 488 489 - if (flags & M_CM_PREFIX) 489 + if (flags & MUTT_CM_PREFIX) 490 490 { 491 491 if (option (OPTTEXTFLOWED)) 492 492 strfcpy (prefix, ">", sizeof (prefix)); ··· 494 494 _mutt_make_string (prefix, sizeof (prefix), NONULL (Prefix), Context, hdr, 0); 495 495 } 496 496 497 - if ((flags & M_CM_NOHEADER) == 0) 497 + if ((flags & MUTT_CM_NOHEADER) == 0) 498 498 { 499 - if (flags & M_CM_PREFIX) 499 + if (flags & MUTT_CM_PREFIX) 500 500 chflags |= CH_PREFIX; 501 501 502 502 else if (hdr->attach_del && (chflags & CH_UPDATE_LEN)) ··· 547 547 #endif 548 548 549 549 /* Update original message if we are sync'ing a mailfolder */ 550 - if (flags & M_CM_UPDATE) 550 + if (flags & MUTT_CM_UPDATE) 551 551 { 552 552 hdr->attach_del = 0; 553 553 hdr->lines = new_lines; ··· 576 576 new_offset = ftello (fpout); 577 577 } 578 578 579 - if (flags & M_CM_DECODE) 579 + if (flags & MUTT_CM_DECODE) 580 580 { 581 581 /* now make a text/plain version of the message */ 582 582 memset (&s, 0, sizeof (STATE)); 583 583 s.fpin = fpin; 584 584 s.fpout = fpout; 585 - if (flags & M_CM_PREFIX) 585 + if (flags & MUTT_CM_PREFIX) 586 586 s.prefix = prefix; 587 - if (flags & M_CM_DISPLAY) 588 - s.flags |= M_DISPLAY; 589 - if (flags & M_CM_PRINTING) 590 - s.flags |= M_PRINTING; 591 - if (flags & M_CM_WEED) 592 - s.flags |= M_WEED; 593 - if (flags & M_CM_CHARCONV) 594 - s.flags |= M_CHARCONV; 595 - if (flags & M_CM_REPLYING) 596 - s.flags |= M_REPLYING; 587 + if (flags & MUTT_CM_DISPLAY) 588 + s.flags |= MUTT_DISPLAY; 589 + if (flags & MUTT_CM_PRINTING) 590 + s.flags |= MUTT_PRINTING; 591 + if (flags & MUTT_CM_WEED) 592 + s.flags |= MUTT_WEED; 593 + if (flags & MUTT_CM_CHARCONV) 594 + s.flags |= MUTT_CHARCONV; 595 + if (flags & MUTT_CM_REPLYING) 596 + s.flags |= MUTT_REPLYING; 597 597 598 - if (WithCrypto && flags & M_CM_VERIFY) 599 - s.flags |= M_VERIFY; 598 + if (WithCrypto && flags & MUTT_CM_VERIFY) 599 + s.flags |= MUTT_VERIFY; 600 600 601 601 rc = mutt_body_handler (body, &s); 602 602 } 603 603 else if (WithCrypto 604 - && (flags & M_CM_DECODE_CRYPT) && (hdr->security & ENCRYPT)) 604 + && (flags & MUTT_CM_DECODE_CRYPT) && (hdr->security & ENCRYPT)) 605 605 { 606 606 BODY *cur = NULL; 607 607 FILE *fp; 608 608 609 609 if ((WithCrypto & APPLICATION_PGP) 610 - && (flags & M_CM_DECODE_PGP) && (hdr->security & APPLICATION_PGP) && 610 + && (flags & MUTT_CM_DECODE_PGP) && (hdr->security & APPLICATION_PGP) && 611 611 hdr->content->type == TYPEMULTIPART) 612 612 { 613 613 if (crypt_pgp_decrypt_mime (fpin, &fp, hdr->content, &cur)) ··· 616 616 } 617 617 618 618 if ((WithCrypto & APPLICATION_SMIME) 619 - && (flags & M_CM_DECODE_SMIME) && (hdr->security & APPLICATION_SMIME) 619 + && (flags & MUTT_CM_DECODE_SMIME) && (hdr->security & APPLICATION_SMIME) 620 620 && hdr->content->type == TYPEAPPLICATION) 621 621 { 622 622 if (crypt_smime_decrypt_mime (fpin, &fp, hdr->content, &cur)) ··· 645 645 else 646 646 { 647 647 fseeko (fpin, body->offset, 0); 648 - if (flags & M_CM_PREFIX) 648 + if (flags & MUTT_CM_PREFIX) 649 649 { 650 650 int c; 651 651 size_t bytes = body->length; ··· 665 665 return -1; 666 666 } 667 667 668 - if ((flags & M_CM_UPDATE) && (flags & M_CM_NOHEADER) == 0 668 + if ((flags & MUTT_CM_UPDATE) && (flags & MUTT_CM_NOHEADER) == 0 669 669 && new_offset != -1) 670 670 { 671 671 body->offset = new_offset; ··· 719 719 if (fgets (buf, sizeof (buf), fpin) == NULL) 720 720 return -1; 721 721 722 - if ((msg = mx_open_new_message (dest, hdr, is_from (buf, NULL, 0, NULL) ? 0 : M_ADD_FROM)) == NULL) 722 + if ((msg = mx_open_new_message (dest, hdr, is_from (buf, NULL, 0, NULL) ? 0 : MUTT_ADD_FROM)) == NULL) 723 723 return -1; 724 - if (dest->magic == M_MBOX || dest->magic == M_MMDF) 724 + if (dest->magic == MUTT_MBOX || dest->magic == MUTT_MMDF) 725 725 chflags |= CH_FROM | CH_FORCE_FROM; 726 - chflags |= (dest->magic == M_MAILDIR ? CH_NOSTATUS : CH_UPDATE); 726 + chflags |= (dest->magic == MUTT_MAILDIR ? CH_NOSTATUS : CH_UPDATE); 727 727 r = _mutt_copy_message (msg->fp, fpin, hdr, body, flags, chflags); 728 728 if (mx_commit_message (msg, dest) != 0) 729 729 r = -1;
+13 -13
copy.h
··· 17 17 */ 18 18 19 19 /* flags to _mutt_copy_message */ 20 - #define M_CM_NOHEADER 1 /* don't copy the message header */ 21 - #define M_CM_PREFIX (1<<1) /* quote the message */ 22 - #define M_CM_DECODE (1<<2) /* decode the message body into text/plain */ 23 - #define M_CM_DISPLAY (1<<3) /* output is displayed to the user */ 24 - #define M_CM_UPDATE (1<<4) /* update structs on sync */ 25 - #define M_CM_WEED (1<<5) /* weed message/rfc822 attachment headers */ 26 - #define M_CM_CHARCONV (1<<6) /* perform character set conversions */ 27 - #define M_CM_PRINTING (1<<7) /* printing the message - display light */ 28 - #define M_CM_REPLYING (1<<8) /* replying the message */ 20 + #define MUTT_CM_NOHEADER 1 /* don't copy the message header */ 21 + #define MUTT_CM_PREFIX (1<<1) /* quote the message */ 22 + #define MUTT_CM_DECODE (1<<2) /* decode the message body into text/plain */ 23 + #define MUTT_CM_DISPLAY (1<<3) /* output is displayed to the user */ 24 + #define MUTT_CM_UPDATE (1<<4) /* update structs on sync */ 25 + #define MUTT_CM_WEED (1<<5) /* weed message/rfc822 attachment headers */ 26 + #define MUTT_CM_CHARCONV (1<<6) /* perform character set conversions */ 27 + #define MUTT_CM_PRINTING (1<<7) /* printing the message - display light */ 28 + #define MUTT_CM_REPLYING (1<<8) /* replying the message */ 29 29 30 - #define M_CM_DECODE_PGP (1<<9) /* used for decoding PGP messages */ 31 - #define M_CM_DECODE_SMIME (1<<10) /* used for decoding S/MIME messages */ 32 - #define M_CM_DECODE_CRYPT (M_CM_DECODE_PGP | M_CM_DECODE_SMIME) 30 + #define MUTT_CM_DECODE_PGP (1<<9) /* used for decoding PGP messages */ 31 + #define MUTT_CM_DECODE_SMIME (1<<10) /* used for decoding S/MIME messages */ 32 + #define MUTT_CM_DECODE_CRYPT (MUTT_CM_DECODE_PGP | MUTT_CM_DECODE_SMIME) 33 33 34 - #define M_CM_VERIFY (1<<11) /* do signature verification */ 34 + #define MUTT_CM_VERIFY (1<<11) /* do signature verification */ 35 35 36 36 /* flags for mutt_copy_header() */ 37 37 #define CH_UPDATE 1 /* update the status and x-status fields? */
+25 -25
crypt-gpgme.c
··· 1454 1454 /* pubkey not present */ 1455 1455 } 1456 1456 1457 - if (!s || !s->fpout || !(s->flags & M_DISPLAY)) 1457 + if (!s || !s->fpout || !(s->flags & MUTT_DISPLAY)) 1458 1458 ; /* No state information so no way to print anything. */ 1459 1459 else if (err) 1460 1460 { ··· 1724 1724 } 1725 1725 } 1726 1726 mutt_need_hard_redraw (); 1727 - if ((s->flags & M_DISPLAY)) 1727 + if ((s->flags & MUTT_DISPLAY)) 1728 1728 { 1729 1729 char buf[200]; 1730 1730 ··· 1760 1760 if(r_is_signed) 1761 1761 *r_is_signed = -1; /* A signature exists. */ 1762 1762 1763 - if ((s->flags & M_DISPLAY)) 1763 + if ((s->flags & MUTT_DISPLAY)) 1764 1764 state_attach_puts (_("[-- Begin signature " 1765 1765 "information --]\n"), s); 1766 1766 for(idx = 0; (res = show_one_sig_status (ctx, idx, s)) != -1; idx++) ··· 1773 1773 if (!anybad && idx && r_is_signed && *r_is_signed) 1774 1774 *r_is_signed = anywarn? 2:1; /* Good signature. */ 1775 1775 1776 - if ((s->flags & M_DISPLAY)) 1776 + if ((s->flags & MUTT_DISPLAY)) 1777 1777 state_attach_puts (_("[-- End signature " 1778 1778 "information --]\n\n"), s); 1779 1779 } ··· 2293 2293 2294 2294 /* fromcode comes from the MIME Content-Type charset label. It might 2295 2295 * be a wrong label, so we want the ability to do corrections via 2296 - * charset-hooks. Therefore we set flags to M_ICONV_HOOK_FROM. 2296 + * charset-hooks. Therefore we set flags to MUTT_ICONV_HOOK_FROM. 2297 2297 */ 2298 - fc = fgetconv_open (fp, charset, Charset, M_ICONV_HOOK_FROM); 2298 + fc = fgetconv_open (fp, charset, Charset, MUTT_ICONV_HOOK_FROM); 2299 2299 2300 2300 for (complete = 1, armor_header = 1; 2301 2301 fgetconvs (buf, sizeof (buf), fc) != NULL; ··· 2395 2395 } 2396 2396 2397 2397 have_any_sigs = (have_any_sigs 2398 - || (clearsign && (s->flags & M_VERIFY))); 2398 + || (clearsign && (s->flags & MUTT_VERIFY))); 2399 2399 2400 2400 /* Copy PGP material to an data container */ 2401 2401 armored_data = file_to_data_object (s->fpin, m->offset, m->length); ··· 2404 2404 { 2405 2405 pgp_gpgme_extract_keys (armored_data, &pgpout, 1); 2406 2406 } 2407 - else if (!clearsign || (s->flags & M_VERIFY)) 2407 + else if (!clearsign || (s->flags & MUTT_VERIFY)) 2408 2408 { 2409 2409 unsigned int sig_stat = 0; 2410 2410 gpgme_data_t plaintext; ··· 2457 2457 2458 2458 have_any_sigs = 0; 2459 2459 maybe_goodsig = 0; 2460 - if ((s->flags & M_DISPLAY) && sig_stat) 2460 + if ((s->flags & MUTT_DISPLAY) && sig_stat) 2461 2461 { 2462 2462 int res, idx; 2463 2463 int anybad = 0; ··· 2501 2501 * seems to be a reasonable guess. 2502 2502 */ 2503 2503 2504 - if(s->flags & M_DISPLAY) 2504 + if(s->flags & MUTT_DISPLAY) 2505 2505 { 2506 2506 if (needpass) 2507 2507 state_attach_puts (_("[-- BEGIN PGP MESSAGE --]\n\n"), s); ··· 2532 2532 fgetconv_close (&fc); 2533 2533 } 2534 2534 2535 - if (s->flags & M_DISPLAY) 2535 + if (s->flags & MUTT_DISPLAY) 2536 2536 { 2537 2537 state_putc ('\n', s); 2538 2538 if (needpass) ··· 2593 2593 mutt_mktemp (tempfile, sizeof (tempfile)); 2594 2594 if (!(fpout = safe_fopen (tempfile, "w+"))) 2595 2595 { 2596 - if (s->flags & M_DISPLAY) 2596 + if (s->flags & MUTT_DISPLAY) 2597 2597 state_attach_puts (_("[-- Error: could not create temporary file! " 2598 2598 "--]\n"), s); 2599 2599 return -1; ··· 2604 2604 { 2605 2605 tattach->goodsig = is_signed > 0; 2606 2606 2607 - if (s->flags & M_DISPLAY) 2607 + if (s->flags & MUTT_DISPLAY) 2608 2608 state_attach_puts (is_signed? 2609 2609 _("[-- The following data is PGP/MIME signed and encrypted --]\n\n"): 2610 2610 _("[-- The following data is PGP/MIME encrypted --]\n\n"), ··· 2625 2625 if (mutt_is_multipart_signed (tattach) && !tattach->next) 2626 2626 a->goodsig |= tattach->goodsig; 2627 2627 2628 - if (s->flags & M_DISPLAY) 2628 + if (s->flags & MUTT_DISPLAY) 2629 2629 { 2630 2630 state_puts ("\n", s); 2631 2631 state_attach_puts (is_signed? ··· 2666 2666 mutt_mktemp (tempfile, sizeof (tempfile)); 2667 2667 if (!(fpout = safe_fopen (tempfile, "w+"))) 2668 2668 { 2669 - if (s->flags & M_DISPLAY) 2669 + if (s->flags & MUTT_DISPLAY) 2670 2670 state_attach_puts (_("[-- Error: could not create temporary file! " 2671 2671 "--]\n"), s); 2672 2672 return -1; ··· 2677 2677 { 2678 2678 tattach->goodsig = is_signed > 0; 2679 2679 2680 - if (s->flags & M_DISPLAY) 2680 + if (s->flags & MUTT_DISPLAY) 2681 2681 state_attach_puts (is_signed? 2682 2682 _("[-- The following data is S/MIME signed --]\n\n"): 2683 2683 _("[-- The following data is S/MIME encrypted --]\n\n"), ··· 2706 2706 a->warnsig = tattach->warnsig; 2707 2707 } 2708 2708 2709 - if (s->flags & M_DISPLAY) 2709 + if (s->flags & MUTT_DISPLAY) 2710 2710 { 2711 2711 state_puts ("\n", s); 2712 2712 state_attach_puts (is_signed? ··· 2757 2757 crypt_entry_t *entry; 2758 2758 crypt_key_t *key; 2759 2759 int kflags = 0; 2760 - int optional = (flags & M_FORMAT_OPTIONAL); 2760 + int optional = (flags & MUTT_FORMAT_OPTIONAL); 2761 2761 const char *s = NULL; 2762 2762 unsigned long val; 2763 2763 ··· 2943 2943 2944 2944 if (optional) 2945 2945 mutt_FormatString (dest, destlen, col, cols, ifstring, mutt_attach_fmt, data, 0); 2946 - else if (flags & M_FORMAT_OPTIONAL) 2946 + else if (flags & MUTT_FORMAT_OPTIONAL) 2947 2947 mutt_FormatString (dest, destlen, col, cols, elsestring, mutt_attach_fmt, data, 0); 2948 2948 return (src); 2949 2949 } ··· 2958 2958 entry.num = num + 1; 2959 2959 2960 2960 mutt_FormatString (s, l, 0, MuttIndexWindow->cols, NONULL (PgpEntryFormat), crypt_entry_fmt, 2961 - (unsigned long) &entry, M_FORMAT_ARROWCURSOR); 2961 + (unsigned long) &entry, MUTT_FORMAT_ARROWCURSOR); 2962 2962 } 2963 2963 2964 2964 /* Compare two addresses and the keyid to be used for sorting. */ ··· 4398 4398 for (;;) 4399 4399 { 4400 4400 resp[0] = 0; 4401 - if (mutt_get_field (tag, resp, sizeof (resp), M_CLEAR) != 0) 4401 + if (mutt_get_field (tag, resp, sizeof (resp), MUTT_CLEAR) != 0) 4402 4402 return NULL; 4403 4403 4404 4404 if (whatfor) ··· 4461 4461 if (crypt_hook != NULL) 4462 4462 { 4463 4463 crypt_hook_val = crypt_hook->data; 4464 - r = M_YES; 4464 + r = MUTT_YES; 4465 4465 if (! oppenc_mode && option(OPTCRYPTCONFIRMHOOK)) 4466 4466 { 4467 4467 snprintf (buf, sizeof (buf), _("Use keyID = \"%s\" for %s?"), 4468 4468 crypt_hook_val, p->mailbox); 4469 - r = mutt_yesorno (buf, M_YES); 4469 + r = mutt_yesorno (buf, MUTT_YES); 4470 4470 } 4471 - if (r == M_YES) 4471 + if (r == MUTT_YES) 4472 4472 { 4473 4473 if (crypt_is_numerical_keyid (crypt_hook_val)) 4474 4474 { ··· 4497 4497 #endif 4498 4498 } 4499 4499 } 4500 - else if (r == M_NO) 4500 + else if (r == MUTT_NO) 4501 4501 { 4502 4502 if (key_selected || (crypt_hook->next != NULL)) 4503 4503 {
+11 -11
crypt.c
··· 149 149 ascii_strcasecmp (msg->content->subtype, "plain")) 150 150 { 151 151 if ((i = query_quadoption (OPT_PGPMIMEAUTO, 152 - _("Inline PGP can't be used with attachments. Revert to PGP/MIME?"))) != M_YES) 152 + _("Inline PGP can't be used with attachments. Revert to PGP/MIME?"))) != MUTT_YES) 153 153 { 154 154 mutt_error _("Mail not sent: inline PGP can't be used with attachments."); 155 155 return -1; ··· 167 167 } 168 168 169 169 /* otherwise inline won't work...ask for revert */ 170 - if ((i = query_quadoption (OPT_PGPMIMEAUTO, _("Message can't be sent inline. Revert to using PGP/MIME?"))) != M_YES) 170 + if ((i = query_quadoption (OPT_PGPMIMEAUTO, _("Message can't be sent inline. Revert to using PGP/MIME?"))) != MUTT_YES) 171 171 { 172 172 mutt_error _("Mail not sent."); 173 173 return -1; ··· 699 699 && (Context->hdrs[Context->v2r[i]]->security & APPLICATION_PGP)) 700 700 { 701 701 mutt_copy_message (fpout, Context, Context->hdrs[Context->v2r[i]], 702 - M_CM_DECODE|M_CM_CHARCONV, 0); 702 + MUTT_CM_DECODE|MUTT_CM_CHARCONV, 0); 703 703 fflush(fpout); 704 704 705 705 mutt_endwin (_("Trying to extract PGP keys...\n")); ··· 711 711 { 712 712 if (Context->hdrs[Context->v2r[i]]->security & ENCRYPT) 713 713 mutt_copy_message (fpout, Context, Context->hdrs[Context->v2r[i]], 714 - M_CM_NOHEADER|M_CM_DECODE_CRYPT 715 - |M_CM_DECODE_SMIME, 0); 714 + MUTT_CM_NOHEADER|MUTT_CM_DECODE_CRYPT 715 + |MUTT_CM_DECODE_SMIME, 0); 716 716 else 717 717 mutt_copy_message (fpout, Context, 718 718 Context->hdrs[Context->v2r[i]], 0, 0); ··· 744 744 if ((WithCrypto & APPLICATION_PGP) 745 745 && (h->security & APPLICATION_PGP)) 746 746 { 747 - mutt_copy_message (fpout, Context, h, M_CM_DECODE|M_CM_CHARCONV, 0); 747 + mutt_copy_message (fpout, Context, h, MUTT_CM_DECODE|MUTT_CM_CHARCONV, 0); 748 748 fflush(fpout); 749 749 mutt_endwin (_("Trying to extract PGP keys...\n")); 750 750 crypt_pgp_invoke_import (tempfname); ··· 754 754 && (h->security & APPLICATION_SMIME)) 755 755 { 756 756 if (h->security & ENCRYPT) 757 - mutt_copy_message (fpout, Context, h, M_CM_NOHEADER 758 - |M_CM_DECODE_CRYPT 759 - |M_CM_DECODE_SMIME, 0); 757 + mutt_copy_message (fpout, Context, h, MUTT_CM_NOHEADER 758 + |MUTT_CM_DECODE_CRYPT 759 + |MUTT_CM_DECODE_SMIME, 0); 760 760 else 761 761 mutt_copy_message (fpout, Context, h, 0, 0); 762 762 ··· 953 953 return mutt_body_handler (a, s); 954 954 } 955 955 956 - if (s->flags & M_DISPLAY) 956 + if (s->flags & MUTT_DISPLAY) 957 957 { 958 958 959 959 crypt_fetch_signatures (&signatures, a->next, &sigcnt); ··· 1009 1009 1010 1010 rc = mutt_body_handler (a, s); 1011 1011 1012 - if (s->flags & M_DISPLAY && sigcnt) 1012 + if (s->flags & MUTT_DISPLAY && sigcnt) 1013 1013 state_attach_puts (_("\n[-- End of signed data --]\n"), s); 1014 1014 1015 1015 return rc;
+13 -13
curs_lib.c
··· 245 245 * ensure there is enough room for the answer and truncate the question 246 246 * to fit. 247 247 */ 248 - safe_asprintf (&answer_string, " ([%s]/%s): ", def == M_YES ? yes : no, def == M_YES ? no : yes); 248 + safe_asprintf (&answer_string, " ([%s]/%s): ", def == MUTT_YES ? yes : no, def == MUTT_YES ? no : yes); 249 249 answer_string_len = mutt_strwidth (answer_string); 250 250 /* maxlen here is sort of arbitrary, so pick a reasonable upper bound */ 251 251 msglen = mutt_wstr_trunc (msg, 4*MuttMessageWindow->cols, MuttMessageWindow->cols - answer_string_len, NULL); ··· 276 276 #endif 277 277 (tolower (ch.ch) == 'y')) 278 278 { 279 - def = M_YES; 279 + def = MUTT_YES; 280 280 break; 281 281 } 282 282 else if ( ··· 286 286 #endif 287 287 (tolower (ch.ch) == 'n')) 288 288 { 289 - def = M_NO; 289 + def = MUTT_NO; 290 290 break; 291 291 } 292 292 else ··· 304 304 305 305 if (def != -1) 306 306 { 307 - addstr ((char *) (def == M_YES ? yes : no)); 307 + addstr ((char *) (def == MUTT_YES ? yes : no)); 308 308 mutt_refresh (); 309 309 } 310 310 else ··· 323 323 curs_set (1); 324 324 if (Timeout) 325 325 timeout (-1); /* restore blocking operation */ 326 - if (mutt_yesorno (_("Exit Mutt?"), M_YES) == M_YES) 326 + if (mutt_yesorno (_("Exit Mutt?"), MUTT_YES) == MUTT_YES) 327 327 { 328 328 endwin (); 329 329 exit (1); ··· 395 395 progress->msg = msg; 396 396 progress->size = size; 397 397 if (progress->size) { 398 - if (progress->flags & M_PROGRESS_SIZE) 398 + if (progress->flags & MUTT_PROGRESS_SIZE) 399 399 mutt_pretty_size (progress->sizestr, sizeof (progress->sizestr), 400 400 progress->size); 401 401 else ··· 433 433 goto out; 434 434 435 435 /* refresh if size > inc */ 436 - if (progress->flags & M_PROGRESS_SIZE && 436 + if (progress->flags & MUTT_PROGRESS_SIZE && 437 437 (pos >= progress->pos + (progress->inc << 10))) 438 438 update = 1; 439 439 else if (pos >= progress->pos + progress->inc) ··· 453 453 454 454 if (update) 455 455 { 456 - if (progress->flags & M_PROGRESS_SIZE) 456 + if (progress->flags & MUTT_PROGRESS_SIZE) 457 457 { 458 458 pos = pos / (progress->inc << 10) * (progress->inc << 10); 459 459 mutt_pretty_size (posstr, sizeof (posstr), pos); ··· 756 756 { 757 757 mutt_refresh (); 758 758 buf[0] = 0; 759 - _mutt_select_file (buf, blen, M_SEL_FOLDER | (multiple ? M_SEL_MULTI : 0), 759 + _mutt_select_file (buf, blen, MUTT_SEL_FOLDER | (multiple ? MUTT_SEL_MULTI : 0), 760 760 files, numfiles); 761 761 *redraw = REDRAW_FULL; 762 762 } ··· 766 766 767 767 sprintf (pc, "%s: ", prompt); /* __SPRINTF_CHECKED__ */ 768 768 mutt_unget_event (ch.op ? 0 : ch.ch, ch.op ? ch.op : 0); 769 - if (_mutt_get_field (pc, buf, blen, (buffy ? M_EFILE : M_FILE) | M_CLEAR, multiple, files, numfiles) 769 + if (_mutt_get_field (pc, buf, blen, (buffy ? MUTT_EFILE : MUTT_FILE) | MUTT_CLEAR, multiple, files, numfiles) 770 770 != 0) 771 771 buf[0] = 0; 772 772 MAYBE_REDRAW (*redraw); ··· 950 950 k = (k == (size_t)(-1)) ? 1 : n; 951 951 wc = replacement_char (); 952 952 } 953 - if (arboreal && wc < M_TREE_MAX) 953 + if (arboreal && wc < MUTT_TREE_MAX) 954 954 w = 1; /* hack */ 955 955 else 956 956 { ··· 1128 1128 wc = replacement_char (); 1129 1129 } 1130 1130 cw = wcwidth (wc); 1131 - /* hack because M_TREE symbols aren't turned into characters 1131 + /* hack because MUTT_TREE symbols aren't turned into characters 1132 1132 * until rendered by print_enriched_string (#3364) */ 1133 - if (cw < 0 && cl == 1 && src[0] && src[0] < M_TREE_MAX) 1133 + if (cw < 0 && cl == 1 && src[0] && src[0] < MUTT_TREE_MAX) 1134 1134 cw = 1; 1135 1135 else if (cw < 0) 1136 1136 cw = 0; /* unprintable wchar */
+62 -62
curs_main.c
··· 188 188 189 189 void index_make_entry (char *s, size_t l, MUTTMENU *menu, int num) 190 190 { 191 - format_flag flag = M_FORMAT_MAKEPRINT | M_FORMAT_ARROWCURSOR | M_FORMAT_INDEX; 191 + format_flag flag = MUTT_FORMAT_MAKEPRINT | MUTT_FORMAT_ARROWCURSOR | MUTT_FORMAT_INDEX; 192 192 int edgemsgno, reverse = Sort & SORT_REVERSE; 193 193 HEADER *h = Context->hdrs[Context->v2r[num]]; 194 194 THREAD *tmp; 195 195 196 196 if ((Sort & SORT_MASK) == SORT_THREADS && h->tree) 197 197 { 198 - flag |= M_FORMAT_TREE; /* display the thread tree */ 198 + flag |= MUTT_FORMAT_TREE; /* display the thread tree */ 199 199 if (h->display_subject) 200 - flag |= M_FORMAT_FORCESUBJ; 200 + flag |= MUTT_FORMAT_FORCESUBJ; 201 201 else 202 202 { 203 203 if (reverse) ··· 219 219 * subject... */ 220 220 if (reverse ? tmp->message->msgno > edgemsgno : tmp->message->msgno < edgemsgno) 221 221 { 222 - flag |= M_FORMAT_FORCESUBJ; 222 + flag |= MUTT_FORMAT_FORCESUBJ; 223 223 break; 224 224 } 225 225 else if (tmp->message->virtual >= 0) 226 226 break; 227 227 } 228 - if (flag & M_FORMAT_FORCESUBJ) 228 + if (flag & MUTT_FORMAT_FORCESUBJ) 229 229 { 230 230 for (tmp = h->thread->prev; tmp; tmp = tmp->prev) 231 231 { ··· 237 237 break; 238 238 else if (tmp->message->virtual >= 0) 239 239 { 240 - flag &= ~M_FORMAT_FORCESUBJ; 240 + flag &= ~MUTT_FORMAT_FORCESUBJ; 241 241 break; 242 242 } 243 243 } ··· 364 364 if (ctx->pattern) 365 365 { 366 366 #define THIS_BODY ctx->hdrs[j]->content 367 - for (j = (check == M_REOPENED) ? 0 : oldcount; j < ctx->msgcount; j++) 367 + for (j = (check == MUTT_REOPENED) ? 0 : oldcount; j < ctx->msgcount; j++) 368 368 { 369 369 if (!j) 370 370 ctx->vcount = 0; 371 371 372 372 if (mutt_pattern_exec (ctx->limit_pattern, 373 - M_MATCH_FULL_ADDRESS, 373 + MUTT_MATCH_FULL_ADDRESS, 374 374 ctx, ctx->hdrs[j])) 375 375 { 376 376 assert (ctx->vcount < ctx->msgcount); ··· 385 385 } 386 386 387 387 /* save the list of new messages */ 388 - if (oldcount && check != M_REOPENED 388 + if (oldcount && check != MUTT_REOPENED 389 389 && ((Sort & SORT_MASK) == SORT_THREADS)) 390 390 { 391 391 save_new = (HEADER **) safe_malloc (sizeof (HEADER *) * (ctx->msgcount - oldcount)); ··· 394 394 } 395 395 396 396 /* if the mailbox was reopened, need to rethread from scratch */ 397 - mutt_sort_headers (ctx, (check == M_REOPENED)); 397 + mutt_sort_headers (ctx, (check == MUTT_REOPENED)); 398 398 399 399 /* uncollapse threads with new mail */ 400 400 if ((Sort & SORT_MASK) == SORT_THREADS) 401 401 { 402 - if (check == M_REOPENED) 402 + if (check == MUTT_REOPENED) 403 403 { 404 404 THREAD *h, *j; 405 405 ··· 560 560 561 561 set_option (OPTSEARCHINVALID); 562 562 } 563 - else if (check == M_NEW_MAIL || check == M_REOPENED || check == M_FLAGS) 563 + else if (check == MUTT_NEW_MAIL || check == MUTT_REOPENED || check == MUTT_FLAGS) 564 564 { 565 565 update_index (menu, Context, check, oldcount, index_hint); 566 566 567 567 /* notify the user of new mail */ 568 - if (check == M_REOPENED) 568 + if (check == MUTT_REOPENED) 569 569 mutt_error _("Mailbox was externally modified. Flags may be wrong."); 570 - else if (check == M_NEW_MAIL) 570 + else if (check == MUTT_NEW_MAIL) 571 571 { 572 572 mutt_message _("New mail in this mailbox."); 573 573 if (option (OPTBEEPNEW)) 574 574 beep (); 575 - } else if (check == M_FLAGS) 575 + } else if (check == MUTT_FLAGS) 576 576 mutt_message _("Mailbox was externally modified."); 577 577 578 578 /* avoid the message being overwritten by buffy */ ··· 868 868 CHECK_VISIBLE; 869 869 CHECK_READONLY; 870 870 /* L10N: CHECK_ACL */ 871 - CHECK_ACL(M_ACL_DELETE, _("Cannot delete message(s)")); 871 + CHECK_ACL(MUTT_ACL_DELETE, _("Cannot delete message(s)")); 872 872 873 873 CHECK_ATTACH; 874 - mutt_pattern_func (M_DELETE, _("Delete messages matching: ")); 874 + mutt_pattern_func (MUTT_DELETE, _("Delete messages matching: ")); 875 875 menu->redraw = REDRAW_INDEX | REDRAW_STATUS; 876 876 break; 877 877 ··· 908 908 CHECK_IN_MAILBOX; 909 909 menu->oldcurrent = (Context->vcount && menu->current >= 0 && menu->current < Context->vcount) ? 910 910 CURHDR->index : -1; 911 - if (mutt_pattern_func (M_LIMIT, _("Limit to messages matching: ")) == 0) 911 + if (mutt_pattern_func (MUTT_LIMIT, _("Limit to messages matching: ")) == 0) 912 912 { 913 913 if (menu->oldcurrent >= 0) 914 914 { ··· 942 942 break; 943 943 } 944 944 945 - if (query_quadoption (OPT_QUIT, _("Quit Mutt?")) == M_YES) 945 + if (query_quadoption (OPT_QUIT, _("Quit Mutt?")) == MUTT_YES) 946 946 { 947 947 int check; 948 948 ··· 952 952 done = 1; 953 953 else 954 954 { 955 - if (check == M_NEW_MAIL || check == M_REOPENED) 955 + if (check == MUTT_NEW_MAIL || check == MUTT_REOPENED) 956 956 update_index (menu, Context, check, oldcount, index_hint); 957 957 958 958 menu->redraw = REDRAW_FULL; /* new mail arrived? */ ··· 1006 1006 if (tag && !option (OPTAUTOTAG)) 1007 1007 { 1008 1008 for (j = 0; j < Context->vcount; j++) 1009 - mutt_set_flag (Context, Context->hdrs[Context->v2r[j]], M_TAG, 0); 1009 + mutt_set_flag (Context, Context->hdrs[Context->v2r[j]], MUTT_TAG, 0); 1010 1010 menu->redraw = REDRAW_STATUS | REDRAW_INDEX; 1011 1011 } 1012 1012 else 1013 1013 { 1014 - mutt_set_flag (Context, CURHDR, M_TAG, !CURHDR->tagged); 1014 + mutt_set_flag (Context, CURHDR, MUTT_TAG, !CURHDR->tagged); 1015 1015 1016 1016 Context->last_tag = CURHDR->tagged ? CURHDR : 1017 1017 ((Context->last_tag == CURHDR && !CURHDR->tagged) ··· 1032 1032 1033 1033 CHECK_MSGCOUNT; 1034 1034 CHECK_VISIBLE; 1035 - mutt_pattern_func (M_TAG, _("Tag messages matching: ")); 1035 + mutt_pattern_func (MUTT_TAG, _("Tag messages matching: ")); 1036 1036 menu->redraw = REDRAW_INDEX | REDRAW_STATUS; 1037 1037 break; 1038 1038 ··· 1042 1042 CHECK_VISIBLE; 1043 1043 CHECK_READONLY; 1044 1044 /* L10N: CHECK_ACL */ 1045 - CHECK_ACL(M_ACL_DELETE, _("Cannot undelete message(s)")); 1045 + CHECK_ACL(MUTT_ACL_DELETE, _("Cannot undelete message(s)")); 1046 1046 1047 - if (mutt_pattern_func (M_UNDELETE, _("Undelete messages matching: ")) == 0) 1047 + if (mutt_pattern_func (MUTT_UNDELETE, _("Undelete messages matching: ")) == 0) 1048 1048 menu->redraw = REDRAW_INDEX | REDRAW_STATUS; 1049 1049 break; 1050 1050 ··· 1052 1052 1053 1053 CHECK_MSGCOUNT; 1054 1054 CHECK_VISIBLE; 1055 - if (mutt_pattern_func (M_UNTAG, _("Untag messages matching: ")) == 0) 1055 + if (mutt_pattern_func (MUTT_UNTAG, _("Untag messages matching: ")) == 0) 1056 1056 menu->redraw = REDRAW_INDEX | REDRAW_STATUS; 1057 1057 break; 1058 1058 ··· 1062 1062 1063 1063 #ifdef USE_IMAP 1064 1064 case OP_MAIN_IMAP_FETCH: 1065 - if (Context && Context->magic == M_IMAP) 1065 + if (Context && Context->magic == MUTT_IMAP) 1066 1066 imap_check_mailbox (Context, &index_hint, 1); 1067 1067 break; 1068 1068 1069 1069 case OP_MAIN_IMAP_LOGOUT_ALL: 1070 - if (Context && Context->magic == M_IMAP) 1070 + if (Context && Context->magic == MUTT_IMAP) 1071 1071 { 1072 1072 if (mx_close_mailbox (Context, &index_hint) != 0) 1073 1073 { ··· 1124 1124 } 1125 1125 set_option (OPTSEARCHINVALID); 1126 1126 } 1127 - else if (check == M_NEW_MAIL || check == M_REOPENED) 1127 + else if (check == MUTT_NEW_MAIL || check == MUTT_REOPENED) 1128 1128 update_index (menu, Context, check, oldcount, index_hint); 1129 1129 1130 1130 /* ··· 1218 1218 1219 1219 if ((check = mx_close_mailbox (Context, &index_hint)) != 0) 1220 1220 { 1221 - if (check == M_NEW_MAIL || check == M_REOPENED) 1221 + if (check == MUTT_NEW_MAIL || check == MUTT_REOPENED) 1222 1222 update_index (menu, Context, check, oldcount, index_hint); 1223 1223 1224 1224 set_option (OPTSEARCHINVALID); ··· 1240 1240 1241 1241 if ((Context = mx_open_mailbox (buf, 1242 1242 (option (OPTREADONLY) || op == OP_MAIN_CHANGE_FOLDER_READONLY) ? 1243 - M_READONLY : 0, NULL)) != NULL) 1243 + MUTT_READONLY : 0, NULL)) != NULL) 1244 1244 { 1245 1245 menu->current = ci_first_message (); 1246 1246 } ··· 1299 1299 1300 1300 if ((menu->menu == MENU_MAIN) 1301 1301 && (query_quadoption (OPT_QUIT, 1302 - _("Exit Mutt without saving?")) == M_YES)) 1302 + _("Exit Mutt without saving?")) == MUTT_YES)) 1303 1303 { 1304 1304 if (Context) 1305 1305 { ··· 1350 1350 CHECK_VISIBLE; 1351 1351 CHECK_READONLY; 1352 1352 /* L10N: CHECK_ACL */ 1353 - CHECK_ACL(M_ACL_DELETE, _("Cannot link threads")); 1353 + CHECK_ACL(MUTT_ACL_DELETE, _("Cannot link threads")); 1354 1354 1355 1355 if ((Sort & SORT_MASK) != SORT_THREADS) 1356 1356 mutt_error _("Threading is not enabled."); ··· 1631 1631 CHECK_VISIBLE; 1632 1632 CHECK_READONLY; 1633 1633 /* L10N: CHECK_ACL */ 1634 - CHECK_ACL(M_ACL_WRITE, _("Cannot flag message")); 1634 + CHECK_ACL(MUTT_ACL_WRITE, _("Cannot flag message")); 1635 1635 1636 1636 if (tag) 1637 1637 { ··· 1639 1639 { 1640 1640 if (Context->hdrs[Context->v2r[j]]->tagged) 1641 1641 mutt_set_flag (Context, Context->hdrs[Context->v2r[j]], 1642 - M_FLAG, !Context->hdrs[Context->v2r[j]]->flagged); 1642 + MUTT_FLAG, !Context->hdrs[Context->v2r[j]]->flagged); 1643 1643 } 1644 1644 1645 1645 menu->redraw |= REDRAW_INDEX; 1646 1646 } 1647 1647 else 1648 1648 { 1649 - mutt_set_flag (Context, CURHDR, M_FLAG, !CURHDR->flagged); 1649 + mutt_set_flag (Context, CURHDR, MUTT_FLAG, !CURHDR->flagged); 1650 1650 if (option (OPTRESOLVE)) 1651 1651 { 1652 1652 if ((menu->current = ci_next_undeleted (menu->current)) == -1) ··· 1669 1669 CHECK_VISIBLE; 1670 1670 CHECK_READONLY; 1671 1671 /* L10N: CHECK_ACL */ 1672 - CHECK_ACL(M_ACL_SEEN, _("Cannot toggle new")); 1672 + CHECK_ACL(MUTT_ACL_SEEN, _("Cannot toggle new")); 1673 1673 1674 1674 if (tag) 1675 1675 { ··· 1679 1679 { 1680 1680 if (Context->hdrs[Context->v2r[j]]->read || 1681 1681 Context->hdrs[Context->v2r[j]]->old) 1682 - mutt_set_flag (Context, Context->hdrs[Context->v2r[j]], M_NEW, 1); 1682 + mutt_set_flag (Context, Context->hdrs[Context->v2r[j]], MUTT_NEW, 1); 1683 1683 else 1684 - mutt_set_flag (Context, Context->hdrs[Context->v2r[j]], M_READ, 1); 1684 + mutt_set_flag (Context, Context->hdrs[Context->v2r[j]], MUTT_READ, 1); 1685 1685 } 1686 1686 } 1687 1687 menu->redraw = REDRAW_STATUS | REDRAW_INDEX; ··· 1689 1689 else 1690 1690 { 1691 1691 if (CURHDR->read || CURHDR->old) 1692 - mutt_set_flag (Context, CURHDR, M_NEW, 1); 1692 + mutt_set_flag (Context, CURHDR, MUTT_NEW, 1); 1693 1693 else 1694 - mutt_set_flag (Context, CURHDR, M_READ, 1); 1694 + mutt_set_flag (Context, CURHDR, MUTT_READ, 1); 1695 1695 1696 1696 if (option (OPTRESOLVE)) 1697 1697 { ··· 1783 1783 CHECK_MSGCOUNT; 1784 1784 CHECK_VISIBLE; 1785 1785 CHECK_READONLY; 1786 - /* CHECK_ACL(M_ACL_WRITE); */ 1786 + /* CHECK_ACL(MUTT_ACL_WRITE); */ 1787 1787 1788 1788 if (mutt_change_flag (tag ? NULL : CURHDR, (op == OP_MAIN_SET_FLAG)) == 0) 1789 1789 { ··· 1924 1924 CHECK_VISIBLE; 1925 1925 CHECK_READONLY; 1926 1926 /* L10N: CHECK_ACL */ 1927 - CHECK_ACL(M_ACL_DELETE, _("Cannot delete message")); 1927 + CHECK_ACL(MUTT_ACL_DELETE, _("Cannot delete message")); 1928 1928 1929 1929 if (tag) 1930 1930 { 1931 - mutt_tag_set_flag (M_DELETE, 1); 1931 + mutt_tag_set_flag (MUTT_DELETE, 1); 1932 1932 if (option (OPTDELETEUNTAG)) 1933 - mutt_tag_set_flag (M_TAG, 0); 1933 + mutt_tag_set_flag (MUTT_TAG, 0); 1934 1934 menu->redraw = REDRAW_INDEX; 1935 1935 } 1936 1936 else 1937 1937 { 1938 - mutt_set_flag (Context, CURHDR, M_DELETE, 1); 1938 + mutt_set_flag (Context, CURHDR, MUTT_DELETE, 1); 1939 1939 if (option (OPTDELETEUNTAG)) 1940 - mutt_set_flag (Context, CURHDR, M_TAG, 0); 1940 + mutt_set_flag (Context, CURHDR, MUTT_TAG, 0); 1941 1941 if (option (OPTRESOLVE)) 1942 1942 { 1943 1943 if ((menu->current = ci_next_undeleted (menu->current)) == -1) ··· 1966 1966 CHECK_VISIBLE; 1967 1967 CHECK_READONLY; 1968 1968 /* L10N: CHECK_ACL */ 1969 - CHECK_ACL(M_ACL_DELETE, _("Cannot delete message(s)")); 1969 + CHECK_ACL(MUTT_ACL_DELETE, _("Cannot delete message(s)")); 1970 1970 1971 - rc = mutt_thread_set_flag (CURHDR, M_DELETE, 1, 1971 + rc = mutt_thread_set_flag (CURHDR, MUTT_DELETE, 1, 1972 1972 op == OP_DELETE_THREAD ? 0 : 1); 1973 1973 1974 1974 if (rc != -1) 1975 1975 { 1976 1976 if (option (OPTDELETEUNTAG)) 1977 - mutt_thread_set_flag (CURHDR, M_TAG, 0, 1977 + mutt_thread_set_flag (CURHDR, MUTT_TAG, 0, 1978 1978 op == OP_DELETE_THREAD ? 0 : 1); 1979 1979 if (option (OPTRESOLVE)) 1980 1980 if ((menu->current = ci_next_undeleted (menu->current)) == -1) ··· 2008 2008 CHECK_READONLY; 2009 2009 CHECK_ATTACH; 2010 2010 /* L10N: CHECK_ACL */ 2011 - CHECK_ACL(M_ACL_INSERT, _("Cannot edit message")); 2011 + CHECK_ACL(MUTT_ACL_INSERT, _("Cannot edit message")); 2012 2012 2013 2013 if (option (OPTPGPAUTODEC) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED))) 2014 2014 mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw); ··· 2106 2106 /* in an IMAP folder index with imap_peek=no, piping could change 2107 2107 * new or old messages status to read. Redraw what's needed. 2108 2108 */ 2109 - if (Context->magic == M_IMAP && !option (OPTIMAPPEEK)) 2109 + if (Context->magic == MUTT_IMAP && !option (OPTIMAPPEEK)) 2110 2110 { 2111 2111 menu->redraw = (tag ? REDRAW_INDEX : REDRAW_CURRENT) | REDRAW_STATUS; 2112 2112 } ··· 2125 2125 /* in an IMAP folder index with imap_peek=no, printing could change 2126 2126 * new or old messages status to read. Redraw what's needed. 2127 2127 */ 2128 - if (Context->magic == M_IMAP && !option (OPTIMAPPEEK)) 2128 + if (Context->magic == MUTT_IMAP && !option (OPTIMAPPEEK)) 2129 2129 { 2130 2130 menu->redraw = (tag ? REDRAW_INDEX : REDRAW_CURRENT) | REDRAW_STATUS; 2131 2131 } ··· 2140 2140 CHECK_VISIBLE; 2141 2141 CHECK_READONLY; 2142 2142 /* L10N: CHECK_ACL */ 2143 - CHECK_ACL(M_ACL_SEEN, _("Cannot mark message(s) as read")); 2143 + CHECK_ACL(MUTT_ACL_SEEN, _("Cannot mark message(s) as read")); 2144 2144 2145 - rc = mutt_thread_set_flag (CURHDR, M_READ, 1, 2145 + rc = mutt_thread_set_flag (CURHDR, MUTT_READ, 1, 2146 2146 op == OP_MAIN_READ_THREAD ? 0 : 1); 2147 2147 2148 2148 if (rc != -1) ··· 2211 2211 2212 2212 CHECK_MSGCOUNT; 2213 2213 CHECK_VISIBLE; 2214 - rc = mutt_thread_set_flag (CURHDR, M_TAG, !CURHDR->tagged, 2214 + rc = mutt_thread_set_flag (CURHDR, MUTT_TAG, !CURHDR->tagged, 2215 2215 op == OP_TAG_THREAD ? 0 : 1); 2216 2216 2217 2217 if (rc != -1) ··· 2236 2236 CHECK_VISIBLE; 2237 2237 CHECK_READONLY; 2238 2238 /* L10N: CHECK_ACL */ 2239 - CHECK_ACL(M_ACL_DELETE, _("Cannot undelete message")); 2239 + CHECK_ACL(MUTT_ACL_DELETE, _("Cannot undelete message")); 2240 2240 2241 2241 if (tag) 2242 2242 { 2243 - mutt_tag_set_flag (M_DELETE, 0); 2243 + mutt_tag_set_flag (MUTT_DELETE, 0); 2244 2244 menu->redraw = REDRAW_INDEX; 2245 2245 } 2246 2246 else 2247 2247 { 2248 - mutt_set_flag (Context, CURHDR, M_DELETE, 0); 2248 + mutt_set_flag (Context, CURHDR, MUTT_DELETE, 0); 2249 2249 if (option (OPTRESOLVE) && menu->current < Context->vcount - 1) 2250 2250 { 2251 2251 menu->current++; ··· 2264 2264 CHECK_VISIBLE; 2265 2265 CHECK_READONLY; 2266 2266 /* L10N: CHECK_ACL */ 2267 - CHECK_ACL(M_ACL_DELETE, _("Cannot undelete message(s)")); 2267 + CHECK_ACL(MUTT_ACL_DELETE, _("Cannot undelete message(s)")); 2268 2268 2269 - rc = mutt_thread_set_flag (CURHDR, M_DELETE, 0, 2269 + rc = mutt_thread_set_flag (CURHDR, MUTT_DELETE, 0, 2270 2270 op == OP_UNDELETE_THREAD ? 0 : 1); 2271 2271 2272 2272 if (rc != -1) ··· 2338 2338 return; 2339 2339 2340 2340 for (color = ColorIndexList; color; color = color->next) 2341 - if (mutt_pattern_exec (color->color_pattern, M_MATCH_FULL_ADDRESS, ctx, curhdr)) 2341 + if (mutt_pattern_exec (color->color_pattern, MUTT_MATCH_FULL_ADDRESS, ctx, curhdr)) 2342 2342 { 2343 2343 curhdr->pair = color->pair; 2344 2344 return;
+4 -4
doc/makedoc.c
··· 482 482 { 483 483 case DT_QUAD: 484 484 { 485 - if (!strcasecmp (s, "M_YES")) strncpy (t, "yes", l); 486 - else if (!strcasecmp (s, "M_NO")) strncpy (t, "no", l); 487 - else if (!strcasecmp (s, "M_ASKYES")) strncpy (t, "ask-yes", l); 488 - else if (!strcasecmp (s, "M_ASKNO")) strncpy (t, "ask-no", l); 485 + if (!strcasecmp (s, "MUTT_YES")) strncpy (t, "yes", l); 486 + else if (!strcasecmp (s, "MUTT_NO")) strncpy (t, "no", l); 487 + else if (!strcasecmp (s, "MUTT_ASKYES")) strncpy (t, "ask-yes", l); 488 + else if (!strcasecmp (s, "MUTT_ASKNO")) strncpy (t, "ask-no", l); 489 489 break; 490 490 } 491 491 case DT_BOOL:
+10 -10
editmsg.c
··· 67 67 mutt_mktemp (tmp, sizeof (tmp)); 68 68 69 69 omagic = DefaultMagic; 70 - DefaultMagic = M_MBOX; 70 + DefaultMagic = MUTT_MBOX; 71 71 72 - rc = (mx_open_mailbox (tmp, M_NEWFOLDER, &tmpctx) == NULL) ? -1 : 0; 72 + rc = (mx_open_mailbox (tmp, MUTT_NEWFOLDER, &tmpctx) == NULL) ? -1 : 0; 73 73 74 74 DefaultMagic = omagic; 75 75 ··· 80 80 } 81 81 82 82 rc = mutt_append_message (&tmpctx, ctx, cur, 0, CH_NOLEN | 83 - ((ctx->magic == M_MBOX || ctx->magic == M_MMDF) ? 0 : CH_NOSTATUS)); 83 + ((ctx->magic == MUTT_MBOX || ctx->magic == MUTT_MMDF) ? 0 : CH_NOSTATUS)); 84 84 oerrno = errno; 85 85 86 86 mx_close_mailbox (&tmpctx, NULL); ··· 143 143 goto bail; 144 144 } 145 145 146 - if (mx_open_mailbox (ctx->path, M_APPEND, &tmpctx) == NULL) 146 + if (mx_open_mailbox (ctx->path, MUTT_APPEND, &tmpctx) == NULL) 147 147 { 148 148 rc = -1; 149 149 /* L10N: %s is from strerror(errno) */ ··· 152 152 } 153 153 154 154 of = 0; 155 - cf = ((tmpctx.magic == M_MBOX || tmpctx.magic == M_MMDF) ? 0 : CH_NOSTATUS); 155 + cf = ((tmpctx.magic == MUTT_MBOX || tmpctx.magic == MUTT_MMDF) ? 0 : CH_NOSTATUS); 156 156 157 157 if (fgets (buff, sizeof (buff), fp) && is_from (buff, NULL, 0, NULL)) 158 158 { 159 - if (tmpctx.magic == M_MBOX || tmpctx.magic == M_MMDF) 159 + if (tmpctx.magic == MUTT_MBOX || tmpctx.magic == MUTT_MMDF) 160 160 cf = CH_FROM | CH_FORCE_FROM; 161 161 } 162 162 else 163 - of = M_ADD_FROM; 163 + of = MUTT_ADD_FROM; 164 164 165 165 /* 166 166 * XXX - we have to play games with the message flags to avoid ··· 199 199 200 200 if (rc == 0) 201 201 { 202 - mutt_set_flag (Context, cur, M_DELETE, 1); 203 - mutt_set_flag (Context, cur, M_READ, 1); 202 + mutt_set_flag (Context, cur, MUTT_DELETE, 1); 203 + mutt_set_flag (Context, cur, MUTT_READ, 1); 204 204 205 205 if (option (OPTDELETEUNTAG)) 206 - mutt_set_flag (Context, cur, M_TAG, 0); 206 + mutt_set_flag (Context, cur, MUTT_TAG, 0); 207 207 } 208 208 else if (rc == -1) 209 209 mutt_message (_("Error. Preserving temporary file: %s"), tmp);
+27 -27
enter.c
··· 32 32 /* redraw flags for mutt_enter_string() */ 33 33 enum 34 34 { 35 - M_REDRAW_INIT = 1, /* go to end of line and redraw */ 36 - M_REDRAW_LINE /* redraw entire line */ 35 + MUTT_REDRAW_INIT = 1, /* go to end of line and redraw */ 36 + MUTT_REDRAW_LINE /* redraw entire line */ 37 37 }; 38 38 39 39 static int my_wcwidth (wchar_t wc) ··· 225 225 { 226 226 int width = MuttMessageWindow->cols - col - 1; 227 227 int redraw; 228 - int pass = (flags & M_PASS); 228 + int pass = (flags & MUTT_PASS); 229 229 int first = 1; 230 230 int ch, w, r; 231 231 size_t i; ··· 241 241 if (state->wbuf) 242 242 { 243 243 /* Coming back after return 1 */ 244 - redraw = M_REDRAW_LINE; 244 + redraw = MUTT_REDRAW_LINE; 245 245 first = 0; 246 246 } 247 247 else ··· 249 249 /* Initialise wbuf from buf */ 250 250 state->wbuflen = 0; 251 251 state->lastchar = my_mbstowcs (&state->wbuf, &state->wbuflen, 0, buf); 252 - redraw = M_REDRAW_INIT; 252 + redraw = MUTT_REDRAW_INIT; 253 253 } 254 254 255 - if (flags & M_FILE) 255 + if (flags & MUTT_FILE) 256 256 hclass = HC_FILE; 257 - else if (flags & M_EFILE) 257 + else if (flags & MUTT_EFILE) 258 258 hclass = HC_MBOX; 259 - else if (flags & M_CMD) 259 + else if (flags & MUTT_CMD) 260 260 hclass = HC_CMD; 261 - else if (flags & M_ALIAS) 261 + else if (flags & MUTT_ALIAS) 262 262 hclass = HC_ALIAS; 263 - else if (flags & M_COMMAND) 263 + else if (flags & MUTT_COMMAND) 264 264 hclass = HC_COMMAND; 265 - else if (flags & M_PATTERN) 265 + else if (flags & MUTT_PATTERN) 266 266 hclass = HC_PATTERN; 267 267 else 268 268 hclass = HC_OTHER; ··· 271 271 { 272 272 if (redraw && !pass) 273 273 { 274 - if (redraw == M_REDRAW_INIT) 274 + if (redraw == MUTT_REDRAW_INIT) 275 275 { 276 276 /* Go to end of line */ 277 277 state->curpos = state->lastchar; ··· 306 306 first = 0; 307 307 if (ch != OP_EDITOR_COMPLETE && ch != OP_EDITOR_COMPLETE_QUERY) 308 308 state->tabs = 0; 309 - redraw = M_REDRAW_LINE; 309 + redraw = MUTT_REDRAW_LINE; 310 310 switch (ch) 311 311 { 312 312 case OP_EDITOR_HISTORY_UP: ··· 317 317 mutt_history_save_scratch (hclass, buf); 318 318 } 319 319 replace_part (state, 0, mutt_history_prev (hclass)); 320 - redraw = M_REDRAW_INIT; 320 + redraw = MUTT_REDRAW_INIT; 321 321 break; 322 322 323 323 case OP_EDITOR_HISTORY_DOWN: ··· 328 328 mutt_history_save_scratch (hclass, buf); 329 329 } 330 330 replace_part (state, 0, mutt_history_next (hclass)); 331 - redraw = M_REDRAW_INIT; 331 + redraw = MUTT_REDRAW_INIT; 332 332 break; 333 333 334 334 case OP_EDITOR_BACKSPACE: ··· 352 352 break; 353 353 354 354 case OP_EDITOR_EOL: 355 - redraw= M_REDRAW_INIT; 355 + redraw= MUTT_REDRAW_INIT; 356 356 break; 357 357 358 358 case OP_EDITOR_KILL_LINE: ··· 508 508 break; 509 509 510 510 case OP_EDITOR_BUFFY_CYCLE: 511 - if (flags & M_EFILE) 511 + if (flags & MUTT_EFILE) 512 512 { 513 513 first = 1; /* clear input if user types a real key later */ 514 514 my_wcstombs (buf, buflen, state->wbuf, state->curpos); ··· 516 516 state->curpos = state->lastchar = my_mbstowcs (&state->wbuf, &state->wbuflen, 0, buf); 517 517 break; 518 518 } 519 - else if (!(flags & M_FILE)) 519 + else if (!(flags & MUTT_FILE)) 520 520 goto self_insert; 521 - /* fall through to completion routine (M_FILE) */ 521 + /* fall through to completion routine (MUTT_FILE) */ 522 522 523 523 case OP_EDITOR_COMPLETE: 524 524 case OP_EDITOR_COMPLETE_QUERY: 525 525 state->tabs++; 526 - if (flags & M_CMD) 526 + if (flags & MUTT_CMD) 527 527 { 528 528 for (i = state->curpos; i && !is_shell_char(state->wbuf[i-1]); i--) 529 529 ; ··· 531 531 if (tempbuf && templen == state->lastchar - i && 532 532 !memcmp (tempbuf, state->wbuf + i, (state->lastchar - i) * sizeof (wchar_t))) 533 533 { 534 - mutt_select_file (buf, buflen, (flags & M_EFILE) ? M_SEL_FOLDER : 0); 534 + mutt_select_file (buf, buflen, (flags & MUTT_EFILE) ? MUTT_SEL_FOLDER : 0); 535 535 set_option (OPTNEEDREDRAW); 536 536 if (*buf) 537 537 replace_part (state, i, buf); ··· 548 548 549 549 replace_part (state, i, buf); 550 550 } 551 - else if (flags & M_ALIAS && ch == OP_EDITOR_COMPLETE) 551 + else if (flags & MUTT_ALIAS && ch == OP_EDITOR_COMPLETE) 552 552 { 553 553 /* invoke the alias-menu to get more addresses */ 554 554 for (i = state->curpos; i && state->wbuf[i-1] != ',' && ··· 566 566 } 567 567 break; 568 568 } 569 - else if (flags & M_ALIAS && ch == OP_EDITOR_COMPLETE_QUERY) 569 + else if (flags & MUTT_ALIAS && ch == OP_EDITOR_COMPLETE_QUERY) 570 570 { 571 571 /* invoke the query-menu to get more addresses */ 572 572 if ((i = state->curpos)) ··· 584 584 rv = 1; 585 585 goto bye; 586 586 } 587 - else if (flags & M_COMMAND) 587 + else if (flags & MUTT_COMMAND) 588 588 { 589 589 my_wcstombs (buf, buflen, state->wbuf, state->curpos); 590 590 i = strlen (buf); ··· 595 595 BEEP (); 596 596 replace_part (state, 0, buf); 597 597 } 598 - else if (flags & (M_FILE | M_EFILE)) 598 + else if (flags & (MUTT_FILE | MUTT_EFILE)) 599 599 { 600 600 my_wcstombs (buf, buflen, state->wbuf, state->curpos); 601 601 ··· 604 604 !memcmp (tempbuf, state->wbuf, state->lastchar * sizeof (wchar_t)))) 605 605 { 606 606 _mutt_select_file (buf, buflen, 607 - ((flags & M_EFILE) ? M_SEL_FOLDER : 0) | (multiple ? M_SEL_MULTI : 0), 607 + ((flags & MUTT_EFILE) ? MUTT_SEL_FOLDER : 0) | (multiple ? MUTT_SEL_MULTI : 0), 608 608 files, numfiles); 609 609 set_option (OPTNEEDREDRAW); 610 610 if (*buf) ··· 704 704 } 705 705 } 706 706 707 - if (first && (flags & M_CLEAR)) 707 + if (first && (flags & MUTT_CLEAR)) 708 708 { 709 709 first = 0; 710 710 if (IsWPrint (wc)) /* why? */
+25 -25
flags.c
··· 33 33 int flagged = ctx->flagged; 34 34 int update = 0; 35 35 36 - if (ctx->readonly && flag != M_TAG) 36 + if (ctx->readonly && flag != MUTT_TAG) 37 37 return; /* don't modify anything if we are read-only */ 38 38 39 39 switch (flag) 40 40 { 41 - case M_DELETE: 41 + case MUTT_DELETE: 42 42 43 - if (!mutt_bit_isset(ctx->rights,M_ACL_DELETE)) 43 + if (!mutt_bit_isset(ctx->rights,MUTT_ACL_DELETE)) 44 44 return; 45 45 46 46 if (bf) ··· 53 53 #ifdef USE_IMAP 54 54 /* deleted messages aren't treated as changed elsewhere so that the 55 55 * purge-on-sync option works correctly. This isn't applicable here */ 56 - if (ctx && ctx->magic == M_IMAP) 56 + if (ctx && ctx->magic == MUTT_IMAP) 57 57 { 58 58 h->changed = 1; 59 59 if (upd_ctx) ctx->changed = 1; ··· 68 68 if (upd_ctx) ctx->deleted--; 69 69 #ifdef USE_IMAP 70 70 /* see my comment above */ 71 - if (ctx->magic == M_IMAP) 71 + if (ctx->magic == MUTT_IMAP) 72 72 { 73 73 h->changed = 1; 74 74 if (upd_ctx) ctx->changed = 1; ··· 82 82 * is checked in specific code in the maildir folder 83 83 * driver. 84 84 */ 85 - if (ctx->magic == M_MAILDIR && upd_ctx && h->trash) 85 + if (ctx->magic == MUTT_MAILDIR && upd_ctx && h->trash) 86 86 ctx->changed = 1; 87 87 } 88 88 break; 89 89 90 - case M_NEW: 90 + case MUTT_NEW: 91 91 92 - if (!mutt_bit_isset(ctx->rights,M_ACL_SEEN)) 92 + if (!mutt_bit_isset(ctx->rights,MUTT_ACL_SEEN)) 93 93 return; 94 94 95 95 if (bf) ··· 120 120 } 121 121 break; 122 122 123 - case M_OLD: 123 + case MUTT_OLD: 124 124 125 - if (!mutt_bit_isset(ctx->rights,M_ACL_SEEN)) 125 + if (!mutt_bit_isset(ctx->rights,MUTT_ACL_SEEN)) 126 126 return; 127 127 128 128 if (bf) ··· 148 148 } 149 149 break; 150 150 151 - case M_READ: 151 + case MUTT_READ: 152 152 153 - if (!mutt_bit_isset(ctx->rights,M_ACL_SEEN)) 153 + if (!mutt_bit_isset(ctx->rights,MUTT_ACL_SEEN)) 154 154 return; 155 155 156 156 if (bf) ··· 178 178 } 179 179 break; 180 180 181 - case M_REPLIED: 181 + case MUTT_REPLIED: 182 182 183 - if (!mutt_bit_isset(ctx->rights,M_ACL_WRITE)) 183 + if (!mutt_bit_isset(ctx->rights,MUTT_ACL_WRITE)) 184 184 return; 185 185 186 186 if (bf) ··· 209 209 } 210 210 break; 211 211 212 - case M_FLAG: 212 + case MUTT_FLAG: 213 213 214 - if (!mutt_bit_isset(ctx->rights,M_ACL_WRITE)) 214 + if (!mutt_bit_isset(ctx->rights,MUTT_ACL_WRITE)) 215 215 return; 216 216 217 217 if (bf) ··· 235 235 } 236 236 break; 237 237 238 - case M_TAG: 238 + case MUTT_TAG: 239 239 if (bf) 240 240 { 241 241 if (!h->tagged) ··· 340 340 { 341 341 case 'd': 342 342 case 'D': 343 - flag = M_DELETE; 343 + flag = MUTT_DELETE; 344 344 break; 345 345 346 346 case 'N': 347 347 case 'n': 348 - flag = M_NEW; 348 + flag = MUTT_NEW; 349 349 break; 350 350 351 351 case 'o': 352 352 case 'O': 353 353 if (h) 354 - mutt_set_flag (Context, h, M_READ, !bf); 354 + mutt_set_flag (Context, h, MUTT_READ, !bf); 355 355 else 356 - mutt_tag_set_flag (M_READ, !bf); 357 - flag = M_OLD; 356 + mutt_tag_set_flag (MUTT_READ, !bf); 357 + flag = MUTT_OLD; 358 358 break; 359 359 360 360 case 'r': 361 361 case 'R': 362 - flag = M_REPLIED; 362 + flag = MUTT_REPLIED; 363 363 break; 364 364 365 365 case '*': 366 - flag = M_TAG; 366 + flag = MUTT_TAG; 367 367 break; 368 368 369 369 case '!': 370 - flag = M_FLAG; 370 + flag = MUTT_FLAG; 371 371 break; 372 372 373 373 default:
+7 -7
functions.h
··· 22 22 * 23 23 * Notes: 24 24 * 25 - * - If you want to bind \n or \r, use M_ENTER_S so that it will work 25 + * - If you want to bind \n or \r, use MUTT_ENTER_S so that it will work 26 26 * correctly under both ncurses and S-Lang 27 27 * 28 28 * - If you need to bind a control char, use the octal value because the \cX ··· 70 70 { "tag-prefix-cond", OP_TAG_PREFIX_COND, NULL }, 71 71 { "end-cond", OP_END_COND, NULL }, 72 72 { "shell-escape", OP_SHELL_ESCAPE, "!" }, 73 - { "select-entry", OP_GENERIC_SELECT_ENTRY,M_ENTER_S }, 73 + { "select-entry", OP_GENERIC_SELECT_ENTRY,MUTT_ENTER_S }, 74 74 { "search", OP_SEARCH, "/" }, 75 75 { "search-reverse", OP_SEARCH_REVERSE, "\033/" }, 76 76 { "search-opposite", OP_SEARCH_OPPOSITE, NULL }, ··· 147 147 { "show-version", OP_VERSION, "V" }, 148 148 { "set-flag", OP_MAIN_SET_FLAG, "w" }, 149 149 { "clear-flag", OP_MAIN_CLEAR_FLAG, "W" }, 150 - { "display-message", OP_DISPLAY_MESSAGE, M_ENTER_S }, 150 + { "display-message", OP_DISPLAY_MESSAGE, MUTT_ENTER_S }, 151 151 { "buffy-list", OP_BUFFY_LIST, "." }, 152 152 { "sync-mailbox", OP_MAIN_SYNC_FOLDER, "$" }, 153 153 { "display-address", OP_DISPLAY_ADDRESS, "@" }, ··· 247 247 { "search", OP_SEARCH, "/" }, 248 248 { "search-reverse", OP_SEARCH_REVERSE, "\033/" }, 249 249 { "search-opposite", OP_SEARCH_OPPOSITE, NULL }, 250 - { "next-line", OP_NEXT_LINE, M_ENTER_S }, 250 + { "next-line", OP_NEXT_LINE, MUTT_ENTER_S }, 251 251 { "jump", OP_JUMP, NULL }, 252 252 { "next-unread", OP_MAIN_NEXT_UNREAD, NULL }, 253 253 { "previous-new", OP_MAIN_PREV_NEW, NULL }, ··· 289 289 { "list-reply", OP_LIST_REPLY, "L" }, 290 290 { "forward-message", OP_FORWARD_MESSAGE, "f" }, 291 291 { "view-text", OP_ATTACH_VIEW_TEXT, "T" }, 292 - { "view-attach", OP_VIEW_ATTACH, M_ENTER_S }, 292 + { "view-attach", OP_VIEW_ATTACH, MUTT_ENTER_S }, 293 293 { "delete-entry", OP_DELETE, "d" }, 294 294 { "undelete-entry", OP_UNDELETE, "u" }, 295 295 { "collapse-parts", OP_ATTACH_COLLAPSE, "v" }, ··· 333 333 { "toggle-unlink", OP_COMPOSE_TOGGLE_UNLINK, "u" }, 334 334 { "toggle-recode", OP_COMPOSE_TOGGLE_RECODE, NULL }, 335 335 { "update-encoding", OP_COMPOSE_UPDATE_ENCODING, "U" }, 336 - { "view-attach", OP_VIEW_ATTACH, M_ENTER_S }, 336 + { "view-attach", OP_VIEW_ATTACH, MUTT_ENTER_S }, 337 337 { "send-message", OP_COMPOSE_SEND_MESSAGE, "y" }, 338 338 { "pipe-entry", OP_PIPE, "|" }, 339 339 ··· 446 446 447 447 #ifdef MIXMASTER 448 448 const struct binding_t OpMix[] = { /* map: mixmaster */ 449 - { "accept", OP_MIX_USE, M_ENTER_S }, 449 + { "accept", OP_MIX_USE, MUTT_ENTER_S }, 450 450 { "append", OP_MIX_APPEND, "a" }, 451 451 { "insert", OP_MIX_INSERT, "i" }, 452 452 { "delete", OP_MIX_DELETE, "d" },
+2 -2
group.h
··· 20 20 #ifndef _MUTT_GROUP_H_ 21 21 #define _MUTT_GROUP_H_ 1 22 22 23 - #define M_GROUP 0 24 - #define M_UNGROUP 1 23 + #define MUTT_GROUP 0 24 + #define MUTT_UNGROUP 1 25 25 26 26 void mutt_group_add_adrlist (group_t *g, ADDRESS *a); 27 27
+30 -30
handler.c
··· 646 646 } 647 647 else 648 648 { 649 - if (stte->s->flags & M_DISPLAY) 649 + if (stte->s->flags & MUTT_DISPLAY) 650 650 { 651 651 if (stte->tag_level[RICH_BOLD]) 652 652 { ··· 721 721 { 722 722 if (stte->tag_level[j]) /* make sure not to go negative */ 723 723 stte->tag_level[j]--; 724 - if ((stte->s->flags & M_DISPLAY) && j == RICH_PARAM && stte->tag_level[RICH_COLOR]) 724 + if ((stte->s->flags & MUTT_DISPLAY) && j == RICH_PARAM && stte->tag_level[RICH_COLOR]) 725 725 { 726 726 stte->param[stte->param_used] = (wchar_t) '\0'; 727 727 if (!wcscasecmp(L"black", stte->param)) ··· 757 757 enriched_puts("\033[37m", stte); 758 758 } 759 759 } 760 - if ((stte->s->flags & M_DISPLAY) && j == RICH_COLOR) 760 + if ((stte->s->flags & MUTT_DISPLAY) && j == RICH_COLOR) 761 761 { 762 762 enriched_puts("\033[0m", stte); 763 763 } ··· 791 791 792 792 memset (&stte, 0, sizeof (stte)); 793 793 stte.s = s; 794 - stte.WrapMargin = ((s->flags & M_DISPLAY) ? (MuttIndexWindow->cols-4) : 794 + stte.WrapMargin = ((s->flags & MUTT_DISPLAY) ? (MuttIndexWindow->cols-4) : 795 795 ((MuttIndexWindow->cols-4)<72)?(MuttIndexWindow->cols-4):72); 796 796 stte.line_max = stte.WrapMargin * 4; 797 797 stte.line = (wchar_t *) safe_calloc (1, (stte.line_max + 1) * sizeof (wchar_t)); ··· 987 987 * 988 988 * WARNING: type is altered by this call as a result of `mime_lookup' support */ 989 989 if (is_autoview) 990 - return rfc1524_mailcap_lookup(b, type, NULL, M_AUTOVIEW); 990 + return rfc1524_mailcap_lookup(b, type, NULL, MUTT_AUTOVIEW); 991 991 992 992 return 0; 993 993 } ··· 1125 1125 1126 1126 if (choice) 1127 1127 { 1128 - if (s->flags & M_DISPLAY && !option (OPTWEED)) 1128 + if (s->flags & MUTT_DISPLAY && !option (OPTWEED)) 1129 1129 { 1130 1130 fseeko (s->fpin, choice->hdr_offset, 0); 1131 1131 mutt_copy_bytes(s->fpin, s->fpout, choice->offset-choice->hdr_offset); 1132 1132 } 1133 1133 mutt_body_handler (choice, s); 1134 1134 } 1135 - else if (s->flags & M_DISPLAY) 1135 + else if (s->flags & MUTT_DISPLAY) 1136 1136 { 1137 1137 /* didn't find anything that we could display! */ 1138 1138 state_mark_attach (s); ··· 1169 1169 if (b->parts) 1170 1170 { 1171 1171 mutt_copy_hdr (s->fpin, s->fpout, off_start, b->parts->offset, 1172 - (((s->flags & M_WEED) || ((s->flags & (M_DISPLAY|M_PRINTING)) && option (OPTWEED))) ? (CH_WEED | CH_REORDER) : 0) | 1172 + (((s->flags & MUTT_WEED) || ((s->flags & (MUTT_DISPLAY|MUTT_PRINTING)) && option (OPTWEED))) ? (CH_WEED | CH_REORDER) : 0) | 1173 1173 (s->prefix ? CH_PREFIX : 0) | CH_DECODE | CH_FROM | 1174 - ((s->flags & M_DISPLAY) ? CH_DISPLAY : 0), s->prefix); 1174 + ((s->flags & MUTT_DISPLAY) ? CH_DISPLAY : 0), s->prefix); 1175 1175 1176 1176 if (s->prefix) 1177 1177 state_puts (s->prefix, s); ··· 1248 1248 1249 1249 for (p = b->parts, count = 1; p; p = p->next, count++) 1250 1250 { 1251 - if (s->flags & M_DISPLAY) 1251 + if (s->flags & MUTT_DISPLAY) 1252 1252 { 1253 1253 state_mark_attach (s); 1254 1254 state_printf (s, _("[-- Attachment #%d"), count); ··· 1283 1283 dprint (1, (debugfile, "Failed on attachment #%d, type %s/%s.\n", count, TYPE(p), NONULL (p->subtype))); 1284 1284 } 1285 1285 1286 - if ((s->flags & M_REPLYING) 1287 - && (option (OPTINCLUDEONLYFIRST)) && (s->flags & M_FIRSTDONE)) 1286 + if ((s->flags & MUTT_REPLYING) 1287 + && (option (OPTINCLUDEONLYFIRST)) && (s->flags & MUTT_FIRSTDONE)) 1288 1288 break; 1289 1289 } 1290 1290 ··· 1314 1314 int rc = 0; 1315 1315 1316 1316 snprintf (type, sizeof (type), "%s/%s", TYPE (a), a->subtype); 1317 - rfc1524_mailcap_lookup (a, type, entry, M_AUTOVIEW); 1317 + rfc1524_mailcap_lookup (a, type, entry, MUTT_AUTOVIEW); 1318 1318 1319 1319 fname = safe_strdup (a->filename); 1320 1320 mutt_sanitize_filename (fname, 1); ··· 1328 1328 /* rfc1524_expand_command returns 0 if the file is required */ 1329 1329 piped = rfc1524_expand_command (a, tempfile, type, command, sizeof (command)); 1330 1330 1331 - if (s->flags & M_DISPLAY) 1331 + if (s->flags & MUTT_DISPLAY) 1332 1332 { 1333 1333 state_mark_attach (s); 1334 1334 state_printf (s, _("[-- Autoview using %s --]\n"), command); ··· 1361 1361 if (thepid < 0) 1362 1362 { 1363 1363 mutt_perror _("Can't create filter"); 1364 - if (s->flags & M_DISPLAY) 1364 + if (s->flags & MUTT_DISPLAY) 1365 1365 { 1366 1366 state_mark_attach (s); 1367 1367 state_printf (s, _("[-- Can't run %s. --]\n"), command); ··· 1380 1380 /* check for data on stderr */ 1381 1381 if (fgets (buffer, sizeof(buffer), fperr)) 1382 1382 { 1383 - if (s->flags & M_DISPLAY) 1383 + if (s->flags & MUTT_DISPLAY) 1384 1384 { 1385 1385 state_mark_attach (s); 1386 1386 state_printf (s, _("[-- Autoview stderr of %s --]\n"), command); ··· 1401 1401 /* Check for stderr messages */ 1402 1402 if (fgets (buffer, sizeof(buffer), fperr)) 1403 1403 { 1404 - if (s->flags & M_DISPLAY) 1404 + if (s->flags & MUTT_DISPLAY) 1405 1405 { 1406 1406 state_mark_attach (s); 1407 1407 state_printf (s, _("[-- Autoview stderr of %s --]\n"), ··· 1423 1423 else 1424 1424 mutt_unlink (tempfile); 1425 1425 1426 - if (s->flags & M_DISPLAY) 1426 + if (s->flags & MUTT_DISPLAY) 1427 1427 mutt_clear_error (); 1428 1428 } 1429 1429 rfc1524_free_entry (&entry); ··· 1440 1440 access_type = mutt_get_parameter ("access-type", b->parameter); 1441 1441 if (!access_type) 1442 1442 { 1443 - if (s->flags & M_DISPLAY) 1443 + if (s->flags & MUTT_DISPLAY) 1444 1444 { 1445 1445 state_mark_attach (s); 1446 1446 state_puts (_("[-- Error: message/external-body has no access-type parameter --]\n"), s); ··· 1458 1458 1459 1459 if (!ascii_strcasecmp (access_type, "x-mutt-deleted")) 1460 1460 { 1461 - if (s->flags & (M_DISPLAY|M_PRINTING)) 1461 + if (s->flags & (MUTT_DISPLAY|MUTT_PRINTING)) 1462 1462 { 1463 1463 char *length; 1464 1464 char pretty_size[10]; ··· 1493 1493 } 1494 1494 else if(expiration && expire < time(NULL)) 1495 1495 { 1496 - if (s->flags & M_DISPLAY) 1496 + if (s->flags & MUTT_DISPLAY) 1497 1497 { 1498 1498 state_mark_attach (s); 1499 1499 state_printf (s, _("[-- This %s/%s attachment is not included, --]\n"), ··· 1508 1508 } 1509 1509 else 1510 1510 { 1511 - if (s->flags & M_DISPLAY) 1511 + if (s->flags & MUTT_DISPLAY) 1512 1512 { 1513 1513 state_mark_attach (s); 1514 1514 state_printf (s, ··· 1532 1532 int istext = mutt_is_text_part (b); 1533 1533 iconv_t cd = (iconv_t)(-1); 1534 1534 1535 - if (istext && s->flags & M_CHARCONV) 1535 + if (istext && s->flags & MUTT_CHARCONV) 1536 1536 { 1537 1537 char *charset = mutt_get_parameter ("charset", b->parameter); 1538 1538 if (!charset && AssumedCharset && *AssumedCharset) 1539 1539 charset = mutt_get_default_charset (); 1540 1540 if (charset && Charset) 1541 - cd = mutt_iconv_open (Charset, charset, M_ICONV_HOOK_FROM); 1541 + cd = mutt_iconv_open (Charset, charset, MUTT_ICONV_HOOK_FROM); 1542 1542 } 1543 1543 else if (istext && b->charset) 1544 - cd = mutt_iconv_open (Charset, b->charset, M_ICONV_HOOK_FROM); 1544 + cd = mutt_iconv_open (Charset, b->charset, MUTT_ICONV_HOOK_FROM); 1545 1545 1546 1546 fseeko (s->fpin, b->offset, 0); 1547 1547 switch (b->encoding) ··· 1684 1684 s->fpin = fp; 1685 1685 } 1686 1686 } 1687 - s->flags |= M_FIRSTDONE; 1687 + s->flags |= MUTT_FIRSTDONE; 1688 1688 1689 1689 return rc; 1690 1690 } ··· 1727 1727 if (mutt_is_autoview (b)) 1728 1728 { 1729 1729 handler = autoview_handler; 1730 - s->flags &= ~M_CHARCONV; 1730 + s->flags &= ~MUTT_CHARCONV; 1731 1731 } 1732 1732 else if (b->type == TYPETEXT) 1733 1733 { ··· 1769 1769 1770 1770 if (!p) 1771 1771 mutt_error _("Error: multipart/signed has no protocol."); 1772 - else if (s->flags & M_VERIFY) 1772 + else if (s->flags & MUTT_VERIFY) 1773 1773 handler = mutt_signed_handler; 1774 1774 } 1775 1775 else if (mutt_is_valid_multipart_pgp_encrypted (b)) ··· 1812 1812 } 1813 1813 /* print hint to use attachment menu for disposition == attachment 1814 1814 if we're not already being called from there */ 1815 - else if ((s->flags & M_DISPLAY) || (b->disposition == DISPATTACH && 1815 + else if ((s->flags & MUTT_DISPLAY) || (b->disposition == DISPATTACH && 1816 1816 !option (OPTVIEWATTACH) && 1817 1817 option (OPTHONORDISP) && 1818 1818 (plaintext || handler))) ··· 1835 1835 fputs (" --]\n", s->fpout); 1836 1836 } 1837 1837 1838 - s->flags = oflags | (s->flags & M_FIRSTDONE); 1838 + s->flags = oflags | (s->flags & MUTT_FIRSTDONE); 1839 1839 if (rc) 1840 1840 { 1841 1841 dprint (1, (debugfile, "Bailing on attachment of type %s/%s.\n", TYPE(b), NONULL (b->subtype)));
+2 -2
hcache.c
··· 613 613 *off = 0; 614 614 d = lazy_malloc(sizeof (validate)); 615 615 616 - if (flags & M_GENERATE_UIDVALIDITY) 616 + if (flags & MUTT_GENERATE_UIDVALIDITY) 617 617 { 618 618 struct timeval now; 619 619 gettimeofday(&now, NULL); ··· 775 775 /* 776 776 * flags 777 777 * 778 - * M_GENERATE_UIDVALIDITY 778 + * MUTT_GENERATE_UIDVALIDITY 779 779 * ignore uidvalidity param and store gettimeofday() as the value 780 780 */ 781 781 int
+1 -1
hcache.h
··· 35 35 size_t (*keylen)(const char *fn)); 36 36 37 37 typedef enum { 38 - M_GENERATE_UIDVALIDITY = 1 /* use gettimeofday() as value */ 38 + MUTT_GENERATE_UIDVALIDITY = 1 /* use gettimeofday() as value */ 39 39 } mutt_hcache_store_flags_t; 40 40 41 41 /* uidvalidity is an IMAP-specific unsigned 32 bit number */
+7 -7
hdrline.c
··· 250 250 CONTEXT *ctx; 251 251 char fmt[SHORT_STRING], buf2[LONG_STRING], ch, *p; 252 252 int do_locales, i; 253 - int optional = (flags & M_FORMAT_OPTIONAL); 253 + int optional = (flags & MUTT_FORMAT_OPTIONAL); 254 254 int threads = ((Sort & SORT_MASK) == SORT_THREADS); 255 - int is_index = (flags & M_FORMAT_INDEX); 255 + int is_index = (flags & MUTT_FORMAT_INDEX); 256 256 #define THREAD_NEW (threads && hdr->collapsed && hdr->num_hidden > 1 && mutt_thread_contains_unread (ctx, hdr) == 1) 257 257 #define THREAD_OLD (threads && hdr->collapsed && hdr->num_hidden > 1 && mutt_thread_contains_unread (ctx, hdr) == 2) 258 258 size_t len; ··· 569 569 570 570 case 's': 571 571 572 - if (flags & M_FORMAT_TREE && !hdr->collapsed) 572 + if (flags & MUTT_FORMAT_TREE && !hdr->collapsed) 573 573 { 574 - if (flags & M_FORMAT_FORCESUBJ) 574 + if (flags & MUTT_FORMAT_FORCESUBJ) 575 575 { 576 576 mutt_format_s (dest, destlen, "", NONULL (hdr->env->subject)); 577 577 snprintf (buf2, sizeof (buf2), "%s%s", hdr->tree, dest); ··· 705 705 { 706 706 i = 1; /* reduce reuse recycle */ 707 707 htmp = NULL; 708 - if (flags & M_FORMAT_TREE 708 + if (flags & MUTT_FORMAT_TREE 709 709 && (hdr->thread->prev && hdr->thread->prev->message 710 710 && hdr->thread->prev->message->env->x_label)) 711 711 htmp = hdr->thread->prev->message; 712 - else if (flags & M_FORMAT_TREE 712 + else if (flags & MUTT_FORMAT_TREE 713 713 && (hdr->thread->parent && hdr->thread->parent->message 714 714 && hdr->thread->parent->message->env->x_label)) 715 715 htmp = hdr->thread->parent->message; ··· 737 737 738 738 if (optional) 739 739 mutt_FormatString (dest, destlen, col, cols, ifstring, hdr_format_str, (unsigned long) hfi, flags); 740 - else if (flags & M_FORMAT_OPTIONAL) 740 + else if (flags & MUTT_FORMAT_OPTIONAL) 741 741 mutt_FormatString (dest, destlen, col, cols, elsestring, hdr_format_str, (unsigned long) hfi, flags); 742 742 743 743 return (src);
+1 -1
help.c
··· 377 377 } 378 378 while 379 379 (mutt_do_pager (buf, t, 380 - M_PAGER_RETWINCH | M_PAGER_MARKER | M_PAGER_NSKIP | M_PAGER_NOWRAP, 380 + MUTT_PAGER_RETWINCH | MUTT_PAGER_MARKER | MUTT_PAGER_NSKIP | MUTT_PAGER_NOWRAP, 381 381 NULL) 382 382 == OP_REFORMAT_WINCH); 383 383 }
+20 -20
hook.c
··· 70 70 goto error; 71 71 } 72 72 73 - mutt_extract_token (&command, s, (data & (M_FOLDERHOOK | M_SENDHOOK | M_SEND2HOOK | M_ACCOUNTHOOK | M_REPLYHOOK)) ? M_TOKEN_SPACE : 0); 73 + mutt_extract_token (&command, s, (data & (MUTT_FOLDERHOOK | MUTT_SENDHOOK | MUTT_SEND2HOOK | MUTT_ACCOUNTHOOK | MUTT_REPLYHOOK)) ? MUTT_TOKEN_SPACE : 0); 74 74 75 75 if (!command.data) 76 76 { ··· 84 84 goto error; 85 85 } 86 86 87 - if (data & (M_FOLDERHOOK | M_MBOXHOOK)) 87 + if (data & (MUTT_FOLDERHOOK | MUTT_MBOXHOOK)) 88 88 { 89 89 /* Accidentally using the ^ mailbox shortcut in the .muttrc is a 90 90 * common mistake */ ··· 109 109 memset (&pattern, 0, sizeof (pattern)); 110 110 pattern.data = safe_strdup (path); 111 111 } 112 - else if (DefaultHook && !(data & (M_CHARSETHOOK | M_ICONVHOOK | M_ACCOUNTHOOK)) 113 - && (!WithCrypto || !(data & M_CRYPTHOOK)) 112 + else if (DefaultHook && !(data & (MUTT_CHARSETHOOK | MUTT_ICONVHOOK | MUTT_ACCOUNTHOOK)) 113 + && (!WithCrypto || !(data & MUTT_CRYPTHOOK)) 114 114 ) 115 115 { 116 116 char tmp[HUGE_STRING]; ··· 126 126 pattern.data = safe_strdup (tmp); 127 127 } 128 128 129 - if (data & (M_MBOXHOOK | M_SAVEHOOK | M_FCCHOOK)) 129 + if (data & (MUTT_MBOXHOOK | MUTT_SAVEHOOK | MUTT_FCCHOOK)) 130 130 { 131 131 strfcpy (path, command.data, sizeof (path)); 132 132 mutt_expand_path (path, sizeof (path)); ··· 142 142 ptr->rx.not == not && 143 143 !mutt_strcmp (pattern.data, ptr->rx.pattern)) 144 144 { 145 - if (data & (M_FOLDERHOOK | M_SENDHOOK | M_SEND2HOOK | M_MESSAGEHOOK | M_ACCOUNTHOOK | M_REPLYHOOK | M_CRYPTHOOK)) 145 + if (data & (MUTT_FOLDERHOOK | MUTT_SENDHOOK | MUTT_SEND2HOOK | MUTT_MESSAGEHOOK | MUTT_ACCOUNTHOOK | MUTT_REPLYHOOK | MUTT_CRYPTHOOK)) 146 146 { 147 147 /* these hooks allow multiple commands with the same 148 148 * pattern, so if we've already seen this pattern/command pair, just ··· 171 171 break; 172 172 } 173 173 174 - if (data & (M_SENDHOOK | M_SEND2HOOK | M_SAVEHOOK | M_FCCHOOK | M_MESSAGEHOOK | M_REPLYHOOK)) 174 + if (data & (MUTT_SENDHOOK | MUTT_SEND2HOOK | MUTT_SAVEHOOK | MUTT_FCCHOOK | MUTT_MESSAGEHOOK | MUTT_REPLYHOOK)) 175 175 { 176 176 if ((pat = mutt_pattern_comp (pattern.data, 177 - (data & (M_SENDHOOK | M_SEND2HOOK | M_FCCHOOK)) ? 0 : M_FULL_MSG, 177 + (data & (MUTT_SENDHOOK | MUTT_SEND2HOOK | MUTT_FCCHOOK)) ? 0 : MUTT_FULL_MSG, 178 178 err)) == NULL) 179 179 goto error; 180 180 } ··· 182 182 { 183 183 /* Hooks not allowing full patterns: Check syntax of regexp */ 184 184 rx = safe_malloc (sizeof (regex_t)); 185 - #ifdef M_CRYPTHOOK 186 - if ((rc = REGCOMP (rx, NONULL(pattern.data), ((data & (M_CRYPTHOOK|M_CHARSETHOOK|M_ICONVHOOK)) ? REG_ICASE : 0))) != 0) 185 + #ifdef MUTT_CRYPTHOOK 186 + if ((rc = REGCOMP (rx, NONULL(pattern.data), ((data & (MUTT_CRYPTHOOK|MUTT_CHARSETHOOK|MUTT_ICONVHOOK)) ? REG_ICASE : 0))) != 0) 187 187 #else 188 - if ((rc = REGCOMP (rx, NONULL(pattern.data), (data & (M_CHARSETHOOK|M_ICONVHOOK)) ? REG_ICASE : 0)) != 0) 189 - #endif /* M_CRYPTHOOK */ 188 + if ((rc = REGCOMP (rx, NONULL(pattern.data), (data & (MUTT_CHARSETHOOK|MUTT_ICONVHOOK)) ? REG_ICASE : 0)) != 0) 189 + #endif /* MUTT_CRYPTHOOK */ 190 190 { 191 191 regerror (rc, rx, err->data, err->dsize); 192 192 FREE (&rx); ··· 297 297 HOOK *tmp = Hooks; 298 298 BUFFER err, token; 299 299 300 - current_hook_type = M_FOLDERHOOK; 300 + current_hook_type = MUTT_FOLDERHOOK; 301 301 302 302 mutt_buffer_init (&err); 303 303 err.dsize = STRING; ··· 308 308 if(!tmp->command) 309 309 continue; 310 310 311 - if (tmp->type & M_FOLDERHOOK) 311 + if (tmp->type & MUTT_FOLDERHOOK) 312 312 { 313 313 if ((regexec (tmp->rx.rx, path, 0, NULL, 0) == 0) ^ tmp->rx.not) 314 314 { ··· 404 404 void mutt_default_save (char *path, size_t pathlen, HEADER *hdr) 405 405 { 406 406 *path = 0; 407 - if (mutt_addr_hook (path, pathlen, M_SAVEHOOK, Context, hdr) != 0) 407 + if (mutt_addr_hook (path, pathlen, MUTT_SAVEHOOK, Context, hdr) != 0) 408 408 { 409 409 char tmp[_POSIX_PATH_MAX]; 410 410 ADDRESS *adr; ··· 435 435 char buf[_POSIX_PATH_MAX]; 436 436 ENVELOPE *env = hdr->env; 437 437 438 - if (mutt_addr_hook (path, pathlen, M_FCCHOOK, NULL, hdr) != 0) 438 + if (mutt_addr_hook (path, pathlen, MUTT_FCCHOOK, NULL, hdr) != 0) 439 439 { 440 440 if ((option (OPTSAVENAME) || option (OPTFORCENAME)) && 441 441 (env->to || env->cc || env->bcc)) ··· 481 481 482 482 char *mutt_charset_hook (const char *chs) 483 483 { 484 - return _mutt_string_hook (chs, M_CHARSETHOOK); 484 + return _mutt_string_hook (chs, MUTT_CHARSETHOOK); 485 485 } 486 486 487 487 char *mutt_iconv_hook (const char *chs) 488 488 { 489 - return _mutt_string_hook (chs, M_ICONVHOOK); 489 + return _mutt_string_hook (chs, MUTT_ICONVHOOK); 490 490 } 491 491 492 492 LIST *mutt_crypt_hook (ADDRESS *adr) 493 493 { 494 - return _mutt_list_hook (adr->mailbox, M_CRYPTHOOK); 494 + return _mutt_list_hook (adr->mailbox, MUTT_CRYPTHOOK); 495 495 } 496 496 497 497 #ifdef USE_SOCKET ··· 516 516 517 517 for (hook = Hooks; hook; hook = hook->next) 518 518 { 519 - if (! (hook->command && (hook->type & M_ACCOUNTHOOK))) 519 + if (! (hook->command && (hook->type & MUTT_ACCOUNTHOOK))) 520 520 continue; 521 521 522 522 if ((regexec (hook->rx.rx, url, 0, NULL, 0) == 0) ^ hook->rx.not)
+5 -5
imap/browse.c
··· 220 220 dprint (1, (debugfile, "imap_mailbox_state: bad path %s\n", path)); 221 221 return -1; 222 222 } 223 - if (!(idata = imap_conn_find (&mx.account, M_IMAP_CONN_NONEW))) 223 + if (!(idata = imap_conn_find (&mx.account, MUTT_IMAP_CONN_NONEW))) 224 224 { 225 225 dprint (2, (debugfile, "imap_mailbox_state: no open connection for %s\n", 226 226 path)); ··· 259 259 return -1; 260 260 } 261 261 262 - if (!(idata = imap_conn_find (&mx.account, M_IMAP_CONN_NONEW))) 262 + if (!(idata = imap_conn_find (&mx.account, MUTT_IMAP_CONN_NONEW))) 263 263 { 264 264 dprint (1, (debugfile, "imap_mailbox_create: Couldn't find open connection to %s", mx.account.host)); 265 265 goto fail; ··· 275 275 buf[n] = '\0'; 276 276 } 277 277 278 - if (mutt_get_field (_("Create mailbox: "), buf, sizeof (buf), M_FILE) < 0) 278 + if (mutt_get_field (_("Create mailbox: "), buf, sizeof (buf), MUTT_FILE) < 0) 279 279 goto fail; 280 280 281 281 if (!mutt_strlen (buf)) ··· 313 313 return -1; 314 314 } 315 315 316 - if (!(idata = imap_conn_find (&mx.account, M_IMAP_CONN_NONEW))) 316 + if (!(idata = imap_conn_find (&mx.account, MUTT_IMAP_CONN_NONEW))) 317 317 { 318 318 dprint (1, (debugfile, "imap_mailbox_rename: Couldn't find open connection to %s", mx.account.host)); 319 319 goto fail; ··· 328 328 snprintf(buf, sizeof (buf), _("Rename mailbox %s to: "), mx.mbox); 329 329 strfcpy (newname, mx.mbox, sizeof (newname)); 330 330 331 - if (mutt_get_field (buf, newname, sizeof (newname), M_FILE) < 0) 331 + if (mutt_get_field (buf, newname, sizeof (newname), MUTT_FILE) < 0) 332 332 goto fail; 333 333 334 334 if (!mutt_strlen (newname))
+16 -16
imap/command.c
··· 806 806 switch (*s) 807 807 { 808 808 case 'l': 809 - mutt_bit_set (idata->ctx->rights, M_ACL_LOOKUP); 809 + mutt_bit_set (idata->ctx->rights, MUTT_ACL_LOOKUP); 810 810 break; 811 811 case 'r': 812 - mutt_bit_set (idata->ctx->rights, M_ACL_READ); 812 + mutt_bit_set (idata->ctx->rights, MUTT_ACL_READ); 813 813 break; 814 814 case 's': 815 - mutt_bit_set (idata->ctx->rights, M_ACL_SEEN); 815 + mutt_bit_set (idata->ctx->rights, MUTT_ACL_SEEN); 816 816 break; 817 817 case 'w': 818 - mutt_bit_set (idata->ctx->rights, M_ACL_WRITE); 818 + mutt_bit_set (idata->ctx->rights, MUTT_ACL_WRITE); 819 819 break; 820 820 case 'i': 821 - mutt_bit_set (idata->ctx->rights, M_ACL_INSERT); 821 + mutt_bit_set (idata->ctx->rights, MUTT_ACL_INSERT); 822 822 break; 823 823 case 'p': 824 - mutt_bit_set (idata->ctx->rights, M_ACL_POST); 824 + mutt_bit_set (idata->ctx->rights, MUTT_ACL_POST); 825 825 break; 826 826 case 'a': 827 - mutt_bit_set (idata->ctx->rights, M_ACL_ADMIN); 827 + mutt_bit_set (idata->ctx->rights, MUTT_ACL_ADMIN); 828 828 break; 829 829 case 'k': 830 - mutt_bit_set (idata->ctx->rights, M_ACL_CREATE); 830 + mutt_bit_set (idata->ctx->rights, MUTT_ACL_CREATE); 831 831 break; 832 832 case 'x': 833 - mutt_bit_set (idata->ctx->rights, M_ACL_DELMX); 833 + mutt_bit_set (idata->ctx->rights, MUTT_ACL_DELMX); 834 834 break; 835 835 case 't': 836 - mutt_bit_set (idata->ctx->rights, M_ACL_DELETE); 836 + mutt_bit_set (idata->ctx->rights, MUTT_ACL_DELETE); 837 837 break; 838 838 case 'e': 839 - mutt_bit_set (idata->ctx->rights, M_ACL_EXPUNGE); 839 + mutt_bit_set (idata->ctx->rights, MUTT_ACL_EXPUNGE); 840 840 break; 841 841 842 842 /* obsolete rights */ 843 843 case 'c': 844 - mutt_bit_set (idata->ctx->rights, M_ACL_CREATE); 845 - mutt_bit_set (idata->ctx->rights, M_ACL_DELMX); 844 + mutt_bit_set (idata->ctx->rights, MUTT_ACL_CREATE); 845 + mutt_bit_set (idata->ctx->rights, MUTT_ACL_DELMX); 846 846 break; 847 847 case 'd': 848 - mutt_bit_set (idata->ctx->rights, M_ACL_DELETE); 849 - mutt_bit_set (idata->ctx->rights, M_ACL_EXPUNGE); 848 + mutt_bit_set (idata->ctx->rights, MUTT_ACL_DELETE); 849 + mutt_bit_set (idata->ctx->rights, MUTT_ACL_EXPUNGE); 850 850 break; 851 851 default: 852 852 dprint(1, (debugfile, "Unknown right: %c\n", *s)); ··· 969 969 /* should perhaps move this code back to imap_buffy_check */ 970 970 for (inc = Incoming; inc; inc = inc->next) 971 971 { 972 - if (inc->magic != M_IMAP) 972 + if (inc->magic != MUTT_IMAP) 973 973 continue; 974 974 975 975 if (imap_parse_path (inc->path, &mx) < 0)
+70 -70
imap/imap.c
··· 68 68 return -1; 69 69 70 70 if (!(idata = imap_conn_find (&mx.account, 71 - option (OPTIMAPPASSIVE) ? M_IMAP_CONN_NONEW : 0))) 71 + option (OPTIMAPPASSIVE) ? MUTT_IMAP_CONN_NONEW : 0))) 72 72 { 73 73 FREE (&mx.mbox); 74 74 return -1; ··· 153 153 154 154 if (!ctx || !ctx->data) { 155 155 if (!(idata = imap_conn_find (&mx.account, 156 - option (OPTIMAPPASSIVE) ? M_IMAP_CONN_NONEW : 0))) 156 + option (OPTIMAPPASSIVE) ? MUTT_IMAP_CONN_NONEW : 0))) 157 157 { 158 158 FREE (&mx.mbox); 159 159 return -1; ··· 184 184 { 185 185 tmp = conn->next; 186 186 187 - if (conn->account.type == M_ACCT_TYPE_IMAP && conn->fd >= 0) 187 + if (conn->account.type == MUTT_ACCT_TYPE_IMAP && conn->fd >= 0) 188 188 { 189 189 mutt_message (_("Closing connection to %s..."), conn->account.host); 190 190 imap_logout ((IMAP_DATA**) (void*) &conn->data); ··· 332 332 memcpy (&conn->account, creds, sizeof (ACCOUNT)); 333 333 334 334 idata = (IMAP_DATA*)conn->data; 335 - if (flags & M_IMAP_CONN_NONEW) 335 + if (flags & MUTT_IMAP_CONN_NONEW) 336 336 { 337 337 if (!idata) 338 338 { ··· 343 343 else if (idata->state < IMAP_AUTHENTICATED) 344 344 continue; 345 345 } 346 - if (flags & M_IMAP_CONN_NOSELECT && idata && idata->state >= IMAP_SELECTED) 346 + if (flags & MUTT_IMAP_CONN_NOSELECT && idata && idata->state >= IMAP_SELECTED) 347 347 continue; 348 348 if (idata && idata->status == IMAP_FATAL) 349 349 continue; ··· 429 429 int rc; 430 430 431 431 if (option(OPTSSLFORCETLS)) 432 - rc = M_YES; 432 + rc = MUTT_YES; 433 433 else if ((rc = query_quadoption (OPT_SSLSTARTTLS, 434 434 _("Secure connection with TLS?"))) == -1) 435 435 goto err_close_conn; 436 - if (rc == M_YES) { 436 + if (rc == MUTT_YES) { 437 437 if ((rc = imap_exec (idata, "STARTTLS", IMAP_CMD_FAIL_OK)) == -1) 438 438 goto bail; 439 439 if (rc != -2) ··· 571 571 } 572 572 573 573 /* we require a connection which isn't currently in IMAP_SELECTED state */ 574 - if (!(idata = imap_conn_find (&(mx.account), M_IMAP_CONN_NOSELECT))) 574 + if (!(idata = imap_conn_find (&(mx.account), MUTT_IMAP_CONN_NOSELECT))) 575 575 goto fail_noidata; 576 576 if (idata->state < IMAP_AUTHENTICATED) 577 577 goto fail; ··· 610 610 /* assume we have all rights if ACL is unavailable */ 611 611 else 612 612 { 613 - mutt_bit_set (idata->ctx->rights, M_ACL_LOOKUP); 614 - mutt_bit_set (idata->ctx->rights, M_ACL_READ); 615 - mutt_bit_set (idata->ctx->rights, M_ACL_SEEN); 616 - mutt_bit_set (idata->ctx->rights, M_ACL_WRITE); 617 - mutt_bit_set (idata->ctx->rights, M_ACL_INSERT); 618 - mutt_bit_set (idata->ctx->rights, M_ACL_POST); 619 - mutt_bit_set (idata->ctx->rights, M_ACL_CREATE); 620 - mutt_bit_set (idata->ctx->rights, M_ACL_DELETE); 613 + mutt_bit_set (idata->ctx->rights, MUTT_ACL_LOOKUP); 614 + mutt_bit_set (idata->ctx->rights, MUTT_ACL_READ); 615 + mutt_bit_set (idata->ctx->rights, MUTT_ACL_SEEN); 616 + mutt_bit_set (idata->ctx->rights, MUTT_ACL_WRITE); 617 + mutt_bit_set (idata->ctx->rights, MUTT_ACL_INSERT); 618 + mutt_bit_set (idata->ctx->rights, MUTT_ACL_POST); 619 + mutt_bit_set (idata->ctx->rights, MUTT_ACL_CREATE); 620 + mutt_bit_set (idata->ctx->rights, MUTT_ACL_DELETE); 621 621 } 622 622 /* pipeline the postponed count if possible */ 623 623 pmx.mbox = NULL; ··· 740 740 } 741 741 #endif 742 742 743 - if (!(mutt_bit_isset(idata->ctx->rights, M_ACL_DELETE) || 744 - mutt_bit_isset(idata->ctx->rights, M_ACL_SEEN) || 745 - mutt_bit_isset(idata->ctx->rights, M_ACL_WRITE) || 746 - mutt_bit_isset(idata->ctx->rights, M_ACL_INSERT))) 743 + if (!(mutt_bit_isset(idata->ctx->rights, MUTT_ACL_DELETE) || 744 + mutt_bit_isset(idata->ctx->rights, MUTT_ACL_SEEN) || 745 + mutt_bit_isset(idata->ctx->rights, MUTT_ACL_WRITE) || 746 + mutt_bit_isset(idata->ctx->rights, MUTT_ACL_INSERT))) 747 747 ctx->readonly = 1; 748 748 749 749 ctx->hdrmax = count; ··· 790 790 return -1; 791 791 } 792 792 793 - ctx->magic = M_IMAP; 793 + ctx->magic = MUTT_IMAP; 794 794 ctx->data = idata; 795 795 796 796 imap_fix_path (idata, mx.mbox, mailbox, sizeof (mailbox)); ··· 884 884 if (hdrs[n]->active) 885 885 switch (flag) 886 886 { 887 - case M_DELETED: 887 + case MUTT_DELETED: 888 888 if (hdrs[n]->deleted != HEADER_DATA(hdrs[n])->deleted) 889 889 match = invert ^ hdrs[n]->deleted; 890 890 break; 891 - case M_FLAG: 891 + case MUTT_FLAG: 892 892 if (hdrs[n]->flagged != HEADER_DATA(hdrs[n])->flagged) 893 893 match = invert ^ hdrs[n]->flagged; 894 894 break; 895 - case M_OLD: 895 + case MUTT_OLD: 896 896 if (hdrs[n]->old != HEADER_DATA(hdrs[n])->old) 897 897 match = invert ^ hdrs[n]->old; 898 898 break; 899 - case M_READ: 899 + case MUTT_READ: 900 900 if (hdrs[n]->read != HEADER_DATA(hdrs[n])->read) 901 901 match = invert ^ hdrs[n]->read; 902 902 break; 903 - case M_REPLIED: 903 + case MUTT_REPLIED: 904 904 if (hdrs[n]->replied != HEADER_DATA(hdrs[n])->replied) 905 905 match = invert ^ hdrs[n]->replied; 906 906 break; 907 907 908 - case M_TAG: 908 + case MUTT_TAG: 909 909 if (hdrs[n]->tagged) 910 910 match = 1; 911 911 break; ··· 952 952 * pre, message set, post 953 953 * flag: enum of flag type on which to filter 954 954 * changed: include only changed messages in message set 955 - * invert: invert sense of flag, eg M_READ matches unread messages 955 + * invert: invert sense of flag, eg MUTT_READ matches unread messages 956 956 * Returns: number of matched messages, or -1 on failure */ 957 957 int imap_exec_msgset (IMAP_DATA* idata, const char* pre, const char* post, 958 958 int flag, int changed, int invert) ··· 1060 1060 1061 1061 flags[0] = '\0'; 1062 1062 1063 - imap_set_flag (idata, M_ACL_SEEN, hdr->read, "\\Seen ", 1063 + imap_set_flag (idata, MUTT_ACL_SEEN, hdr->read, "\\Seen ", 1064 1064 flags, sizeof (flags)); 1065 - imap_set_flag (idata, M_ACL_WRITE, hdr->old, 1065 + imap_set_flag (idata, MUTT_ACL_WRITE, hdr->old, 1066 1066 "Old ", flags, sizeof (flags)); 1067 - imap_set_flag (idata, M_ACL_WRITE, hdr->flagged, 1067 + imap_set_flag (idata, MUTT_ACL_WRITE, hdr->flagged, 1068 1068 "\\Flagged ", flags, sizeof (flags)); 1069 - imap_set_flag (idata, M_ACL_WRITE, hdr->replied, 1069 + imap_set_flag (idata, MUTT_ACL_WRITE, hdr->replied, 1070 1070 "\\Answered ", flags, sizeof (flags)); 1071 - imap_set_flag (idata, M_ACL_DELETE, hdr->deleted, 1071 + imap_set_flag (idata, MUTT_ACL_DELETE, hdr->deleted, 1072 1072 "\\Deleted ", flags, sizeof (flags)); 1073 1073 1074 1074 /* now make sure we don't lose custom tags */ 1075 - if (mutt_bit_isset (idata->ctx->rights, M_ACL_WRITE)) 1075 + if (mutt_bit_isset (idata->ctx->rights, MUTT_ACL_WRITE)) 1076 1076 imap_add_keywords (flags, hdr, idata->flags, sizeof (flags)); 1077 1077 1078 1078 mutt_remove_trailing_ws (flags); ··· 1081 1081 * explicitly revoke all system flags (if we have permission) */ 1082 1082 if (!*flags) 1083 1083 { 1084 - imap_set_flag (idata, M_ACL_SEEN, 1, "\\Seen ", flags, sizeof (flags)); 1085 - imap_set_flag (idata, M_ACL_WRITE, 1, "Old ", flags, sizeof (flags)); 1086 - imap_set_flag (idata, M_ACL_WRITE, 1, "\\Flagged ", flags, sizeof (flags)); 1087 - imap_set_flag (idata, M_ACL_WRITE, 1, "\\Answered ", flags, sizeof (flags)); 1088 - imap_set_flag (idata, M_ACL_DELETE, 1, "\\Deleted ", flags, sizeof (flags)); 1084 + imap_set_flag (idata, MUTT_ACL_SEEN, 1, "\\Seen ", flags, sizeof (flags)); 1085 + imap_set_flag (idata, MUTT_ACL_WRITE, 1, "Old ", flags, sizeof (flags)); 1086 + imap_set_flag (idata, MUTT_ACL_WRITE, 1, "\\Flagged ", flags, sizeof (flags)); 1087 + imap_set_flag (idata, MUTT_ACL_WRITE, 1, "\\Answered ", flags, sizeof (flags)); 1088 + imap_set_flag (idata, MUTT_ACL_DELETE, 1, "\\Deleted ", flags, sizeof (flags)); 1089 1089 1090 1090 mutt_remove_trailing_ws (flags); 1091 1091 ··· 1102 1102 /* after all this it's still possible to have no flags, if you 1103 1103 * have no ACL rights */ 1104 1104 if (*flags && (imap_exec (idata, cmd->data, 0) != 0) && 1105 - err_continue && (*err_continue != M_YES)) 1105 + err_continue && (*err_continue != MUTT_YES)) 1106 1106 { 1107 1107 *err_continue = imap_continue ("imap_sync_message: STORE failed", 1108 1108 idata->buf); 1109 - if (*err_continue != M_YES) 1109 + if (*err_continue != MUTT_YES) 1110 1110 return -1; 1111 1111 } 1112 1112 ··· 1128 1128 if (!mutt_bit_isset (idata->ctx->rights, right)) 1129 1129 return 0; 1130 1130 1131 - if (right == M_ACL_WRITE && !imap_has_flag (idata->flags, name)) 1131 + if (right == MUTT_ACL_WRITE && !imap_has_flag (idata->flags, name)) 1132 1132 return 0; 1133 1133 1134 1134 snprintf (buf, sizeof(buf), "+FLAGS.SILENT (%s)", name); ··· 1175 1175 return rc; 1176 1176 1177 1177 /* if we are expunging anyway, we can do deleted messages very quickly... */ 1178 - if (expunge && mutt_bit_isset (ctx->rights, M_ACL_DELETE)) 1178 + if (expunge && mutt_bit_isset (ctx->rights, MUTT_ACL_DELETE)) 1179 1179 { 1180 1180 if ((rc = imap_exec_msgset (idata, "UID STORE", "+FLAGS.SILENT (\\Deleted)", 1181 - M_DELETED, 1, 0)) < 0) 1181 + MUTT_DELETED, 1, 0)) < 0) 1182 1182 { 1183 1183 mutt_error (_("Expunge failed")); 1184 1184 mutt_sleep (1); ··· 1227 1227 mutt_message (_("Saving changed messages... [%d/%d]"), n+1, 1228 1228 ctx->msgcount); 1229 1229 if (!appendctx) 1230 - appendctx = mx_open_mailbox (ctx->path, M_APPEND | M_QUIET, NULL); 1230 + appendctx = mx_open_mailbox (ctx->path, MUTT_APPEND | MUTT_QUIET, NULL); 1231 1231 if (!appendctx) 1232 1232 dprint (1, (debugfile, "imap_sync_mailbox: Error opening mailbox in append mode\n")); 1233 1233 else ··· 1253 1253 mutt_get_sort_func (SORT_ORDER)); 1254 1254 } 1255 1255 1256 - rc = sync_helper (idata, M_ACL_DELETE, M_DELETED, "\\Deleted"); 1256 + rc = sync_helper (idata, MUTT_ACL_DELETE, MUTT_DELETED, "\\Deleted"); 1257 1257 if (rc >= 0) 1258 - rc |= sync_helper (idata, M_ACL_WRITE, M_FLAG, "\\Flagged"); 1258 + rc |= sync_helper (idata, MUTT_ACL_WRITE, MUTT_FLAG, "\\Flagged"); 1259 1259 if (rc >= 0) 1260 - rc |= sync_helper (idata, M_ACL_WRITE, M_OLD, "Old"); 1260 + rc |= sync_helper (idata, MUTT_ACL_WRITE, MUTT_OLD, "Old"); 1261 1261 if (rc >= 0) 1262 - rc |= sync_helper (idata, M_ACL_SEEN, M_READ, "\\Seen"); 1262 + rc |= sync_helper (idata, MUTT_ACL_SEEN, MUTT_READ, "\\Seen"); 1263 1263 if (rc >= 0) 1264 - rc |= sync_helper (idata, M_ACL_WRITE, M_REPLIED, "\\Answered"); 1264 + rc |= sync_helper (idata, MUTT_ACL_WRITE, MUTT_REPLIED, "\\Answered"); 1265 1265 1266 1266 if (oldsort != Sort) 1267 1267 { ··· 1279 1279 { 1280 1280 if (ctx->closing) 1281 1281 { 1282 - if (mutt_yesorno (_("Error saving flags. Close anyway?"), 0) == M_YES) 1282 + if (mutt_yesorno (_("Error saving flags. Close anyway?"), 0) == MUTT_YES) 1283 1283 { 1284 1284 rc = 0; 1285 1285 idata->state = IMAP_AUTHENTICATED; ··· 1308 1308 1309 1309 /* We must send an EXPUNGE command if we're not closing. */ 1310 1310 if (expunge && !(ctx->closing) && 1311 - mutt_bit_isset(ctx->rights, M_ACL_DELETE)) 1311 + mutt_bit_isset(ctx->rights, MUTT_ACL_DELETE)) 1312 1312 { 1313 1313 mutt_message _("Expunging messages from server..."); 1314 1314 /* Set expunge bit so we don't get spurious reopened messages */ ··· 1392 1392 /* use the NOOP or IDLE command to poll for new mail 1393 1393 * 1394 1394 * return values: 1395 - * M_REOPENED mailbox has been externally modified 1396 - * M_NEW_MAIL new mail has arrived! 1395 + * MUTT_REOPENED mailbox has been externally modified 1396 + * MUTT_NEW_MAIL new mail has arrived! 1397 1397 * 0 no change 1398 1398 * -1 error 1399 1399 */ ··· 1440 1440 imap_cmd_finish (idata); 1441 1441 1442 1442 if (idata->check_status & IMAP_EXPUNGE_PENDING) 1443 - result = M_REOPENED; 1443 + result = MUTT_REOPENED; 1444 1444 else if (idata->check_status & IMAP_NEWMAIL_PENDING) 1445 - result = M_NEW_MAIL; 1445 + result = MUTT_NEW_MAIL; 1446 1446 else if (idata->check_status & IMAP_FLAGS_PENDING) 1447 - result = M_FLAGS; 1447 + result = MUTT_FLAGS; 1448 1448 1449 1449 idata->check_status = 0; 1450 1450 ··· 1461 1461 dprint (1, (debugfile, "imap_get_mailbox: Error parsing %s\n", path)); 1462 1462 return -1; 1463 1463 } 1464 - if (!(*hidata = imap_conn_find (&(mx.account), option (OPTIMAPPASSIVE) ? M_IMAP_CONN_NONEW : 0)) 1464 + if (!(*hidata = imap_conn_find (&(mx.account), option (OPTIMAPPASSIVE) ? MUTT_IMAP_CONN_NONEW : 0)) 1465 1465 || (*hidata)->state < IMAP_AUTHENTICATED) 1466 1466 { 1467 1467 FREE (&mx.mbox); ··· 1495 1495 if (! mailbox->magic) 1496 1496 { 1497 1497 if (mx_is_imap (mailbox->path)) 1498 - mailbox->magic = M_IMAP; 1498 + mailbox->magic = MUTT_IMAP; 1499 1499 } 1500 1500 1501 - if (mailbox->magic != M_IMAP) 1501 + if (mailbox->magic != MUTT_IMAP) 1502 1502 continue; 1503 1503 1504 1504 mailbox->new = 0; ··· 1553 1553 /* collect results */ 1554 1554 for (mailbox = Incoming; mailbox; mailbox = mailbox->next) 1555 1555 { 1556 - if (mailbox->magic == M_IMAP && mailbox->new) 1556 + if (mailbox->magic == MUTT_IMAP && mailbox->new) 1557 1557 buffies++; 1558 1558 } 1559 1559 ··· 1692 1692 { 1693 1693 switch (pat->op) 1694 1694 { 1695 - case M_BODY: 1696 - case M_HEADER: 1697 - case M_WHOLE_MSG: 1695 + case MUTT_BODY: 1696 + case MUTT_HEADER: 1697 + case MUTT_WHOLE_MSG: 1698 1698 if (pat->stringmatch) 1699 1699 rc++; 1700 1700 break; ··· 1735 1735 { 1736 1736 if (do_search (clause, 0)) 1737 1737 { 1738 - if (pat->op == M_OR && clauses > 1) 1738 + if (pat->op == MUTT_OR && clauses > 1) 1739 1739 mutt_buffer_addstr (buf, "OR "); 1740 1740 clauses--; 1741 1741 ··· 1759 1759 1760 1760 switch (pat->op) 1761 1761 { 1762 - case M_HEADER: 1762 + case MUTT_HEADER: 1763 1763 mutt_buffer_addstr (buf, "HEADER "); 1764 1764 1765 1765 /* extract header name */ ··· 1780 1780 imap_quote_string (term, sizeof (term), delim); 1781 1781 mutt_buffer_addstr (buf, term); 1782 1782 break; 1783 - case M_BODY: 1783 + case MUTT_BODY: 1784 1784 mutt_buffer_addstr (buf, "BODY "); 1785 1785 imap_quote_string (term, sizeof (term), pat->p.str); 1786 1786 mutt_buffer_addstr (buf, term); 1787 1787 break; 1788 - case M_WHOLE_MSG: 1788 + case MUTT_WHOLE_MSG: 1789 1789 mutt_buffer_addstr (buf, "TEXT "); 1790 1790 imap_quote_string (term, sizeof (term), pat->p.str); 1791 1791 mutt_buffer_addstr (buf, term); ··· 1927 1927 ciss_url_t url; 1928 1928 char urlstr[LONG_STRING]; 1929 1929 1930 - if (conn->account.type != M_ACCT_TYPE_IMAP) 1930 + if (conn->account.type != MUTT_ACCT_TYPE_IMAP) 1931 1931 continue; 1932 1932 1933 1933 mutt_account_tourl (&conn->account, &url); ··· 1971 1971 1972 1972 /* don't open a new socket just for completion. Instead complete over 1973 1973 * known mailboxes/hooks/etc */ 1974 - if (!(idata = imap_conn_find (&(mx.account), M_IMAP_CONN_NONEW))) 1974 + if (!(idata = imap_conn_find (&(mx.account), MUTT_IMAP_CONN_NONEW))) 1975 1975 { 1976 1976 FREE (&mx.mbox); 1977 1977 strfcpy (dest, path, dlen);
+2 -2
imap/imap_private.h
··· 121 121 }; 122 122 123 123 /* imap_conn_find flags */ 124 - #define M_IMAP_CONN_NONEW (1<<0) 125 - #define M_IMAP_CONN_NOSELECT (1<<1) 124 + #define MUTT_IMAP_CONN_NONEW (1<<0) 125 + #define MUTT_IMAP_CONN_NOSELECT (1<<1) 126 126 127 127 /* -- data structures -- */ 128 128 typedef struct
+17 -17
imap/message.c
··· 140 140 /* L10N: 141 141 Comparing the cached data with the IMAP server's data */ 142 142 mutt_progress_init (&progress, _("Evaluating cache..."), 143 - M_PROGRESS_MSG, ReadInc, msgend + 1); 143 + MUTT_PROGRESS_MSG, ReadInc, msgend + 1); 144 144 145 145 snprintf (buf, sizeof (buf), 146 146 "UID FETCH 1:%u (UID FLAGS)", uidnext - 1); ··· 230 230 #endif /* USE_HCACHE */ 231 231 232 232 mutt_progress_init (&progress, _("Fetching message headers..."), 233 - M_PROGRESS_MSG, ReadInc, msgend + 1); 233 + MUTT_PROGRESS_MSG, ReadInc, msgend + 1); 234 234 235 235 for (msgno = msgbegin; msgno <= msgend ; msgno++) 236 236 { ··· 498 498 goto bail; 499 499 } 500 500 mutt_progress_init (&progressbar, _("Fetching message..."), 501 - M_PROGRESS_SIZE, NetInc, bytes); 501 + MUTT_PROGRESS_SIZE, NetInc, bytes); 502 502 if (imap_read_literal (msg->fp, idata, bytes, &progressbar) < 0) 503 503 goto bail; 504 504 /* pick up trailing line */ ··· 559 559 if (read != h->read) 560 560 { 561 561 h->read = read; 562 - mutt_set_flag (ctx, h, M_NEW, read); 562 + mutt_set_flag (ctx, h, MUTT_NEW, read); 563 563 } 564 564 565 565 h->lines = 0; ··· 642 642 rewind (fp); 643 643 644 644 mutt_progress_init (&progressbar, _("Uploading message..."), 645 - M_PROGRESS_SIZE, NetInc, len); 645 + MUTT_PROGRESS_SIZE, NetInc, len); 646 646 647 647 imap_munge_mbox_name (idata, mbox, sizeof (mbox), mailbox); 648 648 imap_make_date (internaldate, msg->received); ··· 747 747 int rc; 748 748 int n; 749 749 IMAP_MBOX mx; 750 - int err_continue = M_NO; 750 + int err_continue = MUTT_NO; 751 751 int triedcreate = 0; 752 752 753 753 idata = (IMAP_DATA*) ctx->data; ··· 809 809 } 810 810 } 811 811 812 - rc = imap_exec_msgset (idata, "UID COPY", mmbox, M_TAG, 0, 0); 812 + rc = imap_exec_msgset (idata, "UID COPY", mmbox, MUTT_TAG, 0, 0); 813 813 if (!rc) 814 814 { 815 815 dprint (1, (debugfile, "imap_copy_messages: No messages tagged\n")); ··· 885 885 { 886 886 if (ctx->hdrs[n]->tagged) 887 887 { 888 - mutt_set_flag (ctx, ctx->hdrs[n], M_DELETE, 1); 888 + mutt_set_flag (ctx, ctx->hdrs[n], MUTT_DELETE, 1); 889 889 if (option (OPTDELETEUNTAG)) 890 - mutt_set_flag (ctx, ctx->hdrs[n], M_TAG, 0); 890 + mutt_set_flag (ctx, ctx->hdrs[n], MUTT_TAG, 0); 891 891 } 892 892 } 893 893 else 894 894 { 895 - mutt_set_flag (ctx, h, M_DELETE, 1); 895 + mutt_set_flag (ctx, h, MUTT_DELETE, 1); 896 896 if (option (OPTDELETEUNTAG)) 897 - mutt_set_flag (ctx, h, M_TAG, 0); 897 + mutt_set_flag (ctx, h, MUTT_TAG, 0); 898 898 } 899 899 } 900 900 ··· 1059 1059 readonly = ctx->readonly; 1060 1060 ctx->readonly = 0; 1061 1061 1062 - mutt_set_flag (ctx, h, M_NEW, !(hd->read || hd->old)); 1063 - mutt_set_flag (ctx, h, M_OLD, hd->old); 1064 - mutt_set_flag (ctx, h, M_READ, hd->read); 1065 - mutt_set_flag (ctx, h, M_DELETE, hd->deleted); 1066 - mutt_set_flag (ctx, h, M_FLAG, hd->flagged); 1067 - mutt_set_flag (ctx, h, M_REPLIED, hd->replied); 1062 + mutt_set_flag (ctx, h, MUTT_NEW, !(hd->read || hd->old)); 1063 + mutt_set_flag (ctx, h, MUTT_OLD, hd->old); 1064 + mutt_set_flag (ctx, h, MUTT_READ, hd->read); 1065 + mutt_set_flag (ctx, h, MUTT_DELETE, hd->deleted); 1066 + mutt_set_flag (ctx, h, MUTT_FLAG, hd->flagged); 1067 + mutt_set_flag (ctx, h, MUTT_REPLIED, hd->replied); 1068 1068 1069 1069 /* this message is now definitively *not* changed (mutt_set_flag 1070 1070 * marks things changed as a side-effect) */
+13 -13
imap/util.c
··· 23 23 #include "config.h" 24 24 25 25 #include "mutt.h" 26 - #include "mx.h" /* for M_IMAP */ 26 + #include "mx.h" /* for MUTT_IMAP */ 27 27 #include "url.h" 28 28 #include "imap_private.h" 29 29 #ifdef USE_HCACHE ··· 61 61 if (imap_parse_path (path, &mx) < 0) 62 62 return -1; 63 63 64 - idata = imap_conn_find (&mx.account, M_IMAP_CONN_NONEW); 64 + idata = imap_conn_find (&mx.account, MUTT_IMAP_CONN_NONEW); 65 65 mutt_account_tourl (&mx.account, &url); 66 66 imap_fix_path (idata, mx.mbox, fixedpath, sizeof (fixedpath)); 67 67 url.path = fixedpath; ··· 195 195 /* Defaults */ 196 196 memset(&mx->account, 0, sizeof(mx->account)); 197 197 mx->account.port = ImapPort; 198 - mx->account.type = M_ACCT_TYPE_IMAP; 198 + mx->account.type = MUTT_ACCT_TYPE_IMAP; 199 199 200 200 c = safe_strdup (path); 201 201 url_parse_ciss (&url, c); ··· 210 210 mx->mbox = safe_strdup (url.path); 211 211 212 212 if (url.scheme == U_IMAPS) 213 - mx->account.flags |= M_ACCT_SSL; 213 + mx->account.flags |= MUTT_ACCT_SSL; 214 214 215 215 FREE (&c); 216 216 } ··· 233 233 *c = '\0'; 234 234 strfcpy (mx->account.user, tmp, sizeof (mx->account.user)); 235 235 strfcpy (tmp, c+1, sizeof (tmp)); 236 - mx->account.flags |= M_ACCT_USER; 236 + mx->account.flags |= MUTT_ACCT_USER; 237 237 } 238 238 239 239 if ((n = sscanf (tmp, "%127[^:/]%127s", mx->account.host, tmp)) < 1) ··· 245 245 246 246 if (n > 1) { 247 247 if (sscanf (tmp, ":%hu%127s", &(mx->account.port), tmp) >= 1) 248 - mx->account.flags |= M_ACCT_PORT; 248 + mx->account.flags |= MUTT_ACCT_PORT; 249 249 if (sscanf (tmp, "/%s", tmp) == 1) 250 250 { 251 251 if (!ascii_strncmp (tmp, "ssl", 3)) 252 - mx->account.flags |= M_ACCT_SSL; 252 + mx->account.flags |= MUTT_ACCT_SSL; 253 253 else 254 254 { 255 255 dprint (1, (debugfile, "imap_parse_path: Unknown connection type in %s\n", path)); ··· 260 260 } 261 261 } 262 262 263 - if ((mx->account.flags & M_ACCT_SSL) && !(mx->account.flags & M_ACCT_PORT)) 263 + if ((mx->account.flags & MUTT_ACCT_SSL) && !(mx->account.flags & MUTT_ACCT_PORT)) 264 264 mx->account.port = ImapsPort; 265 265 266 266 return 0; ··· 748 748 conn = mutt_socket_head (); 749 749 while (conn) 750 750 { 751 - if (conn->account.type == M_ACCT_TYPE_IMAP) 751 + if (conn->account.type == MUTT_ACCT_TYPE_IMAP) 752 752 { 753 753 int need_free = 0; 754 754 ··· 830 830 831 831 void imap_allow_reopen (CONTEXT *ctx) 832 832 { 833 - if (ctx && ctx->magic == M_IMAP && CTX_DATA->ctx == ctx) 833 + if (ctx && ctx->magic == MUTT_IMAP && CTX_DATA->ctx == ctx) 834 834 CTX_DATA->reopen |= IMAP_REOPEN_ALLOW; 835 835 } 836 836 837 837 void imap_disallow_reopen (CONTEXT *ctx) 838 838 { 839 - if (ctx && ctx->magic == M_IMAP && CTX_DATA->ctx == ctx) 839 + if (ctx && ctx->magic == MUTT_IMAP && CTX_DATA->ctx == ctx) 840 840 CTX_DATA->reopen &= ~IMAP_REOPEN_ALLOW; 841 841 } 842 842 843 843 int imap_account_match (const ACCOUNT* a1, const ACCOUNT* a2) 844 844 { 845 - IMAP_DATA* a1_idata = imap_conn_find (a1, M_IMAP_CONN_NONEW); 846 - IMAP_DATA* a2_idata = imap_conn_find (a2, M_IMAP_CONN_NONEW); 845 + IMAP_DATA* a1_idata = imap_conn_find (a1, MUTT_IMAP_CONN_NONEW); 846 + IMAP_DATA* a2_idata = imap_conn_find (a2, MUTT_IMAP_CONN_NONEW); 847 847 const ACCOUNT* a1_canon = a1_idata == NULL ? a1 : &a1_idata->conn->account; 848 848 const ACCOUNT* a2_canon = a2_idata == NULL ? a2 : &a2_idata->conn->account; 849 849
+42 -42
init.c
··· 107 107 108 108 switch (v) 109 109 { 110 - case M_YES: 111 - case M_NO: 110 + case MUTT_YES: 111 + case MUTT_NO: 112 112 return (v); 113 113 114 114 default: 115 - v = mutt_yesorno (prompt, (v == M_ASKYES)); 115 + v = mutt_yesorno (prompt, (v == MUTT_ASKYES)); 116 116 mutt_window_clearline (MuttMessageWindow, 0); 117 117 return (v); 118 118 } ··· 146 146 { 147 147 if (!qc) 148 148 { 149 - if ((ISSPACE (ch) && !(flags & M_TOKEN_SPACE)) || 150 - (ch == '#' && !(flags & M_TOKEN_COMMENT)) || 151 - (ch == '=' && (flags & M_TOKEN_EQUAL)) || 152 - (ch == ';' && !(flags & M_TOKEN_SEMICOLON)) || 153 - ((flags & M_TOKEN_PATTERN) && strchr ("~%=!|", ch))) 149 + if ((ISSPACE (ch) && !(flags & MUTT_TOKEN_SPACE)) || 150 + (ch == '#' && !(flags & MUTT_TOKEN_COMMENT)) || 151 + (ch == '=' && (flags & MUTT_TOKEN_EQUAL)) || 152 + (ch == ';' && !(flags & MUTT_TOKEN_SEMICOLON)) || 153 + ((flags & MUTT_TOKEN_PATTERN) && strchr ("~%=!|", ch))) 154 154 break; 155 155 } 156 156 ··· 158 158 159 159 if (ch == qc) 160 160 qc = 0; /* end of quote */ 161 - else if (!qc && (ch == '\'' || ch == '"') && !(flags & M_TOKEN_QUOTE)) 161 + else if (!qc && (ch == '\'' || ch == '"') && !(flags & MUTT_TOKEN_QUOTE)) 162 162 qc = ch; 163 163 else if (ch == '\\' && qc != '\'') 164 164 { ··· 202 202 mutt_buffer_addch (dest, ch); 203 203 } 204 204 } 205 - else if (ch == '^' && (flags & M_TOKEN_CONDENSE)) 205 + else if (ch == '^' && (flags & MUTT_TOKEN_CONDENSE)) 206 206 { 207 207 if (!*tok->dptr) 208 208 return -1; /* premature end of token */ ··· 711 711 /* Insist on at least one parameter */ 712 712 if (!MoreArgs(s)) 713 713 { 714 - if (data == M_SPAM) 714 + if (data == MUTT_SPAM) 715 715 strfcpy(err->data, _("spam: no matching pattern"), err->dsize); 716 716 else 717 717 strfcpy(err->data, _("nospam: no matching pattern"), err->dsize); ··· 721 721 /* Extract the first token, a regexp */ 722 722 mutt_extract_token (buf, s, 0); 723 723 724 - /* data should be either M_SPAM or M_NOSPAM. M_SPAM is for spam commands. */ 725 - if (data == M_SPAM) 724 + /* data should be either MUTT_SPAM or MUTT_NOSPAM. MUTT_SPAM is for spam commands. */ 725 + if (data == MUTT_SPAM) 726 726 { 727 727 /* If there's a second parameter, it's a template for the spam tag. */ 728 728 if (MoreArgs(s)) ··· 746 746 return 0; 747 747 } 748 748 749 - /* M_NOSPAM is for nospam commands. */ 750 - else if (data == M_NOSPAM) 749 + /* MUTT_NOSPAM is for nospam commands. */ 750 + else if (data == MUTT_NOSPAM) 751 751 { 752 752 /* nospam only ever has one parameter. */ 753 753 ··· 842 842 if (parse_group_context (&gc, buf, s, data, err) == -1) 843 843 goto bail; 844 844 845 - if (data == M_UNGROUP && !mutt_strcasecmp (buf->data, "*")) 845 + if (data == MUTT_UNGROUP && !mutt_strcasecmp (buf->data, "*")) 846 846 { 847 847 if (mutt_group_context_clear (&gc) < 0) 848 848 goto bail; ··· 859 859 { 860 860 case NONE: 861 861 snprintf (err->data, err->dsize, _("%sgroup: missing -rx or -addr."), 862 - data == M_UNGROUP ? "un" : ""); 862 + data == MUTT_UNGROUP ? "un" : ""); 863 863 goto bail; 864 864 865 865 case RX: 866 - if (data == M_GROUP && 866 + if (data == MUTT_GROUP && 867 867 mutt_group_context_add_rx (gc, buf->data, REG_ICASE, err) != 0) 868 868 goto bail; 869 - else if (data == M_UNGROUP && 869 + else if (data == MUTT_UNGROUP && 870 870 mutt_group_context_remove_rx (gc, buf->data) < 0) 871 871 goto bail; 872 872 break; ··· 880 880 data == 1 ? "un" : "", estr); 881 881 goto bail; 882 882 } 883 - if (data == M_GROUP) 883 + if (data == MUTT_GROUP) 884 884 mutt_group_context_add_adrlist (gc, addr); 885 - else if (data == M_UNGROUP) 885 + else if (data == MUTT_UNGROUP) 886 886 mutt_group_context_remove_adrlist (gc, addr); 887 887 rfc822_free_address (&addr); 888 888 break; ··· 1329 1329 set_option (OPTFORCEREDRAWINDEX); 1330 1330 } 1331 1331 1332 - mutt_extract_token (buf, s, M_TOKEN_QUOTE | M_TOKEN_SPACE | M_TOKEN_SEMICOLON); 1332 + mutt_extract_token (buf, s, MUTT_TOKEN_QUOTE | MUTT_TOKEN_SPACE | MUTT_TOKEN_SEMICOLON); 1333 1333 dprint (3, (debugfile, "parse_alias: Second token is '%s'.\n", 1334 1334 buf->data)); 1335 1335 ··· 1426 1426 size_t keylen; 1427 1427 char *p; 1428 1428 1429 - mutt_extract_token (buf, s, M_TOKEN_SPACE | M_TOKEN_QUOTE); 1429 + mutt_extract_token (buf, s, MUTT_TOKEN_SPACE | MUTT_TOKEN_QUOTE); 1430 1430 if ((p = strpbrk (buf->data, ": \t")) == NULL || *p != ':') 1431 1431 { 1432 1432 strfcpy (err->data, _("invalid header field"), err->dsize); ··· 1704 1704 { 1705 1705 /* reset state variables */ 1706 1706 query = 0; 1707 - unset = data & M_SET_UNSET; 1708 - inv = data & M_SET_INV; 1709 - reset = data & M_SET_RESET; 1707 + unset = data & MUTT_SET_UNSET; 1708 + inv = data & MUTT_SET_INV; 1709 + reset = data & MUTT_SET_RESET; 1710 1710 myvar = NULL; 1711 1711 1712 1712 if (*s->dptr == '?') ··· 1731 1731 } 1732 1732 1733 1733 /* get the variable name */ 1734 - mutt_extract_token (tmp, s, M_TOKEN_EQUAL); 1734 + mutt_extract_token (tmp, s, MUTT_TOKEN_EQUAL); 1735 1735 1736 1736 if (!mutt_strncmp ("my_", tmp->data, 3)) 1737 1737 myvar = tmp->data; ··· 2022 2022 { 2023 2023 switch (DefaultMagic) 2024 2024 { 2025 - case M_MBOX: 2025 + case MUTT_MBOX: 2026 2026 p = "mbox"; 2027 2027 break; 2028 - case M_MMDF: 2028 + case MUTT_MMDF: 2029 2029 p = "MMDF"; 2030 2030 break; 2031 - case M_MH: 2031 + case MUTT_MH: 2032 2032 p = "MH"; 2033 2033 break; 2034 - case M_MAILDIR: 2034 + case MUTT_MAILDIR: 2035 2035 p = "Maildir"; 2036 2036 break; 2037 2037 default: ··· 2132 2132 s->dptr++; 2133 2133 mutt_extract_token (tmp, s, 0); 2134 2134 if (ascii_strcasecmp ("yes", tmp->data) == 0) 2135 - set_quadoption (MuttVars[idx].data, M_YES); 2135 + set_quadoption (MuttVars[idx].data, MUTT_YES); 2136 2136 else if (ascii_strcasecmp ("no", tmp->data) == 0) 2137 - set_quadoption (MuttVars[idx].data, M_NO); 2137 + set_quadoption (MuttVars[idx].data, MUTT_NO); 2138 2138 else if (ascii_strcasecmp ("ask-yes", tmp->data) == 0) 2139 - set_quadoption (MuttVars[idx].data, M_ASKYES); 2139 + set_quadoption (MuttVars[idx].data, MUTT_ASKYES); 2140 2140 else if (ascii_strcasecmp ("ask-no", tmp->data) == 0) 2141 - set_quadoption (MuttVars[idx].data, M_ASKNO); 2141 + set_quadoption (MuttVars[idx].data, MUTT_ASKNO); 2142 2142 else 2143 2143 { 2144 2144 snprintf (err->data, err->dsize, _("%s: invalid value"), tmp->data); ··· 2151 2151 if (inv) 2152 2152 toggle_quadoption (MuttVars[idx].data); 2153 2153 else if (unset) 2154 - set_quadoption (MuttVars[idx].data, M_NO); 2154 + set_quadoption (MuttVars[idx].data, MUTT_NO); 2155 2155 else 2156 - set_quadoption (MuttVars[idx].data, M_YES); 2156 + set_quadoption (MuttVars[idx].data, MUTT_YES); 2157 2157 } 2158 2158 } 2159 2159 else if (DTYPE (MuttVars[idx].type) == DT_SORT) ··· 2259 2259 } 2260 2260 2261 2261 mutt_buffer_init (&token); 2262 - while ((linebuf = mutt_read_line (linebuf, &buflen, f, &line, M_CONT)) != NULL) 2262 + while ((linebuf = mutt_read_line (linebuf, &buflen, f, &line, MUTT_CONT)) != NULL) 2263 2263 { 2264 2264 conv=ConfigCharset && (*ConfigCharset) && Charset; 2265 2265 if (conv) ··· 2703 2703 2704 2704 switch (DefaultMagic) 2705 2705 { 2706 - case M_MBOX: 2706 + case MUTT_MBOX: 2707 2707 p = "mbox"; 2708 2708 break; 2709 - case M_MMDF: 2709 + case MUTT_MMDF: 2710 2710 p = "MMDF"; 2711 2711 break; 2712 - case M_MH: 2712 + case MUTT_MH: 2713 2713 p = "MH"; 2714 2714 break; 2715 - case M_MAILDIR: 2715 + case MUTT_MAILDIR: 2716 2716 p = "Maildir"; 2717 2717 break; 2718 2718 default:
+49 -49
init.h
··· 49 49 #define DT_SORT_AUX 0x80 50 50 51 51 /* flags to parse_set() */ 52 - #define M_SET_INV (1<<0) /* default is to invert all vars */ 53 - #define M_SET_UNSET (1<<1) /* default is to unset all vars */ 54 - #define M_SET_RESET (1<<2) /* default is to reset all vars to default */ 52 + #define MUTT_SET_INV (1<<0) /* default is to invert all vars */ 53 + #define MUTT_SET_UNSET (1<<1) /* default is to unset all vars */ 54 + #define MUTT_SET_RESET (1<<2) /* default is to reset all vars to default */ 55 55 56 56 /* forced redraw/resort types */ 57 57 #define R_NONE 0 ··· 84 84 85 85 struct option_t MuttVars[] = { 86 86 /*++*/ 87 - { "abort_nosubject", DT_QUAD, R_NONE, OPT_SUBJECT, M_ASKYES }, 87 + { "abort_nosubject", DT_QUAD, R_NONE, OPT_SUBJECT, MUTT_ASKYES }, 88 88 /* 89 89 ** .pp 90 90 ** If set to \fIyes\fP, when composing messages and no subject is given ··· 92 92 ** \fIno\fP, composing messages with no subject given at the subject 93 93 ** prompt will never be aborted. 94 94 */ 95 - { "abort_unmodified", DT_QUAD, R_NONE, OPT_ABORT, M_YES }, 95 + { "abort_unmodified", DT_QUAD, R_NONE, OPT_ABORT, MUTT_YES }, 96 96 /* 97 97 ** .pp 98 98 ** If set to \fIyes\fP, composition will automatically abort after ··· 300 300 ** notifying you of new mail. This is independent of the setting of the 301 301 ** $$beep variable. 302 302 */ 303 - { "bounce", DT_QUAD, R_NONE, OPT_BOUNCE, M_ASKYES }, 303 + { "bounce", DT_QUAD, R_NONE, OPT_BOUNCE, MUTT_ASKYES }, 304 304 /* 305 305 ** .pp 306 306 ** Controls whether you will be asked to confirm bouncing messages. ··· 444 444 ** .pp 445 445 ** Sets the default Content-Type for the body of newly composed messages. 446 446 */ 447 - { "copy", DT_QUAD, R_NONE, OPT_COPY, M_YES }, 447 + { "copy", DT_QUAD, R_NONE, OPT_COPY, MUTT_YES }, 448 448 /* 449 449 ** .pp 450 450 ** This variable controls whether or not copies of your outgoing messages ··· 581 581 ** verification (only supported by the GPGME backend). 582 582 */ 583 583 { "pgp_verify_sig", DT_SYN, R_NONE, UL "crypt_verify_sig", 0}, 584 - { "crypt_verify_sig", DT_QUAD, R_NONE, OPT_VERIFYSIG, M_YES }, 584 + { "crypt_verify_sig", DT_QUAD, R_NONE, OPT_VERIFYSIG, MUTT_YES }, 585 585 /* 586 586 ** .pp 587 587 ** If \fI``yes''\fP, always attempt to verify PGP or S/MIME signatures. ··· 619 619 ** ``$alternates'') and is to or cc'ed to a user matching the given 620 620 ** regular expression. 621 621 */ 622 - { "delete", DT_QUAD, R_NONE, OPT_DELETE, M_ASKYES }, 622 + { "delete", DT_QUAD, R_NONE, OPT_DELETE, MUTT_ASKYES }, 623 623 /* 624 624 ** .pp 625 625 ** Controls whether or not messages are really deleted when closing or ··· 770 770 ** \fBNote:\fP this variable has no effect when the $$autoedit 771 771 ** variable is \fIset\fP. 772 772 */ 773 - { "fcc_attach", DT_QUAD, R_NONE, OPT_FCCATTACH, M_YES }, 773 + { "fcc_attach", DT_QUAD, R_NONE, OPT_FCCATTACH, MUTT_YES }, 774 774 /* 775 775 ** .pp 776 776 ** This variable controls whether or not attachments on outgoing messages ··· 874 874 { "forw_decrypt", DT_SYN, R_NONE, UL "forward_decrypt", 0 }, 875 875 /* 876 876 */ 877 - { "forward_edit", DT_QUAD, R_NONE, OPT_FORWEDIT, M_YES }, 877 + { "forward_edit", DT_QUAD, R_NONE, OPT_FORWEDIT, MUTT_YES }, 878 878 /* 879 879 ** .pp 880 880 ** This quadoption controls whether or not the user is automatically ··· 1054 1054 ** If \fIunset\fP, Mutt will render all MIME parts it can 1055 1055 ** properly transform to plain text. 1056 1056 */ 1057 - { "honor_followup_to", DT_QUAD, R_NONE, OPT_MFUPTO, M_YES }, 1057 + { "honor_followup_to", DT_QUAD, R_NONE, OPT_MFUPTO, MUTT_YES }, 1058 1058 /* 1059 1059 ** .pp 1060 1060 ** This variable controls whether or not a Mail-Followup-To header is ··· 1264 1264 ** use the viewer defined in that entry to convert the body part to text 1265 1265 ** form. 1266 1266 */ 1267 - { "include", DT_QUAD, R_NONE, OPT_INCLUDE, M_ASKYES }, 1267 + { "include", DT_QUAD, R_NONE, OPT_INCLUDE, MUTT_ASKYES }, 1268 1268 /* 1269 1269 ** .pp 1270 1270 ** Controls whether or not a copy of the message(s) you are replying to ··· 1484 1484 ** .pp 1485 1485 ** Also see the $$move variable. 1486 1486 */ 1487 - { "mbox_type", DT_MAGIC,R_NONE, UL &DefaultMagic, M_MBOX }, 1487 + { "mbox_type", DT_MAGIC,R_NONE, UL &DefaultMagic, MUTT_MBOX }, 1488 1488 /* 1489 1489 ** .pp 1490 1490 ** The default mailbox type used when creating new folders. May be any of ··· 1588 1588 ** .pp 1589 1589 ** The name of the MH sequence used for unseen messages. 1590 1590 */ 1591 - { "mime_forward", DT_QUAD, R_NONE, OPT_MIMEFWD, M_NO }, 1591 + { "mime_forward", DT_QUAD, R_NONE, OPT_MIMEFWD, MUTT_NO }, 1592 1592 /* 1593 1593 ** .pp 1594 1594 ** When \fIset\fP, the message you are forwarding will be attached as a ··· 1610 1610 { "mime_fwd", DT_SYN, R_NONE, UL "mime_forward", 0 }, 1611 1611 /* 1612 1612 */ 1613 - { "mime_forward_rest", DT_QUAD, R_NONE, OPT_MIMEFWDREST, M_YES }, 1613 + { "mime_forward_rest", DT_QUAD, R_NONE, OPT_MIMEFWDREST, MUTT_YES }, 1614 1614 /* 1615 1615 ** .pp 1616 1616 ** When forwarding multiple attachments of a MIME message from the attachment ··· 1640 1640 ** mixmaster chain. 1641 1641 */ 1642 1642 #endif 1643 - { "move", DT_QUAD, R_NONE, OPT_MOVE, M_NO }, 1643 + { "move", DT_QUAD, R_NONE, OPT_MOVE, MUTT_NO }, 1644 1644 /* 1645 1645 ** .pp 1646 1646 ** Controls whether or not Mutt will move read messages ··· 1946 1946 ** in the key selection menu and a few other places. 1947 1947 ** (PGP only) 1948 1948 */ 1949 - { "pgp_mime_auto", DT_QUAD, R_NONE, OPT_PGPMIMEAUTO, M_ASKYES }, 1949 + { "pgp_mime_auto", DT_QUAD, R_NONE, OPT_PGPMIMEAUTO, MUTT_ASKYES }, 1950 1950 /* 1951 1951 ** .pp 1952 1952 ** This option controls whether Mutt will prompt you for ··· 2132 2132 ** This variable configures how often (in seconds) mutt should look for 2133 2133 ** new mail in the currently selected mailbox if it is a POP mailbox. 2134 2134 */ 2135 - { "pop_delete", DT_QUAD, R_NONE, OPT_POPDELETE, M_ASKNO }, 2135 + { "pop_delete", DT_QUAD, R_NONE, OPT_POPDELETE, MUTT_ASKNO }, 2136 2136 /* 2137 2137 ** .pp 2138 2138 ** If \fIset\fP, Mutt will delete successfully downloaded messages from the POP ··· 2167 2167 ** fairly secure machine, because the superuser can read your muttrc 2168 2168 ** even if you are the only one who can read the file. 2169 2169 */ 2170 - { "pop_reconnect", DT_QUAD, R_NONE, OPT_POPRECONNECT, M_ASKYES }, 2170 + { "pop_reconnect", DT_QUAD, R_NONE, OPT_POPRECONNECT, MUTT_ASKYES }, 2171 2171 /* 2172 2172 ** .pp 2173 2173 ** Controls whether or not Mutt will try to reconnect to the POP server if ··· 2190 2190 { "post_indent_str", DT_SYN, R_NONE, UL "post_indent_string", 0 }, 2191 2191 /* 2192 2192 */ 2193 - { "postpone", DT_QUAD, R_NONE, OPT_POSTPONE, M_ASKYES }, 2193 + { "postpone", DT_QUAD, R_NONE, OPT_POSTPONE, MUTT_ASKYES }, 2194 2194 /* 2195 2195 ** .pp 2196 2196 ** Controls whether or not messages are saved in the $$postponed ··· 2242 2242 ** remote machine without having to enter a password. 2243 2243 */ 2244 2244 #endif /* USE_SOCKET */ 2245 - { "print", DT_QUAD, R_NONE, OPT_PRINT, M_ASKNO }, 2245 + { "print", DT_QUAD, R_NONE, OPT_PRINT, MUTT_ASKNO }, 2246 2246 /* 2247 2247 ** .pp 2248 2248 ** Controls whether or not Mutt really prints messages. ··· 2320 2320 ** .pp 2321 2321 ** * = can be optionally printed if nonzero, see the $$status_format documentation. 2322 2322 */ 2323 - { "quit", DT_QUAD, R_NONE, OPT_QUIT, M_YES }, 2323 + { "quit", DT_QUAD, R_NONE, OPT_QUIT, MUTT_YES }, 2324 2324 /* 2325 2325 ** .pp 2326 2326 ** This variable controls whether ``quit'' and ``exit'' actually quit ··· 2374 2374 ** variable will \fInot\fP be used when the user has set a real name 2375 2375 ** in the $$from variable. 2376 2376 */ 2377 - { "recall", DT_QUAD, R_NONE, OPT_RECALL, M_ASKYES }, 2377 + { "recall", DT_QUAD, R_NONE, OPT_RECALL, MUTT_ASKYES }, 2378 2378 /* 2379 2379 ** .pp 2380 2380 ** Controls whether or not Mutt recalls postponed messages ··· 2445 2445 ** .pp 2446 2446 ** Also see the ``$alternates'' command. 2447 2447 */ 2448 - { "reply_to", DT_QUAD, R_NONE, OPT_REPLYTO, M_ASKYES }, 2448 + { "reply_to", DT_QUAD, R_NONE, OPT_REPLYTO, MUTT_ASKYES }, 2449 2449 /* 2450 2450 ** .pp 2451 2451 ** If \fIset\fP, when replying to a message, Mutt will use the address listed ··· 3123 3123 ** the default from the GNUTLS library. 3124 3124 */ 3125 3125 # endif /* USE_SSL_GNUTLS */ 3126 - { "ssl_starttls", DT_QUAD, R_NONE, OPT_SSLSTARTTLS, M_YES }, 3126 + { "ssl_starttls", DT_QUAD, R_NONE, OPT_SSLSTARTTLS, MUTT_YES }, 3127 3127 /* 3128 3128 ** .pp 3129 3129 ** If \fIset\fP (the default), mutt will attempt to use \fCSTARTTLS\fP on servers ··· 3696 3696 { "alternates", parse_alternates, 0 }, 3697 3697 { "unalternates", parse_unalternates, 0 }, 3698 3698 #ifdef USE_SOCKET 3699 - { "account-hook", mutt_parse_hook, M_ACCOUNTHOOK }, 3699 + { "account-hook", mutt_parse_hook, MUTT_ACCOUNTHOOK }, 3700 3700 #endif 3701 3701 { "alias", parse_alias, 0 }, 3702 3702 { "attachments", parse_attachments, 0 }, ··· 3704 3704 { "auto_view", parse_list, UL &AutoViewList }, 3705 3705 { "alternative_order", parse_list, UL &AlternativeOrderList}, 3706 3706 { "bind", mutt_parse_bind, 0 }, 3707 - { "charset-hook", mutt_parse_hook, M_CHARSETHOOK }, 3707 + { "charset-hook", mutt_parse_hook, MUTT_CHARSETHOOK }, 3708 3708 #ifdef HAVE_COLOR 3709 3709 { "color", mutt_parse_color, 0 }, 3710 3710 { "uncolor", mutt_parse_uncolor, 0 }, 3711 3711 #endif 3712 3712 { "exec", mutt_parse_exec, 0 }, 3713 - { "fcc-hook", mutt_parse_hook, M_FCCHOOK }, 3714 - { "fcc-save-hook", mutt_parse_hook, M_FCCHOOK | M_SAVEHOOK }, 3715 - { "folder-hook", mutt_parse_hook, M_FOLDERHOOK }, 3716 - { "group", parse_group, M_GROUP }, 3717 - { "ungroup", parse_group, M_UNGROUP }, 3713 + { "fcc-hook", mutt_parse_hook, MUTT_FCCHOOK }, 3714 + { "fcc-save-hook", mutt_parse_hook, MUTT_FCCHOOK | MUTT_SAVEHOOK }, 3715 + { "folder-hook", mutt_parse_hook, MUTT_FOLDERHOOK }, 3716 + { "group", parse_group, MUTT_GROUP }, 3717 + { "ungroup", parse_group, MUTT_UNGROUP }, 3718 3718 { "hdr_order", parse_list, UL &HeaderOrderList }, 3719 3719 #ifdef HAVE_ICONV 3720 - { "iconv-hook", mutt_parse_hook, M_ICONVHOOK }, 3720 + { "iconv-hook", mutt_parse_hook, MUTT_ICONVHOOK }, 3721 3721 #endif 3722 3722 { "ignore", parse_ignore, 0 }, 3723 3723 { "lists", parse_lists, 0 }, 3724 3724 { "macro", mutt_parse_macro, 0 }, 3725 - { "mailboxes", mutt_parse_mailboxes, M_MAILBOXES }, 3726 - { "unmailboxes", mutt_parse_mailboxes, M_UNMAILBOXES }, 3725 + { "mailboxes", mutt_parse_mailboxes, MUTT_MAILBOXES }, 3726 + { "unmailboxes", mutt_parse_mailboxes, MUTT_UNMAILBOXES }, 3727 3727 { "mailto_allow", parse_list, UL &MailtoAllow }, 3728 3728 { "unmailto_allow", parse_unlist, UL &MailtoAllow }, 3729 - { "message-hook", mutt_parse_hook, M_MESSAGEHOOK }, 3730 - { "mbox-hook", mutt_parse_hook, M_MBOXHOOK }, 3729 + { "message-hook", mutt_parse_hook, MUTT_MESSAGEHOOK }, 3730 + { "mbox-hook", mutt_parse_hook, MUTT_MBOXHOOK }, 3731 3731 { "mime_lookup", parse_list, UL &MimeLookupList }, 3732 3732 { "unmime_lookup", parse_unlist, UL &MimeLookupList }, 3733 3733 { "mono", mutt_parse_mono, 0 }, 3734 3734 { "my_hdr", parse_my_hdr, 0 }, 3735 - { "pgp-hook", mutt_parse_hook, M_CRYPTHOOK }, 3736 - { "crypt-hook", mutt_parse_hook, M_CRYPTHOOK }, 3735 + { "pgp-hook", mutt_parse_hook, MUTT_CRYPTHOOK }, 3736 + { "crypt-hook", mutt_parse_hook, MUTT_CRYPTHOOK }, 3737 3737 { "push", mutt_parse_push, 0 }, 3738 - { "reply-hook", mutt_parse_hook, M_REPLYHOOK }, 3739 - { "reset", parse_set, M_SET_RESET }, 3740 - { "save-hook", mutt_parse_hook, M_SAVEHOOK }, 3738 + { "reply-hook", mutt_parse_hook, MUTT_REPLYHOOK }, 3739 + { "reset", parse_set, MUTT_SET_RESET }, 3740 + { "save-hook", mutt_parse_hook, MUTT_SAVEHOOK }, 3741 3741 { "score", mutt_parse_score, 0 }, 3742 - { "send-hook", mutt_parse_hook, M_SENDHOOK }, 3743 - { "send2-hook", mutt_parse_hook, M_SEND2HOOK }, 3742 + { "send-hook", mutt_parse_hook, MUTT_SENDHOOK }, 3743 + { "send2-hook", mutt_parse_hook, MUTT_SEND2HOOK }, 3744 3744 { "set", parse_set, 0 }, 3745 3745 { "source", parse_source, 0 }, 3746 - { "spam", parse_spam_list, M_SPAM }, 3747 - { "nospam", parse_spam_list, M_NOSPAM }, 3746 + { "spam", parse_spam_list, MUTT_SPAM }, 3747 + { "nospam", parse_spam_list, MUTT_NOSPAM }, 3748 3748 { "subscribe", parse_subscribe, 0 }, 3749 - { "toggle", parse_set, M_SET_INV }, 3749 + { "toggle", parse_set, MUTT_SET_INV }, 3750 3750 { "unalias", parse_unalias, 0 }, 3751 3751 { "unalternative_order",parse_unlist, UL &AlternativeOrderList }, 3752 3752 { "unauto_view", parse_unlist, UL &AutoViewList }, ··· 3757 3757 { "unmono", mutt_parse_unmono, 0 }, 3758 3758 { "unmy_hdr", parse_unmy_hdr, 0 }, 3759 3759 { "unscore", mutt_parse_unscore, 0 }, 3760 - { "unset", parse_set, M_SET_UNSET }, 3760 + { "unset", parse_set, MUTT_SET_UNSET }, 3761 3761 { "unsubscribe", parse_unsubscribe, 0 }, 3762 3762 { NULL, NULL, 0 } 3763 3763 };
+4 -4
keymap.c
··· 79 79 #ifdef KEY_ENTER 80 80 { "<Enter>", KEY_ENTER }, 81 81 #endif 82 - { "<Return>", M_ENTER_C }, 82 + { "<Return>", MUTT_ENTER_C }, 83 83 { "<Esc>", '\033' }, 84 84 { "<Tab>", '\t' }, 85 85 { "<Space>", ' ' }, ··· 859 859 { 860 860 int r = 0; 861 861 862 - mutt_extract_token (buf, s, M_TOKEN_CONDENSE); 862 + mutt_extract_token (buf, s, MUTT_TOKEN_CONDENSE); 863 863 if (MoreArgs (s)) 864 864 { 865 865 strfcpy (err->data, _("push: too many arguments"), err->dsize); ··· 1037 1037 if ((key = parse_keymap (menu, s, sizeof (menu) / sizeof (menu[0]), &nummenus, err)) == NULL) 1038 1038 return (-1); 1039 1039 1040 - mutt_extract_token (buf, s, M_TOKEN_CONDENSE); 1040 + mutt_extract_token (buf, s, MUTT_TOKEN_CONDENSE); 1041 1041 /* make sure the macro sequence is not an empty string */ 1042 1042 if (!*buf->data) 1043 1043 { ··· 1048 1048 if (MoreArgs (s)) 1049 1049 { 1050 1050 seq = safe_strdup (buf->data); 1051 - mutt_extract_token (buf, s, M_TOKEN_CONDENSE); 1051 + mutt_extract_token (buf, s, MUTT_TOKEN_CONDENSE); 1052 1052 1053 1053 if (MoreArgs (s)) 1054 1054 {
+2 -2
lib.c
··· 761 761 { 762 762 if (line) 763 763 (*line)++; 764 - if (flags & M_EOL) 764 + if (flags & MUTT_EOL) 765 765 return s; 766 766 *ch = 0; 767 767 if (ch > s && *(ch - 1) == '\r') 768 768 *--ch = 0; 769 - if (!(flags & M_CONT) || ch == s || *(ch - 1) != '\\') 769 + if (!(flags & MUTT_CONT) || ch == s || *(ch - 1) != '\\') 770 770 return s; 771 771 offset = ch - s - 1; 772 772 }
+2 -2
lib.h
··· 160 160 #define S_BKG 126 161 161 162 162 /* Flags for mutt_read_line() */ 163 - #define M_CONT (1<<0) /* \-continuation */ 164 - #define M_EOL (1<<1) /* don't strip \n/\r\n */ 163 + #define MUTT_CONT (1<<0) /* \-continuation */ 164 + #define MUTT_EOL (1<<1) /* don't strip \n/\r\n */ 165 165 166 166 /* The actual library functions. */ 167 167
+11 -11
mailbox.h
··· 20 20 #define _MAILBOX_H 21 21 22 22 /* flags for mutt_open_mailbox() */ 23 - #define M_NOSORT (1<<0) /* do not sort the mailbox after opening it */ 24 - #define M_APPEND (1<<1) /* open mailbox for appending messages */ 25 - #define M_READONLY (1<<2) /* open in read-only mode */ 26 - #define M_QUIET (1<<3) /* do not print any messages */ 27 - #define M_NEWFOLDER (1<<4) /* create a new folder - same as M_APPEND, but uses 23 + #define MUTT_NOSORT (1<<0) /* do not sort the mailbox after opening it */ 24 + #define MUTT_APPEND (1<<1) /* open mailbox for appending messages */ 25 + #define MUTT_READONLY (1<<2) /* open in read-only mode */ 26 + #define MUTT_QUIET (1<<3) /* do not print any messages */ 27 + #define MUTT_NEWFOLDER (1<<4) /* create a new folder - same as MUTT_APPEND, but uses 28 28 * safe_fopen() for mbox-style folders. 29 29 */ 30 30 31 31 /* mx_open_new_message() */ 32 - #define M_ADD_FROM (1<<0) /* add a From_ line */ 33 - #define M_SET_DRAFT (1<<1) /* set the message draft flag */ 32 + #define MUTT_ADD_FROM (1<<0) /* add a From_ line */ 33 + #define MUTT_SET_DRAFT (1<<1) /* set the message draft flag */ 34 34 35 35 /* return values from mx_check_mailbox() */ 36 36 enum 37 37 { 38 - M_NEW_MAIL = 1, /* new mail received in mailbox */ 39 - M_LOCKED, /* couldn't lock the mailbox */ 40 - M_REOPENED, /* mailbox was reopened */ 41 - M_FLAGS /* nondestructive flags change (IMAP) */ 38 + MUTT_NEW_MAIL = 1, /* new mail received in mailbox */ 39 + MUTT_LOCKED, /* couldn't lock the mailbox */ 40 + MUTT_REOPENED, /* mailbox was reopened */ 41 + MUTT_FLAGS /* nondestructive flags change (IMAP) */ 42 42 }; 43 43 44 44 typedef struct
+17 -17
main.c
··· 550 550 mutt_init_windows (); 551 551 } 552 552 553 - #define M_IGNORE (1<<0) /* -z */ 554 - #define M_BUFFY (1<<1) /* -Z */ 555 - #define M_NOSYSRC (1<<2) /* -n */ 556 - #define M_RO (1<<3) /* -R */ 557 - #define M_SELECT (1<<4) /* -y */ 553 + #define MUTT_IGNORE (1<<0) /* -z */ 554 + #define MUTT_BUFFY (1<<1) /* -Z */ 555 + #define MUTT_NOSYSRC (1<<2) /* -n */ 556 + #define MUTT_RO (1<<3) /* -R */ 557 + #define MUTT_SELECT (1<<4) /* -y */ 558 558 559 559 int main (int argc, char **argv) 560 560 { ··· 698 698 break; 699 699 700 700 case 'n': 701 - flags |= M_NOSYSRC; 701 + flags |= MUTT_NOSYSRC; 702 702 break; 703 703 704 704 case 'p': ··· 710 710 break; 711 711 712 712 case 'R': 713 - flags |= M_RO; /* read-only mode */ 713 + flags |= MUTT_RO; /* read-only mode */ 714 714 break; 715 715 716 716 case 's': ··· 726 726 break; 727 727 728 728 case 'y': /* My special hack mode */ 729 - flags |= M_SELECT; 729 + flags |= MUTT_SELECT; 730 730 break; 731 731 732 732 case 'z': 733 - flags |= M_IGNORE; 733 + flags |= MUTT_IGNORE; 734 734 break; 735 735 736 736 case 'Z': 737 - flags |= M_BUFFY | M_IGNORE; 737 + flags |= MUTT_BUFFY | MUTT_IGNORE; 738 738 break; 739 739 740 740 default: ··· 782 782 } 783 783 784 784 /* set defaults and read init files */ 785 - mutt_init (flags & M_NOSYSRC, commands); 785 + mutt_init (flags & MUTT_NOSYSRC, commands); 786 786 mutt_free_list (&commands); 787 787 788 788 /* Initialize crypto backends. */ ··· 847 847 if (stat (fpath, &sb) == -1 && errno == ENOENT) 848 848 { 849 849 snprintf (msg, sizeof (msg), _("%s does not exist. Create it?"), Maildir); 850 - if (mutt_yesorno (msg, M_YES) == M_YES) 850 + if (mutt_yesorno (msg, MUTT_YES) == MUTT_YES) 851 851 { 852 852 if (mkdir (fpath, 0700) == -1 && errno != EEXIST) 853 853 mutt_error ( _("Can't create %s: %s."), Maildir, strerror (errno)); ··· 1160 1160 } 1161 1161 else 1162 1162 { 1163 - if (flags & M_BUFFY) 1163 + if (flags & MUTT_BUFFY) 1164 1164 { 1165 1165 if (!mutt_buffy_check (0)) 1166 1166 { ··· 1170 1170 folder[0] = 0; 1171 1171 mutt_buffy (folder, sizeof (folder)); 1172 1172 } 1173 - else if (flags & M_SELECT) 1173 + else if (flags & MUTT_SELECT) 1174 1174 { 1175 1175 if (!Incoming) { 1176 1176 mutt_endwin _("No incoming mailboxes defined."); 1177 1177 exit (1); 1178 1178 } 1179 1179 folder[0] = 0; 1180 - mutt_select_file (folder, sizeof (folder), M_SEL_FOLDER | M_SEL_BUFFY); 1180 + mutt_select_file (folder, sizeof (folder), MUTT_SEL_FOLDER | MUTT_SEL_BUFFY); 1181 1181 if (!folder[0]) 1182 1182 { 1183 1183 mutt_endwin (NULL); ··· 1192 1192 mutt_str_replace (&CurrentFolder, folder); 1193 1193 mutt_str_replace (&LastFolder, folder); 1194 1194 1195 - if (flags & M_IGNORE) 1195 + if (flags & MUTT_IGNORE) 1196 1196 { 1197 1197 /* check to see if there are any messages in the folder */ 1198 1198 switch (mx_check_empty (folder)) ··· 1208 1208 1209 1209 mutt_folder_hook (folder); 1210 1210 1211 - if((Context = mx_open_mailbox (folder, ((flags & M_RO) || option (OPTREADONLY)) ? M_READONLY : 0, NULL)) 1211 + if((Context = mx_open_mailbox (folder, ((flags & MUTT_RO) || option (OPTREADONLY)) ? MUTT_READONLY : 0, NULL)) 1212 1212 || !explicit_folder) 1213 1213 { 1214 1214 mutt_index_menu ();
+32 -32
mbox.c
··· 117 117 if (!ctx->quiet) 118 118 { 119 119 snprintf (msgbuf, sizeof (msgbuf), _("Reading %s..."), ctx->path); 120 - mutt_progress_init (&progress, msgbuf, M_PROGRESS_MSG, ReadInc, 0); 120 + mutt_progress_init (&progress, msgbuf, MUTT_PROGRESS_MSG, ReadInc, 0); 121 121 } 122 122 123 123 FOREVER ··· 267 267 if (!ctx->quiet) 268 268 { 269 269 snprintf (msgbuf, sizeof (msgbuf), _("Reading %s..."), ctx->path); 270 - mutt_progress_init (&progress, msgbuf, M_PROGRESS_MSG, ReadInc, 0); 270 + mutt_progress_init (&progress, msgbuf, MUTT_PROGRESS_MSG, ReadInc, 0); 271 271 } 272 272 273 273 loc = ftello (ctx->fp); ··· 428 428 return (-1); 429 429 } 430 430 431 - if (ctx->magic == M_MBOX) 431 + if (ctx->magic == MUTT_MBOX) 432 432 rc = mbox_parse_mailbox (ctx); 433 - else if (ctx->magic == M_MMDF) 433 + else if (ctx->magic == MUTT_MMDF) 434 434 rc = mmdf_parse_mailbox (ctx); 435 435 else 436 436 rc = -1; ··· 560 560 /* check to see if the mailbox has changed on disk. 561 561 * 562 562 * return values: 563 - * M_REOPENED mailbox has been reopened 564 - * M_NEW_MAIL new mail has arrived! 565 - * M_LOCKED couldn't lock the file 563 + * MUTT_REOPENED mailbox has been reopened 564 + * MUTT_NEW_MAIL new mail has arrived! 565 + * MUTT_LOCKED couldn't lock the file 566 566 * 0 no change 567 567 * -1 error 568 568 */ ··· 598 598 * probably the new mail arrived: no reason to wait till we can 599 599 * parse it: we'll get it on the next pass 600 600 */ 601 - return (M_LOCKED); 601 + return (MUTT_LOCKED); 602 602 } 603 603 unlock = 1; 604 604 } ··· 613 613 dprint (1, (debugfile, "mbox_check_mailbox: fseek() failed\n")); 614 614 if (fgets (buffer, sizeof (buffer), ctx->fp) != NULL) 615 615 { 616 - if ((ctx->magic == M_MBOX && mutt_strncmp ("From ", buffer, 5) == 0) || 617 - (ctx->magic == M_MMDF && mutt_strcmp (MMDF_SEP, buffer) == 0)) 616 + if ((ctx->magic == MUTT_MBOX && mutt_strncmp ("From ", buffer, 5) == 0) || 617 + (ctx->magic == MUTT_MMDF && mutt_strcmp (MMDF_SEP, buffer) == 0)) 618 618 { 619 619 if (fseeko (ctx->fp, ctx->size, SEEK_SET) != 0) 620 620 dprint (1, (debugfile, "mbox_check_mailbox: fseek() failed\n")); 621 - if (ctx->magic == M_MBOX) 621 + if (ctx->magic == MUTT_MBOX) 622 622 mbox_parse_mailbox (ctx); 623 623 else 624 624 mmdf_parse_mailbox (ctx); ··· 634 634 mutt_unblock_signals (); 635 635 } 636 636 637 - return (M_NEW_MAIL); /* signal that new mail arrived */ 637 + return (MUTT_NEW_MAIL); /* signal that new mail arrived */ 638 638 } 639 639 else 640 640 modified = 1; ··· 658 658 mbox_unlock_mailbox (ctx); 659 659 mutt_unblock_signals (); 660 660 } 661 - return (M_REOPENED); 661 + return (MUTT_REOPENED); 662 662 } 663 663 } 664 664 ··· 762 762 } 763 763 764 764 /* Check to make sure that the file hasn't changed on disk */ 765 - if ((i = mbox_check_mailbox (ctx, index_hint)) == M_NEW_MAIL || i == M_REOPENED) 765 + if ((i = mbox_check_mailbox (ctx, index_hint)) == MUTT_NEW_MAIL || i == MUTT_REOPENED) 766 766 { 767 767 /* new mail arrived, or mailbox reopened */ 768 768 need_sort = i; ··· 815 815 /* the offset stored in the header does not include the MMDF_SEP, so make 816 816 * sure we seek to the correct location 817 817 */ 818 - if (ctx->magic == M_MMDF) 818 + if (ctx->magic == MUTT_MMDF) 819 819 offset -= (sizeof MMDF_SEP - 1); 820 820 821 821 /* allocate space for the new offsets */ ··· 825 825 if (!ctx->quiet) 826 826 { 827 827 snprintf (msgbuf, sizeof (msgbuf), _("Writing %s..."), ctx->path); 828 - mutt_progress_init (&progress, msgbuf, M_PROGRESS_MSG, WriteInc, ctx->msgcount); 828 + mutt_progress_init (&progress, msgbuf, MUTT_PROGRESS_MSG, WriteInc, ctx->msgcount); 829 829 } 830 830 831 831 for (i = first, j = 0; i < ctx->msgcount; i++) ··· 847 847 { 848 848 j++; 849 849 850 - if (ctx->magic == M_MMDF) 850 + if (ctx->magic == MUTT_MMDF) 851 851 { 852 852 if (fputs (MMDF_SEP, fp) == EOF) 853 853 { ··· 865 865 */ 866 866 newOffset[i - first].hdr = ftello (fp) + offset; 867 867 868 - if (mutt_copy_message (fp, ctx, ctx->hdrs[i], M_CM_UPDATE, 868 + if (mutt_copy_message (fp, ctx, ctx->hdrs[i], MUTT_CM_UPDATE, 869 869 CH_FROM | CH_UPDATE | CH_UPDATE_LEN) != 0) 870 870 { 871 871 mutt_perror (tempfile); ··· 885 885 886 886 switch(ctx->magic) 887 887 { 888 - case M_MMDF: 888 + case MUTT_MMDF: 889 889 if(fputs(MMDF_SEP, fp) == EOF) 890 890 { 891 891 mutt_perror (tempfile); ··· 939 939 if (fseeko (ctx->fp, offset, SEEK_SET) != 0 || /* seek the append location */ 940 940 /* do a sanity check to make sure the mailbox looks ok */ 941 941 fgets (buf, sizeof (buf), ctx->fp) == NULL || 942 - (ctx->magic == M_MBOX && mutt_strncmp ("From ", buf, 5) != 0) || 943 - (ctx->magic == M_MMDF && mutt_strcmp (MMDF_SEP, buf) != 0)) 942 + (ctx->magic == MUTT_MBOX && mutt_strncmp ("From ", buf, 5) != 0) || 943 + (ctx->magic == MUTT_MMDF && mutt_strcmp (MMDF_SEP, buf) != 0)) 944 944 { 945 945 dprint (1, (debugfile, "mbox_sync_mailbox: message not in expected position.")); 946 946 dprint (1, (debugfile, "\tLINE: %s\n", buf)); ··· 1064 1064 if (need_sort) 1065 1065 /* if the mailbox was reopened, the thread tree will be invalid so make 1066 1066 * sure to start threading from scratch. */ 1067 - mutt_sort_headers (ctx, (need_sort == M_REOPENED)); 1067 + mutt_sort_headers (ctx, (need_sort == MUTT_REOPENED)); 1068 1068 1069 1069 return rc; 1070 1070 } ··· 1143 1143 1144 1144 switch (ctx->magic) 1145 1145 { 1146 - case M_MBOX: 1147 - case M_MMDF: 1146 + case MUTT_MBOX: 1147 + case MUTT_MMDF: 1148 1148 cmp_headers = mbox_strict_cmp_headers; 1149 1149 safe_fclose (&ctx->fp); 1150 1150 if (!(ctx->fp = safe_fopen (ctx->path, "r"))) 1151 1151 rc = -1; 1152 1152 else 1153 - rc = ((ctx->magic == M_MBOX) ? mbox_parse_mailbox 1153 + rc = ((ctx->magic == MUTT_MBOX) ? mbox_parse_mailbox 1154 1154 : mmdf_parse_mailbox) (ctx); 1155 1155 break; 1156 1156 ··· 1221 1221 * otherwise, the header may have been modified externally, 1222 1222 * and we don't want to lose _those_ changes 1223 1223 */ 1224 - mutt_set_flag (ctx, ctx->hdrs[i], M_FLAG, old_hdrs[j]->flagged); 1225 - mutt_set_flag (ctx, ctx->hdrs[i], M_REPLIED, old_hdrs[j]->replied); 1226 - mutt_set_flag (ctx, ctx->hdrs[i], M_OLD, old_hdrs[j]->old); 1227 - mutt_set_flag (ctx, ctx->hdrs[i], M_READ, old_hdrs[j]->read); 1224 + mutt_set_flag (ctx, ctx->hdrs[i], MUTT_FLAG, old_hdrs[j]->flagged); 1225 + mutt_set_flag (ctx, ctx->hdrs[i], MUTT_REPLIED, old_hdrs[j]->replied); 1226 + mutt_set_flag (ctx, ctx->hdrs[i], MUTT_OLD, old_hdrs[j]->old); 1227 + mutt_set_flag (ctx, ctx->hdrs[i], MUTT_READ, old_hdrs[j]->read); 1228 1228 } 1229 - mutt_set_flag (ctx, ctx->hdrs[i], M_DELETE, old_hdrs[j]->deleted); 1230 - mutt_set_flag (ctx, ctx->hdrs[i], M_TAG, old_hdrs[j]->tagged); 1229 + mutt_set_flag (ctx, ctx->hdrs[i], MUTT_DELETE, old_hdrs[j]->deleted); 1230 + mutt_set_flag (ctx, ctx->hdrs[i], MUTT_TAG, old_hdrs[j]->tagged); 1231 1231 1232 1232 /* we don't need this header any more */ 1233 1233 mutt_free_header (&(old_hdrs[j])); ··· 1248 1248 1249 1249 ctx->quiet = 0; 1250 1250 1251 - return ((ctx->changed || msg_mod) ? M_REOPENED : M_NEW_MAIL); 1251 + return ((ctx->changed || msg_mod) ? MUTT_REOPENED : MUTT_NEW_MAIL); 1252 1252 } 1253 1253 1254 1254 /*
+21 -21
menu.c
··· 37 37 memset (&mbstate, 0, sizeof (mbstate)); 38 38 while (*s) 39 39 { 40 - if (*s < M_TREE_MAX) 40 + if (*s < MUTT_TREE_MAX) 41 41 { 42 42 if (do_color) 43 43 SETCOLOR (MT_COLOR_TREE); 44 - while (*s && *s < M_TREE_MAX) 44 + while (*s && *s < MUTT_TREE_MAX) 45 45 { 46 46 switch (*s) 47 47 { 48 - case M_TREE_LLCORNER: 48 + case MUTT_TREE_LLCORNER: 49 49 if (option (OPTASCIICHARS)) 50 50 addch ('`'); 51 51 #ifdef WACS_LLCORNER ··· 58 58 addch (ACS_LLCORNER); 59 59 #endif 60 60 break; 61 - case M_TREE_ULCORNER: 61 + case MUTT_TREE_ULCORNER: 62 62 if (option (OPTASCIICHARS)) 63 63 addch (','); 64 64 #ifdef WACS_ULCORNER ··· 71 71 addch (ACS_ULCORNER); 72 72 #endif 73 73 break; 74 - case M_TREE_LTEE: 74 + case MUTT_TREE_LTEE: 75 75 if (option (OPTASCIICHARS)) 76 76 addch ('|'); 77 77 #ifdef WACS_LTEE ··· 84 84 addch (ACS_LTEE); 85 85 #endif 86 86 break; 87 - case M_TREE_HLINE: 87 + case MUTT_TREE_HLINE: 88 88 if (option (OPTASCIICHARS)) 89 89 addch ('-'); 90 90 #ifdef WACS_HLINE ··· 97 97 addch (ACS_HLINE); 98 98 #endif 99 99 break; 100 - case M_TREE_VLINE: 100 + case MUTT_TREE_VLINE: 101 101 if (option (OPTASCIICHARS)) 102 102 addch ('|'); 103 103 #ifdef WACS_VLINE ··· 110 110 addch (ACS_VLINE); 111 111 #endif 112 112 break; 113 - case M_TREE_TTEE: 113 + case MUTT_TREE_TTEE: 114 114 if (option (OPTASCIICHARS)) 115 115 addch ('-'); 116 116 #ifdef WACS_TTEE ··· 123 123 addch (ACS_TTEE); 124 124 #endif 125 125 break; 126 - case M_TREE_BTEE: 126 + case MUTT_TREE_BTEE: 127 127 if (option (OPTASCIICHARS)) 128 128 addch ('-'); 129 129 #ifdef WACS_BTEE ··· 136 136 addch (ACS_BTEE); 137 137 #endif 138 138 break; 139 - case M_TREE_SPACE: 139 + case MUTT_TREE_SPACE: 140 140 addch (' '); 141 141 break; 142 - case M_TREE_RARROW: 142 + case MUTT_TREE_RARROW: 143 143 addch ('>'); 144 144 break; 145 - case M_TREE_STAR: 145 + case MUTT_TREE_STAR: 146 146 addch ('*'); /* fake thread indicator */ 147 147 break; 148 - case M_TREE_HIDDEN: 148 + case MUTT_TREE_HIDDEN: 149 149 addch ('&'); 150 150 break; 151 - case M_TREE_EQUALS: 151 + case MUTT_TREE_EQUALS: 152 152 addch ('='); 153 153 break; 154 - case M_TREE_MISSING: 154 + case MUTT_TREE_MISSING: 155 155 addch ('?'); 156 156 break; 157 157 } ··· 220 220 { 221 221 char buf[STRING]; 222 222 223 - snprintf (buf, sizeof (buf), M_MODEFMT, menu->title); 223 + snprintf (buf, sizeof (buf), MUTT_MODEFMT, menu->title); 224 224 SETCOLOR (MT_COLOR_STATUS); 225 225 mutt_window_move (menu->statuswin, 0, 0); 226 226 mutt_paddstr (menu->statuswin->cols, buf); ··· 713 713 FREE (p); /* __FREE_CHECKED__ */ 714 714 } 715 715 716 - #define M_SEARCH_UP 1 717 - #define M_SEARCH_DOWN 2 716 + #define MUTT_SEARCH_UP 1 717 + #define MUTT_SEARCH_DOWN 2 718 718 719 719 static int menu_search (MUTTMENU *menu, int op) 720 720 { ··· 731 731 strfcpy (buf, searchBuf && *searchBuf ? searchBuf : "", sizeof (buf)); 732 732 if (mutt_get_field ((op == OP_SEARCH || op == OP_SEARCH_NEXT) 733 733 ? _("Search for: ") : _("Reverse search for: "), 734 - buf, sizeof (buf), M_CLEAR) != 0 || !buf[0]) 734 + buf, sizeof (buf), MUTT_CLEAR) != 0 || !buf[0]) 735 735 return (-1); 736 736 if (menu->menu >= 0 && menu->menu < MENU_MAX) 737 737 { ··· 739 739 searchBuf = SearchBuffers[menu->menu]; 740 740 } 741 741 menu->searchDir = (op == OP_SEARCH || op == OP_SEARCH_NEXT) ? 742 - M_SEARCH_DOWN : M_SEARCH_UP; 742 + MUTT_SEARCH_DOWN : MUTT_SEARCH_UP; 743 743 } 744 744 745 - searchDir = (menu->searchDir == M_SEARCH_UP) ? -1 : 1; 745 + searchDir = (menu->searchDir == MUTT_SEARCH_UP) ? -1 : 1; 746 746 if (op == OP_SEARCH_OPPOSITE) 747 747 searchDir = -searchDir; 748 748
+42 -42
mh.c
··· 669 669 struct stat st; 670 670 struct mh_data *data = mh_data (ctx); 671 671 672 - if (ctx->magic == M_MAILDIR) 672 + if (ctx->magic == MUTT_MAILDIR) 673 673 { 674 674 snprintf (buf, sizeof (buf), "%s/%s", ctx->path, "cur"); 675 675 if (stat (buf, &st) == 0) ··· 717 717 718 718 h->index = -1; 719 719 720 - if (magic == M_MAILDIR) 720 + if (magic == MUTT_MAILDIR) 721 721 { 722 722 /* 723 723 * maildir stores its flags in the filename, so ignore the ··· 771 771 772 772 while ((de = readdir (dirp)) != NULL) 773 773 { 774 - if ((ctx->magic == M_MH && !mh_valid_message (de->d_name)) 775 - || (ctx->magic == M_MAILDIR && *de->d_name == '.')) 774 + if ((ctx->magic == MUTT_MH && !mh_valid_message (de->d_name)) 775 + || (ctx->magic == MUTT_MAILDIR && *de->d_name == '.')) 776 776 continue; 777 777 778 778 /* FOO - really ignore the return value? */ ··· 782 782 783 783 h = mutt_new_header (); 784 784 h->old = is_old; 785 - if (ctx->magic == M_MAILDIR) 785 + if (ctx->magic == MUTT_MAILDIR) 786 786 maildir_parse_flags (h, de->d_name); 787 787 788 788 if (count) ··· 1015 1015 */ 1016 1016 static void mh_sort_natural (CONTEXT *ctx, struct maildir **md) 1017 1017 { 1018 - if (!ctx || !md || !*md || ctx->magic != M_MH || Sort != SORT_ORDER) 1018 + if (!ctx || !md || !*md || ctx->magic != MUTT_MH || Sort != SORT_ORDER) 1019 1019 return; 1020 1020 dprint (4, (debugfile, "maildir: sorting %s into natural order\n", 1021 1021 ctx->path)); ··· 1112 1112 ret = 0; 1113 1113 } 1114 1114 1115 - if (ctx->magic == M_MH) 1115 + if (ctx->magic == MUTT_MH) 1116 1116 data = mutt_hcache_fetch (hc, p->h->path, strlen); 1117 1117 else 1118 1118 data = mutt_hcache_fetch (hc, p->h->path + 3, &maildir_hcache_keylen); ··· 1121 1121 if (data != NULL && !ret && lastchanged.st_mtime <= when->tv_sec) 1122 1122 { 1123 1123 p->h = mutt_hcache_restore ((unsigned char *)data, &p->h); 1124 - if (ctx->magic == M_MAILDIR) 1124 + if (ctx->magic == MUTT_MAILDIR) 1125 1125 maildir_parse_flags (p->h, fn); 1126 1126 } 1127 1127 else ··· 1132 1132 { 1133 1133 p->header_parsed = 1; 1134 1134 #if USE_HCACHE 1135 - if (ctx->magic == M_MH) 1136 - mutt_hcache_store (hc, p->h->path, p->h, 0, strlen, M_GENERATE_UIDVALIDITY); 1135 + if (ctx->magic == MUTT_MH) 1136 + mutt_hcache_store (hc, p->h->path, p->h, 0, strlen, MUTT_GENERATE_UIDVALIDITY); 1137 1137 else 1138 - mutt_hcache_store (hc, p->h->path + 3, p->h, 0, &maildir_hcache_keylen, M_GENERATE_UIDVALIDITY); 1138 + mutt_hcache_store (hc, p->h->path + 3, p->h, 0, &maildir_hcache_keylen, MUTT_GENERATE_UIDVALIDITY); 1139 1139 #endif 1140 1140 } else 1141 1141 mutt_free_header (&p->h); ··· 1182 1182 if (!ctx->quiet) 1183 1183 { 1184 1184 snprintf (msgbuf, sizeof (msgbuf), _("Scanning %s..."), ctx->path); 1185 - mutt_progress_init (&progress, msgbuf, M_PROGRESS_MSG, ReadInc, 0); 1185 + mutt_progress_init (&progress, msgbuf, MUTT_PROGRESS_MSG, ReadInc, 0); 1186 1186 } 1187 1187 1188 1188 if (!ctx->data) ··· 1203 1203 if (!ctx->quiet) 1204 1204 { 1205 1205 snprintf (msgbuf, sizeof (msgbuf), _("Reading %s..."), ctx->path); 1206 - mutt_progress_init (&progress, msgbuf, M_PROGRESS_MSG, ReadInc, count); 1206 + mutt_progress_init (&progress, msgbuf, MUTT_PROGRESS_MSG, ReadInc, count); 1207 1207 } 1208 1208 maildir_delayed_parsing (ctx, &md, &progress); 1209 1209 1210 - if (ctx->magic == M_MH) 1210 + if (ctx->magic == MUTT_MH) 1211 1211 { 1212 1212 if (mh_read_sequences (&mhs, ctx->path) < 0) 1213 1213 return -1; ··· 1554 1554 return -1; 1555 1555 1556 1556 if ((rc = mutt_copy_message (dest->fp, ctx, h, 1557 - M_CM_UPDATE, CH_UPDATE | CH_UPDATE_LEN)) == 0) 1557 + MUTT_CM_UPDATE, CH_UPDATE | CH_UPDATE_LEN)) == 0) 1558 1558 { 1559 1559 snprintf (oldpath, _POSIX_PATH_MAX, "%s/%s", ctx->path, h->path); 1560 1560 strfcpy (partpath, h->path, _POSIX_PATH_MAX); 1561 1561 1562 - if (ctx->magic == M_MAILDIR) 1562 + if (ctx->magic == MUTT_MAILDIR) 1563 1563 rc = maildir_commit_message (ctx, dest, h); 1564 1564 else 1565 1565 rc = _mh_commit_message (ctx, dest, h, 0); ··· 1587 1587 * lose flag modifications. 1588 1588 */ 1589 1589 1590 - if (ctx->magic == M_MH && rc == 0) 1590 + if (ctx->magic == MUTT_MH && rc == 0) 1591 1591 { 1592 1592 snprintf (newpath, _POSIX_PATH_MAX, "%s/%s", ctx->path, h->path); 1593 1593 if ((rc = safe_rename (newpath, oldpath)) == 0) ··· 1693 1693 char msgbuf[STRING]; 1694 1694 progress_t progress; 1695 1695 1696 - if (ctx->magic == M_MH) 1696 + if (ctx->magic == MUTT_MH) 1697 1697 i = mh_check_mailbox (ctx, index_hint); 1698 1698 else 1699 1699 i = maildir_check_mailbox (ctx, index_hint); ··· 1702 1702 return i; 1703 1703 1704 1704 #if USE_HCACHE 1705 - if (ctx->magic == M_MAILDIR || ctx->magic == M_MH) 1705 + if (ctx->magic == MUTT_MAILDIR || ctx->magic == MUTT_MH) 1706 1706 hc = mutt_hcache_open(HeaderCache, ctx->path, NULL); 1707 1707 #endif /* USE_HCACHE */ 1708 1708 1709 1709 if (!ctx->quiet) 1710 1710 { 1711 1711 snprintf (msgbuf, sizeof (msgbuf), _("Writing %s..."), ctx->path); 1712 - mutt_progress_init (&progress, msgbuf, M_PROGRESS_MSG, WriteInc, ctx->msgcount); 1712 + mutt_progress_init (&progress, msgbuf, MUTT_PROGRESS_MSG, WriteInc, ctx->msgcount); 1713 1713 } 1714 1714 1715 1715 for (i = 0; i < ctx->msgcount; i++) ··· 1718 1718 mutt_progress_update (&progress, i, -1); 1719 1719 1720 1720 if (ctx->hdrs[i]->deleted 1721 - && (ctx->magic != M_MAILDIR || !option (OPTMAILDIRTRASH))) 1721 + && (ctx->magic != MUTT_MAILDIR || !option (OPTMAILDIRTRASH))) 1722 1722 { 1723 1723 snprintf (path, sizeof (path), "%s/%s", ctx->path, ctx->hdrs[i]->path); 1724 - if (ctx->magic == M_MAILDIR 1725 - || (option (OPTMHPURGE) && ctx->magic == M_MH)) 1724 + if (ctx->magic == MUTT_MAILDIR 1725 + || (option (OPTMHPURGE) && ctx->magic == MUTT_MH)) 1726 1726 { 1727 1727 #if USE_HCACHE 1728 - if (ctx->magic == M_MAILDIR) 1728 + if (ctx->magic == MUTT_MAILDIR) 1729 1729 mutt_hcache_delete (hc, ctx->hdrs[i]->path + 3, &maildir_hcache_keylen); 1730 - else if (ctx->magic == M_MH) 1730 + else if (ctx->magic == MUTT_MH) 1731 1731 mutt_hcache_delete (hc, ctx->hdrs[i]->path, strlen); 1732 1732 #endif /* USE_HCACHE */ 1733 1733 unlink (path); 1734 1734 } 1735 - else if (ctx->magic == M_MH) 1735 + else if (ctx->magic == MUTT_MH) 1736 1736 { 1737 1737 /* MH just moves files out of the way when you delete them */ 1738 1738 if (*ctx->hdrs[i]->path != ',') ··· 1746 1746 } 1747 1747 } 1748 1748 else if (ctx->hdrs[i]->changed || ctx->hdrs[i]->attach_del || 1749 - (ctx->magic == M_MAILDIR 1749 + (ctx->magic == MUTT_MAILDIR 1750 1750 && (option (OPTMAILDIRTRASH) || ctx->hdrs[i]->trash) 1751 1751 && (ctx->hdrs[i]->deleted != ctx->hdrs[i]->trash))) 1752 1752 { 1753 - if (ctx->magic == M_MAILDIR) 1753 + if (ctx->magic == MUTT_MAILDIR) 1754 1754 { 1755 1755 if (maildir_sync_message (ctx, i) == -1) 1756 1756 goto err; ··· 1765 1765 #if USE_HCACHE 1766 1766 if (ctx->hdrs[i]->changed) 1767 1767 { 1768 - if (ctx->magic == M_MAILDIR) 1768 + if (ctx->magic == MUTT_MAILDIR) 1769 1769 mutt_hcache_store (hc, ctx->hdrs[i]->path + 3, ctx->hdrs[i], 1770 - 0, &maildir_hcache_keylen, M_GENERATE_UIDVALIDITY); 1771 - else if (ctx->magic == M_MH) 1772 - mutt_hcache_store (hc, ctx->hdrs[i]->path, ctx->hdrs[i], 0, strlen, M_GENERATE_UIDVALIDITY); 1770 + 0, &maildir_hcache_keylen, MUTT_GENERATE_UIDVALIDITY); 1771 + else if (ctx->magic == MUTT_MH) 1772 + mutt_hcache_store (hc, ctx->hdrs[i]->path, ctx->hdrs[i], 0, strlen, MUTT_GENERATE_UIDVALIDITY); 1773 1773 } 1774 1774 #endif 1775 1775 1776 1776 } 1777 1777 1778 1778 #if USE_HCACHE 1779 - if (ctx->magic == M_MAILDIR || ctx->magic == M_MH) 1779 + if (ctx->magic == MUTT_MAILDIR || ctx->magic == MUTT_MH) 1780 1780 mutt_hcache_close (hc); 1781 1781 #endif /* USE_HCACHE */ 1782 1782 1783 - if (ctx->magic == M_MH) 1783 + if (ctx->magic == MUTT_MH) 1784 1784 mh_update_sequences (ctx); 1785 1785 1786 1786 /* XXX race condition? */ ··· 1794 1794 for (i = 0, j = 0; i < ctx->msgcount; i++) 1795 1795 { 1796 1796 if (!ctx->hdrs[i]->deleted 1797 - || (ctx->magic == M_MAILDIR && option (OPTMAILDIRTRASH))) 1797 + || (ctx->magic == MUTT_MAILDIR && option (OPTMAILDIRTRASH))) 1798 1798 ctx->hdrs[i]->index = j++; 1799 1799 } 1800 1800 } ··· 1803 1803 1804 1804 err: 1805 1805 #if USE_HCACHE 1806 - if (ctx->magic == M_MAILDIR || ctx->magic == M_MH) 1806 + if (ctx->magic == MUTT_MAILDIR || ctx->magic == MUTT_MH) 1807 1807 mutt_hcache_close (hc); 1808 1808 #endif /* USE_HCACHE */ 1809 1809 return -1; ··· 1864 1864 * bits are already properly set, but it is still faster not to pass 1865 1865 * through it */ 1866 1866 if (o->flagged != n->flagged) 1867 - mutt_set_flag (ctx, o, M_FLAG, n->flagged); 1867 + mutt_set_flag (ctx, o, MUTT_FLAG, n->flagged); 1868 1868 if (o->replied != n->replied) 1869 - mutt_set_flag (ctx, o, M_REPLIED, n->replied); 1869 + mutt_set_flag (ctx, o, MUTT_REPLIED, n->replied); 1870 1870 if (o->read != n->read) 1871 - mutt_set_flag (ctx, o, M_READ, n->read); 1871 + mutt_set_flag (ctx, o, MUTT_READ, n->read); 1872 1872 if (o->old != n->old) 1873 - mutt_set_flag (ctx, o, M_OLD, n->old); 1873 + mutt_set_flag (ctx, o, MUTT_OLD, n->old); 1874 1874 1875 1875 /* mutt_set_flag() will set this, but we don't need to 1876 1876 * sync the changes we made because we just updated the ··· 2028 2028 /* Incorporate new messages */ 2029 2029 have_new = maildir_move_to_context (ctx, &md); 2030 2030 2031 - return occult ? M_REOPENED : (have_new ? M_NEW_MAIL : 0); 2031 + return occult ? MUTT_REOPENED : (have_new ? MUTT_NEW_MAIL : 0); 2032 2032 } 2033 2033 2034 2034 /* ··· 2141 2141 /* Incorporate new messages */ 2142 2142 have_new = maildir_move_to_context (ctx, &md); 2143 2143 2144 - return occult ? M_REOPENED : (have_new ? M_NEW_MAIL : 0); 2144 + return occult ? MUTT_REOPENED : (have_new ? MUTT_NEW_MAIL : 0); 2145 2145 } 2146 2146 2147 2147
+150 -150
mutt.h
··· 80 80 #include "mutt_regex.h" 81 81 82 82 /* flags for mutt_enter_string() */ 83 - #define M_ALIAS 1 /* do alias "completion" by calling up the alias-menu */ 84 - #define M_FILE (1<<1) /* do file completion */ 85 - #define M_EFILE (1<<2) /* do file completion, plus incoming folders */ 86 - #define M_CMD (1<<3) /* do completion on previous word */ 87 - #define M_PASS (1<<4) /* password mode (no echo) */ 88 - #define M_CLEAR (1<<5) /* clear input if printable character is pressed */ 89 - #define M_COMMAND (1<<6) /* do command completion */ 90 - #define M_PATTERN (1<<7) /* pattern mode - only used for history classes */ 83 + #define MUTT_ALIAS 1 /* do alias "completion" by calling up the alias-menu */ 84 + #define MUTT_FILE (1<<1) /* do file completion */ 85 + #define MUTT_EFILE (1<<2) /* do file completion, plus incoming folders */ 86 + #define MUTT_CMD (1<<3) /* do completion on previous word */ 87 + #define MUTT_PASS (1<<4) /* password mode (no echo) */ 88 + #define MUTT_CLEAR (1<<5) /* clear input if printable character is pressed */ 89 + #define MUTT_COMMAND (1<<6) /* do command completion */ 90 + #define MUTT_PATTERN (1<<7) /* pattern mode - only used for history classes */ 91 91 92 92 /* flags for mutt_get_token() */ 93 - #define M_TOKEN_EQUAL 1 /* treat '=' as a special */ 94 - #define M_TOKEN_CONDENSE (1<<1) /* ^(char) to control chars (macros) */ 95 - #define M_TOKEN_SPACE (1<<2) /* don't treat whitespace as a term */ 96 - #define M_TOKEN_QUOTE (1<<3) /* don't interpret quotes */ 97 - #define M_TOKEN_PATTERN (1<<4) /* !)|~ are terms (for patterns) */ 98 - #define M_TOKEN_COMMENT (1<<5) /* don't reap comments */ 99 - #define M_TOKEN_SEMICOLON (1<<6) /* don't treat ; as special */ 93 + #define MUTT_TOKEN_EQUAL 1 /* treat '=' as a special */ 94 + #define MUTT_TOKEN_CONDENSE (1<<1) /* ^(char) to control chars (macros) */ 95 + #define MUTT_TOKEN_SPACE (1<<2) /* don't treat whitespace as a term */ 96 + #define MUTT_TOKEN_QUOTE (1<<3) /* don't interpret quotes */ 97 + #define MUTT_TOKEN_PATTERN (1<<4) /* !)|~ are terms (for patterns) */ 98 + #define MUTT_TOKEN_COMMENT (1<<5) /* don't reap comments */ 99 + #define MUTT_TOKEN_SEMICOLON (1<<6) /* don't treat ; as special */ 100 100 101 101 typedef struct 102 102 { ··· 113 113 } event_t; 114 114 115 115 /* flags for _mutt_system() */ 116 - #define M_DETACH_PROCESS 1 /* detach subprocess from group */ 116 + #define MUTT_DETACH_PROCESS 1 /* detach subprocess from group */ 117 117 118 118 /* flags for mutt_FormatString() */ 119 119 typedef enum 120 120 { 121 - M_FORMAT_FORCESUBJ = (1<<0), /* print the subject even if unchanged */ 122 - M_FORMAT_TREE = (1<<1), /* draw the thread tree */ 123 - M_FORMAT_MAKEPRINT = (1<<2), /* make sure that all chars are printable */ 124 - M_FORMAT_OPTIONAL = (1<<3), 125 - M_FORMAT_STAT_FILE = (1<<4), /* used by mutt_attach_fmt */ 126 - M_FORMAT_ARROWCURSOR = (1<<5), /* reserve space for arrow_cursor */ 127 - M_FORMAT_INDEX = (1<<6), /* this is a main index entry */ 128 - M_FORMAT_NOFILTER = (1<<7) /* do not allow filtering on this pass */ 121 + MUTT_FORMAT_FORCESUBJ = (1<<0), /* print the subject even if unchanged */ 122 + MUTT_FORMAT_TREE = (1<<1), /* draw the thread tree */ 123 + MUTT_FORMAT_MAKEPRINT = (1<<2), /* make sure that all chars are printable */ 124 + MUTT_FORMAT_OPTIONAL = (1<<3), 125 + MUTT_FORMAT_STAT_FILE = (1<<4), /* used by mutt_attach_fmt */ 126 + MUTT_FORMAT_ARROWCURSOR = (1<<5), /* reserve space for arrow_cursor */ 127 + MUTT_FORMAT_INDEX = (1<<6), /* this is a main index entry */ 128 + MUTT_FORMAT_NOFILTER = (1<<7) /* do not allow filtering on this pass */ 129 129 } format_flag; 130 130 131 131 /* types for mutt_add_hook() */ 132 - #define M_FOLDERHOOK 1 133 - #define M_MBOXHOOK (1<<1) 134 - #define M_SENDHOOK (1<<2) 135 - #define M_FCCHOOK (1<<3) 136 - #define M_SAVEHOOK (1<<4) 137 - #define M_CHARSETHOOK (1<<5) 138 - #define M_ICONVHOOK (1<<6) 139 - #define M_MESSAGEHOOK (1<<7) 140 - #define M_CRYPTHOOK (1<<8) 141 - #define M_ACCOUNTHOOK (1<<9) 142 - #define M_REPLYHOOK (1<<10) 143 - #define M_SEND2HOOK (1<<11) 132 + #define MUTT_FOLDERHOOK 1 133 + #define MUTT_MBOXHOOK (1<<1) 134 + #define MUTT_SENDHOOK (1<<2) 135 + #define MUTT_FCCHOOK (1<<3) 136 + #define MUTT_SAVEHOOK (1<<4) 137 + #define MUTT_CHARSETHOOK (1<<5) 138 + #define MUTT_ICONVHOOK (1<<6) 139 + #define MUTT_MESSAGEHOOK (1<<7) 140 + #define MUTT_CRYPTHOOK (1<<8) 141 + #define MUTT_ACCOUNTHOOK (1<<9) 142 + #define MUTT_REPLYHOOK (1<<10) 143 + #define MUTT_SEND2HOOK (1<<11) 144 144 145 145 /* tree characters for linearize_tree and print_enriched_string */ 146 - #define M_TREE_LLCORNER 1 147 - #define M_TREE_ULCORNER 2 148 - #define M_TREE_LTEE 3 149 - #define M_TREE_HLINE 4 150 - #define M_TREE_VLINE 5 151 - #define M_TREE_SPACE 6 152 - #define M_TREE_RARROW 7 153 - #define M_TREE_STAR 8 154 - #define M_TREE_HIDDEN 9 155 - #define M_TREE_EQUALS 10 156 - #define M_TREE_TTEE 11 157 - #define M_TREE_BTEE 12 158 - #define M_TREE_MISSING 13 159 - #define M_TREE_MAX 14 146 + #define MUTT_TREE_LLCORNER 1 147 + #define MUTT_TREE_ULCORNER 2 148 + #define MUTT_TREE_LTEE 3 149 + #define MUTT_TREE_HLINE 4 150 + #define MUTT_TREE_VLINE 5 151 + #define MUTT_TREE_SPACE 6 152 + #define MUTT_TREE_RARROW 7 153 + #define MUTT_TREE_STAR 8 154 + #define MUTT_TREE_HIDDEN 9 155 + #define MUTT_TREE_EQUALS 10 156 + #define MUTT_TREE_TTEE 11 157 + #define MUTT_TREE_BTEE 12 158 + #define MUTT_TREE_MISSING 13 159 + #define MUTT_TREE_MAX 14 160 160 161 - #define M_THREAD_COLLAPSE (1<<0) 162 - #define M_THREAD_UNCOLLAPSE (1<<1) 163 - #define M_THREAD_GET_HIDDEN (1<<2) 164 - #define M_THREAD_UNREAD (1<<3) 165 - #define M_THREAD_NEXT_UNREAD (1<<4) 161 + #define MUTT_THREAD_COLLAPSE (1<<0) 162 + #define MUTT_THREAD_UNCOLLAPSE (1<<1) 163 + #define MUTT_THREAD_GET_HIDDEN (1<<2) 164 + #define MUTT_THREAD_UNREAD (1<<3) 165 + #define MUTT_THREAD_NEXT_UNREAD (1<<4) 166 166 167 167 enum 168 168 { 169 169 /* modes for mutt_view_attachment() */ 170 - M_REGULAR = 1, 171 - M_MAILCAP, 172 - M_AS_TEXT, 170 + MUTT_REGULAR = 1, 171 + MUTT_MAILCAP, 172 + MUTT_AS_TEXT, 173 173 174 174 /* action codes used by mutt_set_flag() and mutt_pattern_function() */ 175 - M_ALL, 176 - M_NONE, 177 - M_NEW, 178 - M_OLD, 179 - M_REPLIED, 180 - M_READ, 181 - M_UNREAD, 182 - M_DELETE, 183 - M_UNDELETE, 184 - M_DELETED, 185 - M_FLAG, 186 - M_TAG, 187 - M_UNTAG, 188 - M_LIMIT, 189 - M_EXPIRED, 190 - M_SUPERSEDED, 175 + MUTT_ALL, 176 + MUTT_NONE, 177 + MUTT_NEW, 178 + MUTT_OLD, 179 + MUTT_REPLIED, 180 + MUTT_READ, 181 + MUTT_UNREAD, 182 + MUTT_DELETE, 183 + MUTT_UNDELETE, 184 + MUTT_DELETED, 185 + MUTT_FLAG, 186 + MUTT_TAG, 187 + MUTT_UNTAG, 188 + MUTT_LIMIT, 189 + MUTT_EXPIRED, 190 + MUTT_SUPERSEDED, 191 191 192 192 /* actions for mutt_pattern_comp/mutt_pattern_exec */ 193 - M_AND, 194 - M_OR, 195 - M_THREAD, 196 - M_TO, 197 - M_CC, 198 - M_COLLAPSED, 199 - M_SUBJECT, 200 - M_FROM, 201 - M_DATE, 202 - M_DATE_RECEIVED, 203 - M_DUPLICATED, 204 - M_UNREFERENCED, 205 - M_ID, 206 - M_BODY, 207 - M_HEADER, 208 - M_HORMEL, 209 - M_WHOLE_MSG, 210 - M_SENDER, 211 - M_MESSAGE, 212 - M_SCORE, 213 - M_SIZE, 214 - M_REFERENCE, 215 - M_RECIPIENT, 216 - M_LIST, 217 - M_SUBSCRIBED_LIST, 218 - M_PERSONAL_RECIP, 219 - M_PERSONAL_FROM, 220 - M_ADDRESS, 221 - M_CRYPT_SIGN, 222 - M_CRYPT_VERIFIED, 223 - M_CRYPT_ENCRYPT, 224 - M_PGP_KEY, 225 - M_XLABEL, 226 - M_MIMEATTACH, 193 + MUTT_AND, 194 + MUTT_OR, 195 + MUTT_THREAD, 196 + MUTT_TO, 197 + MUTT_CC, 198 + MUTT_COLLAPSED, 199 + MUTT_SUBJECT, 200 + MUTT_FROM, 201 + MUTT_DATE, 202 + MUTT_DATE_RECEIVED, 203 + MUTT_DUPLICATED, 204 + MUTT_UNREFERENCED, 205 + MUTT_ID, 206 + MUTT_BODY, 207 + MUTT_HEADER, 208 + MUTT_HORMEL, 209 + MUTT_WHOLE_MSG, 210 + MUTT_SENDER, 211 + MUTT_MESSAGE, 212 + MUTT_SCORE, 213 + MUTT_SIZE, 214 + MUTT_REFERENCE, 215 + MUTT_RECIPIENT, 216 + MUTT_LIST, 217 + MUTT_SUBSCRIBED_LIST, 218 + MUTT_PERSONAL_RECIP, 219 + MUTT_PERSONAL_FROM, 220 + MUTT_ADDRESS, 221 + MUTT_CRYPT_SIGN, 222 + MUTT_CRYPT_VERIFIED, 223 + MUTT_CRYPT_ENCRYPT, 224 + MUTT_PGP_KEY, 225 + MUTT_XLABEL, 226 + MUTT_MIMEATTACH, 227 227 228 228 /* Options for Mailcap lookup */ 229 - M_EDIT, 230 - M_COMPOSE, 231 - M_PRINT, 232 - M_AUTOVIEW, 229 + MUTT_EDIT, 230 + MUTT_COMPOSE, 231 + MUTT_PRINT, 232 + MUTT_AUTOVIEW, 233 233 234 234 /* options for socket code */ 235 - M_NEW_SOCKET, 235 + MUTT_NEW_SOCKET, 236 236 #ifdef USE_SSL_OPENSSL 237 - M_NEW_SSL_SOCKET, 237 + MUTT_NEW_SSL_SOCKET, 238 238 #endif 239 239 240 240 /* Options for mutt_save_attachment */ 241 - M_SAVE_APPEND, 242 - M_SAVE_OVERWRITE 241 + MUTT_SAVE_APPEND, 242 + MUTT_SAVE_OVERWRITE 243 243 }; 244 244 245 245 /* possible arguments to set_quadoption() */ 246 246 enum 247 247 { 248 - M_NO, 249 - M_YES, 250 - M_ASKNO, 251 - M_ASKYES 248 + MUTT_NO, 249 + MUTT_YES, 250 + MUTT_ASKNO, 251 + MUTT_ASKYES 252 252 }; 253 253 254 254 /* quad-option vars */ ··· 300 300 #define SENDDRAFTFILE (1<<11) /* Used by the -H flag */ 301 301 302 302 /* flags for mutt_compose_menu() */ 303 - #define M_COMPOSE_NOFREEHEADER (1<<0) 303 + #define MUTT_COMPOSE_NOFREEHEADER (1<<0) 304 304 305 305 /* flags to _mutt_select_file() */ 306 - #define M_SEL_BUFFY (1<<0) 307 - #define M_SEL_MULTI (1<<1) 308 - #define M_SEL_FOLDER (1<<2) 306 + #define MUTT_SEL_BUFFY (1<<0) 307 + #define MUTT_SEL_MULTI (1<<1) 308 + #define MUTT_SEL_FOLDER (1<<2) 309 309 310 310 /* flags for parse_spam_list */ 311 - #define M_SPAM 1 312 - #define M_NOSPAM 2 311 + #define MUTT_SPAM 1 312 + #define MUTT_NOSPAM 2 313 313 314 314 /* boolean vars */ 315 315 enum ··· 811 811 812 812 813 813 /* flag to mutt_pattern_comp() */ 814 - #define M_FULL_MSG (1<<0) /* enable body and header matching */ 814 + #define MUTT_FULL_MSG (1<<0) /* enable body and header matching */ 815 815 816 816 typedef enum { 817 - M_MATCH_FULL_ADDRESS = 1 817 + MUTT_MATCH_FULL_ADDRESS = 1 818 818 } pattern_exec_flag; 819 819 820 820 typedef struct group_t ··· 853 853 /* ACL Rights */ 854 854 enum 855 855 { 856 - M_ACL_LOOKUP = 0, 857 - M_ACL_READ, 858 - M_ACL_SEEN, 859 - M_ACL_WRITE, 860 - M_ACL_INSERT, 861 - M_ACL_POST, 862 - M_ACL_CREATE, 863 - M_ACL_DELMX, 864 - M_ACL_DELETE, 865 - M_ACL_EXPUNGE, 866 - M_ACL_ADMIN, 856 + MUTT_ACL_LOOKUP = 0, 857 + MUTT_ACL_READ, 858 + MUTT_ACL_SEEN, 859 + MUTT_ACL_WRITE, 860 + MUTT_ACL_INSERT, 861 + MUTT_ACL_POST, 862 + MUTT_ACL_CREATE, 863 + MUTT_ACL_DELMX, 864 + MUTT_ACL_DELETE, 865 + MUTT_ACL_EXPUNGE, 866 + MUTT_ACL_ADMIN, 867 867 868 868 RIGHTSMAX 869 869 }; ··· 933 933 } ENTER_STATE; 934 934 935 935 /* flags for the STATE struct */ 936 - #define M_DISPLAY (1<<0) /* output is displayed to the user */ 937 - #define M_VERIFY (1<<1) /* perform signature verification */ 938 - #define M_PENDINGPREFIX (1<<2) /* prefix to write, but character must follow */ 939 - #define M_WEED (1<<3) /* weed headers even when not in display mode */ 940 - #define M_CHARCONV (1<<4) /* Do character set conversions */ 941 - #define M_PRINTING (1<<5) /* are we printing? - M_DISPLAY "light" */ 942 - #define M_REPLYING (1<<6) /* are we replying? */ 943 - #define M_FIRSTDONE (1<<7) /* the first attachment has been done */ 936 + #define MUTT_DISPLAY (1<<0) /* output is displayed to the user */ 937 + #define MUTT_VERIFY (1<<1) /* perform signature verification */ 938 + #define MUTT_PENDINGPREFIX (1<<2) /* prefix to write, but character must follow */ 939 + #define MUTT_WEED (1<<3) /* weed headers even when not in display mode */ 940 + #define MUTT_CHARCONV (1<<4) /* Do character set conversions */ 941 + #define MUTT_PRINTING (1<<5) /* are we printing? - MUTT_DISPLAY "light" */ 942 + #define MUTT_REPLYING (1<<6) /* are we replying? */ 943 + #define MUTT_FIRSTDONE (1<<7) /* the first attachment has been done */ 944 944 945 - #define state_set_prefix(s) ((s)->flags |= M_PENDINGPREFIX) 946 - #define state_reset_prefix(s) ((s)->flags &= ~M_PENDINGPREFIX) 945 + #define state_set_prefix(s) ((s)->flags |= MUTT_PENDINGPREFIX) 946 + #define state_reset_prefix(s) ((s)->flags &= ~MUTT_PENDINGPREFIX) 947 947 #define state_puts(x,y) fputs(x,(y)->fpout) 948 948 #define state_putc(x,y) fputc(x,(y)->fpout) 949 949 ··· 963 963 regex_t minor_rx; 964 964 } ATTACH_MATCH; 965 965 966 - #define M_PARTS_TOPLEVEL (1<<0) /* is the top-level part */ 966 + #define MUTT_PARTS_TOPLEVEL (1<<0) /* is the top-level part */ 967 967 968 968 #include "ascii.h" 969 969 #include "protos.h"
+6 -6
mutt_curses.h
··· 37 37 * ncurses and SLang seem to send different characters when the Enter key is 38 38 * pressed, so define some macros to properly detect the Enter key. 39 39 */ 40 - #define M_ENTER_C '\r' 41 - #define M_ENTER_S "\r" 40 + #define MUTT_ENTER_C '\r' 41 + #define MUTT_ENTER_S "\r" 42 42 43 43 #else /* USE_SLANG_CURSES */ 44 44 ··· 52 52 # include <curses.h> 53 53 #endif 54 54 55 - #define M_ENTER_C '\n' 56 - #define M_ENTER_S "\n" 55 + #define MUTT_ENTER_C '\n' 56 + #define MUTT_ENTER_S "\n" 57 57 58 58 #endif /* USE_SLANG_CURSES */ 59 59 ··· 138 138 struct color_line *next; 139 139 } COLOR_LINE; 140 140 141 - #define M_PROGRESS_SIZE (1<<0) /* traffic-based progress */ 142 - #define M_PROGRESS_MSG (1<<1) /* message-based progress */ 141 + #define MUTT_PROGRESS_SIZE (1<<0) /* traffic-based progress */ 142 + #define MUTT_PROGRESS_MSG (1<<1) /* message-based progress */ 143 143 144 144 typedef struct 145 145 {
+1 -1
mutt_menu.h
··· 36 36 #define REDRAW_BODY (1<<6) 37 37 #define REDRAW_SIGWINCH (1<<7) 38 38 39 - #define M_MODEFMT "-- Mutt: %s" 39 + #define MUTT_MODEFMT "-- Mutt: %s" 40 40 41 41 typedef struct menu_t 42 42 {
+5 -5
mutt_sasl.c
··· 78 78 /* arbitrary. SASL will probably use a smaller buffer anyway. OTOH it's 79 79 * been a while since I've had access to an SASL server which negotiated 80 80 * a protection buffer. */ 81 - #define M_SASL_MAXBUF 65536 81 + #define MUTT_SASL_MAXBUF 65536 82 82 83 83 #define IP_PORT_BUFLEN 1024 84 84 ··· 181 181 182 182 switch (conn->account.type) 183 183 { 184 - case M_ACCT_TYPE_IMAP: 184 + case MUTT_ACCT_TYPE_IMAP: 185 185 service = "imap"; 186 186 break; 187 - case M_ACCT_TYPE_POP: 187 + case MUTT_ACCT_TYPE_POP: 188 188 service = "pop"; 189 189 break; 190 - case M_ACCT_TYPE_SMTP: 190 + case MUTT_ACCT_TYPE_SMTP: 191 191 service = "smtp"; 192 192 break; 193 193 default: ··· 233 233 memset (&secprops, 0, sizeof (secprops)); 234 234 /* Work around a casting bug in the SASL krb4 module */ 235 235 secprops.max_ssf = 0x7fff; 236 - secprops.maxbufsize = M_SASL_MAXBUF; 236 + secprops.maxbufsize = MUTT_SASL_MAXBUF; 237 237 if (sasl_setprop (*saslconn, SASL_SEC_PROPS, &secprops) != SASL_OK) 238 238 { 239 239 mutt_error (_("Error setting SASL security properties"));
+1 -1
mutt_socket.c
··· 288 288 289 289 if (Tunnel && *Tunnel) 290 290 mutt_tunnel_socket_setup (conn); 291 - else if (account->flags & M_ACCT_SSL) 291 + else if (account->flags & MUTT_ACCT_SSL) 292 292 { 293 293 #if defined(USE_SSL) 294 294 if (mutt_ssl_socket_setup (conn) < 0)
+6 -6
mutt_socket.h
··· 24 24 #include "lib.h" 25 25 26 26 /* logging levels */ 27 - #define M_SOCK_LOG_CMD 2 28 - #define M_SOCK_LOG_HDR 3 29 - #define M_SOCK_LOG_FULL 4 27 + #define MUTT_SOCK_LOG_CMD 2 28 + #define MUTT_SOCK_LOG_HDR 3 29 + #define MUTT_SOCK_LOG_FULL 4 30 30 31 31 typedef struct _connection 32 32 { ··· 56 56 int mutt_socket_read (CONNECTION* conn, char* buf, size_t len); 57 57 int mutt_socket_poll (CONNECTION* conn); 58 58 int mutt_socket_readchar (CONNECTION *conn, char *c); 59 - #define mutt_socket_readln(A,B,C) mutt_socket_readln_d(A,B,C,M_SOCK_LOG_CMD) 59 + #define mutt_socket_readln(A,B,C) mutt_socket_readln_d(A,B,C,MUTT_SOCK_LOG_CMD) 60 60 int mutt_socket_readln_d (char *buf, size_t buflen, CONNECTION *conn, int dbg); 61 - #define mutt_socket_write(A,B) mutt_socket_write_d(A,B,-1,M_SOCK_LOG_CMD) 62 - #define mutt_socket_write_n(A,B,C) mutt_socket_write_d(A,B,C,M_SOCK_LOG_CMD) 61 + #define mutt_socket_write(A,B) mutt_socket_write_d(A,B,-1,MUTT_SOCK_LOG_CMD) 62 + #define mutt_socket_write_n(A,B,C) mutt_socket_write_d(A,B,C,MUTT_SOCK_LOG_CMD) 63 63 int mutt_socket_write_d (CONNECTION *conn, const char *buf, int len, int dbg); 64 64 65 65 /* stupid hack for imap_logout_all */
+3 -3
mutt_ssl.c
··· 739 739 FILE *fp; 740 740 741 741 /* expiration check */ 742 - if (option (OPTSSLVERIFYDATES) != M_NO) 742 + if (option (OPTSSLVERIFYDATES) != MUTT_NO) 743 743 { 744 744 if (X509_cmp_current_time (X509_get_notBefore (peercert)) >= 0) 745 745 { ··· 943 943 } 944 944 945 945 buf[0] = 0; 946 - if (host && option (OPTSSLVERIFYHOST) != M_NO) 946 + if (host && option (OPTSSLVERIFYHOST) != MUTT_NO) 947 947 { 948 948 if (!check_host (cert, host, buf, sizeof (buf))) 949 949 { ··· 1065 1065 len - idx, len); 1066 1066 menu->title = title; 1067 1067 if (SslCertFile 1068 - && (option (OPTSSLVERIFYDATES) == M_NO 1068 + && (option (OPTSSLVERIFYDATES) == MUTT_NO 1069 1069 || (X509_cmp_current_time (X509_get_notAfter (cert)) >= 0 1070 1070 && X509_cmp_current_time (X509_get_notBefore (cert)) < 0))) 1071 1071 {
+2 -2
mutt_ssl_gnutls.c
··· 698 698 return -1; 699 699 } 700 700 701 - if (option (OPTSSLVERIFYDATES) != M_NO) 701 + if (option (OPTSSLVERIFYDATES) != MUTT_NO) 702 702 { 703 703 if (gnutls_x509_crt_get_expiration_time (cert) < time(NULL)) 704 704 *certerr |= CERTERR_EXPIRED; ··· 706 706 *certerr |= CERTERR_NOTYETVALID; 707 707 } 708 708 709 - if (chainidx == 0 && option (OPTSSLVERIFYHOST) != M_NO 709 + if (chainidx == 0 && option (OPTSSLVERIFYHOST) != MUTT_NO 710 710 && !gnutls_x509_crt_check_hostname (cert, hostname) 711 711 && !tls_check_stored_hostname (certdata, hostname)) 712 712 *certerr |= CERTERR_HOSTNAME;
+21 -21
muttlib.c
··· 990 990 /* L10N: 991 991 Means "The path you specified as the destination file is a directory." 992 992 See the msgid "Save to file: " (alias.c, recvattach.c) */ 993 - else if ((rc = mutt_yesorno (_("File is a directory, save under it?"), M_YES)) != M_YES) 994 - return (rc == M_NO) ? 1 : -1; 993 + else if ((rc = mutt_yesorno (_("File is a directory, save under it?"), MUTT_YES)) != MUTT_YES) 994 + return (rc == MUTT_NO) ? 1 : -1; 995 995 996 996 strfcpy (tmp, mutt_basename (NONULL (attname)), sizeof (tmp)); 997 997 if (mutt_get_field (_("File under directory: "), tmp, sizeof (tmp), 998 - M_FILE | M_CLEAR) != 0 || !tmp[0]) 998 + MUTT_FILE | MUTT_CLEAR) != 0 || !tmp[0]) 999 999 return (-1); 1000 1000 mutt_concat_path (fname, path, tmp, flen); 1001 1001 } ··· 1011 1011 return 1; 1012 1012 1013 1013 case 2: /* append */ 1014 - *append = M_SAVE_APPEND; 1014 + *append = MUTT_SAVE_APPEND; 1015 1015 break; 1016 1016 case 1: /* overwrite */ 1017 - *append = M_SAVE_OVERWRITE; 1017 + *append = MUTT_SAVE_OVERWRITE; 1018 1018 break; 1019 1019 } 1020 1020 } ··· 1069 1069 1070 1070 prefix[0] = '\0'; 1071 1071 destlen--; /* save room for the terminal \0 */ 1072 - wlen = ((flags & M_FORMAT_ARROWCURSOR) && option (OPTARROWCURSOR)) ? 3 : 0; 1072 + wlen = ((flags & MUTT_FORMAT_ARROWCURSOR) && option (OPTARROWCURSOR)) ? 3 : 0; 1073 1073 col += wlen; 1074 1074 1075 - if ((flags & M_FORMAT_NOFILTER) == 0) 1075 + if ((flags & MUTT_FORMAT_NOFILTER) == 0) 1076 1076 { 1077 1077 int off = -1; 1078 1078 ··· 1119 1119 dprint(3, (debugfile, "fmtpipe %2d: %s\n", i++, word->data)); 1120 1120 mutt_buffer_addch(command, '\''); 1121 1121 mutt_FormatString(buf, sizeof(buf), 0, cols, word->data, callback, data, 1122 - flags | M_FORMAT_NOFILTER); 1122 + flags | MUTT_FORMAT_NOFILTER); 1123 1123 for (p = buf; p && *p; p++) 1124 1124 { 1125 1125 if (*p == '\'') ··· 1139 1139 1140 1140 col -= wlen; /* reset to passed in value */ 1141 1141 wptr = dest; /* reset write ptr */ 1142 - wlen = ((flags & M_FORMAT_ARROWCURSOR) && option (OPTARROWCURSOR)) ? 3 : 0; 1142 + wlen = ((flags & MUTT_FORMAT_ARROWCURSOR) && option (OPTARROWCURSOR)) ? 3 : 0; 1143 1143 if ((pid = mutt_create_filter(command->data, NULL, &filter, NULL)) != -1) 1144 1144 { 1145 1145 int rc; ··· 1214 1214 1215 1215 if (*src == '?') 1216 1216 { 1217 - flags |= M_FORMAT_OPTIONAL; 1217 + flags |= MUTT_FORMAT_OPTIONAL; 1218 1218 src++; 1219 1219 } 1220 1220 else 1221 1221 { 1222 - flags &= ~M_FORMAT_OPTIONAL; 1222 + flags &= ~MUTT_FORMAT_OPTIONAL; 1223 1223 1224 1224 /* eat the format string */ 1225 1225 cp = prefix; ··· 1238 1238 1239 1239 ch = *src++; /* save the character to switch on */ 1240 1240 1241 - if (flags & M_FORMAT_OPTIONAL) 1241 + if (flags & MUTT_FORMAT_OPTIONAL) 1242 1242 { 1243 1243 if (*src != '?') 1244 1244 break; /* bad format */ ··· 1321 1321 } 1322 1322 else if (soft && pad < 0) 1323 1323 { 1324 - int offset = ((flags & M_FORMAT_ARROWCURSOR) && option (OPTARROWCURSOR)) ? 3 : 0; 1324 + int offset = ((flags & MUTT_FORMAT_ARROWCURSOR) && option (OPTARROWCURSOR)) ? 3 : 0; 1325 1325 int avail_cols = (cols > offset) ? (cols - offset) : 0; 1326 1326 /* \0-terminate dest for length computation in mutt_wstr_trunc() */ 1327 1327 *wptr = 0; ··· 1465 1465 *wptr = 0; 1466 1466 1467 1467 #if 0 1468 - if (flags & M_FORMAT_MAKEPRINT) 1468 + if (flags & MUTT_FORMAT_MAKEPRINT) 1469 1469 { 1470 1470 /* Make sure that the string is printable by changing all non-printable 1471 1471 chars to dots, or spaces for non-printable whitespace */ 1472 1472 for (cp = dest ; *cp ; cp++) 1473 1473 if (!IsPrint (*cp) && 1474 - !((flags & M_FORMAT_TREE) && (*cp <= M_TREE_MAX))) 1474 + !((flags & MUTT_FORMAT_TREE) && (*cp <= MUTT_TREE_MAX))) 1475 1475 *cp = isspace ((unsigned char) *cp) ? ' ' : '.'; 1476 1476 } 1477 1477 #endif ··· 1524 1524 magic = mx_get_magic (s); 1525 1525 1526 1526 #ifdef USE_POP 1527 - if (magic == M_POP) 1527 + if (magic == MUTT_POP) 1528 1528 { 1529 1529 mutt_error _("Can't save message to POP mailbox."); 1530 1530 return 1; ··· 1536 1536 if (option (OPTCONFIRMAPPEND)) 1537 1537 { 1538 1538 snprintf (tmp, sizeof (tmp), _("Append messages to %s?"), s); 1539 - if ((rc = mutt_yesorno (tmp, M_YES)) == M_NO) 1539 + if ((rc = mutt_yesorno (tmp, MUTT_YES)) == MUTT_NO) 1540 1540 ret = 1; 1541 1541 else if (rc == -1) 1542 1542 ret = -1; ··· 1551 1551 return 1; 1552 1552 } 1553 1553 } 1554 - else if (magic != M_IMAP) 1554 + else if (magic != MUTT_IMAP) 1555 1555 { 1556 1556 st->st_mtime = 0; 1557 1557 st->st_atime = 0; ··· 1561 1561 if (option (OPTCONFIRMCREATE)) 1562 1562 { 1563 1563 snprintf (tmp, sizeof (tmp), _("Create %s?"), s); 1564 - if ((rc = mutt_yesorno (tmp, M_YES)) == M_NO) 1564 + if ((rc = mutt_yesorno (tmp, MUTT_YES)) == MUTT_NO) 1565 1565 ret = 1; 1566 1566 else if (rc == -1) 1567 1567 ret = -1; ··· 1580 1580 1581 1581 void state_prefix_putc (char c, STATE *s) 1582 1582 { 1583 - if (s->flags & M_PENDINGPREFIX) 1583 + if (s->flags & MUTT_PENDINGPREFIX) 1584 1584 { 1585 1585 state_reset_prefix (s); 1586 1586 if (s->prefix) ··· 1607 1607 1608 1608 void state_mark_attach (STATE *s) 1609 1609 { 1610 - if ((s->flags & M_DISPLAY) && !mutt_strcmp (Pager, "builtin")) 1610 + if ((s->flags & MUTT_DISPLAY) && !mutt_strcmp (Pager, "builtin")) 1611 1611 state_puts (AttachmentMarker, s); 1612 1612 } 1613 1613
+96 -96
mx.c
··· 115 115 116 116 snprintf(msg, sizeof(msg), _("Lock count exceeded, remove lock for %s?"), 117 117 path); 118 - if(retry && mutt_yesorno(msg, M_YES) == M_YES) 118 + if(retry && mutt_yesorno(msg, MUTT_YES) == MUTT_YES) 119 119 { 120 120 flags |= DL_FL_FORCE; 121 121 retry--; ··· 352 352 353 353 #ifdef USE_IMAP 354 354 if(mx_is_imap(path)) 355 - return M_IMAP; 355 + return MUTT_IMAP; 356 356 #endif /* USE_IMAP */ 357 357 358 358 #ifdef USE_POP 359 359 if (mx_is_pop (path)) 360 - return M_POP; 360 + return MUTT_POP; 361 361 #endif /* USE_POP */ 362 362 363 363 if (stat (path, &st) == -1) ··· 371 371 { 372 372 /* check for maildir-style mailbox */ 373 373 if (mx_is_maildir (path)) 374 - return M_MAILDIR; 374 + return MUTT_MAILDIR; 375 375 376 376 /* check for mh-style mailbox */ 377 377 if (mx_is_mh (path)) 378 - return M_MH; 378 + return MUTT_MH; 379 379 } 380 380 else if (st.st_size == 0) 381 381 { 382 382 /* hard to tell what zero-length files are, so assume the default magic */ 383 - if (DefaultMagic == M_MBOX || DefaultMagic == M_MMDF) 383 + if (DefaultMagic == MUTT_MBOX || DefaultMagic == MUTT_MMDF) 384 384 return (DefaultMagic); 385 385 else 386 - return (M_MBOX); 386 + return (MUTT_MBOX); 387 387 } 388 388 else if ((f = fopen (path, "r")) != NULL) 389 389 { ··· 391 391 392 392 fgets (tmp, sizeof (tmp), f); 393 393 if (mutt_strncmp ("From ", tmp, 5) == 0) 394 - magic = M_MBOX; 394 + magic = MUTT_MBOX; 395 395 else if (mutt_strcmp (MMDF_SEP, tmp) == 0) 396 - magic = M_MMDF; 396 + magic = MUTT_MMDF; 397 397 safe_fclose (&f); 398 398 399 399 if (!option(OPTCHECKMBOXSIZE)) ··· 423 423 int mx_set_magic (const char *s) 424 424 { 425 425 if (ascii_strcasecmp (s, "mbox") == 0) 426 - DefaultMagic = M_MBOX; 426 + DefaultMagic = MUTT_MBOX; 427 427 else if (ascii_strcasecmp (s, "mmdf") == 0) 428 - DefaultMagic = M_MMDF; 428 + DefaultMagic = MUTT_MMDF; 429 429 else if (ascii_strcasecmp (s, "mh") == 0) 430 - DefaultMagic = M_MH; 430 + DefaultMagic = MUTT_MH; 431 431 else if (ascii_strcasecmp (s, "maildir") == 0) 432 - DefaultMagic = M_MAILDIR; 432 + DefaultMagic = MUTT_MAILDIR; 433 433 else 434 434 return (-1); 435 435 ··· 479 479 { 480 480 ctx->magic = DefaultMagic; 481 481 482 - if (ctx->magic == M_MH || ctx->magic == M_MAILDIR) 482 + if (ctx->magic == MUTT_MH || ctx->magic == MUTT_MAILDIR) 483 483 { 484 484 char tmp[_POSIX_PATH_MAX]; 485 485 ··· 489 489 return (-1); 490 490 } 491 491 492 - if (ctx->magic == M_MAILDIR) 492 + if (ctx->magic == MUTT_MAILDIR) 493 493 { 494 494 snprintf (tmp, sizeof (tmp), "%s/cur", ctx->path); 495 495 if (mkdir (tmp, S_IRWXU)) ··· 543 543 544 544 switch (ctx->magic) 545 545 { 546 - case M_MBOX: 547 - case M_MMDF: 548 - if ((ctx->fp = safe_fopen (ctx->path, flags & M_NEWFOLDER ? "w" : "a")) == NULL || 546 + case MUTT_MBOX: 547 + case MUTT_MMDF: 548 + if ((ctx->fp = safe_fopen (ctx->path, flags & MUTT_NEWFOLDER ? "w" : "a")) == NULL || 549 549 mbox_lock_mailbox (ctx, 1, 1) != 0) 550 550 { 551 551 if (!ctx->fp) ··· 560 560 fseek (ctx->fp, 0, 2); 561 561 break; 562 562 563 - case M_MH: 564 - case M_MAILDIR: 563 + case MUTT_MH: 564 + case MUTT_MAILDIR: 565 565 /* nothing to do */ 566 566 break; 567 567 ··· 576 576 * open a mailbox and parse it 577 577 * 578 578 * Args: 579 - * flags M_NOSORT do not sort mailbox 580 - * M_APPEND open mailbox for appending 581 - * M_READONLY open mailbox in read-only mode 582 - * M_QUIET only print error messages 579 + * flags MUTT_NOSORT do not sort mailbox 580 + * MUTT_APPEND open mailbox for appending 581 + * MUTT_READONLY open mailbox in read-only mode 582 + * MUTT_QUIET only print error messages 583 583 * ctx if non-null, context struct to use 584 584 */ 585 585 CONTEXT *mx_open_mailbox (const char *path, int flags, CONTEXT *pctx) ··· 598 598 for (rc=0; rc < RIGHTSMAX; rc++) 599 599 mutt_bit_set(ctx->rights,rc); 600 600 601 - if (flags & M_QUIET) 601 + if (flags & MUTT_QUIET) 602 602 ctx->quiet = 1; 603 - if (flags & M_READONLY) 603 + if (flags & MUTT_READONLY) 604 604 ctx->readonly = 1; 605 605 606 - if (flags & (M_APPEND|M_NEWFOLDER)) 606 + if (flags & (MUTT_APPEND|MUTT_NEWFOLDER)) 607 607 { 608 608 if (mx_open_mailbox_append (ctx, flags) != 0) 609 609 { ··· 643 643 644 644 switch (ctx->magic) 645 645 { 646 - case M_MH: 646 + case MUTT_MH: 647 647 rc = mh_read_dir (ctx, NULL); 648 648 break; 649 649 650 - case M_MAILDIR: 650 + case MUTT_MAILDIR: 651 651 rc = maildir_read_dir (ctx); 652 652 break; 653 653 654 - case M_MMDF: 655 - case M_MBOX: 654 + case MUTT_MMDF: 655 + case MUTT_MBOX: 656 656 rc = mbox_open_mailbox (ctx); 657 657 break; 658 658 659 659 #ifdef USE_IMAP 660 - case M_IMAP: 660 + case MUTT_IMAP: 661 661 rc = imap_open_mailbox (ctx); 662 662 break; 663 663 #endif /* USE_IMAP */ 664 664 665 665 #ifdef USE_POP 666 - case M_POP: 666 + case MUTT_POP: 667 667 rc = pop_open_mailbox (ctx); 668 668 break; 669 669 #endif /* USE_POP */ ··· 675 675 676 676 if (rc == 0) 677 677 { 678 - if ((flags & M_NOSORT) == 0) 678 + if ((flags & MUTT_NOSORT) == 0) 679 679 { 680 680 /* avoid unnecessary work since the mailbox is completely unthreaded 681 681 to begin with */ ··· 740 740 741 741 switch (ctx->magic) 742 742 { 743 - case M_MBOX: 744 - case M_MMDF: 743 + case MUTT_MBOX: 744 + case MUTT_MMDF: 745 745 rc = mbox_sync_mailbox (ctx, index_hint); 746 746 if (option(OPTCHECKMBOXSIZE)) 747 747 tmp = mutt_find_mailbox (ctx->path); 748 748 break; 749 749 750 - case M_MH: 751 - case M_MAILDIR: 750 + case MUTT_MH: 751 + case MUTT_MAILDIR: 752 752 rc = mh_sync_mailbox (ctx, index_hint); 753 753 break; 754 754 755 755 #ifdef USE_IMAP 756 - case M_IMAP: 756 + case MUTT_IMAP: 757 757 /* extra argument means EXPUNGE */ 758 758 rc = imap_sync_mailbox (ctx, 1, index_hint); 759 759 break; 760 760 #endif /* USE_IMAP */ 761 761 762 762 #ifdef USE_POP 763 - case M_POP: 763 + case MUTT_POP: 764 764 rc = pop_sync_mailbox (ctx, index_hint); 765 765 break; 766 766 #endif /* USE_POP */ ··· 800 800 if (ctx->append) 801 801 { 802 802 /* mailbox was opened in write-mode */ 803 - if (ctx->magic == M_MBOX || ctx->magic == M_MMDF) 803 + if (ctx->magic == MUTT_MBOX || ctx->magic == MUTT_MMDF) 804 804 mbox_close_mailbox (ctx); 805 805 else 806 806 mx_fastclose_mailbox (ctx); ··· 814 814 read_msgs++; 815 815 } 816 816 817 - if (read_msgs && quadoption (OPT_MOVE) != M_NO) 817 + if (read_msgs && quadoption (OPT_MOVE) != MUTT_NO) 818 818 { 819 819 char *p; 820 820 821 - if ((p = mutt_find_hook (M_MBOXHOOK, ctx->path))) 821 + if ((p = mutt_find_hook (MUTT_MBOXHOOK, ctx->path))) 822 822 { 823 823 isSpool = 1; 824 824 strfcpy (mbox, p, sizeof (mbox)); ··· 845 845 * There is no point in asking whether or not to purge if we are 846 846 * just marking messages as "trash". 847 847 */ 848 - if (ctx->deleted && !(ctx->magic == M_MAILDIR && option (OPTMAILDIRTRASH))) 848 + if (ctx->deleted && !(ctx->magic == MUTT_MAILDIR && option (OPTMAILDIRTRASH))) 849 849 { 850 850 snprintf (buf, sizeof (buf), ctx->deleted == 1 851 851 ? _("Purge %d deleted message?") : _("Purge %d deleted messages?"), ··· 862 862 for (i = 0; i < ctx->msgcount; i++) 863 863 { 864 864 if (!ctx->hdrs[i]->deleted && !ctx->hdrs[i]->old && !ctx->hdrs[i]->read) 865 - mutt_set_flag (ctx, ctx->hdrs[i], M_OLD, 1); 865 + mutt_set_flag (ctx, ctx->hdrs[i], MUTT_OLD, 1); 866 866 } 867 867 } 868 868 ··· 875 875 /* try to use server-side copy first */ 876 876 i = 1; 877 877 878 - if (ctx->magic == M_IMAP && mx_is_imap (mbox)) 878 + if (ctx->magic == MUTT_IMAP && mx_is_imap (mbox)) 879 879 { 880 880 /* tag messages for moving, and clear old tags, if any */ 881 881 for (i = 0; i < ctx->msgcount; i++) ··· 898 898 else /* use regular append-copy mode */ 899 899 #endif 900 900 { 901 - if (mx_open_mailbox (mbox, M_APPEND, &f) == NULL) 901 + if (mx_open_mailbox (mbox, MUTT_APPEND, &f) == NULL) 902 902 { 903 903 ctx->closing = 0; 904 904 return -1; ··· 911 911 { 912 912 if (mutt_append_message (&f, ctx, ctx->hdrs[i], 0, CH_UPDATE_LEN) == 0) 913 913 { 914 - mutt_set_flag (ctx, ctx->hdrs[i], M_DELETE, 1); 914 + mutt_set_flag (ctx, ctx->hdrs[i], MUTT_DELETE, 1); 915 915 } 916 916 else 917 917 { ··· 930 930 { 931 931 if (!ctx->quiet) 932 932 mutt_message _("Mailbox is unchanged."); 933 - if (ctx->magic == M_MBOX || ctx->magic == M_MMDF) 933 + if (ctx->magic == MUTT_MBOX || ctx->magic == MUTT_MMDF) 934 934 mbox_reset_atime (ctx, NULL); 935 935 mx_fastclose_mailbox (ctx); 936 936 return 0; ··· 938 938 939 939 #ifdef USE_IMAP 940 940 /* allow IMAP to preserve the deleted flag across sessions */ 941 - if (ctx->magic == M_IMAP) 941 + if (ctx->magic == MUTT_IMAP) 942 942 { 943 943 if ((check = imap_sync_mailbox (ctx, purge, index_hint)) != 0) 944 944 { ··· 977 977 } 978 978 979 979 if (ctx->msgcount == ctx->deleted && 980 - (ctx->magic == M_MMDF || ctx->magic == M_MBOX) && 980 + (ctx->magic == MUTT_MMDF || ctx->magic == MUTT_MBOX) && 981 981 !mutt_is_spool(ctx->path) && !option (OPTSAVEEMPTY)) 982 982 mx_unlink_empty (ctx->path); 983 983 ··· 1006 1006 for (i = 0, j = 0; i < ctx->msgcount; i++) 1007 1007 { 1008 1008 if ((committing && (!ctx->hdrs[i]->deleted || 1009 - (ctx->magic == M_MAILDIR && option (OPTMAILDIRTRASH)))) || 1009 + (ctx->magic == MUTT_MAILDIR && option (OPTMAILDIRTRASH)))) || 1010 1010 (!committing && ctx->hdrs[i]->active)) 1011 1011 { 1012 1012 if (i != j) ··· 1028 1028 else if (ctx->hdrs[j]->changed) 1029 1029 ctx->changed++; 1030 1030 1031 - if (!committing || (ctx->magic == M_MAILDIR && option (OPTMAILDIRTRASH))) 1031 + if (!committing || (ctx->magic == MUTT_MAILDIR && option (OPTMAILDIRTRASH))) 1032 1032 { 1033 1033 if (ctx->hdrs[j]->deleted) 1034 1034 ctx->deleted++; ··· 1049 1049 } 1050 1050 else 1051 1051 { 1052 - if (ctx->magic == M_MH || ctx->magic == M_MAILDIR) 1052 + if (ctx->magic == MUTT_MH || ctx->magic == MUTT_MAILDIR) 1053 1053 ctx->size -= (ctx->hdrs[i]->content->length + 1054 1054 ctx->hdrs[i]->content->offset - 1055 1055 ctx->hdrs[i]->content->hdr_offset); ··· 1119 1119 ctx->deleted); 1120 1120 if ((purge = query_quadoption (OPT_DELETE, buf)) < 0) 1121 1121 return (-1); 1122 - else if (purge == M_NO) 1122 + else if (purge == MUTT_NO) 1123 1123 { 1124 1124 if (!ctx->changed) 1125 1125 return 0; /* nothing to do! */ 1126 1126 /* let IMAP servers hold on to D flags */ 1127 - if (ctx->magic != M_IMAP) 1127 + if (ctx->magic != MUTT_IMAP) 1128 1128 { 1129 1129 for (i = 0 ; i < ctx->msgcount ; i++) 1130 1130 ctx->hdrs[i]->deleted = 0; ··· 1141 1141 deleted = ctx->deleted; 1142 1142 1143 1143 #ifdef USE_IMAP 1144 - if (ctx->magic == M_IMAP) 1144 + if (ctx->magic == MUTT_IMAP) 1145 1145 rc = imap_sync_mailbox (ctx, purge, index_hint); 1146 1146 else 1147 1147 #endif ··· 1149 1149 if (rc == 0) 1150 1150 { 1151 1151 #ifdef USE_IMAP 1152 - if (ctx->magic == M_IMAP && !purge) 1152 + if (ctx->magic == MUTT_IMAP && !purge) 1153 1153 { 1154 1154 if (!ctx->quiet) 1155 1155 mutt_message _("Mailbox checkpointed."); ··· 1165 1165 mutt_sleep (0); 1166 1166 1167 1167 if (ctx->msgcount == ctx->deleted && 1168 - (ctx->magic == M_MBOX || ctx->magic == M_MMDF) && 1168 + (ctx->magic == MUTT_MBOX || ctx->magic == MUTT_MMDF) && 1169 1169 !mutt_is_spool (ctx->path) && !option (OPTSAVEEMPTY)) 1170 1170 { 1171 1171 unlink (ctx->path); ··· 1180 1180 * MH and maildir are safe. mbox-style seems to need re-sorting, 1181 1181 * at least with the new threading code. 1182 1182 */ 1183 - if (purge || (ctx->magic != M_MAILDIR && ctx->magic != M_MH)) 1183 + if (purge || (ctx->magic != MUTT_MAILDIR && ctx->magic != MUTT_MH)) 1184 1184 { 1185 1185 /* IMAP does this automatically after handling EXPUNGE */ 1186 - if (ctx->magic != M_IMAP) 1186 + if (ctx->magic != MUTT_IMAP) 1187 1187 { 1188 1188 mx_update_tables (ctx, 1); 1189 1189 mutt_sort_headers (ctx, 1); /* rethread from scratch */ ··· 1232 1232 1233 1233 switch (dest->magic) 1234 1234 { 1235 - case M_MMDF: 1236 - case M_MBOX: 1235 + case MUTT_MMDF: 1236 + case MUTT_MBOX: 1237 1237 func = mbox_open_new_message; 1238 1238 break; 1239 - case M_MAILDIR: 1239 + case MUTT_MAILDIR: 1240 1240 func = maildir_open_new_message; 1241 1241 break; 1242 - case M_MH: 1242 + case MUTT_MH: 1243 1243 func = mh_open_new_message; 1244 1244 break; 1245 1245 #ifdef USE_IMAP 1246 - case M_IMAP: 1246 + case MUTT_IMAP: 1247 1247 func = imap_open_new_message; 1248 1248 break; 1249 1249 #endif ··· 1262 1262 msg->flags.flagged = hdr->flagged; 1263 1263 msg->flags.replied = hdr->replied; 1264 1264 msg->flags.read = hdr->read; 1265 - msg->flags.draft = (flags & M_SET_DRAFT) ? 1 : 0; 1265 + msg->flags.draft = (flags & MUTT_SET_DRAFT) ? 1 : 0; 1266 1266 msg->received = hdr->received; 1267 1267 } 1268 1268 ··· 1271 1271 1272 1272 if (func (msg, dest, hdr) == 0) 1273 1273 { 1274 - if (dest->magic == M_MMDF) 1274 + if (dest->magic == MUTT_MMDF) 1275 1275 fputs (MMDF_SEP, msg->fp); 1276 1276 1277 - if ((msg->magic == M_MBOX || msg->magic == M_MMDF) && 1278 - flags & M_ADD_FROM) 1277 + if ((msg->magic == MUTT_MBOX || msg->magic == MUTT_MMDF) && 1278 + flags & MUTT_ADD_FROM) 1279 1279 { 1280 1280 if (hdr) 1281 1281 { ··· 1307 1307 1308 1308 switch (ctx->magic) 1309 1309 { 1310 - case M_MBOX: 1311 - case M_MMDF: 1310 + case MUTT_MBOX: 1311 + case MUTT_MMDF: 1312 1312 1313 1313 if (lock) 1314 1314 { ··· 1316 1316 if (mbox_lock_mailbox (ctx, 0, 0) == -1) 1317 1317 { 1318 1318 mutt_unblock_signals (); 1319 - return M_LOCKED; 1319 + return MUTT_LOCKED; 1320 1320 } 1321 1321 } 1322 1322 ··· 1331 1331 return rc; 1332 1332 1333 1333 1334 - case M_MH: 1334 + case MUTT_MH: 1335 1335 return (mh_check_mailbox (ctx, index_hint)); 1336 - case M_MAILDIR: 1336 + case MUTT_MAILDIR: 1337 1337 return (maildir_check_mailbox (ctx, index_hint)); 1338 1338 1339 1339 #ifdef USE_IMAP 1340 - case M_IMAP: 1340 + case MUTT_IMAP: 1341 1341 /* caller expects that mailbox may change */ 1342 1342 imap_allow_reopen (ctx); 1343 1343 rc = imap_check_mailbox (ctx, index_hint, 0); ··· 1346 1346 #endif /* USE_IMAP */ 1347 1347 1348 1348 #ifdef USE_POP 1349 - case M_POP: 1349 + case MUTT_POP: 1350 1350 return (pop_check_mailbox (ctx, index_hint)); 1351 1351 #endif /* USE_POP */ 1352 1352 } ··· 1364 1364 msg = safe_calloc (1, sizeof (MESSAGE)); 1365 1365 switch (msg->magic = ctx->magic) 1366 1366 { 1367 - case M_MBOX: 1368 - case M_MMDF: 1367 + case MUTT_MBOX: 1368 + case MUTT_MMDF: 1369 1369 msg->fp = ctx->fp; 1370 1370 break; 1371 1371 1372 - case M_MH: 1373 - case M_MAILDIR: 1372 + case MUTT_MH: 1373 + case MUTT_MAILDIR: 1374 1374 { 1375 1375 HEADER *cur = ctx->hdrs[msgno]; 1376 1376 char path[_POSIX_PATH_MAX]; ··· 1378 1378 snprintf (path, sizeof (path), "%s/%s", ctx->path, cur->path); 1379 1379 1380 1380 if ((msg->fp = fopen (path, "r")) == NULL && errno == ENOENT && 1381 - ctx->magic == M_MAILDIR) 1381 + ctx->magic == MUTT_MAILDIR) 1382 1382 msg->fp = maildir_open_find_message (ctx->path, cur->path); 1383 1383 1384 1384 if (msg->fp == NULL) ··· 1392 1392 break; 1393 1393 1394 1394 #ifdef USE_IMAP 1395 - case M_IMAP: 1395 + case MUTT_IMAP: 1396 1396 { 1397 1397 if (imap_fetch_message (msg, ctx, msgno) != 0) 1398 1398 FREE (&msg); ··· 1401 1401 #endif /* USE_IMAP */ 1402 1402 1403 1403 #ifdef USE_POP 1404 - case M_POP: 1404 + case MUTT_POP: 1405 1405 { 1406 1406 if (pop_fetch_message (msg, ctx, msgno) != 0) 1407 1407 FREE (&msg); ··· 1432 1432 1433 1433 switch (msg->magic) 1434 1434 { 1435 - case M_MMDF: 1435 + case MUTT_MMDF: 1436 1436 { 1437 1437 if (fputs (MMDF_SEP, msg->fp) == EOF) 1438 1438 r = -1; 1439 1439 break; 1440 1440 } 1441 1441 1442 - case M_MBOX: 1442 + case MUTT_MBOX: 1443 1443 { 1444 1444 if (fputc ('\n', msg->fp) == EOF) 1445 1445 r = -1; ··· 1447 1447 } 1448 1448 1449 1449 #ifdef USE_IMAP 1450 - case M_IMAP: 1450 + case MUTT_IMAP: 1451 1451 { 1452 1452 if ((r = safe_fclose (&msg->fp)) == 0) 1453 1453 r = imap_append_message (ctx, msg); ··· 1455 1455 } 1456 1456 #endif 1457 1457 1458 - case M_MAILDIR: 1458 + case MUTT_MAILDIR: 1459 1459 { 1460 1460 r = maildir_commit_message (ctx, msg, NULL); 1461 1461 break; 1462 1462 } 1463 1463 1464 - case M_MH: 1464 + case MUTT_MH: 1465 1465 { 1466 1466 r = mh_commit_message (ctx, msg, NULL); 1467 1467 break; 1468 1468 } 1469 1469 } 1470 1470 1471 - if (r == 0 && (ctx->magic == M_MBOX || ctx->magic == M_MMDF) 1471 + if (r == 0 && (ctx->magic == MUTT_MBOX || ctx->magic == MUTT_MMDF) 1472 1472 && (fflush (msg->fp) == EOF || fsync (fileno (msg->fp)) == -1)) 1473 1473 { 1474 1474 mutt_perror _("Can't write message"); ··· 1483 1483 { 1484 1484 int r = 0; 1485 1485 1486 - if ((*msg)->magic == M_MH || (*msg)->magic == M_MAILDIR 1487 - || (*msg)->magic == M_IMAP || (*msg)->magic == M_POP) 1486 + if ((*msg)->magic == MUTT_MH || (*msg)->magic == MUTT_MAILDIR 1487 + || (*msg)->magic == MUTT_IMAP || (*msg)->magic == MUTT_POP) 1488 1488 { 1489 1489 r = safe_fclose (&(*msg)->fp); 1490 1490 } ··· 1611 1611 { 1612 1612 switch (mx_get_magic (path)) 1613 1613 { 1614 - case M_MBOX: 1615 - case M_MMDF: 1614 + case MUTT_MBOX: 1615 + case MUTT_MMDF: 1616 1616 return mbox_check_empty (path); 1617 - case M_MH: 1617 + case MUTT_MH: 1618 1618 return mh_check_empty (path); 1619 - case M_MAILDIR: 1619 + case MUTT_MAILDIR: 1620 1620 return maildir_check_empty (path); 1621 1621 default: 1622 1622 errno = EINVAL;
+7 -7
mx.h
··· 30 30 /* supported mailbox formats */ 31 31 enum 32 32 { 33 - M_MBOX = 1, 34 - M_MMDF, 35 - M_MH, 36 - M_MAILDIR, 37 - M_IMAP, 38 - M_POP 33 + MUTT_MBOX = 1, 34 + MUTT_MMDF, 35 + MUTT_MH, 36 + MUTT_MAILDIR, 37 + MUTT_IMAP, 38 + MUTT_POP 39 39 }; 40 40 41 - WHERE short DefaultMagic INITVAL (M_MBOX); 41 + WHERE short DefaultMagic INITVAL (MUTT_MBOX); 42 42 43 43 #define MMDF_SEP "\001\001\001\001\n" 44 44 #define MAXLOCKATTEMPT 5
+69 -69
pager.c
··· 196 196 } 197 197 else 198 198 m = n; 199 - if (!(flags & M_SHOWCOLOR)) 199 + if (!(flags & MUTT_SHOWCOLOR)) 200 200 def_color = ColorDefs[MT_COLOR_NORMAL]; 201 201 else if (lineInfo[m].type == MT_COLOR_HEADER) 202 202 def_color = (lineInfo[m].syntax)[0].color; 203 203 else 204 204 def_color = ColorDefs[lineInfo[m].type]; 205 205 206 - if ((flags & M_SHOWCOLOR) && lineInfo[m].type == MT_COLOR_QUOTED) 206 + if ((flags & MUTT_SHOWCOLOR) && lineInfo[m].type == MT_COLOR_QUOTED) 207 207 { 208 208 struct q_class_t *class = lineInfo[m].quote; 209 209 ··· 220 220 } 221 221 222 222 color = def_color; 223 - if (flags & M_SHOWCOLOR) 223 + if (flags & MUTT_SHOWCOLOR) 224 224 { 225 225 for (i = 0; i < lineInfo[m].chunks; i++) 226 226 { ··· 239 239 } 240 240 } 241 241 242 - if (flags & M_SEARCH) 242 + if (flags & MUTT_SEARCH) 243 243 { 244 244 for (i = 0; i < lineInfo[m].search_cnt; i++) 245 245 { ··· 1037 1037 { 1038 1038 if (offset != *last_pos) 1039 1039 fseeko (f, offset, 0); 1040 - if ((*buf = (unsigned char *) mutt_read_line ((char *) *buf, blen, f, &l, M_EOL)) == NULL) 1040 + if ((*buf = (unsigned char *) mutt_read_line ((char *) *buf, blen, f, &l, MUTT_EOL)) == NULL) 1041 1041 { 1042 1042 fmt[0] = 0; 1043 1043 return (-1); ··· 1101 1101 int ch, vch, last_special = -1, special = 0, t; 1102 1102 wchar_t wc; 1103 1103 mbstate_t mbstate; 1104 - int wrap_cols = mutt_window_wrap_cols (pager_window, (flags & M_PAGER_NOWRAP) ? 0 : Wrap); 1104 + int wrap_cols = mutt_window_wrap_cols (pager_window, (flags & MUTT_PAGER_NOWRAP) ? 0 : Wrap); 1105 1105 1106 1106 if (check_attachment_marker ((char *)buf) == 0) 1107 1107 wrap_cols = pager_window->cols; ··· 1203 1203 } 1204 1204 1205 1205 if (pa && 1206 - ((flags & (M_SHOWCOLOR | M_SEARCH | M_PAGER_MARKER)) || 1206 + ((flags & (MUTT_SHOWCOLOR | MUTT_SEARCH | MUTT_PAGER_MARKER)) || 1207 1207 special || last_special || pa->attr)) 1208 1208 { 1209 1209 resolve_color (*lineInfo, n, vch, flags, special, pa); ··· 1276 1276 1277 1277 /* 1278 1278 * Args: 1279 - * flags M_SHOWFLAT, show characters (used for displaying help) 1280 - * M_SHOWCOLOR, show characters in color 1279 + * flags MUTT_SHOWFLAT, show characters (used for displaying help) 1280 + * MUTT_SHOWCOLOR, show characters in color 1281 1281 * otherwise don't show characters 1282 - * M_HIDE, don't show quoted text 1283 - * M_SEARCH, resolve search patterns 1284 - * M_TYPES, compute line's type 1285 - * M_PAGER_NSKIP, keeps leading whitespace 1286 - * M_PAGER_MARKER, eventually show markers 1282 + * MUTT_HIDE, don't show quoted text 1283 + * MUTT_SEARCH, resolve search patterns 1284 + * MUTT_TYPES, compute line's type 1285 + * MUTT_PAGER_NSKIP, keeps leading whitespace 1286 + * MUTT_PAGER_MARKER, eventually show markers 1287 1287 * 1288 1288 * Return values: 1289 1289 * -1 EOF was reached ··· 1330 1330 } 1331 1331 1332 1332 /* only do color hiliting if we are viewing a message */ 1333 - if (flags & (M_SHOWCOLOR | M_TYPES)) 1333 + if (flags & (MUTT_SHOWCOLOR | MUTT_TYPES)) 1334 1334 { 1335 1335 if ((*lineInfo)[n].type == -1) 1336 1336 { ··· 1343 1343 } 1344 1344 1345 1345 resolve_types ((char *) fmt, (char *) buf, *lineInfo, n, *last, 1346 - QuoteList, q_level, force_redraw, flags & M_SHOWCOLOR); 1346 + QuoteList, q_level, force_redraw, flags & MUTT_SHOWCOLOR); 1347 1347 1348 1348 /* avoid race condition for continuation lines when scrolling up */ 1349 1349 for (m = n + 1; m < *last && (*lineInfo)[m].offset && (*lineInfo)[m].continuation; m++) ··· 1351 1351 } 1352 1352 1353 1353 /* this also prevents searching through the hidden lines */ 1354 - if ((flags & M_HIDE) && (*lineInfo)[n].type == MT_COLOR_QUOTED) 1355 - flags = 0; /* M_NOSHOW */ 1354 + if ((flags & MUTT_HIDE) && (*lineInfo)[n].type == MT_COLOR_QUOTED) 1355 + flags = 0; /* MUTT_NOSHOW */ 1356 1356 } 1357 1357 1358 1358 /* At this point, (*lineInfo[n]).quote may still be undefined. We 1359 - * don't want to compute it every time M_TYPES is set, since this 1359 + * don't want to compute it every time MUTT_TYPES is set, since this 1360 1360 * would slow down the "bottom" function unacceptably. A compromise 1361 1361 * solution is hence to call regexec() again, just to find out the 1362 1362 * length of the quote prefix. 1363 1363 */ 1364 - if ((flags & M_SHOWCOLOR) && !(*lineInfo)[n].continuation && 1364 + if ((flags & MUTT_SHOWCOLOR) && !(*lineInfo)[n].continuation && 1365 1365 (*lineInfo)[n].type == MT_COLOR_QUOTED && (*lineInfo)[n].quote == NULL) 1366 1366 { 1367 1367 if (fill_buffer (f, last_pos, (*lineInfo)[n].offset, &buf, &fmt, &buflen, &buf_ready) < 0) ··· 1377 1377 force_redraw, q_level); 1378 1378 } 1379 1379 1380 - if ((flags & M_SEARCH) && !(*lineInfo)[n].continuation && (*lineInfo)[n].search_cnt == -1) 1380 + if ((flags & MUTT_SEARCH) && !(*lineInfo)[n].continuation && (*lineInfo)[n].search_cnt == -1) 1381 1381 { 1382 1382 if (fill_buffer (f, last_pos, (*lineInfo)[n].offset, &buf, &fmt, &buflen, &buf_ready) < 0) 1383 1383 { ··· 1409 1409 } 1410 1410 } 1411 1411 1412 - if (!(flags & M_SHOW) && (*lineInfo)[n+1].offset > 0) 1412 + if (!(flags & MUTT_SHOW) && (*lineInfo)[n+1].offset > 0) 1413 1413 { 1414 1414 /* we've already scanned this line, so just exit */ 1415 1415 rc = 0; 1416 1416 goto out; 1417 1417 } 1418 - if ((flags & M_SHOWCOLOR) && *force_redraw && (*lineInfo)[n+1].offset > 0) 1418 + if ((flags & MUTT_SHOWCOLOR) && *force_redraw && (*lineInfo)[n+1].offset > 0) 1419 1419 { 1420 1420 /* no need to try to display this line... */ 1421 1421 rc = 1; ··· 1448 1448 while (ch && (buf[ch] == ' ' || buf[ch] == '\t' || buf[ch] == '\r')) 1449 1449 ch--; 1450 1450 /* a very long word with leading spaces causes infinite wrapping */ 1451 - if ((!ch) && (flags & M_PAGER_NSKIP)) 1451 + if ((!ch) && (flags & MUTT_PAGER_NSKIP)) 1452 1452 buf_ptr = buf + cnt; 1453 1453 else 1454 1454 cnt = ch + 1; ··· 1456 1456 else 1457 1457 buf_ptr = buf + cnt; /* a very long word... */ 1458 1458 } 1459 - if (!(flags & M_PAGER_NSKIP)) 1459 + if (!(flags & MUTT_PAGER_NSKIP)) 1460 1460 /* skip leading blanks on the next line too */ 1461 1461 while (*buf_ptr == ' ' || *buf_ptr == '\t') 1462 1462 buf_ptr++; ··· 1472 1472 (*lineInfo)[n+1].offset = (*lineInfo)[n].offset + (long) (buf_ptr - buf); 1473 1473 1474 1474 /* if we don't need to display the line we are done */ 1475 - if (!(flags & M_SHOW)) 1475 + if (!(flags & MUTT_SHOW)) 1476 1476 { 1477 1477 rc = 0; 1478 1478 goto out; ··· 1492 1492 #endif 1493 1493 1494 1494 /* end the last color pattern (needed by S-Lang) */ 1495 - if (special || (col != pager_window->cols && (flags & (M_SHOWCOLOR | M_SEARCH)))) 1495 + if (special || (col != pager_window->cols && (flags & (MUTT_SHOWCOLOR | MUTT_SEARCH)))) 1496 1496 resolve_color (*lineInfo, n, vch, flags, 0, &a); 1497 1497 1498 1498 /* ··· 1500 1500 * ncurses does an implicit clrtoeol() when you do addch('\n') so we have 1501 1501 * to make sure to reset the color *after* that 1502 1502 */ 1503 - if (flags & M_SHOWCOLOR) 1503 + if (flags & MUTT_SHOWCOLOR) 1504 1504 { 1505 1505 m = ((*lineInfo)[n].continuation) ? ((*lineInfo)[n].syntax)[0].first : n; 1506 1506 if ((*lineInfo)[m].type == MT_COLOR_HEADER) ··· 1519 1519 * clrtoeol, otherwise the color for this line will not be 1520 1520 * filled to the right margin. 1521 1521 */ 1522 - if (flags & M_SHOWCOLOR) 1522 + if (flags & MUTT_SHOWCOLOR) 1523 1523 NORMAL_COLOR; 1524 1524 1525 1525 /* build a return code */ 1526 - if (!(flags & M_SHOW)) 1526 + if (!(flags & MUTT_SHOW)) 1527 1527 flags = 0; 1528 1528 1529 1529 rc = flags; ··· 1588 1588 struct stat sb; 1589 1589 regex_t SearchRE; 1590 1590 int SearchCompiled = 0, SearchFlag = 0, SearchBack = 0; 1591 - int has_types = (IsHeader(extra) || (flags & M_SHOWCOLOR)) ? M_TYPES : 0; /* main message or rfc822 attachment */ 1591 + int has_types = (IsHeader(extra) || (flags & MUTT_SHOWCOLOR)) ? MUTT_TYPES : 0; /* main message or rfc822 attachment */ 1592 1592 1593 1593 mutt_window_t *index_status_window = NULL; 1594 1594 mutt_window_t *index_window = NULL; ··· 1601 1601 int old_PagerIndexLines; /* some people want to resize it 1602 1602 * while inside the pager... */ 1603 1603 1604 - if (!(flags & M_SHOWCOLOR)) 1605 - flags |= M_SHOWFLAT; 1604 + if (!(flags & MUTT_SHOWCOLOR)) 1605 + flags |= MUTT_SHOWFLAT; 1606 1606 1607 1607 if ((fp = fopen (fname, "r")) == NULL) 1608 1608 { ··· 1623 1623 if (IsHeader (extra) && !extra->hdr->read) 1624 1624 { 1625 1625 Context->msgnotreadyet = extra->hdr->msgno; 1626 - mutt_set_flag (Context, extra->hdr, M_READ, 1); 1626 + mutt_set_flag (Context, extra->hdr, MUTT_READ, 1); 1627 1627 } 1628 1628 1629 1629 lineInfo = safe_malloc (sizeof (struct line_t) * (maxLine = LINES)); ··· 1722 1722 { 1723 1723 REGCOMP 1724 1724 (&SearchRE, searchbuf, REG_NEWLINE | mutt_which_case (searchbuf)); 1725 - SearchFlag = M_SEARCH; 1725 + SearchFlag = MUTT_SEARCH; 1726 1726 SearchBack = Resize->SearchBack; 1727 1727 } 1728 1728 lines = Resize->line; ··· 1769 1769 i = -1; 1770 1770 j = -1; 1771 1771 while (display_line (fp, &last_pos, &lineInfo, ++i, &lastLine, &maxLine, 1772 - has_types | SearchFlag | (flags & M_PAGER_NOWRAP), &QuoteList, &q_level, &force_redraw, 1772 + has_types | SearchFlag | (flags & MUTT_PAGER_NOWRAP), &QuoteList, &q_level, &force_redraw, 1773 1773 &SearchRE, pager_window) == 0) 1774 1774 if (!lineInfo[i].continuation && ++j == lines) 1775 1775 { ··· 1791 1791 { 1792 1792 if (display_line (fp, &last_pos, &lineInfo, curline, &lastLine, 1793 1793 &maxLine, 1794 - (flags & M_DISPLAYFLAGS) | hideQuoted | SearchFlag | (flags & M_PAGER_NOWRAP), 1794 + (flags & MUTT_DISPLAYFLAGS) | hideQuoted | SearchFlag | (flags & MUTT_PAGER_NOWRAP), 1795 1795 &QuoteList, &q_level, &force_redraw, &SearchRE, 1796 1796 pager_window) > 0) 1797 1797 lines++; ··· 1840 1840 size_t l1 = pager_status_window->cols * MB_LEN_MAX; 1841 1841 size_t l2 = sizeof (buffer); 1842 1842 hfi.hdr = (IsHeader (extra)) ? extra->hdr : extra->bdy->hdr; 1843 - mutt_make_string_info (buffer, l1 < l2 ? l1 : l2, NONULL (PagerFmt), &hfi, M_FORMAT_MAKEPRINT); 1843 + mutt_make_string_info (buffer, l1 < l2 ? l1 : l2, NONULL (PagerFmt), &hfi, MUTT_FORMAT_MAKEPRINT); 1844 1844 mutt_paddstr (pager_status_window->cols, buffer); 1845 1845 } 1846 1846 else ··· 1919 1919 if (!lineInfo[i].continuation) 1920 1920 lines++; 1921 1921 1922 - if (flags & M_PAGER_RETWINCH) 1922 + if (flags & MUTT_PAGER_RETWINCH) 1923 1923 { 1924 1924 Resize = safe_malloc (sizeof (struct resize)); 1925 1925 ··· 1975 1975 break; 1976 1976 1977 1977 case OP_QUIT: 1978 - if (query_quadoption (OPT_QUIT, _("Quit Mutt?")) == M_YES) 1978 + if (query_quadoption (OPT_QUIT, _("Quit Mutt?")) == MUTT_YES) 1979 1979 { 1980 1980 /* avoid prompting again in the index menu */ 1981 - set_quadoption (OPT_QUIT, M_YES); 1981 + set_quadoption (OPT_QUIT, MUTT_YES); 1982 1982 ch = -1; 1983 1983 } 1984 1984 break; ··· 2123 2123 2124 2124 if (lineInfo[topline].search_cnt > 0) 2125 2125 { 2126 - SearchFlag = M_SEARCH; 2126 + SearchFlag = MUTT_SEARCH; 2127 2127 /* give some context for search results */ 2128 2128 if (topline - searchctx > 0) 2129 2129 topline -= searchctx; ··· 2139 2139 if (mutt_get_field ((ch == OP_SEARCH || ch == OP_SEARCH_NEXT) ? 2140 2140 _("Search for: ") : _("Reverse search for: "), 2141 2141 buffer, sizeof (buffer), 2142 - M_CLEAR) != 0) 2142 + MUTT_CLEAR) != 0) 2143 2143 break; 2144 2144 2145 2145 if (!strcmp (buffer, searchbuf)) ··· 2199 2199 /* update the search pointers */ 2200 2200 i = 0; 2201 2201 while (display_line (fp, &last_pos, &lineInfo, i, &lastLine, 2202 - &maxLine, M_SEARCH | (flags & M_PAGER_NSKIP) | (flags & M_PAGER_NOWRAP), 2202 + &maxLine, MUTT_SEARCH | (flags & MUTT_PAGER_NSKIP) | (flags & MUTT_PAGER_NOWRAP), 2203 2203 &QuoteList, &q_level, 2204 2204 &force_redraw, &SearchRE, pager_window) == 0) 2205 2205 i++; ··· 2236 2236 } 2237 2237 else 2238 2238 { 2239 - SearchFlag = M_SEARCH; 2239 + SearchFlag = MUTT_SEARCH; 2240 2240 /* give some context for search results */ 2241 2241 if (SearchContext > 0 && SearchContext < pager_window->rows) 2242 2242 searchctx = SearchContext; ··· 2253 2253 case OP_SEARCH_TOGGLE: 2254 2254 if (SearchCompiled) 2255 2255 { 2256 - SearchFlag ^= M_SEARCH; 2256 + SearchFlag ^= MUTT_SEARCH; 2257 2257 redraw = REDRAW_BODY; 2258 2258 } 2259 2259 break; ··· 2274 2274 case OP_PAGER_HIDE_QUOTED: 2275 2275 if (has_types) 2276 2276 { 2277 - hideQuoted ^= M_HIDE; 2277 + hideQuoted ^= MUTT_HIDE; 2278 2278 if (hideQuoted && lineInfo[topline].type == MT_COLOR_QUOTED) 2279 2279 topline = upNLines (1, lineInfo, topline, hideQuoted); 2280 2280 else ··· 2290 2290 2291 2291 while ((new_topline < lastLine || 2292 2292 (0 == (dretval = display_line (fp, &last_pos, &lineInfo, 2293 - new_topline, &lastLine, &maxLine, M_TYPES | (flags & M_PAGER_NOWRAP), 2293 + new_topline, &lastLine, &maxLine, MUTT_TYPES | (flags & MUTT_PAGER_NOWRAP), 2294 2294 &QuoteList, &q_level, &force_redraw, &SearchRE, pager_window)))) 2295 2295 && lineInfo[new_topline].type != MT_COLOR_QUOTED) 2296 2296 new_topline++; ··· 2303 2303 2304 2304 while ((new_topline < lastLine || 2305 2305 (0 == (dretval = display_line (fp, &last_pos, &lineInfo, 2306 - new_topline, &lastLine, &maxLine, M_TYPES | (flags & M_PAGER_NOWRAP), 2306 + new_topline, &lastLine, &maxLine, MUTT_TYPES | (flags & MUTT_PAGER_NOWRAP), 2307 2307 &QuoteList, &q_level, &force_redraw, &SearchRE, pager_window)))) 2308 2308 && lineInfo[new_topline].type == MT_COLOR_QUOTED) 2309 2309 new_topline++; ··· 2323 2323 i = curline; 2324 2324 /* make sure the types are defined to the end of file */ 2325 2325 while (display_line (fp, &last_pos, &lineInfo, i, &lastLine, 2326 - &maxLine, has_types | (flags & M_PAGER_NOWRAP), 2326 + &maxLine, has_types | (flags & MUTT_PAGER_NOWRAP), 2327 2327 &QuoteList, &q_level, &force_redraw, 2328 2328 &SearchRE, pager_window) == 0) 2329 2329 i++; ··· 2394 2394 CHECK_MODE(IsHeader (extra)); 2395 2395 CHECK_READONLY; 2396 2396 /* L10N: CHECK_ACL */ 2397 - CHECK_ACL(M_ACL_DELETE, _("Cannot delete message")); 2397 + CHECK_ACL(MUTT_ACL_DELETE, _("Cannot delete message")); 2398 2398 2399 - mutt_set_flag (Context, extra->hdr, M_DELETE, 1); 2399 + mutt_set_flag (Context, extra->hdr, MUTT_DELETE, 1); 2400 2400 if (option (OPTDELETEUNTAG)) 2401 - mutt_set_flag (Context, extra->hdr, M_TAG, 0); 2401 + mutt_set_flag (Context, extra->hdr, MUTT_TAG, 0); 2402 2402 redraw = REDRAW_STATUS | REDRAW_INDEX; 2403 2403 if (option (OPTRESOLVE)) 2404 2404 { ··· 2426 2426 CHECK_MODE(IsHeader (extra)); 2427 2427 CHECK_READONLY; 2428 2428 /* L10N: CHECK_ACL */ 2429 - CHECK_ACL(M_ACL_DELETE, _("Cannot delete message(s)")); 2429 + CHECK_ACL(MUTT_ACL_DELETE, _("Cannot delete message(s)")); 2430 2430 2431 - r = mutt_thread_set_flag (extra->hdr, M_DELETE, 1, 2431 + r = mutt_thread_set_flag (extra->hdr, MUTT_DELETE, 1, 2432 2432 ch == OP_DELETE_THREAD ? 0 : 1); 2433 2433 2434 2434 if (r != -1) 2435 2435 { 2436 2436 if (option (OPTDELETEUNTAG)) 2437 - mutt_thread_set_flag (extra->hdr, M_TAG, 0, 2437 + mutt_thread_set_flag (extra->hdr, MUTT_TAG, 0, 2438 2438 ch == OP_DELETE_THREAD ? 0 : 1); 2439 2439 if (option (OPTRESOLVE)) 2440 2440 { ··· 2482 2482 if (option (OPTWRAP) != old_smart_wrap || 2483 2483 option (OPTMARKERS) != old_markers) 2484 2484 { 2485 - if (flags & M_PAGER_RETWINCH) 2485 + if (flags & MUTT_PAGER_RETWINCH) 2486 2486 { 2487 2487 ch = -1; 2488 2488 rc = OP_REFORMAT_WINCH; ··· 2524 2524 lastLine = 0; 2525 2525 while (j > 0 && display_line (fp, &last_pos, &lineInfo, topline, 2526 2526 &lastLine, &maxLine, 2527 - (has_types ? M_TYPES : 0) | (flags & M_PAGER_NOWRAP), 2527 + (has_types ? MUTT_TYPES : 0) | (flags & MUTT_PAGER_NOWRAP), 2528 2528 &QuoteList, &q_level, &force_redraw, 2529 2529 &SearchRE, pager_window) == 0) 2530 2530 { ··· 2547 2547 CHECK_MODE(IsHeader (extra)); 2548 2548 CHECK_READONLY; 2549 2549 /* L10N: CHECK_ACL */ 2550 - CHECK_ACL(M_ACL_WRITE, "Cannot flag message"); 2550 + CHECK_ACL(MUTT_ACL_WRITE, "Cannot flag message"); 2551 2551 2552 - mutt_set_flag (Context, extra->hdr, M_FLAG, !extra->hdr->flagged); 2552 + mutt_set_flag (Context, extra->hdr, MUTT_FLAG, !extra->hdr->flagged); 2553 2553 redraw = REDRAW_STATUS | REDRAW_INDEX; 2554 2554 if (option (OPTRESOLVE)) 2555 2555 { ··· 2686 2686 2687 2687 case OP_TAG: 2688 2688 CHECK_MODE(IsHeader (extra)); 2689 - mutt_set_flag (Context, extra->hdr, M_TAG, !extra->hdr->tagged); 2689 + mutt_set_flag (Context, extra->hdr, MUTT_TAG, !extra->hdr->tagged); 2690 2690 2691 2691 Context->last_tag = extra->hdr->tagged ? extra->hdr : 2692 2692 ((Context->last_tag == extra->hdr && !extra->hdr->tagged) ··· 2704 2704 CHECK_MODE(IsHeader (extra)); 2705 2705 CHECK_READONLY; 2706 2706 /* L10N: CHECK_ACL */ 2707 - CHECK_ACL(M_ACL_SEEN, _("Cannot toggle new")); 2707 + CHECK_ACL(MUTT_ACL_SEEN, _("Cannot toggle new")); 2708 2708 2709 2709 if (extra->hdr->read || extra->hdr->old) 2710 - mutt_set_flag (Context, extra->hdr, M_NEW, 1); 2710 + mutt_set_flag (Context, extra->hdr, MUTT_NEW, 1); 2711 2711 else if (!first) 2712 - mutt_set_flag (Context, extra->hdr, M_READ, 1); 2712 + mutt_set_flag (Context, extra->hdr, MUTT_READ, 1); 2713 2713 first = 0; 2714 2714 Context->msgnotreadyet = -1; 2715 2715 redraw = REDRAW_STATUS | REDRAW_INDEX; ··· 2724 2724 CHECK_MODE(IsHeader (extra)); 2725 2725 CHECK_READONLY; 2726 2726 /* L10N: CHECK_ACL */ 2727 - CHECK_ACL(M_ACL_DELETE, _("Cannot undelete message")); 2727 + CHECK_ACL(MUTT_ACL_DELETE, _("Cannot undelete message")); 2728 2728 2729 - mutt_set_flag (Context, extra->hdr, M_DELETE, 0); 2729 + mutt_set_flag (Context, extra->hdr, MUTT_DELETE, 0); 2730 2730 redraw = REDRAW_STATUS | REDRAW_INDEX; 2731 2731 if (option (OPTRESOLVE)) 2732 2732 { ··· 2740 2740 CHECK_MODE(IsHeader (extra)); 2741 2741 CHECK_READONLY; 2742 2742 /* L10N: CHECK_ACL */ 2743 - CHECK_ACL(M_ACL_DELETE, _("Cannot undelete message(s)")); 2743 + CHECK_ACL(MUTT_ACL_DELETE, _("Cannot undelete message(s)")); 2744 2744 2745 - r = mutt_thread_set_flag (extra->hdr, M_DELETE, 0, 2745 + r = mutt_thread_set_flag (extra->hdr, MUTT_DELETE, 0, 2746 2746 ch == OP_UNDELETE_THREAD ? 0 : 1); 2747 2747 2748 2748 if (r != -1) ··· 2770 2770 break; 2771 2771 2772 2772 case OP_VIEW_ATTACHMENTS: 2773 - if (flags & M_PAGER_ATTACHMENT) 2773 + if (flags & MUTT_PAGER_ATTACHMENT) 2774 2774 { 2775 2775 ch = -1; 2776 2776 rc = OP_ATTACH_COLLAPSE;
+13 -13
pager.h
··· 19 19 #include "attach.h" 20 20 21 21 /* dynamic internal flags */ 22 - #define M_SHOWFLAT (1<<0) 23 - #define M_SHOWCOLOR (1<<1) 24 - #define M_HIDE (1<<2) 25 - #define M_SEARCH (1<<3) 26 - #define M_TYPES (1<<4) 27 - #define M_SHOW (M_SHOWCOLOR | M_SHOWFLAT) 22 + #define MUTT_SHOWFLAT (1<<0) 23 + #define MUTT_SHOWCOLOR (1<<1) 24 + #define MUTT_HIDE (1<<2) 25 + #define MUTT_SEARCH (1<<3) 26 + #define MUTT_TYPES (1<<4) 27 + #define MUTT_SHOW (MUTT_SHOWCOLOR | MUTT_SHOWFLAT) 28 28 29 29 /* exported flags for mutt_(do_)?pager */ 30 - #define M_PAGER_NSKIP (1<<5) /* preserve whitespace with smartwrap */ 31 - #define M_PAGER_MARKER (1<<6) /* use markers if option is set */ 32 - #define M_PAGER_RETWINCH (1<<7) /* need reformatting on SIGWINCH */ 33 - #define M_PAGER_MESSAGE (M_SHOWCOLOR | M_PAGER_MARKER) 34 - #define M_PAGER_ATTACHMENT (1<<8) 35 - #define M_PAGER_NOWRAP (1<<9) /* format for term width, ignore $wrap */ 30 + #define MUTT_PAGER_NSKIP (1<<5) /* preserve whitespace with smartwrap */ 31 + #define MUTT_PAGER_MARKER (1<<6) /* use markers if option is set */ 32 + #define MUTT_PAGER_RETWINCH (1<<7) /* need reformatting on SIGWINCH */ 33 + #define MUTT_PAGER_MESSAGE (MUTT_SHOWCOLOR | MUTT_PAGER_MARKER) 34 + #define MUTT_PAGER_ATTACHMENT (1<<8) 35 + #define MUTT_PAGER_NOWRAP (1<<9) /* format for term width, ignore $wrap */ 36 36 37 - #define M_DISPLAYFLAGS (M_SHOW | M_PAGER_NSKIP | M_PAGER_MARKER) 37 + #define MUTT_DISPLAYFLAGS (MUTT_SHOW | MUTT_PAGER_NSKIP | MUTT_PAGER_MARKER) 38 38 39 39 typedef struct 40 40 {
+4 -4
parse.c
··· 1557 1557 shallrecurse = 0; 1558 1558 1559 1559 /* Don't count containers if they're top-level. */ 1560 - if (flags & M_PARTS_TOPLEVEL) 1560 + if (flags & MUTT_PARTS_TOPLEVEL) 1561 1561 AT_NOCOUNT("top-level message/*"); 1562 1562 } 1563 1563 else if (bp->type == TYPEMULTIPART) ··· 1568 1568 shallrecurse = 0; 1569 1569 1570 1570 /* Don't count containers if they're top-level. */ 1571 - if (flags & M_PARTS_TOPLEVEL) 1571 + if (flags & MUTT_PARTS_TOPLEVEL) 1572 1572 AT_NOCOUNT("top-level multipart"); 1573 1573 } 1574 1574 ··· 1611 1611 if (shallrecurse) 1612 1612 { 1613 1613 dprint(5, (debugfile, "cbp: %p pre count = %d\n", (void *)bp, count)); 1614 - bp->attach_count = count_body_parts(bp->parts, flags & ~M_PARTS_TOPLEVEL); 1614 + bp->attach_count = count_body_parts(bp->parts, flags & ~MUTT_PARTS_TOPLEVEL); 1615 1615 count += bp->attach_count; 1616 1616 dprint(5, (debugfile, "cbp: %p post count = %d\n", (void *)bp, count)); 1617 1617 } ··· 1634 1634 mutt_parse_mime_message (ctx, hdr); 1635 1635 1636 1636 if (AttachAllow || AttachExclude || InlineAllow || InlineExclude) 1637 - hdr->attach_total = count_body_parts(hdr->content, M_PARTS_TOPLEVEL); 1637 + hdr->attach_total = count_body_parts(hdr->content, MUTT_PARTS_TOPLEVEL); 1638 1638 else 1639 1639 hdr->attach_total = 0; 1640 1640
+161 -161
pattern.c
··· 56 56 } 57 57 Flags[] = 58 58 { 59 - { 'A', M_ALL, 0, NULL }, 60 - { 'b', M_BODY, M_FULL_MSG, eat_regexp }, 61 - { 'B', M_WHOLE_MSG, M_FULL_MSG, eat_regexp }, 62 - { 'c', M_CC, 0, eat_regexp }, 63 - { 'C', M_RECIPIENT, 0, eat_regexp }, 64 - { 'd', M_DATE, 0, eat_date }, 65 - { 'D', M_DELETED, 0, NULL }, 66 - { 'e', M_SENDER, 0, eat_regexp }, 67 - { 'E', M_EXPIRED, 0, NULL }, 68 - { 'f', M_FROM, 0, eat_regexp }, 69 - { 'F', M_FLAG, 0, NULL }, 70 - { 'g', M_CRYPT_SIGN, 0, NULL }, 71 - { 'G', M_CRYPT_ENCRYPT, 0, NULL }, 72 - { 'h', M_HEADER, M_FULL_MSG, eat_regexp }, 73 - { 'H', M_HORMEL, 0, eat_regexp }, 74 - { 'i', M_ID, 0, eat_regexp }, 75 - { 'k', M_PGP_KEY, 0, NULL }, 76 - { 'l', M_LIST, 0, NULL }, 77 - { 'L', M_ADDRESS, 0, eat_regexp }, 78 - { 'm', M_MESSAGE, 0, eat_range }, 79 - { 'n', M_SCORE, 0, eat_range }, 80 - { 'N', M_NEW, 0, NULL }, 81 - { 'O', M_OLD, 0, NULL }, 82 - { 'p', M_PERSONAL_RECIP, 0, NULL }, 83 - { 'P', M_PERSONAL_FROM, 0, NULL }, 84 - { 'Q', M_REPLIED, 0, NULL }, 85 - { 'r', M_DATE_RECEIVED, 0, eat_date }, 86 - { 'R', M_READ, 0, NULL }, 87 - { 's', M_SUBJECT, 0, eat_regexp }, 88 - { 'S', M_SUPERSEDED, 0, NULL }, 89 - { 't', M_TO, 0, eat_regexp }, 90 - { 'T', M_TAG, 0, NULL }, 91 - { 'u', M_SUBSCRIBED_LIST, 0, NULL }, 92 - { 'U', M_UNREAD, 0, NULL }, 93 - { 'v', M_COLLAPSED, 0, NULL }, 94 - { 'V', M_CRYPT_VERIFIED, 0, NULL }, 95 - { 'x', M_REFERENCE, 0, eat_regexp }, 96 - { 'X', M_MIMEATTACH, 0, eat_range }, 97 - { 'y', M_XLABEL, 0, eat_regexp }, 98 - { 'z', M_SIZE, 0, eat_range }, 99 - { '=', M_DUPLICATED, 0, NULL }, 100 - { '$', M_UNREFERENCED, 0, NULL }, 59 + { 'A', MUTT_ALL, 0, NULL }, 60 + { 'b', MUTT_BODY, MUTT_FULL_MSG, eat_regexp }, 61 + { 'B', MUTT_WHOLE_MSG, MUTT_FULL_MSG, eat_regexp }, 62 + { 'c', MUTT_CC, 0, eat_regexp }, 63 + { 'C', MUTT_RECIPIENT, 0, eat_regexp }, 64 + { 'd', MUTT_DATE, 0, eat_date }, 65 + { 'D', MUTT_DELETED, 0, NULL }, 66 + { 'e', MUTT_SENDER, 0, eat_regexp }, 67 + { 'E', MUTT_EXPIRED, 0, NULL }, 68 + { 'f', MUTT_FROM, 0, eat_regexp }, 69 + { 'F', MUTT_FLAG, 0, NULL }, 70 + { 'g', MUTT_CRYPT_SIGN, 0, NULL }, 71 + { 'G', MUTT_CRYPT_ENCRYPT, 0, NULL }, 72 + { 'h', MUTT_HEADER, MUTT_FULL_MSG, eat_regexp }, 73 + { 'H', MUTT_HORMEL, 0, eat_regexp }, 74 + { 'i', MUTT_ID, 0, eat_regexp }, 75 + { 'k', MUTT_PGP_KEY, 0, NULL }, 76 + { 'l', MUTT_LIST, 0, NULL }, 77 + { 'L', MUTT_ADDRESS, 0, eat_regexp }, 78 + { 'm', MUTT_MESSAGE, 0, eat_range }, 79 + { 'n', MUTT_SCORE, 0, eat_range }, 80 + { 'N', MUTT_NEW, 0, NULL }, 81 + { 'O', MUTT_OLD, 0, NULL }, 82 + { 'p', MUTT_PERSONAL_RECIP, 0, NULL }, 83 + { 'P', MUTT_PERSONAL_FROM, 0, NULL }, 84 + { 'Q', MUTT_REPLIED, 0, NULL }, 85 + { 'r', MUTT_DATE_RECEIVED, 0, eat_date }, 86 + { 'R', MUTT_READ, 0, NULL }, 87 + { 's', MUTT_SUBJECT, 0, eat_regexp }, 88 + { 'S', MUTT_SUPERSEDED, 0, NULL }, 89 + { 't', MUTT_TO, 0, eat_regexp }, 90 + { 'T', MUTT_TAG, 0, NULL }, 91 + { 'u', MUTT_SUBSCRIBED_LIST, 0, NULL }, 92 + { 'U', MUTT_UNREAD, 0, NULL }, 93 + { 'v', MUTT_COLLAPSED, 0, NULL }, 94 + { 'V', MUTT_CRYPT_VERIFIED, 0, NULL }, 95 + { 'x', MUTT_REFERENCE, 0, eat_regexp }, 96 + { 'X', MUTT_MIMEATTACH, 0, eat_range }, 97 + { 'y', MUTT_XLABEL, 0, eat_regexp }, 98 + { 'z', MUTT_SIZE, 0, eat_range }, 99 + { '=', MUTT_DUPLICATED, 0, NULL }, 100 + { '$', MUTT_UNREFERENCED, 0, NULL }, 101 101 { 0, 0, 0, NULL } 102 102 }; 103 103 ··· 106 106 static char LastSearchExpn[LONG_STRING] = { 0 }; /* expanded version of 107 107 LastSearch */ 108 108 109 - #define M_MAXRANGE -1 109 + #define MUTT_MAXRANGE -1 110 110 111 111 /* constants for parse_date_range() */ 112 - #define M_PDR_NONE 0x0000 113 - #define M_PDR_MINUS 0x0001 114 - #define M_PDR_PLUS 0x0002 115 - #define M_PDR_WINDOW 0x0004 116 - #define M_PDR_ABSOLUTE 0x0008 117 - #define M_PDR_DONE 0x0010 118 - #define M_PDR_ERROR 0x0100 119 - #define M_PDR_ERRORDONE (M_PDR_ERROR | M_PDR_DONE) 112 + #define MUTT_PDR_NONE 0x0000 113 + #define MUTT_PDR_MINUS 0x0001 114 + #define MUTT_PDR_PLUS 0x0002 115 + #define MUTT_PDR_WINDOW 0x0004 116 + #define MUTT_PDR_ABSOLUTE 0x0008 117 + #define MUTT_PDR_DONE 0x0010 118 + #define MUTT_PDR_ERROR 0x0100 119 + #define MUTT_PDR_ERRORDONE (MUTT_PDR_ERROR | MUTT_PDR_DONE) 120 120 121 121 122 122 /* if no uppercase letters are given, do a case-insensitive search */ ··· 162 162 /* decode the header / body */ 163 163 memset (&s, 0, sizeof (s)); 164 164 s.fpin = msg->fp; 165 - s.flags = M_CHARCONV; 165 + s.flags = MUTT_CHARCONV; 166 166 mutt_mktemp (tempfile, sizeof (tempfile)); 167 167 if ((s.fpout = safe_fopen (tempfile, "w+")) == NULL) 168 168 { ··· 170 170 return (0); 171 171 } 172 172 173 - if (pat->op != M_BODY) 173 + if (pat->op != MUTT_BODY) 174 174 mutt_copy_header (msg->fp, h, s.fpout, CH_FROM | CH_DECODE, NULL); 175 175 176 - if (pat->op != M_HEADER) 176 + if (pat->op != MUTT_HEADER) 177 177 { 178 178 mutt_parse_mime_message (ctx, h); 179 179 ··· 203 203 { 204 204 /* raw header / body */ 205 205 fp = msg->fp; 206 - if (pat->op != M_BODY) 206 + if (pat->op != MUTT_BODY) 207 207 { 208 208 fseeko (fp, h->offset, 0); 209 209 lng = h->content->offset - h->offset; 210 210 } 211 - if (pat->op != M_HEADER) 211 + if (pat->op != MUTT_HEADER) 212 212 { 213 - if (pat->op == M_BODY) 213 + if (pat->op == MUTT_BODY) 214 214 fseeko (fp, h->content->offset, 0); 215 215 lng += h->content->length; 216 216 } ··· 222 222 /* search the file "fp" */ 223 223 while (lng > 0) 224 224 { 225 - if (pat->op == M_HEADER) 225 + if (pat->op == MUTT_HEADER) 226 226 { 227 227 if (*(buf = mutt_read_rfc822_line (fp, buf, &blen)) == '\0') 228 228 break; ··· 260 260 261 261 mutt_buffer_init (&buf); 262 262 pexpr = s->dptr; 263 - if (mutt_extract_token (&buf, s, M_TOKEN_PATTERN | M_TOKEN_COMMENT) != 0 || 263 + if (mutt_extract_token (&buf, s, MUTT_TOKEN_PATTERN | MUTT_TOKEN_COMMENT) != 0 || 264 264 !buf.data) 265 265 { 266 266 snprintf (err->data, err->dsize, _("Error in expression: %s"), pexpr); ··· 329 329 /* range minimum */ 330 330 if (*s->dptr == '>') 331 331 { 332 - pat->max = M_MAXRANGE; 332 + pat->max = MUTT_MAXRANGE; 333 333 pat->min = strtol (s->dptr + 1, &tmp, 0) + 1; /* exclusive range */ 334 334 } 335 335 else ··· 382 382 (pat->max)--; 383 383 } 384 384 else 385 - pat->max = M_MAXRANGE; 385 + pat->max = MUTT_MAXRANGE; 386 386 387 387 if (skip_quote && *tmp == '"') 388 388 tmp++; ··· 494 494 static const char * parse_date_range (const char* pc, struct tm *min, 495 495 struct tm *max, int haveMin, struct tm *baseMin, BUFFER *err) 496 496 { 497 - int flag = M_PDR_NONE; 498 - while (*pc && ((flag & M_PDR_DONE) == 0)) 497 + int flag = MUTT_PDR_NONE; 498 + while (*pc && ((flag & MUTT_PDR_DONE) == 0)) 499 499 { 500 500 const char *pt; 501 501 char ch = *pc++; ··· 508 508 pt = get_offset (min, pc, -1); 509 509 if (pc == pt) 510 510 { 511 - if (flag == M_PDR_NONE) 511 + if (flag == MUTT_PDR_NONE) 512 512 { /* nothing yet and no offset parsed => absolute date? */ 513 513 if (!getDate (pc, max, err)) 514 - flag |= (M_PDR_ABSOLUTE | M_PDR_ERRORDONE); /* done bad */ 514 + flag |= (MUTT_PDR_ABSOLUTE | MUTT_PDR_ERRORDONE); /* done bad */ 515 515 else 516 516 { 517 517 /* reestablish initial base minimum if not specified */ 518 518 if (!haveMin) 519 519 memcpy (min, baseMin, sizeof(struct tm)); 520 - flag |= (M_PDR_ABSOLUTE | M_PDR_DONE); /* done good */ 520 + flag |= (MUTT_PDR_ABSOLUTE | MUTT_PDR_DONE); /* done good */ 521 521 } 522 522 } 523 523 else 524 - flag |= M_PDR_ERRORDONE; 524 + flag |= MUTT_PDR_ERRORDONE; 525 525 } 526 526 else 527 527 { 528 528 pc = pt; 529 - if (flag == M_PDR_NONE && !haveMin) 529 + if (flag == MUTT_PDR_NONE && !haveMin) 530 530 { /* the very first "-3d" without a previous absolute date */ 531 531 max->tm_year = min->tm_year; 532 532 max->tm_mon = min->tm_mon; 533 533 max->tm_mday = min->tm_mday; 534 534 } 535 - flag |= M_PDR_MINUS; 535 + flag |= MUTT_PDR_MINUS; 536 536 } 537 537 } 538 538 break; ··· 540 540 { /* enlarge plusRange */ 541 541 pt = get_offset (max, pc, 1); 542 542 if (pc == pt) 543 - flag |= M_PDR_ERRORDONE; 543 + flag |= MUTT_PDR_ERRORDONE; 544 544 else 545 545 { 546 546 pc = pt; 547 - flag |= M_PDR_PLUS; 547 + flag |= MUTT_PDR_PLUS; 548 548 } 549 549 } 550 550 break; ··· 552 552 { /* enlarge window in both directions */ 553 553 pt = get_offset (min, pc, -1); 554 554 if (pc == pt) 555 - flag |= M_PDR_ERRORDONE; 555 + flag |= MUTT_PDR_ERRORDONE; 556 556 else 557 557 { 558 558 pc = get_offset (max, pc, 1); 559 - flag |= M_PDR_WINDOW; 559 + flag |= MUTT_PDR_WINDOW; 560 560 } 561 561 } 562 562 break; 563 563 default: 564 - flag |= M_PDR_ERRORDONE; 564 + flag |= MUTT_PDR_ERRORDONE; 565 565 } 566 566 SKIPWS (pc); 567 567 } 568 - if ((flag & M_PDR_ERROR) && !(flag & M_PDR_ABSOLUTE)) 568 + if ((flag & MUTT_PDR_ERROR) && !(flag & MUTT_PDR_ABSOLUTE)) 569 569 { /* getDate has its own error message, don't overwrite it here */ 570 570 snprintf (err->data, err->dsize, _("Invalid relative date: %s"), pc-1); 571 571 } 572 - return ((flag & M_PDR_ERROR) ? NULL : pc); 572 + return ((flag & MUTT_PDR_ERROR) ? NULL : pc); 573 573 } 574 574 575 575 static int eat_date (pattern_t *pat, BUFFER *s, BUFFER *err) ··· 580 580 581 581 mutt_buffer_init (&buffer); 582 582 pexpr = s->dptr; 583 - if (mutt_extract_token (&buffer, s, M_TOKEN_COMMENT | M_TOKEN_PATTERN) != 0 583 + if (mutt_extract_token (&buffer, s, MUTT_TOKEN_COMMENT | MUTT_TOKEN_PATTERN) != 0 584 584 || !buffer.data) 585 585 { 586 586 snprintf (err->data, err->dsize, _("Error in expression: %s"), pexpr); ··· 817 817 { 818 818 /* A & B | C == (A & B) | C */ 819 819 tmp = new_pattern (); 820 - tmp->op = M_AND; 820 + tmp->op = MUTT_AND; 821 821 tmp->child = curlist; 822 822 823 823 curlist = tmp; ··· 851 851 return NULL; 852 852 } 853 853 tmp = new_pattern (); 854 - tmp->op = M_THREAD; 854 + tmp->op = MUTT_THREAD; 855 855 if (last) 856 856 last->next = tmp; 857 857 else ··· 878 878 { 879 879 /* A | B & C == (A | B) & C */ 880 880 tmp = new_pattern (); 881 - tmp->op = M_OR; 881 + tmp->op = MUTT_OR; 882 882 tmp->child = curlist; 883 883 curlist = tmp; 884 884 last = tmp; ··· 975 975 if (curlist->next) 976 976 { 977 977 tmp = new_pattern (); 978 - tmp->op = or ? M_OR : M_AND; 978 + tmp->op = or ? MUTT_OR : MUTT_AND; 979 979 tmp->child = curlist; 980 980 curlist = tmp; 981 981 } ··· 1095 1095 } 1096 1096 1097 1097 /* flags 1098 - M_MATCH_FULL_ADDRESS match both personal and machine address */ 1098 + MUTT_MATCH_FULL_ADDRESS match both personal and machine address */ 1099 1099 int 1100 1100 mutt_pattern_exec (struct pattern_t *pat, pattern_exec_flag flags, CONTEXT *ctx, HEADER *h) 1101 1101 { 1102 1102 switch (pat->op) 1103 1103 { 1104 - case M_AND: 1104 + case MUTT_AND: 1105 1105 return (pat->not ^ (perform_and (pat->child, flags, ctx, h) > 0)); 1106 - case M_OR: 1106 + case MUTT_OR: 1107 1107 return (pat->not ^ (perform_or (pat->child, flags, ctx, h) > 0)); 1108 - case M_THREAD: 1108 + case MUTT_THREAD: 1109 1109 return (pat->not ^ match_threadcomplete(pat->child, flags, ctx, h->thread, 1, 1, 1, 1)); 1110 - case M_ALL: 1110 + case MUTT_ALL: 1111 1111 return (!pat->not); 1112 - case M_EXPIRED: 1112 + case MUTT_EXPIRED: 1113 1113 return (pat->not ^ h->expired); 1114 - case M_SUPERSEDED: 1114 + case MUTT_SUPERSEDED: 1115 1115 return (pat->not ^ h->superseded); 1116 - case M_FLAG: 1116 + case MUTT_FLAG: 1117 1117 return (pat->not ^ h->flagged); 1118 - case M_TAG: 1118 + case MUTT_TAG: 1119 1119 return (pat->not ^ h->tagged); 1120 - case M_NEW: 1120 + case MUTT_NEW: 1121 1121 return (pat->not ? h->old || h->read : !(h->old || h->read)); 1122 - case M_UNREAD: 1122 + case MUTT_UNREAD: 1123 1123 return (pat->not ? h->read : !h->read); 1124 - case M_REPLIED: 1124 + case MUTT_REPLIED: 1125 1125 return (pat->not ^ h->replied); 1126 - case M_OLD: 1126 + case MUTT_OLD: 1127 1127 return (pat->not ? (!h->old || h->read) : (h->old && !h->read)); 1128 - case M_READ: 1128 + case MUTT_READ: 1129 1129 return (pat->not ^ h->read); 1130 - case M_DELETED: 1130 + case MUTT_DELETED: 1131 1131 return (pat->not ^ h->deleted); 1132 - case M_MESSAGE: 1133 - return (pat->not ^ (h->msgno >= pat->min - 1 && (pat->max == M_MAXRANGE || 1132 + case MUTT_MESSAGE: 1133 + return (pat->not ^ (h->msgno >= pat->min - 1 && (pat->max == MUTT_MAXRANGE || 1134 1134 h->msgno <= pat->max - 1))); 1135 - case M_DATE: 1135 + case MUTT_DATE: 1136 1136 return (pat->not ^ (h->date_sent >= pat->min && h->date_sent <= pat->max)); 1137 - case M_DATE_RECEIVED: 1137 + case MUTT_DATE_RECEIVED: 1138 1138 return (pat->not ^ (h->received >= pat->min && h->received <= pat->max)); 1139 - case M_BODY: 1140 - case M_HEADER: 1141 - case M_WHOLE_MSG: 1139 + case MUTT_BODY: 1140 + case MUTT_HEADER: 1141 + case MUTT_WHOLE_MSG: 1142 1142 /* 1143 1143 * ctx can be NULL in certain cases, such as when replying to a message from the attachment menu and 1144 1144 * the user has a reply-hook using "~h" (bug #2190). ··· 1147 1147 return 0; 1148 1148 #ifdef USE_IMAP 1149 1149 /* IMAP search sets h->matched at search compile time */ 1150 - if (ctx->magic == M_IMAP && pat->stringmatch) 1150 + if (ctx->magic == MUTT_IMAP && pat->stringmatch) 1151 1151 return (h->matched); 1152 1152 #endif 1153 1153 return (pat->not ^ msg_search (ctx, pat, h->msgno)); 1154 - case M_SENDER: 1155 - return (pat->not ^ match_adrlist (pat, flags & M_MATCH_FULL_ADDRESS, 1, 1154 + case MUTT_SENDER: 1155 + return (pat->not ^ match_adrlist (pat, flags & MUTT_MATCH_FULL_ADDRESS, 1, 1156 1156 h->env->sender)); 1157 - case M_FROM: 1158 - return (pat->not ^ match_adrlist (pat, flags & M_MATCH_FULL_ADDRESS, 1, 1157 + case MUTT_FROM: 1158 + return (pat->not ^ match_adrlist (pat, flags & MUTT_MATCH_FULL_ADDRESS, 1, 1159 1159 h->env->from)); 1160 - case M_TO: 1161 - return (pat->not ^ match_adrlist (pat, flags & M_MATCH_FULL_ADDRESS, 1, 1160 + case MUTT_TO: 1161 + return (pat->not ^ match_adrlist (pat, flags & MUTT_MATCH_FULL_ADDRESS, 1, 1162 1162 h->env->to)); 1163 - case M_CC: 1164 - return (pat->not ^ match_adrlist (pat, flags & M_MATCH_FULL_ADDRESS, 1, 1163 + case MUTT_CC: 1164 + return (pat->not ^ match_adrlist (pat, flags & MUTT_MATCH_FULL_ADDRESS, 1, 1165 1165 h->env->cc)); 1166 - case M_SUBJECT: 1166 + case MUTT_SUBJECT: 1167 1167 return (pat->not ^ (h->env->subject && patmatch (pat, h->env->subject) == 0)); 1168 - case M_ID: 1168 + case MUTT_ID: 1169 1169 return (pat->not ^ (h->env->message_id && patmatch (pat, h->env->message_id) == 0)); 1170 - case M_SCORE: 1171 - return (pat->not ^ (h->score >= pat->min && (pat->max == M_MAXRANGE || 1170 + case MUTT_SCORE: 1171 + return (pat->not ^ (h->score >= pat->min && (pat->max == MUTT_MAXRANGE || 1172 1172 h->score <= pat->max))); 1173 - case M_SIZE: 1174 - return (pat->not ^ (h->content->length >= pat->min && (pat->max == M_MAXRANGE || h->content->length <= pat->max))); 1175 - case M_REFERENCE: 1173 + case MUTT_SIZE: 1174 + return (pat->not ^ (h->content->length >= pat->min && (pat->max == MUTT_MAXRANGE || h->content->length <= pat->max))); 1175 + case MUTT_REFERENCE: 1176 1176 return (pat->not ^ (match_reference (pat, h->env->references) || 1177 1177 match_reference (pat, h->env->in_reply_to))); 1178 - case M_ADDRESS: 1179 - return (pat->not ^ match_adrlist (pat, flags & M_MATCH_FULL_ADDRESS, 4, 1178 + case MUTT_ADDRESS: 1179 + return (pat->not ^ match_adrlist (pat, flags & MUTT_MATCH_FULL_ADDRESS, 4, 1180 1180 h->env->from, h->env->sender, 1181 1181 h->env->to, h->env->cc)); 1182 - case M_RECIPIENT: 1183 - return (pat->not ^ match_adrlist (pat, flags & M_MATCH_FULL_ADDRESS, 1182 + case MUTT_RECIPIENT: 1183 + return (pat->not ^ match_adrlist (pat, flags & MUTT_MATCH_FULL_ADDRESS, 1184 1184 2, h->env->to, h->env->cc)); 1185 - case M_LIST: /* known list, subscribed or not */ 1185 + case MUTT_LIST: /* known list, subscribed or not */ 1186 1186 return (pat->not ^ mutt_is_list_cc (pat->alladdr, h->env->to, h->env->cc)); 1187 - case M_SUBSCRIBED_LIST: 1187 + case MUTT_SUBSCRIBED_LIST: 1188 1188 return (pat->not ^ mutt_is_list_recipient (pat->alladdr, h->env->to, h->env->cc)); 1189 - case M_PERSONAL_RECIP: 1189 + case MUTT_PERSONAL_RECIP: 1190 1190 return (pat->not ^ match_user (pat->alladdr, h->env->to, h->env->cc)); 1191 - case M_PERSONAL_FROM: 1191 + case MUTT_PERSONAL_FROM: 1192 1192 return (pat->not ^ match_user (pat->alladdr, h->env->from, NULL)); 1193 - case M_COLLAPSED: 1193 + case MUTT_COLLAPSED: 1194 1194 return (pat->not ^ (h->collapsed && h->num_hidden > 1)); 1195 - case M_CRYPT_SIGN: 1195 + case MUTT_CRYPT_SIGN: 1196 1196 if (!WithCrypto) 1197 1197 break; 1198 1198 return (pat->not ^ ((h->security & SIGN) ? 1 : 0)); 1199 - case M_CRYPT_VERIFIED: 1199 + case MUTT_CRYPT_VERIFIED: 1200 1200 if (!WithCrypto) 1201 1201 break; 1202 1202 return (pat->not ^ ((h->security & GOODSIGN) ? 1 : 0)); 1203 - case M_CRYPT_ENCRYPT: 1203 + case MUTT_CRYPT_ENCRYPT: 1204 1204 if (!WithCrypto) 1205 1205 break; 1206 1206 return (pat->not ^ ((h->security & ENCRYPT) ? 1 : 0)); 1207 - case M_PGP_KEY: 1207 + case MUTT_PGP_KEY: 1208 1208 if (!(WithCrypto & APPLICATION_PGP)) 1209 1209 break; 1210 1210 return (pat->not ^ ((h->security & APPLICATION_PGP) && (h->security & PGPKEY))); 1211 - case M_XLABEL: 1211 + case MUTT_XLABEL: 1212 1212 return (pat->not ^ (h->env->x_label && patmatch (pat, h->env->x_label) == 0)); 1213 - case M_HORMEL: 1213 + case MUTT_HORMEL: 1214 1214 return (pat->not ^ (h->env->spam && h->env->spam->data && patmatch (pat, h->env->spam->data) == 0)); 1215 - case M_DUPLICATED: 1215 + case MUTT_DUPLICATED: 1216 1216 return (pat->not ^ (h->thread && h->thread->duplicate_thread)); 1217 - case M_MIMEATTACH: 1217 + case MUTT_MIMEATTACH: 1218 1218 { 1219 1219 int count = mutt_count_body_parts (ctx, h); 1220 - return (pat->not ^ (count >= pat->min && (pat->max == M_MAXRANGE || 1220 + return (pat->not ^ (count >= pat->min && (pat->max == MUTT_MAXRANGE || 1221 1221 count <= pat->max))); 1222 1222 } 1223 - case M_UNREFERENCED: 1223 + case MUTT_UNREFERENCED: 1224 1224 return (pat->not ^ (h->thread && !h->thread->child)); 1225 1225 } 1226 1226 mutt_error (_("error: unknown op %d (report this error)."), pat->op); ··· 1303 1303 progress_t progress; 1304 1304 1305 1305 strfcpy (buf, NONULL (Context->pattern), sizeof (buf)); 1306 - if (mutt_get_field (prompt, buf, sizeof (buf), M_PATTERN | M_CLEAR) != 0 || !buf[0]) 1306 + if (mutt_get_field (prompt, buf, sizeof (buf), MUTT_PATTERN | MUTT_CLEAR) != 0 || !buf[0]) 1307 1307 return (-1); 1308 1308 1309 1309 mutt_message _("Compiling search pattern..."); ··· 1314 1314 mutt_buffer_init (&err); 1315 1315 err.dsize = STRING; 1316 1316 err.data = safe_malloc(err.dsize); 1317 - if ((pat = mutt_pattern_comp (buf, M_FULL_MSG, &err)) == NULL) 1317 + if ((pat = mutt_pattern_comp (buf, MUTT_FULL_MSG, &err)) == NULL) 1318 1318 { 1319 1319 FREE (&simple); 1320 1320 mutt_error ("%s", err.data); ··· 1323 1323 } 1324 1324 1325 1325 #ifdef USE_IMAP 1326 - if (Context->magic == M_IMAP && imap_search (Context, pat) < 0) 1326 + if (Context->magic == MUTT_IMAP && imap_search (Context, pat) < 0) 1327 1327 return -1; 1328 1328 #endif 1329 1329 1330 1330 mutt_progress_init (&progress, _("Executing command on matching messages..."), 1331 - M_PROGRESS_MSG, ReadInc, 1332 - (op == M_LIMIT) ? Context->msgcount : Context->vcount); 1331 + MUTT_PROGRESS_MSG, ReadInc, 1332 + (op == MUTT_LIMIT) ? Context->msgcount : Context->vcount); 1333 1333 1334 1334 #define THIS_BODY Context->hdrs[i]->content 1335 1335 1336 - if (op == M_LIMIT) 1336 + if (op == MUTT_LIMIT) 1337 1337 { 1338 1338 Context->vcount = 0; 1339 1339 Context->vsize = 0; ··· 1347 1347 Context->hdrs[i]->limited = 0; 1348 1348 Context->hdrs[i]->collapsed = 0; 1349 1349 Context->hdrs[i]->num_hidden = 0; 1350 - if (mutt_pattern_exec (pat, M_MATCH_FULL_ADDRESS, Context, Context->hdrs[i])) 1350 + if (mutt_pattern_exec (pat, MUTT_MATCH_FULL_ADDRESS, Context, Context->hdrs[i])) 1351 1351 { 1352 1352 Context->hdrs[i]->virtual = Context->vcount; 1353 1353 Context->hdrs[i]->limited = 1; ··· 1363 1363 for (i = 0; i < Context->vcount; i++) 1364 1364 { 1365 1365 mutt_progress_update (&progress, i, -1); 1366 - if (mutt_pattern_exec (pat, M_MATCH_FULL_ADDRESS, Context, Context->hdrs[Context->v2r[i]])) 1366 + if (mutt_pattern_exec (pat, MUTT_MATCH_FULL_ADDRESS, Context, Context->hdrs[Context->v2r[i]])) 1367 1367 { 1368 1368 switch (op) 1369 1369 { 1370 - case M_DELETE: 1371 - case M_UNDELETE: 1372 - mutt_set_flag (Context, Context->hdrs[Context->v2r[i]], M_DELETE, 1373 - (op == M_DELETE)); 1370 + case MUTT_DELETE: 1371 + case MUTT_UNDELETE: 1372 + mutt_set_flag (Context, Context->hdrs[Context->v2r[i]], MUTT_DELETE, 1373 + (op == MUTT_DELETE)); 1374 1374 break; 1375 - case M_TAG: 1376 - case M_UNTAG: 1377 - mutt_set_flag (Context, Context->hdrs[Context->v2r[i]], M_TAG, 1378 - (op == M_TAG)); 1375 + case MUTT_TAG: 1376 + case MUTT_UNTAG: 1377 + mutt_set_flag (Context, Context->hdrs[Context->v2r[i]], MUTT_TAG, 1378 + (op == MUTT_TAG)); 1379 1379 break; 1380 1380 } 1381 1381 } ··· 1386 1386 1387 1387 mutt_clear_error (); 1388 1388 1389 - if (op == M_LIMIT) 1389 + if (op == MUTT_LIMIT) 1390 1390 { 1391 1391 /* drop previous limit pattern */ 1392 1392 FREE (&Context->pattern); ··· 1401 1401 { 1402 1402 Context->pattern = simple; 1403 1403 simple = NULL; /* don't clobber it */ 1404 - Context->limit_pattern = mutt_pattern_comp (buf, M_FULL_MSG, &err); 1404 + Context->limit_pattern = mutt_pattern_comp (buf, MUTT_FULL_MSG, &err); 1405 1405 } 1406 1406 } 1407 1407 FREE (&simple); ··· 1427 1427 if (mutt_get_field ((op == OP_SEARCH || op == OP_SEARCH_NEXT) ? 1428 1428 _("Search for: ") : _("Reverse search for: "), 1429 1429 buf, sizeof (buf), 1430 - M_CLEAR | M_PATTERN) != 0 || !buf[0]) 1430 + MUTT_CLEAR | MUTT_PATTERN) != 0 || !buf[0]) 1431 1431 return (-1); 1432 1432 1433 1433 if (op == OP_SEARCH || op == OP_SEARCH_NEXT) ··· 1450 1450 mutt_pattern_free (&SearchPattern); 1451 1451 err.dsize = STRING; 1452 1452 err.data = safe_malloc (err.dsize); 1453 - if ((SearchPattern = mutt_pattern_comp (temp, M_FULL_MSG, &err)) == NULL) 1453 + if ((SearchPattern = mutt_pattern_comp (temp, MUTT_FULL_MSG, &err)) == NULL) 1454 1454 { 1455 1455 mutt_error ("%s", err.data); 1456 1456 FREE (&err.data); ··· 1466 1466 for (i = 0; i < Context->msgcount; i++) 1467 1467 Context->hdrs[i]->searched = 0; 1468 1468 #ifdef USE_IMAP 1469 - if (Context->magic == M_IMAP && imap_search (Context, SearchPattern) < 0) 1469 + if (Context->magic == MUTT_IMAP && imap_search (Context, SearchPattern) < 0) 1470 1470 return -1; 1471 1471 #endif 1472 1472 unset_option (OPTSEARCHINVALID); ··· 1476 1476 if (op == OP_SEARCH_OPPOSITE) 1477 1477 incr = -incr; 1478 1478 1479 - mutt_progress_init (&progress, _("Searching..."), M_PROGRESS_MSG, 1479 + mutt_progress_init (&progress, _("Searching..."), MUTT_PROGRESS_MSG, 1480 1480 ReadInc, Context->vcount); 1481 1481 1482 1482 for (i = cur + incr, j = 0 ; j != Context->vcount; j++) ··· 1521 1521 { 1522 1522 /* remember that we've already searched this message */ 1523 1523 h->searched = 1; 1524 - if ((h->matched = (mutt_pattern_exec (SearchPattern, M_MATCH_FULL_ADDRESS, Context, h) > 0))) 1524 + if ((h->matched = (mutt_pattern_exec (SearchPattern, MUTT_MATCH_FULL_ADDRESS, Context, h) > 0))) 1525 1525 { 1526 1526 mutt_clear_error(); 1527 1527 if (msg && *msg)
+23 -23
pgp.c
··· 287 287 288 288 /* fromcode comes from the MIME Content-Type charset label. It might 289 289 * be a wrong label, so we want the ability to do corrections via 290 - * charset-hooks. Therefore we set flags to M_ICONV_HOOK_FROM. 290 + * charset-hooks. Therefore we set flags to MUTT_ICONV_HOOK_FROM. 291 291 */ 292 - fc = fgetconv_open (fpin, charset, Charset, M_ICONV_HOOK_FROM); 292 + fc = fgetconv_open (fpin, charset, Charset, MUTT_ICONV_HOOK_FROM); 293 293 294 294 for (complete = 1, armor_header = 1; 295 295 fgetconvs (buf, sizeof (buf), fc) != NULL; ··· 350 350 char body_charset[STRING]; 351 351 mutt_get_body_charset (body_charset, sizeof (body_charset), m); 352 352 353 - rc = 0; /* silence false compiler warning if (s->flags & M_DISPLAY) */ 353 + rc = 0; /* silence false compiler warning if (s->flags & MUTT_DISPLAY) */ 354 354 355 355 fseeko (s->fpin, m->offset, 0); 356 356 last_pos = m->offset; ··· 389 389 continue; 390 390 } 391 391 392 - have_any_sigs = have_any_sigs || (clearsign && (s->flags & M_VERIFY)); 392 + have_any_sigs = have_any_sigs || (clearsign && (s->flags & MUTT_VERIFY)); 393 393 394 394 /* Copy PGP material to temporary file */ 395 395 mutt_mktemp (tmpfname, sizeof (tmpfname)); ··· 429 429 fflush (tmpfp); 430 430 431 431 /* Invoke PGP if needed */ 432 - if (!clearsign || (s->flags & M_VERIFY)) 432 + if (!clearsign || (s->flags & MUTT_VERIFY)) 433 433 { 434 434 mutt_mktemp (outfile, sizeof (outfile)); 435 435 if ((pgpout = safe_fopen (outfile, "w+")) == NULL) ··· 460 460 461 461 safe_fclose (&pgpin); 462 462 463 - if (s->flags & M_DISPLAY) 463 + if (s->flags & MUTT_DISPLAY) 464 464 { 465 465 crypt_current_time (s, "PGP"); 466 466 rc = pgp_copy_checksig (pgperr, s->fpout); ··· 469 469 safe_fclose (&pgperr); 470 470 rv = mutt_wait_filter (thepid); 471 471 472 - if (s->flags & M_DISPLAY) 472 + if (s->flags & MUTT_DISPLAY) 473 473 { 474 474 if (rc == 0) have_any_sigs = 1; 475 475 /* ··· 500 500 pgp_void_passphrase (); 501 501 } 502 502 503 - if (could_not_decrypt && !(s->flags & M_DISPLAY)) 503 + if (could_not_decrypt && !(s->flags & MUTT_DISPLAY)) 504 504 { 505 505 mutt_error _("Could not decrypt PGP message"); 506 506 mutt_sleep (1); ··· 513 513 * Now, copy cleartext to the screen. 514 514 */ 515 515 516 - if(s->flags & M_DISPLAY) 516 + if(s->flags & MUTT_DISPLAY) 517 517 { 518 518 if (needpass) 519 519 state_attach_puts (_("[-- BEGIN PGP MESSAGE --]\n\n"), s); ··· 540 540 541 541 rewind (pgpout); 542 542 state_set_prefix (s); 543 - fc = fgetconv_open (pgpout, expected_charset, Charset, M_ICONV_HOOK_FROM); 543 + fc = fgetconv_open (pgpout, expected_charset, Charset, MUTT_ICONV_HOOK_FROM); 544 544 while ((c = fgetconv (fc)) != EOF) 545 545 state_prefix_putc (c, s); 546 546 fgetconv_close (&fc); ··· 558 558 mutt_unlink (outfile); 559 559 } 560 560 561 - if (s->flags & M_DISPLAY) 561 + if (s->flags & MUTT_DISPLAY) 562 562 { 563 563 state_putc ('\n', s); 564 564 if (needpass) ··· 798 798 goto bailout; 799 799 } 800 800 mutt_copy_message (fpout, Context, Context->hdrs[Context->v2r[i]], 801 - M_CM_DECODE|M_CM_CHARCONV, 0); 801 + MUTT_CM_DECODE|MUTT_CM_CHARCONV, 0); 802 802 } 803 803 } 804 804 } ··· 810 810 safe_fclose (&fpout); 811 811 goto bailout; 812 812 } 813 - mutt_copy_message (fpout, Context, h, M_CM_DECODE|M_CM_CHARCONV, 0); 813 + mutt_copy_message (fpout, Context, h, MUTT_CM_DECODE|MUTT_CM_CHARCONV, 0); 814 814 } 815 815 816 816 safe_fclose (&fpout); ··· 917 917 { 918 918 safe_fclose (&pgperr); 919 919 unlink (pgptmpfile); 920 - if (s->flags & M_DISPLAY) 920 + if (s->flags & MUTT_DISPLAY) 921 921 state_attach_puts (_("[-- Error: could not create a PGP subprocess! --]\n\n"), s); 922 922 return (NULL); 923 923 } ··· 954 954 return NULL; 955 955 } 956 956 957 - if (s->flags & M_DISPLAY) 957 + if (s->flags & MUTT_DISPLAY) 958 958 { 959 959 rewind (pgperr); 960 960 if (pgp_copy_checksig (pgperr, s->fpout) == 0 && !rv && p) ··· 1087 1087 mutt_mktemp (tempfile, sizeof (tempfile)); 1088 1088 if ((fpout = safe_fopen (tempfile, "w+")) == NULL) 1089 1089 { 1090 - if (s->flags & M_DISPLAY) 1090 + if (s->flags & MUTT_DISPLAY) 1091 1091 state_attach_puts (_("[-- Error: could not create temporary file! --]\n"), s); 1092 1092 return -1; 1093 1093 } 1094 1094 1095 - if (s->flags & M_DISPLAY) crypt_current_time (s, "PGP"); 1095 + if (s->flags & MUTT_DISPLAY) crypt_current_time (s, "PGP"); 1096 1096 1097 1097 if ((tattach = pgp_decrypt_part (a, s, fpout, a)) != NULL) 1098 1098 { 1099 - if (s->flags & M_DISPLAY) 1099 + if (s->flags & MUTT_DISPLAY) 1100 1100 state_attach_puts (_("[-- The following data is PGP/MIME encrypted --]\n\n"), s); 1101 1101 1102 1102 fpin = s->fpin; ··· 1114 1114 if (mutt_is_multipart_signed (tattach) && !tattach->next) 1115 1115 a->goodsig |= tattach->goodsig; 1116 1116 1117 - if (s->flags & M_DISPLAY) 1117 + if (s->flags & MUTT_DISPLAY) 1118 1118 { 1119 1119 state_puts ("\n", s); 1120 1120 state_attach_puts (_("[-- End of PGP/MIME encrypted data --]\n"), s); ··· 1298 1298 if (crypt_hook != NULL) 1299 1299 { 1300 1300 keyID = crypt_hook->data; 1301 - r = M_YES; 1301 + r = MUTT_YES; 1302 1302 if (! oppenc_mode && option(OPTCRYPTCONFIRMHOOK)) 1303 1303 { 1304 1304 snprintf (buf, sizeof (buf), _("Use keyID = \"%s\" for %s?"), keyID, p->mailbox); 1305 - r = mutt_yesorno (buf, M_YES); 1305 + r = mutt_yesorno (buf, MUTT_YES); 1306 1306 } 1307 - if (r == M_YES) 1307 + if (r == MUTT_YES) 1308 1308 { 1309 1309 if (crypt_is_numerical_keyid (keyID)) 1310 1310 { ··· 1325 1325 k_info = pgp_getkeybystr (keyID, KEYFLAG_CANENCRYPT, PGP_PUBRING); 1326 1326 } 1327 1327 } 1328 - else if (r == M_NO) 1328 + else if (r == MUTT_NO) 1329 1329 { 1330 1330 if (key_selected || (crypt_hook->next != NULL)) 1331 1331 {
+2 -2
pgpinvoke.c
··· 70 70 { 71 71 char fmt[16]; 72 72 struct pgp_command_context *cctx = (struct pgp_command_context *) data; 73 - int optional = (flags & M_FORMAT_OPTIONAL); 73 + int optional = (flags & MUTT_FORMAT_OPTIONAL); 74 74 75 75 switch (op) 76 76 { ··· 142 142 143 143 if (optional) 144 144 mutt_FormatString (dest, destlen, col, cols, ifstring, _mutt_fmt_pgp_command, data, 0); 145 - else if (flags & M_FORMAT_OPTIONAL) 145 + else if (flags & MUTT_FORMAT_OPTIONAL) 146 146 mutt_FormatString (dest, destlen, col, cols, elsestring, _mutt_fmt_pgp_command, data, 0); 147 147 148 148 return (src);
+5 -5
pgpkey.c
··· 136 136 pgp_uid_t *uid; 137 137 pgp_key_t key, pkey; 138 138 int kflags = 0; 139 - int optional = (flags & M_FORMAT_OPTIONAL); 139 + int optional = (flags & MUTT_FORMAT_OPTIONAL); 140 140 141 141 entry = (pgp_entry_t *) data; 142 142 uid = entry->uid; ··· 280 280 281 281 if (optional) 282 282 mutt_FormatString (dest, destlen, col, cols, ifstring, mutt_attach_fmt, data, 0); 283 - else if (flags & M_FORMAT_OPTIONAL) 283 + else if (flags & MUTT_FORMAT_OPTIONAL) 284 284 mutt_FormatString (dest, destlen, col, cols, elsestring, mutt_attach_fmt, data, 0); 285 285 return (src); 286 286 } ··· 294 294 entry.num = num + 1; 295 295 296 296 mutt_FormatString (s, l, 0, MuttIndexWindow->cols, NONULL (PgpEntryFormat), pgp_entry_fmt, 297 - (unsigned long) &entry, M_FORMAT_ARROWCURSOR); 297 + (unsigned long) &entry, MUTT_FORMAT_ARROWCURSOR); 298 298 } 299 299 300 300 static int _pgp_compare_address (const void *a, const void *b) ··· 628 628 snprintf (buff, sizeof (buff), _("%s Do you really want to use the key?"), 629 629 _(s)); 630 630 631 - if (mutt_yesorno (buff, M_NO) != M_YES) 631 + if (mutt_yesorno (buff, MUTT_NO) != MUTT_YES) 632 632 { 633 633 mutt_clear_error (); 634 634 break; ··· 684 684 FOREVER 685 685 { 686 686 resp[0] = 0; 687 - if (mutt_get_field (tag, resp, sizeof (resp), M_CLEAR) != 0) 687 + if (mutt_get_field (tag, resp, sizeof (resp), MUTT_CLEAR) != 0) 688 688 return NULL; 689 689 690 690 if (whatfor)
+12 -12
pop.c
··· 279 279 280 280 if (!ctx->quiet) 281 281 mutt_progress_init (&progress, _("Fetching message headers..."), 282 - M_PROGRESS_MSG, ReadInc, new_count - old_count); 282 + MUTT_PROGRESS_MSG, ReadInc, new_count - old_count); 283 283 284 284 if (ret == 0) 285 285 { ··· 333 333 #if USE_HCACHE 334 334 else 335 335 { 336 - mutt_hcache_store (hc, ctx->hdrs[i]->data, ctx->hdrs[i], 0, strlen, M_GENERATE_UIDVALIDITY); 336 + mutt_hcache_store (hc, ctx->hdrs[i]->data, ctx->hdrs[i], 0, strlen, MUTT_GENERATE_UIDVALIDITY); 337 337 } 338 338 339 339 FREE(&data); ··· 436 436 437 437 /* init (hard-coded) ACL rights */ 438 438 memset (ctx->rights, 0, sizeof (ctx->rights)); 439 - mutt_bit_set (ctx->rights, M_ACL_SEEN); 440 - mutt_bit_set (ctx->rights, M_ACL_DELETE); 439 + mutt_bit_set (ctx->rights, MUTT_ACL_SEEN); 440 + mutt_bit_set (ctx->rights, MUTT_ACL_DELETE); 441 441 #if USE_HCACHE 442 442 /* flags are managed using header cache, so it only makes sense to 443 443 * enable them in that case */ 444 - mutt_bit_set (ctx->rights, M_ACL_WRITE); 444 + mutt_bit_set (ctx->rights, MUTT_ACL_WRITE); 445 445 #endif 446 446 447 447 FOREVER ··· 570 570 } 571 571 572 572 mutt_progress_init (&progressbar, _("Fetching message..."), 573 - M_PROGRESS_SIZE, NetInc, h->content->length + h->content->offset - 1); 573 + MUTT_PROGRESS_SIZE, NetInc, h->content->length + h->content->offset - 1); 574 574 575 575 /* see if we can put in body cache; use our cache as fallback */ 576 576 if (!(msg->fp = mutt_bcache_put (pop_data->bcache, h->data, 1))) ··· 676 676 return -1; 677 677 678 678 mutt_progress_init (&progress, _("Marking messages deleted..."), 679 - M_PROGRESS_MSG, WriteInc, ctx->deleted); 679 + MUTT_PROGRESS_MSG, WriteInc, ctx->deleted); 680 680 681 681 #if USE_HCACHE 682 682 hc = pop_hcache_open (pop_data, ctx->path); ··· 702 702 #if USE_HCACHE 703 703 if (ctx->hdrs[i]->changed) 704 704 { 705 - mutt_hcache_store (hc, ctx->hdrs[i]->data, ctx->hdrs[i], 0, strlen, M_GENERATE_UIDVALIDITY); 705 + mutt_hcache_store (hc, ctx->hdrs[i]->data, ctx->hdrs[i], 0, strlen, MUTT_GENERATE_UIDVALIDITY); 706 706 } 707 707 #endif 708 708 ··· 762 762 return -1; 763 763 764 764 if (ret > 0) 765 - return M_NEW_MAIL; 765 + return MUTT_NEW_MAIL; 766 766 767 767 return 0; 768 768 } ··· 850 850 goto finish; 851 851 } 852 852 853 - if (mx_open_mailbox (NONULL (Spoolfile), M_APPEND, &ctx) == NULL) 853 + if (mx_open_mailbox (NONULL (Spoolfile), MUTT_APPEND, &ctx) == NULL) 854 854 goto finish; 855 855 856 856 delanswer = query_quadoption (OPT_POPDELETE, _("Delete messages from server?")); ··· 860 860 861 861 for (i = last + 1 ; i <= msgs ; i++) 862 862 { 863 - if ((msg = mx_open_new_message (&ctx, NULL, M_ADD_FROM)) == NULL) 863 + if ((msg = mx_open_new_message (&ctx, NULL, MUTT_ADD_FROM)) == NULL) 864 864 ret = -3; 865 865 else 866 866 { ··· 878 878 mx_close_message (&msg); 879 879 } 880 880 881 - if (ret == 0 && delanswer == M_YES) 881 + if (ret == 0 && delanswer == MUTT_YES) 882 882 { 883 883 /* delete the message on the server */ 884 884 snprintf (buffer, sizeof (buffer), "DELE %d\r\n", i);
+1 -1
pop_auth.c
··· 273 273 ret = pop_query_d (pop_data, buf, sizeof (buf), 274 274 #ifdef DEBUG 275 275 /* don't print the password unless we're at the ungodly debugging level */ 276 - debuglevel < M_SOCK_LOG_FULL ? "PASS *\r\n" : 276 + debuglevel < MUTT_SOCK_LOG_FULL ? "PASS *\r\n" : 277 277 #endif 278 278 NULL); 279 279 }
+9 -9
pop_lib.c
··· 44 44 45 45 /* Defaults */ 46 46 acct->flags = 0; 47 - acct->type = M_ACCT_TYPE_POP; 47 + acct->type = MUTT_ACCT_TYPE_POP; 48 48 acct->port = 0; 49 49 50 50 c = safe_strdup (path); ··· 60 60 } 61 61 62 62 if (url.scheme == U_POPS) 63 - acct->flags |= M_ACCT_SSL; 63 + acct->flags |= MUTT_ACCT_SSL; 64 64 65 65 service = getservbyname (url.scheme == U_POP ? "pop3" : "pop3s", "tcp"); 66 66 if (!acct->port) { ··· 296 296 if (ret == -1) 297 297 return -2; 298 298 pop_data->use_stls = 1; 299 - if (ret == M_YES) 299 + if (ret == MUTT_YES) 300 300 pop_data->use_stls = 2; 301 301 } 302 302 if (pop_data->use_stls == 2) ··· 418 418 */ 419 419 int pop_query_d (POP_DATA *pop_data, char *buf, size_t buflen, char *msg) 420 420 { 421 - int dbg = M_SOCK_LOG_CMD; 421 + int dbg = MUTT_SOCK_LOG_CMD; 422 422 char *c; 423 423 424 424 if (pop_data->status != POP_CONNECTED) ··· 428 428 /* print msg instead of real command */ 429 429 if (msg) 430 430 { 431 - dbg = M_SOCK_LOG_FULL; 432 - dprint (M_SOCK_LOG_CMD, (debugfile, "> %s", msg)); 431 + dbg = MUTT_SOCK_LOG_FULL; 432 + dprint (MUTT_SOCK_LOG_CMD, (debugfile, "> %s", msg)); 433 433 } 434 434 #endif 435 435 ··· 479 479 480 480 FOREVER 481 481 { 482 - chunk = mutt_socket_readln_d (buf, sizeof (buf), pop_data->conn, M_SOCK_LOG_HDR); 482 + chunk = mutt_socket_readln_d (buf, sizeof (buf), pop_data->conn, MUTT_SOCK_LOG_HDR); 483 483 if (chunk < 0) 484 484 { 485 485 pop_data->status = POP_DISCONNECTED; ··· 569 569 int i; 570 570 571 571 mutt_progress_init (&progressbar, _("Verifying message indexes..."), 572 - M_PROGRESS_SIZE, NetInc, 0); 572 + MUTT_PROGRESS_SIZE, NetInc, 0); 573 573 574 574 for (i = 0; i < ctx->msgcount; i++) 575 575 ctx->hdrs[i]->refno = -1; ··· 590 590 return -1; 591 591 592 592 if (query_quadoption (OPT_POPRECONNECT, 593 - _("Connection lost. Reconnect to POP server?")) != M_YES) 593 + _("Connection lost. Reconnect to POP server?")) != MUTT_YES) 594 594 return -1; 595 595 } 596 596 }
+7 -7
postpone.c
··· 129 129 130 130 if (access (Postponed, R_OK | F_OK) != 0) 131 131 return (PostCount = 0); 132 - if (mx_open_mailbox (Postponed, M_NOSORT | M_QUIET, &ctx) == NULL) 132 + if (mx_open_mailbox (Postponed, MUTT_NOSORT | MUTT_QUIET, &ctx) == NULL) 133 133 PostCount = 0; 134 134 else 135 135 PostCount = ctx.msgcount; ··· 149 149 CONTEXT *ctx = (CONTEXT *) menu->data; 150 150 151 151 _mutt_make_string (s, slen, NONULL (HdrFmt), ctx, ctx->hdrs[entry], 152 - M_FORMAT_ARROWCURSOR); 152 + MUTT_FORMAT_ARROWCURSOR); 153 153 } 154 154 155 155 static HEADER *select_msg (void) ··· 178 178 { 179 179 case OP_DELETE: 180 180 case OP_UNDELETE: 181 - mutt_set_flag (PostContext, PostContext->hdrs[menu->current], M_DELETE, (i == OP_DELETE) ? 1 : 0); 181 + mutt_set_flag (PostContext, PostContext->hdrs[menu->current], MUTT_DELETE, (i == OP_DELETE) ? 1 : 0); 182 182 PostCount = PostContext->msgcount - PostContext->deleted; 183 183 if (option (OPTRESOLVE) && menu->current < menu->max - 1) 184 184 { ··· 239 239 if (!Postponed) 240 240 return (-1); 241 241 242 - if ((PostContext = mx_open_mailbox (Postponed, M_NOSORT, NULL)) == NULL) 242 + if ((PostContext = mx_open_mailbox (Postponed, MUTT_NOSORT, NULL)) == NULL) 243 243 { 244 244 PostCount = 0; 245 245 mutt_error _("No postponed messages."); ··· 275 275 } 276 276 277 277 /* finished with this message, so delete it. */ 278 - mutt_set_flag (PostContext, h, M_DELETE, 1); 278 + mutt_set_flag (PostContext, h, MUTT_DELETE, 1); 279 279 280 280 /* update the count for the status display */ 281 281 PostCount = PostContext->msgcount - PostContext->deleted; 282 282 283 283 /* avoid the "purge deleted messages" prompt */ 284 284 opt_delete = quadoption (OPT_DELETE); 285 - set_quadoption (OPT_DELETE, M_YES); 285 + set_quadoption (OPT_DELETE, MUTT_YES); 286 286 mx_close_mailbox (PostContext, NULL); 287 287 set_quadoption (OPT_DELETE, opt_delete); 288 288 ··· 664 664 b->noconv = 1; 665 665 else 666 666 { 667 - s.flags |= M_CHARCONV; 667 + s.flags |= MUTT_CHARCONV; 668 668 b->noconv = 0; 669 669 } 670 670
+7 -7
protos.h
··· 58 58 #define mutt_previous_subthread(x) _mutt_aside_thread(x,0,1) 59 59 int _mutt_aside_thread (HEADER *, short, short); 60 60 61 - #define mutt_collapse_thread(x,y) _mutt_traverse_thread (x,y,M_THREAD_COLLAPSE) 62 - #define mutt_uncollapse_thread(x,y) _mutt_traverse_thread (x,y,M_THREAD_UNCOLLAPSE) 63 - #define mutt_get_hidden(x,y)_mutt_traverse_thread (x,y,M_THREAD_GET_HIDDEN) 64 - #define mutt_thread_contains_unread(x,y) _mutt_traverse_thread (x,y,M_THREAD_UNREAD) 65 - #define mutt_thread_next_unread(x,y) _mutt_traverse_thread(x,y,M_THREAD_NEXT_UNREAD) 61 + #define mutt_collapse_thread(x,y) _mutt_traverse_thread (x,y,MUTT_THREAD_COLLAPSE) 62 + #define mutt_uncollapse_thread(x,y) _mutt_traverse_thread (x,y,MUTT_THREAD_UNCOLLAPSE) 63 + #define mutt_get_hidden(x,y)_mutt_traverse_thread (x,y,MUTT_THREAD_GET_HIDDEN) 64 + #define mutt_thread_contains_unread(x,y) _mutt_traverse_thread (x,y,MUTT_THREAD_UNREAD) 65 + #define mutt_thread_next_unread(x,y) _mutt_traverse_thread(x,y,MUTT_THREAD_NEXT_UNREAD) 66 66 int _mutt_traverse_thread (CONTEXT *ctx, HEADER *hdr, int flag); 67 67 68 68 ··· 308 308 int _mutt_get_field (const char *, char *, size_t, int, int, char ***, int *); 309 309 int mutt_get_hook_type (const char *); 310 310 int mutt_get_field_unbuffered (char *, char *, size_t, int); 311 - #define mutt_get_password(A,B,C) mutt_get_field_unbuffered(A,B,C,M_PASS) 311 + #define mutt_get_password(A,B,C) mutt_get_field_unbuffered(A,B,C,MUTT_PASS) 312 312 int mutt_get_postponed (CONTEXT *, HEADER *, HEADER **, char *, size_t); 313 313 int mutt_get_tmp_attachment (BODY *); 314 314 int mutt_index_menu (void); ··· 441 441 int getdnsdomainname (char *, size_t); 442 442 443 443 /* According to SCO support, this is how to detect SCO */ 444 - #if defined (_M_UNIX) || defined (M_OS) 444 + #if defined (_M_UNIX) || defined (MUTT_OS) 445 445 #define SCO 446 446 #endif 447 447
+3 -3
query.c
··· 193 193 QUERY *query = entry->data; 194 194 char tmp[SHORT_STRING]; 195 195 char buf2[STRING] = ""; 196 - int optional = (flags & M_FORMAT_OPTIONAL); 196 + int optional = (flags & MUTT_FORMAT_OPTIONAL); 197 197 198 198 switch (op) 199 199 { ··· 231 231 232 232 if (optional) 233 233 mutt_FormatString (dest, destlen, col, cols, ifstring, query_format_str, data, 0); 234 - else if (flags & M_FORMAT_OPTIONAL) 234 + else if (flags & MUTT_FORMAT_OPTIONAL) 235 235 mutt_FormatString (dest, destlen, col, cols, elsestring, query_format_str, data, 0); 236 236 237 237 return src; ··· 243 243 244 244 entry->data->num = num; 245 245 mutt_FormatString (s, slen, 0, MuttIndexWindow->cols, NONULL (QueryFormat), query_format_str, 246 - (unsigned long) entry, M_FORMAT_ARROWCURSOR); 246 + (unsigned long) entry, MUTT_FORMAT_ARROWCURSOR); 247 247 } 248 248 249 249 static int query_tag (MUTTMENU *menu, int n, int m)
+22 -22
recvattach.c
··· 72 72 if (idx[x]->level) 73 73 { 74 74 s = buf + 2 * (idx[x]->level - 1); 75 - *s++ = (idx[x]->content->next) ? M_TREE_LTEE : M_TREE_LLCORNER; 76 - *s++ = M_TREE_HLINE; 77 - *s++ = M_TREE_RARROW; 75 + *s++ = (idx[x]->content->next) ? MUTT_TREE_LTEE : MUTT_TREE_LLCORNER; 76 + *s++ = MUTT_TREE_HLINE; 77 + *s++ = MUTT_TREE_RARROW; 78 78 } 79 79 else 80 80 s = buf; ··· 186 186 char tmp[SHORT_STRING]; 187 187 char charset[SHORT_STRING]; 188 188 ATTACHPTR *aptr = (ATTACHPTR *) data; 189 - int optional = (flags & M_FORMAT_OPTIONAL); 189 + int optional = (flags & MUTT_FORMAT_OPTIONAL); 190 190 size_t l; 191 191 192 192 switch (op) ··· 228 228 { 229 229 char s[SHORT_STRING]; 230 230 _mutt_make_string (s, sizeof (s), MsgFmt, NULL, aptr->content->hdr, 231 - M_FORMAT_FORCESUBJ | M_FORMAT_MAKEPRINT | M_FORMAT_ARROWCURSOR); 231 + MUTT_FORMAT_FORCESUBJ | MUTT_FORMAT_MAKEPRINT | MUTT_FORMAT_ARROWCURSOR); 232 232 if (*s) 233 233 { 234 234 mutt_format_s (dest, destlen, prefix, s); ··· 316 316 } 317 317 break; 318 318 case 's': 319 - if (flags & M_FORMAT_STAT_FILE) 319 + if (flags & MUTT_FORMAT_STAT_FILE) 320 320 { 321 321 struct stat st; 322 322 stat (aptr->content->filename, &st); ··· 367 367 368 368 if (optional) 369 369 mutt_FormatString (dest, destlen, col, cols, ifstring, mutt_attach_fmt, data, 0); 370 - else if (flags & M_FORMAT_OPTIONAL) 370 + else if (flags & MUTT_FORMAT_OPTIONAL) 371 371 mutt_FormatString (dest, destlen, col, cols, elsestring, mutt_attach_fmt, data, 0); 372 372 return (src); 373 373 } 374 374 375 375 static void attach_entry (char *b, size_t blen, MUTTMENU *menu, int num) 376 376 { 377 - mutt_FormatString (b, blen, 0, MuttIndexWindow->cols, NONULL (AttachFormat), mutt_attach_fmt, (unsigned long) (((ATTACHPTR **)menu->data)[num]), M_FORMAT_ARROWCURSOR); 377 + mutt_FormatString (b, blen, 0, MuttIndexWindow->cols, NONULL (AttachFormat), mutt_attach_fmt, (unsigned long) (((ATTACHPTR **)menu->data)[num]), MUTT_FORMAT_ARROWCURSOR); 378 378 } 379 379 380 380 int mutt_tag_attach (MUTTMENU *menu, int n, int m) ··· 441 441 prompt = _("Save to file: "); 442 442 while (prompt) 443 443 { 444 - if (mutt_get_field (prompt, buf, sizeof (buf), M_FILE | M_CLEAR) != 0 444 + if (mutt_get_field (prompt, buf, sizeof (buf), MUTT_FILE | MUTT_CLEAR) != 0 445 445 || !buf[0]) 446 446 { 447 447 mutt_clear_error (); ··· 521 521 prepend_curdir (buf, sizeof (buf)); 522 522 523 523 if (mutt_get_field (_("Save to file: "), buf, sizeof (buf), 524 - M_FILE | M_CLEAR) != 0 || !buf[0]) 524 + MUTT_FILE | MUTT_CLEAR) != 0 || !buf[0]) 525 525 return; 526 526 mutt_expand_path (buf, sizeof (buf)); 527 527 if (mutt_check_overwrite (top->filename, buf, tfile, ··· 536 536 } 537 537 else 538 538 { 539 - rc = mutt_save_attachment (fp, top, tfile, M_SAVE_APPEND, hdr); 539 + rc = mutt_save_attachment (fp, top, tfile, MUTT_SAVE_APPEND, hdr); 540 540 if (rc == 0 && AttachSep && (fpout = fopen (tfile,"a")) != NULL) 541 541 { 542 542 fprintf(fpout, "%s", AttachSep); ··· 590 590 snprintf (warning, sizeof (warning), 591 591 _("WARNING! You are about to overwrite %s, continue?"), 592 592 body->filename); 593 - if (mutt_yesorno (warning, M_NO) != M_YES) { 593 + if (mutt_yesorno (warning, MUTT_NO) != MUTT_YES) { 594 594 mutt_window_clearline (MuttMessageWindow, 0); 595 595 return; 596 596 } ··· 674 674 memset (&state, 0, sizeof (STATE)); 675 675 676 676 if (mutt_get_field ((filter ? _("Filter through: ") : _("Pipe to: ")), 677 - buf, sizeof (buf), M_CMD) != 0 || !buf[0]) 677 + buf, sizeof (buf), MUTT_CMD) != 0 || !buf[0]) 678 678 return; 679 679 680 680 mutt_expand_path (buf, sizeof (buf)); ··· 701 701 snprintf (type, sizeof (type), "%s/%s", TYPE (top), top->subtype); 702 702 if (!tag || top->tagged) 703 703 { 704 - if (!rfc1524_mailcap_lookup (top, type, NULL, M_PRINT)) 704 + if (!rfc1524_mailcap_lookup (top, type, NULL, MUTT_PRINT)) 705 705 { 706 706 if (ascii_strcasecmp ("text/plain", top->subtype) && 707 707 ascii_strcasecmp ("application/postscript", top->subtype)) ··· 732 732 if (!tag || top->tagged) 733 733 { 734 734 snprintf (type, sizeof (type), "%s/%s", TYPE (top), top->subtype); 735 - if (!option (OPTATTACHSPLIT) && !rfc1524_mailcap_lookup (top, type, NULL, M_PRINT)) 735 + if (!option (OPTATTACHSPLIT) && !rfc1524_mailcap_lookup (top, type, NULL, MUTT_PRINT)) 736 736 { 737 737 if (!ascii_strcasecmp ("text/plain", top->subtype) || 738 738 !ascii_strcasecmp ("application/postscript", top->subtype)) ··· 745 745 FILE *ifp; 746 746 747 747 mutt_mktemp (newfile, sizeof (newfile)); 748 - if (mutt_decode_save_attachment (fp, top, newfile, M_PRINTING, 0) == 0) 748 + if (mutt_decode_save_attachment (fp, top, newfile, MUTT_PRINTING, 0) == 0) 749 749 { 750 750 if ((ifp = fopen (newfile, "r")) != NULL) 751 751 { ··· 773 773 STATE state; 774 774 775 775 pid_t thepid; 776 - if (query_quadoption (OPT_PRINT, tag ? _("Print tagged attachment(s)?") : _("Print attachment?")) != M_YES) 776 + if (query_quadoption (OPT_PRINT, tag ? _("Print tagged attachment(s)?") : _("Print attachment?")) != MUTT_YES) 777 777 return; 778 778 779 779 if (!option (OPTATTACHSPLIT)) ··· 835 835 /* fall through */ 836 836 837 837 case OP_VIEW_ATTACH: 838 - op = mutt_view_attachment (fp, idx[menu->current]->content, M_REGULAR, 838 + op = mutt_view_attachment (fp, idx[menu->current]->content, MUTT_REGULAR, 839 839 hdr, idx, *idxlen); 840 840 break; 841 841 ··· 953 953 /* make sure we have parsed this message */ 954 954 mutt_parse_mime_message (Context, hdr); 955 955 956 - mutt_message_hook (Context, hdr, M_MESSAGEHOOK); 956 + mutt_message_hook (Context, hdr, MUTT_MESSAGEHOOK); 957 957 958 958 if ((msg = mx_open_message (Context, hdr->msgno)) == NULL) 959 959 return; ··· 1035 1035 switch (op) 1036 1036 { 1037 1037 case OP_ATTACH_VIEW_MAILCAP: 1038 - mutt_view_attachment (fp, idx[menu->current]->content, M_MAILCAP, 1038 + mutt_view_attachment (fp, idx[menu->current]->content, MUTT_MAILCAP, 1039 1039 hdr, idx, idxlen); 1040 1040 menu->redraw = REDRAW_FULL; 1041 1041 break; 1042 1042 1043 1043 case OP_ATTACH_VIEW_TEXT: 1044 - mutt_view_attachment (fp, idx[menu->current]->content, M_AS_TEXT, 1044 + mutt_view_attachment (fp, idx[menu->current]->content, MUTT_AS_TEXT, 1045 1045 hdr, idx, idxlen); 1046 1046 menu->redraw = REDRAW_FULL; 1047 1047 break; ··· 1113 1113 CHECK_READONLY; 1114 1114 1115 1115 #ifdef USE_POP 1116 - if (Context->magic == M_POP) 1116 + if (Context->magic == MUTT_POP) 1117 1117 { 1118 1118 mutt_flushinp (); 1119 1119 mutt_error _("Can't delete attachment from POP server.");
+21 -21
recvcmd.c
··· 173 173 strfcpy (prompt, _("Bounce tagged messages to: "), sizeof (prompt)); 174 174 175 175 buf[0] = '\0'; 176 - if (mutt_get_field (prompt, buf, sizeof (buf), M_ALIAS) 176 + if (mutt_get_field (prompt, buf, sizeof (buf), MUTT_ALIAS) 177 177 || buf[0] == '\0') 178 178 return; 179 179 ··· 213 213 else 214 214 safe_strcat (prompt, sizeof (prompt), "?"); 215 215 216 - if (query_quadoption (OPT_BOUNCE, prompt) != M_YES) 216 + if (query_quadoption (OPT_BOUNCE, prompt) != MUTT_YES) 217 217 { 218 218 rfc822_free_address (&adr); 219 219 mutt_window_clearline (MuttMessageWindow, 0); ··· 469 469 470 470 if ((!cur || mutt_can_decode (cur)) && 471 471 (rc = query_quadoption (OPT_MIMEFWD, 472 - _("Forward as attachments?"))) == M_YES) 472 + _("Forward as attachments?"))) == MUTT_YES) 473 473 mime_fwd_all = 1; 474 474 else if (rc == -1) 475 475 goto bail; ··· 485 485 if ((rc = query_quadoption (OPT_MIMEFWDREST, 486 486 _("Can't decode all tagged attachments. MIME-forward the others?"))) == -1) 487 487 goto bail; 488 - else if (rc == M_NO) 488 + else if (rc == MUTT_NO) 489 489 mime_fwd_any = 0; 490 490 } 491 491 ··· 495 495 496 496 if (option (OPTFORWQUOTE)) 497 497 st.prefix = prefix; 498 - st.flags = M_CHARCONV; 498 + st.flags = MUTT_CHARCONV; 499 499 if (option (OPTWEED)) 500 - st.flags |= M_WEED; 500 + st.flags |= MUTT_WEED; 501 501 st.fpin = fp; 502 502 st.fpout = tmpfp; 503 503 ··· 608 608 tmpbody[0] = '\0'; 609 609 610 610 if ((rc = query_quadoption (OPT_MIMEFWD, 611 - _("Forward MIME encapsulated?"))) == M_NO) 611 + _("Forward MIME encapsulated?"))) == MUTT_NO) 612 612 { 613 613 614 614 /* no MIME encapsulation */ ··· 624 624 if (option (OPTFORWQUOTE)) 625 625 { 626 626 chflags |= CH_PREFIX; 627 - cmflags |= M_CM_PREFIX; 627 + cmflags |= MUTT_CM_PREFIX; 628 628 } 629 629 630 630 if (option (OPTFORWDECODE)) 631 631 { 632 - cmflags |= M_CM_DECODE | M_CM_CHARCONV; 632 + cmflags |= MUTT_CM_DECODE | MUTT_CM_CHARCONV; 633 633 if (option (OPTWEED)) 634 634 { 635 635 chflags |= CH_WEED | CH_REORDER; 636 - cmflags |= M_CM_WEED; 636 + cmflags |= MUTT_CM_WEED; 637 637 } 638 638 } 639 639 640 640 641 641 if (cur) 642 642 { 643 - /* mutt_message_hook (cur->hdr, M_MESSAGEHOOK); */ 643 + /* mutt_message_hook (cur->hdr, MUTT_MESSAGEHOOK); */ 644 644 mutt_forward_intro (tmpfp, cur->hdr); 645 645 _mutt_copy_message (tmpfp, fp, cur->hdr, cur->hdr->content, cmflags, chflags); 646 646 mutt_forward_trailer (tmpfp); ··· 651 651 { 652 652 if (idx[i]->content->tagged) 653 653 { 654 - /* mutt_message_hook (idx[i]->content->hdr, M_MESSAGEHOOK); */ 654 + /* mutt_message_hook (idx[i]->content->hdr, MUTT_MESSAGEHOOK); */ 655 655 mutt_forward_intro (tmpfp, idx[i]->content->hdr); 656 656 _mutt_copy_message (tmpfp, fp, idx[i]->content->hdr, 657 657 idx[i]->content->hdr->content, cmflags, chflags); ··· 661 661 } 662 662 safe_fclose (&tmpfp); 663 663 } 664 - else if (rc == M_YES) /* do MIME encapsulation - we don't need to do much here */ 664 + else if (rc == MUTT_YES) /* do MIME encapsulation - we don't need to do much here */ 665 665 { 666 666 last = &tmphdr->content; 667 667 if (cur) ··· 798 798 799 799 static void attach_include_reply (FILE *fp, FILE *tmpfp, HEADER *cur, int flags) 800 800 { 801 - int cmflags = M_CM_PREFIX | M_CM_DECODE | M_CM_CHARCONV; 801 + int cmflags = MUTT_CM_PREFIX | MUTT_CM_DECODE | MUTT_CM_CHARCONV; 802 802 int chflags = CH_DECODE; 803 803 804 - /* mutt_message_hook (cur, M_MESSAGEHOOK); */ 804 + /* mutt_message_hook (cur, MUTT_MESSAGEHOOK); */ 805 805 806 806 mutt_make_attribution (Context, cur, tmpfp); 807 807 808 808 if (!option (OPTHEADER)) 809 - cmflags |= M_CM_NOHEADER; 809 + cmflags |= MUTT_CM_NOHEADER; 810 810 if (option (OPTWEED)) 811 811 { 812 812 chflags |= CH_WEED; 813 - cmflags |= M_CM_WEED; 813 + cmflags |= MUTT_CM_WEED; 814 814 } 815 815 816 816 _mutt_copy_message (tmpfp, fp, cur, cur->content, cmflags, chflags); ··· 847 847 if ((rc = query_quadoption (OPT_MIMEFWDREST, 848 848 _("Can't decode all tagged attachments. MIME-encapsulate the others?"))) == -1) 849 849 return; 850 - else if (rc == M_YES) 850 + else if (rc == MUTT_YES) 851 851 mime_reply_any = 1; 852 852 } 853 853 else if (nattach == 1) ··· 899 899 strfcpy (prefix, ">", sizeof (prefix)); 900 900 901 901 st.prefix = prefix; 902 - st.flags = M_CHARCONV; 902 + st.flags = MUTT_CHARCONV; 903 903 904 904 if (option (OPTWEED)) 905 - st.flags |= M_WEED; 905 + st.flags |= MUTT_WEED; 906 906 907 907 if (option (OPTHEADER)) 908 908 include_header (1, fp, parent, tmpfp, prefix); ··· 944 944 945 945 if (ci_send_message (flags, tmphdr, tmpbody, NULL, 946 946 parent ? parent : (cur ? cur->hdr : NULL)) == 0) 947 - mutt_set_flag (Context, hdr, M_REPLIED, 1); 947 + mutt_set_flag (Context, hdr, MUTT_REPLIED, 1); 948 948 } 949 949
+3 -3
remailer.c
··· 388 388 { 389 389 char fmt[16]; 390 390 REMAILER *remailer = (REMAILER *) data; 391 - int optional = (flags & M_FORMAT_OPTIONAL); 391 + int optional = (flags & MUTT_FORMAT_OPTIONAL); 392 392 393 393 switch (op) 394 394 { ··· 431 431 432 432 if (optional) 433 433 mutt_FormatString (dest, destlen, col, cols, ifstring, mutt_attach_fmt, data, 0); 434 - else if (flags & M_FORMAT_OPTIONAL) 434 + else if (flags & MUTT_FORMAT_OPTIONAL) 435 435 mutt_FormatString (dest, destlen, col, cols, elsestring, mutt_attach_fmt, data, 0); 436 436 return (src); 437 437 } ··· 442 442 { 443 443 REMAILER **type2_list = (REMAILER **) menu->data; 444 444 mutt_FormatString (b, blen, 0, MuttIndexWindow->cols, NONULL (MixEntryFormat), mix_entry_fmt, 445 - (unsigned long) type2_list[num], M_FORMAT_ARROWCURSOR); 445 + (unsigned long) type2_list[num], MUTT_FORMAT_ARROWCURSOR); 446 446 } 447 447 448 448 static int mix_chain_add (MIXCHAIN *chain, const char *s,
+5 -5
rfc1524.c
··· 204 204 205 205 if ((fp = fopen (filename, "r")) != NULL) 206 206 { 207 - while (!found && (buf = mutt_read_line (buf, &buflen, fp, &line, M_CONT)) != NULL) 207 + while (!found && (buf = mutt_read_line (buf, &buflen, fp, &line, MUTT_CONT)) != NULL) 208 208 { 209 209 /* ignore comments */ 210 210 if (*buf == '#') ··· 309 309 } 310 310 } /* while (ch) */ 311 311 312 - if (opt == M_AUTOVIEW) 312 + if (opt == MUTT_AUTOVIEW) 313 313 { 314 314 if (!copiousoutput) 315 315 found = FALSE; 316 316 } 317 - else if (opt == M_COMPOSE) 317 + else if (opt == MUTT_COMPOSE) 318 318 { 319 319 if (!composecommand) 320 320 found = FALSE; 321 321 } 322 - else if (opt == M_EDIT) 322 + else if (opt == MUTT_EDIT) 323 323 { 324 324 if (!editcommand) 325 325 found = FALSE; 326 326 } 327 - else if (opt == M_PRINT) 327 + else if (opt == MUTT_PRINT) 328 328 { 329 329 if (!printcommand) 330 330 found = FALSE;
+2 -2
rfc2047.c
··· 120 120 } 121 121 mutt_convert_string (ps, 122 122 (const char *)mutt_get_default_charset (), 123 - Charset, M_ICONV_HOOK_FROM); 123 + Charset, MUTT_ICONV_HOOK_FROM); 124 124 return -1; 125 125 } 126 126 ··· 713 713 } 714 714 715 715 if (charset) 716 - mutt_convert_string (&d0, charset, Charset, M_ICONV_HOOK_FROM); 716 + mutt_convert_string (&d0, charset, Charset, MUTT_ICONV_HOOK_FROM); 717 717 mutt_filter_unprintable (&d0); 718 718 strfcpy (d, d0, len); 719 719 rv = 0;
+2 -2
rfc2231.c
··· 130 130 131 131 s = rfc2231_get_charset (p->value, charset, sizeof (charset)); 132 132 rfc2231_decode_one (p->value, s); 133 - mutt_convert_string (&p->value, charset, Charset, M_ICONV_HOOK_FROM); 133 + mutt_convert_string (&p->value, charset, Charset, MUTT_ICONV_HOOK_FROM); 134 134 mutt_filter_unprintable (&p->value); 135 135 136 136 *last = p; ··· 302 302 if (value) 303 303 { 304 304 if (encoded) 305 - mutt_convert_string (&value, charset, Charset, M_ICONV_HOOK_FROM); 305 + mutt_convert_string (&value, charset, Charset, MUTT_ICONV_HOOK_FROM); 306 306 *head = mutt_new_parameter (); 307 307 (*head)->attribute = safe_strdup (attribute); 308 308 (*head)->value = value;
+3 -3
rfc3676.c
··· 71 71 /* Allow quote spacing in the pager even for OPTTEXTFLOWED, 72 72 * but obviously not when replying. 73 73 */ 74 - if (option (OPTTEXTFLOWED) && (s->flags & M_REPLYING)) 74 + if (option (OPTTEXTFLOWED) && (s->flags & MUTT_REPLYING)) 75 75 return 0; 76 76 77 77 return option (OPTREFLOWSPACEQUOTES); ··· 84 84 */ 85 85 static int add_quote_suffix (STATE *s, int ql) 86 86 { 87 - if (s->flags & M_REPLYING) 87 + if (s->flags & MUTT_REPLYING) 88 88 return 0; 89 89 90 90 if (space_quotes (s)) ··· 149 149 static int quote_width (STATE *s, int ql) 150 150 { 151 151 int width = mutt_window_wrap_cols (MuttIndexWindow, ReflowWrap); 152 - if (option(OPTTEXTFLOWED) && (s->flags & M_REPLYING)) 152 + if (option(OPTTEXTFLOWED) && (s->flags & MUTT_REPLYING)) 153 153 { 154 154 /* When replying, force a wrap at FLOWED_MAX to comply with RFC3676 155 155 * guidelines */
+3 -3
score.c
··· 147 147 hdr->score = 0; 148 148 149 149 if (hdr->score <= ScoreThresholdDelete) 150 - _mutt_set_flag (ctx, hdr, M_DELETE, 1, upd_ctx); 150 + _mutt_set_flag (ctx, hdr, MUTT_DELETE, 1, upd_ctx); 151 151 if (hdr->score <= ScoreThresholdRead) 152 - _mutt_set_flag (ctx, hdr, M_READ, 1, upd_ctx); 152 + _mutt_set_flag (ctx, hdr, MUTT_READ, 1, upd_ctx); 153 153 if (hdr->score >= ScoreThresholdFlag) 154 - _mutt_set_flag (ctx, hdr, M_FLAG, 1, upd_ctx); 154 + _mutt_set_flag (ctx, hdr, MUTT_FLAG, 1, upd_ctx); 155 155 } 156 156 157 157 int mutt_parse_unscore (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err)
+32 -32
send.c
··· 197 197 buf[0] = 0; 198 198 mutt_addrlist_to_local (*a); 199 199 rfc822_write_address (buf, sizeof (buf), *a, 0); 200 - if (mutt_get_field (field, buf, sizeof (buf), M_ALIAS) != 0) 200 + if (mutt_get_field (field, buf, sizeof (buf), MUTT_ALIAS) != 0) 201 201 return (-1); 202 202 rfc822_free_address (a); 203 203 *a = mutt_expand_aliases (mutt_parse_adrlist (NULL, buf)); ··· 248 248 } 249 249 250 250 if (mutt_get_field ("Subject: ", buf, sizeof (buf), 0) != 0 || 251 - (!buf[0] && query_quadoption (OPT_SUBJECT, _("No subject, abort?")) != M_NO)) 251 + (!buf[0] && query_quadoption (OPT_SUBJECT, _("No subject, abort?")) != MUTT_NO)) 252 252 { 253 253 mutt_message _("No subject, aborting."); 254 254 return (-1); ··· 365 365 int chflags = CH_DECODE, cmflags = 0; 366 366 367 367 mutt_parse_mime_message (ctx, cur); 368 - mutt_message_hook (ctx, cur, M_MESSAGEHOOK); 368 + mutt_message_hook (ctx, cur, MUTT_MESSAGEHOOK); 369 369 370 370 if (WithCrypto && (cur->security & ENCRYPT) && option (OPTFORWDECODE)) 371 371 { ··· 377 377 378 378 if (option (OPTFORWDECODE)) 379 379 { 380 - cmflags |= M_CM_DECODE | M_CM_CHARCONV; 380 + cmflags |= MUTT_CM_DECODE | MUTT_CM_CHARCONV; 381 381 if (option (OPTWEED)) 382 382 { 383 383 chflags |= CH_WEED | CH_REORDER; 384 - cmflags |= M_CM_WEED; 384 + cmflags |= MUTT_CM_WEED; 385 385 } 386 386 } 387 387 if (option (OPTFORWQUOTE)) 388 - cmflags |= M_CM_PREFIX; 388 + cmflags |= MUTT_CM_PREFIX; 389 389 390 390 /* wrapping headers for forwarding is considered a display 391 391 * rather than send action */ ··· 420 420 421 421 static int include_reply (CONTEXT *ctx, HEADER *cur, FILE *out) 422 422 { 423 - int cmflags = M_CM_PREFIX | M_CM_DECODE | M_CM_CHARCONV | M_CM_REPLYING; 423 + int cmflags = MUTT_CM_PREFIX | MUTT_CM_DECODE | MUTT_CM_CHARCONV | MUTT_CM_REPLYING; 424 424 int chflags = CH_DECODE; 425 425 426 426 if (WithCrypto && (cur->security & ENCRYPT)) ··· 430 430 } 431 431 432 432 mutt_parse_mime_message (ctx, cur); 433 - mutt_message_hook (ctx, cur, M_MESSAGEHOOK); 433 + mutt_message_hook (ctx, cur, MUTT_MESSAGEHOOK); 434 434 435 435 mutt_make_attribution (ctx, cur, out); 436 436 437 437 if (!option (OPTHEADER)) 438 - cmflags |= M_CM_NOHEADER; 438 + cmflags |= MUTT_CM_NOHEADER; 439 439 if (option (OPTWEED)) 440 440 { 441 441 chflags |= CH_WEED | CH_REORDER; 442 - cmflags |= M_CM_WEED; 442 + cmflags |= MUTT_CM_WEED; 443 443 } 444 444 445 445 mutt_copy_message (out, ctx, cur, cmflags, chflags); ··· 453 453 { 454 454 char prompt[STRING]; 455 455 456 - if (flags && env->mail_followup_to && hmfupto == M_YES) 456 + if (flags && env->mail_followup_to && hmfupto == MUTT_YES) 457 457 { 458 458 rfc822_append (to, env->mail_followup_to, 1); 459 459 return 0; ··· 490 490 } 491 491 else if (!(mutt_addrcmp (env->from, env->reply_to) && 492 492 !env->reply_to->next) && 493 - quadoption (OPT_REPLYTO) != M_YES) 493 + quadoption (OPT_REPLYTO) != MUTT_YES) 494 494 { 495 495 /* There are quite a few mailing lists which set the Reply-To: 496 496 * header field to the list address, which makes it quite impossible ··· 505 505 env->reply_to->next?",...":""); 506 506 switch (query_quadoption (OPT_REPLYTO, prompt)) 507 507 { 508 - case M_YES: 508 + case MUTT_YES: 509 509 rfc822_append (to, env->reply_to, 0); 510 510 break; 511 511 512 - case M_NO: 512 + case MUTT_NO: 513 513 rfc822_append (to, env->from, 0); 514 514 break; 515 515 ··· 548 548 rfc822_append (&out->to, tmp, 0); 549 549 rfc822_free_address (&tmp); 550 550 551 - if (in->mail_followup_to && hmfupto == M_YES && 551 + if (in->mail_followup_to && hmfupto == MUTT_YES && 552 552 default_to (&out->cc, in, flags & SENDLISTREPLY, hmfupto) == -1) 553 553 return (-1); /* abort */ 554 554 } ··· 557 557 if (default_to (&out->to, in, flags & SENDGROUPREPLY, hmfupto) == -1) 558 558 return (-1); /* abort */ 559 559 560 - if ((flags & SENDGROUPREPLY) && (!in->mail_followup_to || hmfupto != M_YES)) 560 + if ((flags & SENDGROUPREPLY) && (!in->mail_followup_to || hmfupto != MUTT_YES)) 561 561 { 562 562 /* if(!mutt_addr_is_user(in->to)) */ 563 563 rfc822_append (&out->cc, in->to, 1); ··· 766 766 if ((i = query_quadoption (OPT_INCLUDE, _("Include message in reply?"))) == -1) 767 767 return (-1); 768 768 769 - if (i == M_YES) 769 + if (i == MUTT_YES) 770 770 { 771 771 mutt_message _("Including quoted message..."); 772 772 if (!cur) ··· 792 792 } 793 793 else if (flags & SENDFORWARD) 794 794 { 795 - if ((i = query_quadoption (OPT_MIMEFWD, _("Forward as attachment?"))) == M_YES) 795 + if ((i = query_quadoption (OPT_MIMEFWD, _("Forward as attachment?"))) == MUTT_YES) 796 796 { 797 797 BODY *last = msg->content; 798 798 ··· 1167 1167 1168 1168 int rv = -1; 1169 1169 1170 - if (!flags && !msg && quadoption (OPT_RECALL) != M_NO && 1170 + if (!flags && !msg && quadoption (OPT_RECALL) != MUTT_NO && 1171 1171 mutt_num_postponed (1)) 1172 1172 { 1173 1173 /* If the user is composing a new message, check to see if there ··· 1176 1176 if ((i = query_quadoption (OPT_RECALL, _("Recall postponed message?"))) == -1) 1177 1177 return rv; 1178 1178 1179 - if(i == M_YES) 1179 + if(i == MUTT_YES) 1180 1180 flags |= SENDPOSTPONED; 1181 1181 } 1182 1182 ··· 1325 1325 if ((flags & SENDREPLY) && cur) 1326 1326 { 1327 1327 /* change setting based upon message we are replying to */ 1328 - mutt_message_hook (ctx, cur, M_REPLYHOOK); 1328 + mutt_message_hook (ctx, cur, MUTT_REPLYHOOK); 1329 1329 1330 1330 /* 1331 1331 * set the replied flag for the message we are generating so that the ··· 1337 1337 1338 1338 /* change settings based upon recipients */ 1339 1339 1340 - mutt_message_hook (NULL, msg, M_SENDHOOK); 1340 + mutt_message_hook (NULL, msg, MUTT_SENDHOOK); 1341 1341 1342 1342 /* 1343 1343 * Unset the replied flag from the message we are composing since it is ··· 1387 1387 * used for setting the editor, the sendmail path, or the 1388 1388 * envelope sender. 1389 1389 */ 1390 - mutt_message_hook (NULL, msg, M_SEND2HOOK); 1390 + mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); 1391 1391 1392 1392 /* wait until now to set the real name portion of our return address so 1393 1393 that $realname can be set in a send-hook */ ··· 1423 1423 if (! (flags & SENDKEY) && 1424 1424 ((flags & SENDFORWARD) == 0 || 1425 1425 (option (OPTEDITHDRS) && option (OPTAUTOEDIT)) || 1426 - query_quadoption (OPT_FORWEDIT, _("Edit forwarded message?")) == M_YES)) 1426 + query_quadoption (OPT_FORWEDIT, _("Edit forwarded message?")) == MUTT_YES)) 1427 1427 { 1428 1428 /* If the this isn't a text message, look for a mailcap edit command */ 1429 1429 if (mutt_needs_mailcap (msg->content)) ··· 1463 1463 rfc3676_space_stuff (msg); 1464 1464 } 1465 1465 1466 - mutt_message_hook (NULL, msg, M_SEND2HOOK); 1466 + mutt_message_hook (NULL, msg, MUTT_SEND2HOOK); 1467 1467 } 1468 1468 1469 1469 if (! (flags & (SENDPOSTPONED | SENDFORWARD | SENDKEY | SENDRESEND | SENDDRAFTFILE))) ··· 1472 1472 { 1473 1473 /* if the file was not modified, bail out now */ 1474 1474 if (mtime == st.st_mtime && !msg->content->next && 1475 - query_quadoption (OPT_ABORT, _("Abort unmodified message?")) == M_YES) 1475 + query_quadoption (OPT_ABORT, _("Abort unmodified message?")) == MUTT_YES) 1476 1476 { 1477 1477 mutt_message _("Aborted unmodified message."); 1478 1478 goto cleanup; ··· 1601 1601 fcc_error = 0; /* reset value since we may have failed before */ 1602 1602 mutt_pretty_mailbox (fcc, sizeof (fcc)); 1603 1603 i = mutt_compose_menu (msg, fcc, sizeof (fcc), cur, 1604 - (flags & SENDNOFREEHEADER ? M_COMPOSE_NOFREEHEADER : 0)); 1604 + (flags & SENDNOFREEHEADER ? MUTT_COMPOSE_NOFREEHEADER : 0)); 1605 1605 if (i == -1) 1606 1606 { 1607 1607 /* abort */ ··· 1686 1686 } 1687 1687 1688 1688 if (!msg->env->subject && ! (flags & SENDBATCH) && 1689 - (i = query_quadoption (OPT_SUBJECT, _("No subject, abort sending?"))) != M_NO) 1689 + (i = query_quadoption (OPT_SUBJECT, _("No subject, abort sending?"))) != MUTT_NO) 1690 1690 { 1691 1691 /* if the abort is automatic, print an error message */ 1692 - if (quadoption (OPT_SUBJECT) == M_YES) 1692 + if (quadoption (OPT_SUBJECT) == MUTT_YES) 1693 1693 mutt_error _("No subject specified."); 1694 1694 goto main_loop; 1695 1695 } ··· 1785 1785 msg->content = clear_content; 1786 1786 1787 1787 /* check to see if the user wants copies of all attachments */ 1788 - if (query_quadoption (OPT_FCCATTACH, _("Save attachments in Fcc?")) != M_YES && 1788 + if (query_quadoption (OPT_FCCATTACH, _("Save attachments in Fcc?")) != MUTT_YES && 1789 1789 msg->content->type == TYPEMULTIPART) 1790 1790 { 1791 1791 if (WithCrypto ··· 1913 1913 if (flags & SENDREPLY) 1914 1914 { 1915 1915 if (cur && ctx) 1916 - mutt_set_flag (ctx, cur, M_REPLIED, is_reply (cur, msg)); 1916 + mutt_set_flag (ctx, cur, MUTT_REPLIED, is_reply (cur, msg)); 1917 1917 else if (!(flags & SENDPOSTPONED) && ctx && ctx->tagged) 1918 1918 { 1919 1919 for (i = 0; i < ctx->vcount; i++) 1920 1920 if (ctx->hdrs[ctx->v2r[i]]->tagged) 1921 - mutt_set_flag (ctx, ctx->hdrs[ctx->v2r[i]], M_REPLIED, 1921 + mutt_set_flag (ctx, ctx->hdrs[ctx->v2r[i]], MUTT_REPLIED, 1922 1922 is_reply (ctx->hdrs[ctx->v2r[i]], msg)); 1923 1923 } 1924 1924 }
+9 -9
sendlib.c
··· 1297 1297 if (!attach_msg && option (OPTMIMEFORWDECODE)) 1298 1298 { 1299 1299 chflags |= CH_MIME | CH_TXTPLAIN; 1300 - cmflags = M_CM_DECODE | M_CM_CHARCONV; 1300 + cmflags = MUTT_CM_DECODE | MUTT_CM_CHARCONV; 1301 1301 if ((WithCrypto & APPLICATION_PGP)) 1302 1302 pgp &= ~PGPENCRYPT; 1303 1303 if ((WithCrypto & APPLICATION_SMIME)) ··· 1310 1310 && mutt_is_multipart_encrypted (hdr->content)) 1311 1311 { 1312 1312 chflags |= CH_MIME | CH_NONEWLINE; 1313 - cmflags = M_CM_DECODE_PGP; 1313 + cmflags = MUTT_CM_DECODE_PGP; 1314 1314 pgp &= ~PGPENCRYPT; 1315 1315 } 1316 1316 else if ((WithCrypto & APPLICATION_PGP) 1317 1317 && (mutt_is_application_pgp (hdr->content) & PGPENCRYPT)) 1318 1318 { 1319 1319 chflags |= CH_MIME | CH_TXTPLAIN; 1320 - cmflags = M_CM_DECODE | M_CM_CHARCONV; 1320 + cmflags = MUTT_CM_DECODE | MUTT_CM_CHARCONV; 1321 1321 pgp &= ~PGPENCRYPT; 1322 1322 } 1323 1323 else if ((WithCrypto & APPLICATION_SMIME) 1324 1324 && mutt_is_application_smime (hdr->content) & SMIMEENCRYPT) 1325 1325 { 1326 1326 chflags |= CH_MIME | CH_TXTPLAIN; 1327 - cmflags = M_CM_DECODE | M_CM_CHARCONV; 1327 + cmflags = MUTT_CM_DECODE | MUTT_CM_CHARCONV; 1328 1328 pgp &= ~SMIMEENCRYPT; 1329 1329 } 1330 1330 } ··· 2701 2701 if (post) 2702 2702 set_noconv_flags (hdr->content, 1); 2703 2703 2704 - if (mx_open_mailbox (path, M_APPEND | M_QUIET, &f) == NULL) 2704 + if (mx_open_mailbox (path, MUTT_APPEND | MUTT_QUIET, &f) == NULL) 2705 2705 { 2706 2706 dprint (1, (debugfile, "mutt_write_fcc(): unable to open mailbox %s in append-mode, aborting.\n", 2707 2707 path)); ··· 2711 2711 /* We need to add a Content-Length field to avoid problems where a line in 2712 2712 * the message body begins with "From " 2713 2713 */ 2714 - if (f.magic == M_MMDF || f.magic == M_MBOX) 2714 + if (f.magic == MUTT_MMDF || f.magic == MUTT_MBOX) 2715 2715 { 2716 2716 mutt_mktemp (tempfile, sizeof (tempfile)); 2717 2717 if ((tempfp = safe_fopen (tempfile, "w+")) == NULL) ··· 2726 2726 } 2727 2727 2728 2728 hdr->read = !post; /* make sure to put it in the `cur' directory (maildir) */ 2729 - onm_flags = M_ADD_FROM; 2729 + onm_flags = MUTT_ADD_FROM; 2730 2730 if (post) 2731 - onm_flags |= M_SET_DRAFT; 2731 + onm_flags |= MUTT_SET_DRAFT; 2732 2732 if ((msg = mx_open_new_message (&f, hdr, onm_flags)) == NULL) 2733 2733 { 2734 2734 mx_close_mailbox (&f, NULL); ··· 2755 2755 if (post && fcc) 2756 2756 fprintf (msg->fp, "X-Mutt-Fcc: %s\n", fcc); 2757 2757 2758 - if (f.magic == M_MMDF || f.magic == M_MBOX) 2758 + if (f.magic == MUTT_MMDF || f.magic == MUTT_MBOX) 2759 2759 fprintf (msg->fp, "Status: RO\n"); 2760 2760 2761 2761 /* mutt_write_rfc822_header() only writes out a Date: header with
+9 -9
smime.c
··· 170 170 { 171 171 char fmt[16]; 172 172 struct smime_command_context *cctx = (struct smime_command_context *) data; 173 - int optional = (flags & M_FORMAT_OPTIONAL); 173 + int optional = (flags & MUTT_FORMAT_OPTIONAL); 174 174 175 175 switch (op) 176 176 { ··· 287 287 if (optional) 288 288 mutt_FormatString (dest, destlen, col, cols, ifstring, _mutt_fmt_smime_command, 289 289 data, 0); 290 - else if (flags & M_FORMAT_OPTIONAL) 290 + else if (flags & MUTT_FORMAT_OPTIONAL) 291 291 mutt_FormatString (dest, destlen, col, cols, elsestring, _mutt_fmt_smime_command, 292 292 data, 0); 293 293 ··· 477 477 snprintf (buf, sizeof (buf), _("%s Do you really want to use the key?"), 478 478 _(s)); 479 479 480 - if (mutt_yesorno (buf, M_NO) != M_YES) 480 + if (mutt_yesorno (buf, MUTT_NO) != MUTT_YES) 481 481 { 482 482 mutt_clear_error (); 483 483 break; ··· 766 766 FOREVER 767 767 { 768 768 resp[0] = 0; 769 - if (mutt_get_field (prompt, resp, sizeof (resp), M_CLEAR) != 0) 769 + if (mutt_get_field (prompt, resp, sizeof (resp), MUTT_CLEAR) != 0) 770 770 return NULL; 771 771 772 772 if ((key = smime_get_key_by_str (resp, abilities, public))) ··· 1283 1283 1284 1284 if(h->security & ENCRYPT) 1285 1285 mutt_copy_message (fpout, Context, h, 1286 - M_CM_DECODE_CRYPT & M_CM_DECODE_SMIME, 1286 + MUTT_CM_DECODE_CRYPT & MUTT_CM_DECODE_SMIME, 1287 1287 CH_MIME|CH_WEED|CH_NONEWLINE); 1288 1288 else 1289 1289 mutt_copy_message (fpout, Context, h, 0, 0); ··· 1870 1870 { 1871 1871 safe_fclose (&smimeout); smimeout = NULL; 1872 1872 mutt_unlink (tmpfname); 1873 - if (s->flags & M_DISPLAY) 1873 + if (s->flags & MUTT_DISPLAY) 1874 1874 state_attach_puts (_("[-- Error: unable to create OpenSSL subprocess! --]\n"), s); 1875 1875 return NULL; 1876 1876 } ··· 1881 1881 { 1882 1882 safe_fclose (&smimeout); smimeout = NULL; 1883 1883 mutt_unlink (tmpfname); 1884 - if (s->flags & M_DISPLAY) 1884 + if (s->flags & MUTT_DISPLAY) 1885 1885 state_attach_puts (_("[-- Error: unable to create OpenSSL subprocess! --]\n"), s); 1886 1886 return NULL; 1887 1887 } ··· 1901 1901 mutt_unlink (tmpfname); 1902 1902 1903 1903 1904 - if (s->flags & M_DISPLAY) 1904 + if (s->flags & MUTT_DISPLAY) 1905 1905 { 1906 1906 fflush (smimeerr); 1907 1907 rewind (smimeerr); ··· 1980 1980 fpout = NULL; 1981 1981 } 1982 1982 1983 - if (s->flags & M_DISPLAY) 1983 + if (s->flags & MUTT_DISPLAY) 1984 1984 { 1985 1985 if (type & ENCRYPT) 1986 1986 state_attach_puts (_("\n[-- End of S/MIME encrypted data. --]\n"), s);
+13 -13
smtp.c
··· 185 185 } 186 186 stat (msgfile, &st); 187 187 unlink (msgfile); 188 - mutt_progress_init (&progress, _("Sending message..."), M_PROGRESS_SIZE, 188 + mutt_progress_init (&progress, _("Sending message..."), MUTT_PROGRESS_SIZE, 189 189 NetInc, st.st_size); 190 190 191 191 snprintf (buf, sizeof (buf), "DATA\r\n"); ··· 208 208 snprintf (buf + buflen - 1, sizeof (buf) - buflen + 1, "\r\n"); 209 209 if (buf[0] == '.') 210 210 { 211 - if (mutt_socket_write_d (conn, ".", -1, M_SOCK_LOG_FULL) == -1) 211 + if (mutt_socket_write_d (conn, ".", -1, MUTT_SOCK_LOG_FULL) == -1) 212 212 { 213 213 safe_fclose (&fp); 214 214 return smtp_err_write; 215 215 } 216 216 } 217 - if (mutt_socket_write_d (conn, buf, -1, M_SOCK_LOG_FULL) == -1) 217 + if (mutt_socket_write_d (conn, buf, -1, MUTT_SOCK_LOG_FULL) == -1) 218 218 { 219 219 safe_fclose (&fp); 220 220 return smtp_err_write; ··· 222 222 mutt_progress_update (&progress, ftell (fp), -1); 223 223 } 224 224 if (!term && buflen && 225 - mutt_socket_write_d (conn, "\r\n", -1, M_SOCK_LOG_FULL) == -1) 225 + mutt_socket_write_d (conn, "\r\n", -1, MUTT_SOCK_LOG_FULL) == -1) 226 226 { 227 227 safe_fclose (&fp); 228 228 return smtp_err_write; ··· 372 372 373 373 account->flags = 0; 374 374 account->port = 0; 375 - account->type = M_ACCT_TYPE_SMTP; 375 + account->type = MUTT_ACCT_TYPE_SMTP; 376 376 377 377 urlstr = safe_strdup (SmtpUrl); 378 378 url_parse_ciss (&url, urlstr); ··· 387 387 FREE (&urlstr); 388 388 389 389 if (url.scheme == U_SMTPS) 390 - account->flags |= M_ACCT_SSL; 390 + account->flags |= MUTT_ACCT_SSL; 391 391 392 392 if (!account->port) 393 393 { 394 - if (account->flags & M_ACCT_SSL) 394 + if (account->flags & MUTT_ACCT_SSL) 395 395 account->port = SMTPS_PORT; 396 396 else 397 397 { ··· 421 421 if (!Esmtp) 422 422 { 423 423 /* if TLS or AUTH are requested, use EHLO */ 424 - if (conn->account.flags & M_ACCT_USER) 424 + if (conn->account.flags & MUTT_ACCT_USER) 425 425 Esmtp = 1; 426 426 #ifdef USE_SSL 427 - if (option (OPTSSLFORCETLS) || quadoption (OPT_SSLSTARTTLS) != M_NO) 427 + if (option (OPTSSLFORCETLS) || quadoption (OPT_SSLSTARTTLS) != MUTT_NO) 428 428 Esmtp = 1; 429 429 #endif 430 430 } ··· 458 458 459 459 #ifdef USE_SSL 460 460 if (conn->ssf) 461 - rc = M_NO; 461 + rc = MUTT_NO; 462 462 else if (option (OPTSSLFORCETLS)) 463 - rc = M_YES; 463 + rc = MUTT_YES; 464 464 else if (mutt_bit_isset (Capabilities, STARTTLS) && 465 465 (rc = query_quadoption (OPT_SSLSTARTTLS, 466 466 _("Secure connection with TLS?"))) == -1) 467 467 return rc; 468 468 469 - if (rc == M_YES) 469 + if (rc == MUTT_YES) 470 470 { 471 471 if (mutt_socket_write (conn, "STARTTLS\r\n") < 0) 472 472 return smtp_err_write; ··· 486 486 } 487 487 #endif 488 488 489 - if (conn->account.flags & M_ACCT_USER) 489 + if (conn->account.flags & MUTT_ACCT_USER) 490 490 { 491 491 if (!mutt_bit_isset (Capabilities, AUTH)) 492 492 {
+3 -3
status.c
··· 68 68 unsigned long data, format_flag flags) 69 69 { 70 70 char fmt[SHORT_STRING], tmp[SHORT_STRING], *cp; 71 - int count, optional = (flags & M_FORMAT_OPTIONAL); 71 + int count, optional = (flags & MUTT_FORMAT_OPTIONAL); 72 72 MUTTMENU *menu = (MUTTMENU *) data; 73 73 74 74 *buf = 0; ··· 218 218 i = option(OPTATTACHMSG) ? 3 : ((Context->readonly || 219 219 Context->dontwrite) ? 2 : (Context->changed || 220 220 /* deleted doesn't necessarily mean changed in IMAP */ 221 - (Context->magic != M_IMAP && 221 + (Context->magic != MUTT_IMAP && 222 222 Context->deleted)) ? 1 : 0); 223 223 } 224 224 ··· 291 291 292 292 if (optional) 293 293 _menu_status_line (buf, buflen, col, cols, menu, ifstring); 294 - else if (flags & M_FORMAT_OPTIONAL) 294 + else if (flags & MUTT_FORMAT_OPTIONAL) 295 295 _menu_status_line (buf, buflen, col, cols, menu, elsestring); 296 296 297 297 return (src);
+3 -3
system.c
··· 49 49 mutt_block_signals_system (); 50 50 51 51 /* also don't want to be stopped right now */ 52 - if (flags & M_DETACH_PROCESS) 52 + if (flags & MUTT_DETACH_PROCESS) 53 53 { 54 54 sigemptyset (&set); 55 55 sigaddset (&set, SIGTSTP); ··· 71 71 { 72 72 act.sa_flags = 0; 73 73 74 - if (flags & M_DETACH_PROCESS) 74 + if (flags & MUTT_DETACH_PROCESS) 75 75 { 76 76 int fd; 77 77 ··· 132 132 133 133 /* reset SIGINT, SIGQUIT and SIGCHLD */ 134 134 mutt_unblock_signals_system (1); 135 - if (flags & M_DETACH_PROCESS) 135 + if (flags & MUTT_DETACH_PROCESS) 136 136 sigprocmask (SIG_UNBLOCK, &set, NULL); 137 137 138 138 rc = (thepid != -1) ? (WIFEXITED (rc) ? WEXITSTATUS (rc) : -1) : -1;
+29 -29
thread.c
··· 225 225 226 226 /* Since the graphics characters have a value >255, I have to resort to 227 227 * using escape sequences to pass the information to print_enriched_string(). 228 - * These are the macros M_TREE_* defined in mutt.h. 228 + * These are the macros MUTT_TREE_* defined in mutt.h. 229 229 * 230 230 * ncurses should automatically use the default ASCII characters instead of 231 231 * graphics chars on terminals which don't support them (see the man page ··· 234 234 void mutt_draw_tree (CONTEXT *ctx) 235 235 { 236 236 char *pfx = NULL, *mypfx = NULL, *arrow = NULL, *myarrow = NULL, *new_tree; 237 - char corner = (Sort & SORT_REVERSE) ? M_TREE_ULCORNER : M_TREE_LLCORNER; 238 - char vtee = (Sort & SORT_REVERSE) ? M_TREE_BTEE : M_TREE_TTEE; 237 + char corner = (Sort & SORT_REVERSE) ? MUTT_TREE_ULCORNER : MUTT_TREE_LLCORNER; 238 + char vtee = (Sort & SORT_REVERSE) ? MUTT_TREE_BTEE : MUTT_TREE_TTEE; 239 239 int depth = 0, start_depth = 0, max_depth = 0, width = option (OPTNARROWTREE) ? 1 : 2; 240 240 THREAD *nextdisp = NULL, *pseudo = NULL, *parent = NULL, *tree = ctx->tree; 241 241 ··· 251 251 { 252 252 myarrow = arrow + (depth - start_depth - (start_depth ? 0 : 1)) * width; 253 253 if (depth && start_depth == depth) 254 - myarrow[0] = nextdisp ? M_TREE_LTEE : corner; 254 + myarrow[0] = nextdisp ? MUTT_TREE_LTEE : corner; 255 255 else if (parent->message && !option (OPTHIDELIMITED)) 256 - myarrow[0] = M_TREE_HIDDEN; 256 + myarrow[0] = MUTT_TREE_HIDDEN; 257 257 else if (!parent->message && !option (OPTHIDEMISSING)) 258 - myarrow[0] = M_TREE_MISSING; 258 + myarrow[0] = MUTT_TREE_MISSING; 259 259 else 260 260 myarrow[0] = vtee; 261 261 if (width == 2) 262 - myarrow[1] = pseudo ? M_TREE_STAR 263 - : (tree->duplicate_thread ? M_TREE_EQUALS : M_TREE_HLINE); 262 + myarrow[1] = pseudo ? MUTT_TREE_STAR 263 + : (tree->duplicate_thread ? MUTT_TREE_EQUALS : MUTT_TREE_HLINE); 264 264 if (tree->visible) 265 265 { 266 - myarrow[width] = M_TREE_RARROW; 266 + myarrow[width] = MUTT_TREE_RARROW; 267 267 myarrow[width + 1] = 0; 268 268 new_tree = safe_malloc ((2 + depth * width)); 269 269 if (start_depth > 1) ··· 280 280 if (tree->child && depth) 281 281 { 282 282 mypfx = pfx + (depth - 1) * width; 283 - mypfx[0] = nextdisp ? M_TREE_VLINE : M_TREE_SPACE; 283 + mypfx[0] = nextdisp ? MUTT_TREE_VLINE : MUTT_TREE_SPACE; 284 284 if (width == 2) 285 - mypfx[1] = M_TREE_SPACE; 285 + mypfx[1] = MUTT_TREE_SPACE; 286 286 } 287 287 parent = tree; 288 288 nextdisp = NULL; ··· 1133 1133 int min_unread_msgno = INT_MAX, min_unread = cur->virtual; 1134 1134 #define CHECK_LIMIT (!ctx->pattern || cur->limited) 1135 1135 1136 - if ((Sort & SORT_MASK) != SORT_THREADS && !(flag & M_THREAD_GET_HIDDEN)) 1136 + if ((Sort & SORT_MASK) != SORT_THREADS && !(flag & MUTT_THREAD_GET_HIDDEN)) 1137 1137 { 1138 1138 mutt_error (_("Threading is not enabled.")); 1139 1139 return (cur->virtual); ··· 1165 1165 if (cur->virtual == -1 && CHECK_LIMIT) 1166 1166 num_hidden++; 1167 1167 1168 - if (flag & (M_THREAD_COLLAPSE | M_THREAD_UNCOLLAPSE)) 1168 + if (flag & (MUTT_THREAD_COLLAPSE | MUTT_THREAD_UNCOLLAPSE)) 1169 1169 { 1170 1170 cur->pair = 0; /* force index entry's color to be re-evaluated */ 1171 - cur->collapsed = flag & M_THREAD_COLLAPSE; 1171 + cur->collapsed = flag & MUTT_THREAD_COLLAPSE; 1172 1172 if (cur->virtual != -1) 1173 1173 { 1174 1174 roothdr = cur; 1175 - if (flag & M_THREAD_COLLAPSE) 1175 + if (flag & MUTT_THREAD_COLLAPSE) 1176 1176 final = roothdr->virtual; 1177 1177 } 1178 1178 } ··· 1180 1180 if (thread == top && (thread = thread->child) == NULL) 1181 1181 { 1182 1182 /* return value depends on action requested */ 1183 - if (flag & (M_THREAD_COLLAPSE | M_THREAD_UNCOLLAPSE)) 1183 + if (flag & (MUTT_THREAD_COLLAPSE | MUTT_THREAD_UNCOLLAPSE)) 1184 1184 return (final); 1185 - else if (flag & M_THREAD_UNREAD) 1185 + else if (flag & MUTT_THREAD_UNREAD) 1186 1186 return ((old && new) ? new : (old ? old : new)); 1187 - else if (flag & M_THREAD_GET_HIDDEN) 1187 + else if (flag & MUTT_THREAD_GET_HIDDEN) 1188 1188 return (num_hidden); 1189 - else if (flag & M_THREAD_NEXT_UNREAD) 1189 + else if (flag & MUTT_THREAD_NEXT_UNREAD) 1190 1190 return (min_unread); 1191 1191 } 1192 1192 ··· 1196 1196 1197 1197 if (cur) 1198 1198 { 1199 - if (flag & (M_THREAD_COLLAPSE | M_THREAD_UNCOLLAPSE)) 1199 + if (flag & (MUTT_THREAD_COLLAPSE | MUTT_THREAD_UNCOLLAPSE)) 1200 1200 { 1201 1201 cur->pair = 0; /* force index entry's color to be re-evaluated */ 1202 - cur->collapsed = flag & M_THREAD_COLLAPSE; 1202 + cur->collapsed = flag & MUTT_THREAD_COLLAPSE; 1203 1203 if (!roothdr && CHECK_LIMIT) 1204 1204 { 1205 1205 roothdr = cur; 1206 - if (flag & M_THREAD_COLLAPSE) 1206 + if (flag & MUTT_THREAD_COLLAPSE) 1207 1207 final = roothdr->virtual; 1208 1208 } 1209 1209 1210 - if (reverse && (flag & M_THREAD_COLLAPSE) && (cur->msgno < minmsgno) && CHECK_LIMIT) 1210 + if (reverse && (flag & MUTT_THREAD_COLLAPSE) && (cur->msgno < minmsgno) && CHECK_LIMIT) 1211 1211 { 1212 1212 minmsgno = cur->msgno; 1213 1213 final = cur->virtual; 1214 1214 } 1215 1215 1216 - if (flag & M_THREAD_COLLAPSE) 1216 + if (flag & MUTT_THREAD_COLLAPSE) 1217 1217 { 1218 1218 if (cur != roothdr) 1219 1219 cur->virtual = -1; ··· 1266 1266 } 1267 1267 1268 1268 /* return value depends on action requested */ 1269 - if (flag & (M_THREAD_COLLAPSE | M_THREAD_UNCOLLAPSE)) 1269 + if (flag & (MUTT_THREAD_COLLAPSE | MUTT_THREAD_UNCOLLAPSE)) 1270 1270 return (final); 1271 - else if (flag & M_THREAD_UNREAD) 1271 + else if (flag & MUTT_THREAD_UNREAD) 1272 1272 return ((old && new) ? new : (old ? old : new)); 1273 - else if (flag & M_THREAD_GET_HIDDEN) 1273 + else if (flag & MUTT_THREAD_GET_HIDDEN) 1274 1274 return (num_hidden+1); 1275 - else if (flag & M_THREAD_NEXT_UNREAD) 1275 + else if (flag & MUTT_THREAD_NEXT_UNREAD) 1276 1276 return (min_unread); 1277 1277 1278 1278 return (0); ··· 1407 1407 child->env->in_reply_to = mutt_new_list (); 1408 1408 child->env->in_reply_to->data = safe_strdup (parent->env->message_id); 1409 1409 1410 - mutt_set_flag (ctx, child, M_TAG, 0); 1410 + mutt_set_flag (ctx, child, MUTT_TAG, 0); 1411 1411 1412 1412 child->env->irt_changed = child->changed = 1; 1413 1413 return 1;