NeoMutt  2020-11-20
Teaching an old dog new tricks
DOXYGEN
config.c File Reference

Config used by libhistory. More...

#include "config.h"
#include <stddef.h>
#include <config/lib.h>
#include <stdbool.h>
#include "mutt/lib.h"
#include "lib.h"
+ Include dependency graph for config.c:

Go to the source code of this file.

Functions

bool config_init_history (struct ConfigSet *cs)
 Register history config variables - Implements module_init_config_t. More...
 

Variables

short C_History
 Config: Number of history entries to keep in memory per category. More...
 
char * C_HistoryFile = NULL
 Config: File to save history in. More...
 
bool C_HistoryRemoveDups
 Config: Remove duplicate entries from the history. More...
 
short C_SaveHistory
 Config: Number of history entries to save per category. More...
 
struct ConfigDef HistoryVars []
 

Detailed Description

Config used by libhistory.

Authors
  • Richard Russon

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file config.c.

Function Documentation

◆ config_init_history()

bool config_init_history ( struct ConfigSet cs)

Register history config variables - Implements module_init_config_t.

Definition at line 64 of file config.c.

65 {
66  return cs_register_variables(cs, HistoryVars, 0);
67 }
struct ConfigDef HistoryVars[]
Definition: config.c:43
bool cs_register_variables(const struct ConfigSet *cs, struct ConfigDef vars[], int flags)
Register a set of config items.
Definition: set.c:286
+ Here is the call graph for this function:

Variable Documentation

◆ C_History

short C_History

Config: Number of history entries to keep in memory per category.

Definition at line 37 of file config.c.

◆ C_HistoryFile

char* C_HistoryFile = NULL

Config: File to save history in.

Definition at line 38 of file config.c.

◆ C_HistoryRemoveDups

bool C_HistoryRemoveDups

Config: Remove duplicate entries from the history.

Definition at line 39 of file config.c.

◆ C_SaveHistory

short C_SaveHistory

Config: Number of history entries to save per category.

Definition at line 40 of file config.c.

◆ HistoryVars

struct ConfigDef HistoryVars[]
Initial value:
= {
{ "history", DT_NUMBER|DT_NOT_NEGATIVE, &C_History, 10, 0, NULL,
"Number of history entries to keep in memory per category"
},
{ "history_file", DT_PATH|DT_PATH_FILE, &C_HistoryFile, IP "~/.mutthistory", 0, NULL,
"File to save history in"
},
{ "history_remove_dups", DT_BOOL, &C_HistoryRemoveDups, false, 0, NULL,
"Remove duplicate entries from the history"
},
{ "save_history", DT_NUMBER|DT_NOT_NEGATIVE, &C_SaveHistory, 0, 0, NULL,
"Number of history entries to save per category"
},
{ NULL, 0, NULL, 0, 0, NULL, NULL },
}
#define IP
Definition: set.h:54
#define DT_NOT_NEGATIVE
Negative numbers are not allowed.
Definition: types.h:47
#define DT_PATH_FILE
Path is a file.
Definition: types.h:54
short C_History
Config: Number of history entries to keep in memory per category.
Definition: config.c:37
#define DT_PATH
a path to a file/directory
Definition: types.h:36
short C_SaveHistory
Config: Number of history entries to save per category.
Definition: config.c:40
char * C_HistoryFile
Config: File to save history in.
Definition: config.c:38
bool C_HistoryRemoveDups
Config: Remove duplicate entries from the history.
Definition: config.c:39
#define DT_NUMBER
a number
Definition: types.h:35
#define DT_BOOL
boolean option
Definition: types.h:30

Definition at line 43 of file config.c.