2
* $Id: conftype.h 394 2007-01-25 20:29:45Z hubert@u.washington.edu $
4
* ========================================================================
5
* Copyright 2006 University of Washington
7
* Licensed under the Apache License, Version 2.0 (the "License");
8
* you may not use this file except in compliance with the License.
9
* You may obtain a copy of the License at
11
* http://www.apache.org/licenses/LICENSE-2.0
13
* ========================================================================
16
#ifndef PITH_CONFTYPE_INCLUDED
17
#define PITH_CONFTYPE_INCLUDED
20
#include "../pith/helptext.h"
21
#include "../pith/remtype.h"
24
typedef enum {Sapling, Seedling, Seasoned} FeatureLevel;
28
* The array is initialized in init.c so the order of that initialization
29
* must correspond to the order of the values here. The order is
30
* significant in that it determines the order that the variables
31
* are written into the pinerc file and the order they show up in in the
34
typedef enum { V_PERSONAL_NAME = 0
43
, V_DEFAULT_SAVE_FOLDER
45
, V_READ_MESSAGE_FOLDER
57
, V_SAVED_MSG_NAME_RULE
67
, V_THREAD_INDEX_STYLE
70
, V_THREAD_LASTREPLY_CHAR
80
, V_QUOTE_REPLACE_STRING
83
, V_USE_ONLY_DOMAIN_NAME
91
, V_FORCED_ABOOK_ENTRY
92
, V_KBLOCK_PASSWD_COUNT
103
, V_ACTIVE_MSG_INTERVAL
112
, V_UPLOAD_CMD_PREFIX
114
, V_DOWNLOAD_CMD_PREFIX
124
#if !defined(DOS) && !defined(OS2) && !defined(LEAVEOUTFIFO)
129
* Starting here, the rest of the variables are hidden by default in config
130
* screen. They are exposed with expose-hidden-config feature.
139
, V_LAST_TIME_PRUNE_QUESTION
145
, V_DEBUGMEM /* obsolete */
149
, V_TCPWRITEWARNTIMEO
160
, V_REMOTE_ABOOK_METADATA
161
, V_REMOTE_ABOOK_HISTORY
162
, V_REMOTE_ABOOK_VALIDITY
164
, V_PERSONAL_PRINT_COMMAND
165
, V_PERSONAL_PRINT_CATEGORY
166
, V_PATTERNS /* obsolete */
169
, V_PAT_FILTS_OLD /* obsolete */
171
, V_PAT_SCORES_OLD /* obsolete */
174
, V_ELM_STYLE_SAVE /* obsolete */
175
, V_HEADER_IN_REPLY /* obsolete */
176
, V_FEATURE_LEVEL /* obsolete */
177
, V_OLD_STYLE_REPLY /* obsolete */
178
, V_COMPOSE_MIME /* obsolete */
179
, V_SHOW_ALL_CHARACTERS /* obsolete */
180
, V_SAVE_BY_SENDER /* obsolete */
181
#if defined(DOS) || defined(OS2)
188
, V_INDEX_COLOR_STYLE
189
, V_TITLEBAR_COLOR_STYLE
196
, V_TITLECLOSED_FORE_COLOR
197
, V_TITLECLOSED_BACK_COLOR
198
, V_STATUS_FORE_COLOR
199
, V_STATUS_BACK_COLOR
200
, V_KEYLABEL_FORE_COLOR
201
, V_KEYLABEL_BACK_COLOR
202
, V_KEYNAME_FORE_COLOR
203
, V_KEYNAME_BACK_COLOR
204
, V_SLCTBL_FORE_COLOR
205
, V_SLCTBL_BACK_COLOR
206
, V_QUOTE1_FORE_COLOR
207
, V_QUOTE1_BACK_COLOR
208
, V_QUOTE2_FORE_COLOR
209
, V_QUOTE2_BACK_COLOR
210
, V_QUOTE3_FORE_COLOR
211
, V_QUOTE3_BACK_COLOR
212
, V_SIGNATURE_FORE_COLOR
213
, V_SIGNATURE_BACK_COLOR
214
, V_PROMPT_FORE_COLOR
215
, V_PROMPT_BACK_COLOR
216
, V_IND_PLUS_FORE_COLOR
217
, V_IND_PLUS_BACK_COLOR
218
, V_IND_IMP_FORE_COLOR
219
, V_IND_IMP_BACK_COLOR
220
, V_IND_DEL_FORE_COLOR
221
, V_IND_DEL_BACK_COLOR
222
, V_IND_ANS_FORE_COLOR
223
, V_IND_ANS_BACK_COLOR
224
, V_IND_NEW_FORE_COLOR
225
, V_IND_NEW_BACK_COLOR
226
, V_IND_REC_FORE_COLOR
227
, V_IND_REC_BACK_COLOR
228
, V_IND_UNS_FORE_COLOR
229
, V_IND_UNS_BACK_COLOR
230
, V_IND_ARR_FORE_COLOR
231
, V_IND_ARR_BACK_COLOR
232
, V_IND_OP_FORE_COLOR
233
, V_IND_OP_BACK_COLOR
236
#if defined(DOS) || defined(OS2)
245
, V_PRINT_FONT_CHAR_SET
251
, V_LDAP_SERVERS /* should be last so make will work right */
261
#define V_LAST_VAR (V_DUMMY - 1)
265
* The list of feature numbers (which bit goes with which feature).
266
* The order of the features is not significant.
272
F_ENABLE_TAB_COMPLETE,
289
F_READ_IN_NEWSRC_ORDER,
291
F_SAVE_PARTIAL_WO_CONFIRM,
292
F_NEXT_THRD_WO_CONFIRM,
297
F_UNSELECT_WONT_ADVANCE,
304
F_AUTO_OPEN_NEXT_UNREAD,
305
F_SELECTED_SHOWN_BOLD,
307
F_AUTO_INCLUDE_IN_REPLY,
308
F_DISABLE_CONFIG_SCREEN,
309
F_DISABLE_PASSWORD_CACHING,
310
F_DISABLE_PASSWORD_CMD,
311
F_DISABLE_UPDATE_CMD,
312
F_DISABLE_KBLOCK_CMD,
313
F_DISABLE_SIGEDIT_CMD,
314
F_DISABLE_ROLES_SETUP,
315
F_DISABLE_ROLES_SIGEDIT,
316
F_DISABLE_ROLES_TEMPLEDIT,
317
F_DISABLE_PIPES_IN_SIGS,
318
F_DISABLE_PIPES_IN_TEMPLATES,
319
F_ATTACHMENTS_IN_REPLY,
321
F_ENABLE_INCOMING_UNSEEN,
322
F_NO_NEWS_VALIDATION,
323
F_QUELL_EXTRA_POST_PROMPT,
324
F_DISABLE_TAKE_LASTFIRST,
325
F_DISABLE_TAKE_FULLNAMES,
326
F_DISABLE_TERM_RESET_DISP,
329
F_QUELL_LOCAL_LOOKUP,
330
F_COMPOSE_TO_NEWSGRP,
331
F_PRESERVE_START_STOP,
332
F_COMPOSE_REJECTS_UNQUAL,
340
F_PASS_CONTROL_CHARS,
341
F_PASS_C1_CONTROL_CHARS,
342
F_SINGLE_FOLDER_LIST,
343
F_VERTICAL_FOLDER_LIST,
359
F_ENABLE_DOT_FOLDERS,
360
F_FIRST_SEND_FILTER_DFLT,
361
F_ALWAYS_LAST_FLDR_DFLT,
364
F_WARN_ABOUT_NO_SUBJECT,
365
F_WARN_ABOUT_NO_TO_OR_CC,
368
F_QUELL_LOCK_FAILURE_MSGS,
369
F_ENABLE_SPACE_AS_TAB,
370
F_ENABLE_TAB_DELETES,
371
F_FLAG_SCREEN_KW_SHORTCUT,
373
F_ENABLE_XTERM_NEWMAIL,
374
F_ENABLE_NEWMAIL_SHORT_TEXT,
375
F_EXPANDED_DISTLISTS,
378
F_DISABLE_SETLOCALE_COLLATE,
379
F_FROM_DELIM_IN_PRINT,
383
F_ENABLE_SEARCH_AND_REPL,
388
F_ENABLE_STRIP_SIGDASHES,
389
F_QUELL_PARTIAL_FETCH,
390
F_QUELL_PERSONAL_NAME_PROMPT,
391
F_QUELL_USER_ID_PROMPT,
398
F_QUELL_CHARSET_WARNING,
399
F_ENABLE_EDIT_REPLY_INDENT,
401
F_ALLOW_CHANGING_FROM,
403
F_ENABLE_LESSTHAN_EXIT,
404
F_ENABLE_FAST_RECENT,
407
F_ENABLE_TAKE_EXPORT,
408
F_QUELL_ATTACH_EXTRA_PROMPT,
409
F_QUELL_ATTACH_EXT_WARN,
411
F_QUELL_FILTER_DONE_MSG,
415
F_PREDICT_NNTP_SERVER,
418
F_QUELL_INTERNAL_MSG,
421
F_SEPARATE_FLDR_AS_DIR,
425
F_EXPANDED_ADDRBOOKS,
428
F_SHOW_TEXTPLAIN_INT,
429
F_ROLE_CONFIRM_DEFAULT,
431
F_RET_INBOX_NO_CONFIRM,
437
F_DO_MAILCAP_PARAM_SUBST,
439
F_SLCTBL_ITEM_NOBOLD,
440
F_QUELL_PINGS_COMPOSING,
441
F_QUELL_PINGS_COMPOSING_INBOX,
442
F_QUELL_BEZERK_TIMEZONE,
444
F_QUELL_MAILDOMAIN_WARNING,
445
F_DISABLE_SHARED_NAMESPACES,
447
F_MAILDROPS_PRESERVE_STATE,
448
F_EXPOSE_HIDDEN_CONFIG,
451
F_ALWAYS_SPELL_CHECK,
453
F_COLOR_LINE_IMPORTANT,
455
F_ENABLE_FULL_HDR_AND_TEXT,
456
F_QUELL_FULL_HDR_RESET,
458
F_MULNEWSRC_HOSTNAMES_AS_TYPED,
459
F_STRIP_WS_BEFORE_SEND,
461
F_COMPOSE_ALWAYS_DOWNGRADE,
462
F_SORT_DEFAULT_FCC_ALPHA,
463
F_SORT_DEFAULT_SAVE_ALPHA,
464
F_QUOTE_REPLACE_NOFLOW,
466
F_SEND_CONFIRM_ON_EXPAND,
467
F_ENABLE_NEWMAIL_SOUND,
472
F_QUELL_SSL_LARGEBLOCKS,
473
F_STORE_WINPOS_IN_CONFIG,
478
F_FEATURE_LIST_COUNT /* Number of features */
482
typedef struct init_err {
483
int flags, min_time, max_time;
490
unsigned is_obsolete:1; /* variable read in, not written unless set */
491
unsigned is_used:1; /* Some variables are disabled */
492
unsigned been_written:1;
494
unsigned is_global:1;
495
unsigned is_list:1; /* flag indicating variable is a list */
496
unsigned is_fixed:1; /* sys mgr has fixed this variable */
497
unsigned is_onlymain:1; /* read and written from main_user_val */
498
unsigned is_outermost:1; /* read and written from outermost pinerc */
499
unsigned del_quotes:1; /* remove double quotes */
500
unsigned is_changed_val:1; /* WP: use the changed val instead of cur val */
501
char *descrip; /* description */
503
char *p; /* pointer to single string value */
504
char **l; /* pointer to list of string values */
507
char *p; /* pointer to single string value */
508
char **l; /* pointer to list of string values */
509
} main_user_val; /* from pinerc */
511
char *p; /* pointer to single string value */
512
char **l; /* pointer to list of string values */
513
} changed_val; /* currently different from pinerc */
515
char *p; /* pointer to single string value */
516
char **l; /* pointer to list of string values */
517
} post_user_val; /* from pinerc */
519
char *p; /* pointer to single string value */
520
char **l; /* pointer to list of string values */
521
} global_val; /* from default or pine.conf */
523
char *p; /* pointer to single string value */
524
char **l; /* pointer to list of string values */
525
} fixed_val; /* fixed value assigned in pine.conf.fixed */
527
char *p; /* pointer to single string value */
528
char **l; /* pointer to list of string values */
529
} cmdline_val; /* user typed as cmdline arg */
533
typedef struct feature_entry {
541
typedef struct pinerc_line {
543
struct variable *var;
544
unsigned int is_var:1;
545
unsigned int is_quoted:1;
546
unsigned int obsolete_var:1;
551
* Each pinerc has one of these.
553
typedef struct pinerc_s {
554
RemType type; /* type of pinerc, remote or local */
555
char *name; /* file name or remote name */
556
REMDATA_S *rd; /* remote data structure */
557
time_t pinerc_written;
559
unsigned outstanding_pinerc_changes:1;
560
unsigned quit_to_edit:1;
561
PINERC_LINE *pinerc_lines;
565
typedef enum {ParsePers, ParsePersPost, ParseGlobal, ParseFixed} ParsePinerc;
568
/* data stored in a line in the metadata file */
569
typedef struct remote_data_meta {
570
char *local_cache_file;
571
imapuid_t uidvalidity;
575
char read_status; /* 'R' for readonly, 'W' for readwrite */
581
* Generic name/value pair structure
583
typedef struct nameval {
584
char *name; /* the name that goes on the screen */
585
char *shortname; /* if non-NULL, name that goes in config file */
586
int value; /* the internal bit number */
590
typedef enum {Main, Post, None} EditWhich;
593
/* exported protoypes */
596
#endif /* PITH_CONFTYPE_INCLUDED */