1 /** 2 * @file 3 * Many unsorted constants and some structs 4 * 5 * @authors 6 * Copyright (C) 1996-2002,2010,2013 Michael R. Elkins <me@mutt.org> 7 * Copyright (C) 2004 g10 Code GmbH 8 * 9 * @copyright 10 * This program is free software: you can redistribute it and/or modify it under 11 * the terms of the GNU General Public License as published by the Free Software 12 * Foundation, either version 2 of the License, or (at your option) any later 13 * version. 14 * 15 * This program is distributed in the hope that it will be useful, but WITHOUT 16 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 17 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 18 * details. 19 * 20 * You should have received a copy of the GNU General Public License along with 21 * this program. If not, see <http://www.gnu.org/licenses/>. 22 */ 23 24 #ifndef MUTT_MUTT_H 25 #define MUTT_MUTT_H 26 27 #include "config.h" 28 #include <limits.h> 29 #include <stdint.h> 30 31 /* On OS X 10.5.x, wide char functions are inlined by default breaking 32 * --without-wc-funcs compilation 33 */ 34 #ifdef __APPLE_CC__ 35 #define _DONT_USE_CTYPE_INLINE_ 36 #endif 37 38 /* PATH_MAX is undefined on the hurd */ 39 #ifndef PATH_MAX 40 #define PATH_MAX 4096 41 #endif 42 43 #ifdef HAVE_FGETS_UNLOCKED 44 #define fgets fgets_unlocked 45 #endif 46 47 #ifdef HAVE_FGETC_UNLOCKED 48 #define fgetc fgetc_unlocked 49 #endif 50 51 typedef uint16_t CompletionFlags; ///< Flags for mutt_enter_string_full(), e.g. #MUTT_ALIAS 52 #define MUTT_COMP_NO_FLAGS 0 ///< No flags are set 53 #define MUTT_ALIAS (1 << 0) ///< Do alias "completion" by calling up the alias-menu 54 #define MUTT_FILE (1 << 1) ///< Do file completion 55 #define MUTT_EFILE (1 << 2) ///< Do file completion, plus incoming folders 56 #define MUTT_CMD (1 << 3) ///< Do completion on previous word 57 #define MUTT_PASS (1 << 4) ///< Password mode (no echo) 58 #define MUTT_CLEAR (1 << 5) ///< Clear input if printable character is pressed 59 #define MUTT_COMMAND (1 << 6) ///< Do command completion 60 #define MUTT_PATTERN (1 << 7) ///< Pattern mode - only used for history classes 61 #define MUTT_LABEL (1 << 8) ///< Do label completion 62 #define MUTT_NM_QUERY (1 << 9) ///< Notmuch query mode. 63 #define MUTT_NM_TAG (1 << 10) ///< Notmuch tag +/- mode. 64 65 typedef uint16_t TokenFlags; ///< Flags for mutt_extract_token(), e.g. #MUTT_TOKEN_EQUAL 66 #define MUTT_TOKEN_NO_FLAGS 0 ///< No flags are set 67 #define MUTT_TOKEN_EQUAL (1 << 0) ///< Treat '=' as a special 68 #define MUTT_TOKEN_CONDENSE (1 << 1) ///< ^(char) to control chars (macros) 69 #define MUTT_TOKEN_SPACE (1 << 2) ///< Don't treat whitespace as a term 70 #define MUTT_TOKEN_QUOTE (1 << 3) ///< Don't interpret quotes 71 #define MUTT_TOKEN_PATTERN (1 << 4) ///< ~%=!| are terms (for patterns) 72 #define MUTT_TOKEN_COMMENT (1 << 5) ///< Don't reap comments 73 #define MUTT_TOKEN_SEMICOLON (1 << 6) ///< Don't treat ; as special 74 #define MUTT_TOKEN_BACKTICK_VARS (1 << 7) ///< Expand variables within backticks 75 #define MUTT_TOKEN_NOSHELL (1 << 8) ///< Don't expand environment variables 76 #define MUTT_TOKEN_QUESTION (1 << 9) ///< Treat '?' as a special 77 #define MUTT_TOKEN_PLUS (1 << 10) ///< Treat '+' as a special 78 #define MUTT_TOKEN_MINUS (1 << 11) ///< Treat '-' as a special 79 80 /** 81 * enum MessageType - To set flags or match patterns 82 * 83 * @sa mutt_set_flag(), mutt_pattern_func() 84 */ 85 enum MessageType 86 { 87 MUTT_ALL = 1, ///< All messages 88 MUTT_NONE, ///< No messages 89 MUTT_NEW, ///< New messages 90 MUTT_OLD, ///< Old messages 91 MUTT_REPLIED, ///< Messages that have been replied to 92 MUTT_READ, ///< Messages that have been read 93 MUTT_UNREAD, ///< Unread messages 94 MUTT_DELETE, ///< Messages to be deleted 95 MUTT_UNDELETE, ///< Messages to be un-deleted 96 MUTT_PURGE, ///< Messages to be purged (bypass trash) 97 MUTT_DELETED, ///< Deleted messages 98 MUTT_FLAG, ///< Flagged messages 99 MUTT_TAG, ///< Tagged messages 100 MUTT_UNTAG, ///< Messages to be un-tagged 101 MUTT_LIMIT, ///< Messages in limited view 102 MUTT_EXPIRED, ///< Expired messages 103 MUTT_SUPERSEDED, ///< Superseded messages 104 MUTT_TRASH, ///< Trashed messages 105 106 MUTT_MT_MAX, 107 }; 108 109 /* flags for parse_spam_list */ 110 #define MUTT_SPAM 1 111 #define MUTT_NOSPAM 2 112 113 void reset_value(const char *name); 114 115 #endif /* MUTT_MUTT_H */ 116