~ubuntu-branches/ubuntu/saucy/nut/saucy

« back to all changes in this revision

Viewing changes to include/parseconf.h

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2005-07-20 19:48:50 UTC
  • mto: (16.1.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20050720194850-oo61wjr33rrx2mre
Tags: upstream-2.0.2
ImportĀ upstreamĀ versionĀ 2.0.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#ifndef PARSECONF_H_SEEN
21
21
#define PARSECONF_H_SEEN 1
22
22
 
 
23
#ifdef __cplusplus
 
24
extern "C" {
 
25
#endif
 
26
 
23
27
#define PCONF_CTX_MAGIC 0x00726630
24
28
#define PCONF_ERR_LEN 256
25
29
 
33
37
        int     ch;                     /* last character read          */
34
38
        
35
39
        char    **arglist;              /* array of pointers to words   */
36
 
        int     *argsize;               /* list of sizes for realloc    */
37
 
        int     numargs;                /* max usable in arglist        */
38
 
        int     maxargs;                /* for reallocing arglist       */
 
40
        size_t  *argsize;               /* list of sizes for realloc    */
 
41
        size_t  numargs;                /* max usable in arglist        */
 
42
        size_t  maxargs;                /* for reallocing arglist       */
39
43
 
40
44
        char    *wordbuf;               /* accumulator for current word */
41
45
        char    *wordptr;               /* where next char goes in word */
42
 
        int     wordbufsize;            /* for reallocing wordbuf       */
 
46
        size_t  wordbufsize;            /* for reallocing wordbuf       */
43
47
 
44
48
        int     linenum;                /* for good error reporting     */
45
49
        int     error;                  /* set when an error occurred   */
50
54
        int     magic;                  /* buffer validity check        */
51
55
 
52
56
        /* these may be redefined by the caller to customize memory use */
53
 
        int     arg_limit;              /* halts growth of arglist      */
54
 
        int     wordlen_limit;          /* halts growth of any wordbuf  */
 
57
        size_t  arg_limit;              /* halts growth of arglist      */
 
58
        size_t  wordlen_limit;          /* halts growth of any wordbuf  */
55
59
 
56
60
}       PCONF_CTX;
57
61
 
64
68
char *pconf_encode(const char *src, char *dest, size_t destsize);
65
69
int pconf_char(PCONF_CTX *ctx, char ch);
66
70
 
 
71
#ifdef __cplusplus
 
72
}
 
73
#endif
 
74
 
67
75
#endif  /* PARSECONF_H_SEEN */