1 /** 2 * @file 3 * Hundreds of global variables to back the user variables 4 * 5 * @authors 6 * Copyright (C) 1996-2002,2010,2016 Michael R. Elkins <me@mutt.org> 7 * 8 * @copyright 9 * This program is free software: you can redistribute it and/or modify it under 10 * the terms of the GNU General Public License as published by the Free Software 11 * Foundation, either version 2 of the License, or (at your option) any later 12 * version. 13 * 14 * This program is distributed in the hope that it will be useful, but WITHOUT 15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 16 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 17 * details. 18 * 19 * You should have received a copy of the GNU General Public License along with 20 * this program. If not, see <http://www.gnu.org/licenses/>. 21 */ 22 23 /** 24 * @page neo_mutt_globals Global variables 25 * 26 * Global variables 27 */ 28 29 #ifndef MUTT_GLOBALS_H 30 #define MUTT_GLOBALS_H 31 32 #include "config.h" 33 #include <signal.h> // IWYU pragma: keep 34 #include <stdbool.h> 35 #include "mutt/lib.h" 36 #include "menu/lib.h" 37 #include "where.h" 38 39 #ifdef MAIN_C 40 /* so that global vars get included */ 41 #include "mx.h" 42 #include "sort.h" 43 #include "ncrypt/lib.h" 44 #endif /* MAIN_C */ 45 46 WHERE struct Context *Context; 47 48 WHERE bool ErrorBufMessage; ///< true if the last message was an error 49 WHERE char ErrorBuf[256]; ///< Copy of the last error message 50 51 WHERE char *HomeDir; ///< User's home directory 52 WHERE char *ShortHostname; ///< Short version of the hostname 53 54 WHERE char *Username; ///< User's login name 55 56 WHERE char *CurrentFolder; ///< Currently selected mailbox 57 WHERE char *LastFolder; ///< Previously selected mailbox 58 59 extern const char *GitVer; 60 61 WHERE struct HashTable *TagFormats; ///< Hash Table of tag-formats (tag -> format string) 62 63 /* Lists of strings */ 64 WHERE struct ListHead AlternativeOrderList INITVAL(STAILQ_HEAD_INITIALIZER(AlternativeOrderList)); ///< List of preferred mime types to display 65 WHERE struct ListHead AutoViewList INITVAL(STAILQ_HEAD_INITIALIZER(AutoViewList)); ///< List of mime types to auto view 66 WHERE struct ListHead HeaderOrderList INITVAL(STAILQ_HEAD_INITIALIZER(HeaderOrderList)); ///< List of header fields in the order they should be displayed 67 WHERE struct ListHead MimeLookupList INITVAL(STAILQ_HEAD_INITIALIZER(MimeLookupList)); ///< List of mime types that that shouldn't use the mailcap entry 68 WHERE struct ListHead Muttrc INITVAL(STAILQ_HEAD_INITIALIZER(Muttrc)); ///< List of config files to read 69 WHERE struct ListHead TempAttachmentsList INITVAL(STAILQ_HEAD_INITIALIZER(TempAttachmentsList)); ///< List of temporary files for displaying attachments 70 WHERE struct ListHead UserHeader INITVAL(STAILQ_HEAD_INITIALIZER(UserHeader)); ///< List of custom headers to add to outgoing emails 71 72 /* flags for received signals */ 73 WHERE SIG_ATOMIC_VOLATILE_T SigInt; ///< true after SIGINT is received 74 WHERE SIG_ATOMIC_VOLATILE_T SigWinch; ///< true after SIGWINCH is received 75 76 WHERE enum MenuType CurrentMenu; ///< Current Menu, e.g. #MENU_PAGER 77 78 #endif /* MUTT_GLOBALS_H */ 79