File: flagmaint.h

package info (click to toggle)
alpine 2.11%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 32,876 kB
  • ctags: 26,747
  • sloc: ansic: 316,152; tcl: 26,277; sh: 11,228; makefile: 1,885; perl: 189; xml: 93; exp: 69; csh: 48; sed: 16
file content (55 lines) | stat: -rw-r--r-- 1,506 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
 * $Id: flagmaint.h 807 2007-11-09 01:21:33Z hubert@u.washington.edu $
 *
 * ========================================================================
 * Copyright 2006-2007 University of Washington
 * Copyright 2013 Eduardo Chappa
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * ========================================================================
 */

#ifndef PINE_FLAGMAINT_INCLUDED
#define PINE_FLAGMAINT_INCLUDED


#include "../pith/state.h"


/*
 * Structures to control flag maintenance screen
 */
struct flag_table {
    char     *name;		/* flag's name or keyword's nickname */
    HelpType  help;		/* help text */
    long      flag;		/* flag tag (i.e., F_DEL ) */
    unsigned  set:2;		/* its state (set, unset, unknown) */
    unsigned  ukn:1;		/* allow unknown state */
    char     *keyword;		/* only for user-defined, could be same as name */
    char     *comment;		/* comment about the name, keyword name if there is a nick */
};


struct flag_screen {
    char	      **explanation;
    struct flag_table **flag_table;
};

/*
 * Some defs to help keep flag setting straight...
 */
#define	CMD_FLAG_CLEAR	FALSE
#define	CMD_FLAG_SET	TRUE
#define	CMD_FLAG_UNKN	2


/* exported protoypes */
int	flag_maintenance_screen(struct pine *, struct flag_screen *);


#endif /* PINE_FLAGMAINT_INCLUDED */