The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/include/configfile.h

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    1 /*      configfile.h - Generic configuration file format.
    2  *                                                      Author: Kees J. Bot
    3  *                                                              5 Jun 1999
    4  */
    5 #ifndef _CONFIGFILE_H
    6 #define _CONFIGFILE_H
    7 
    8 /* Data can only be modified inside the library. */
    9 #ifndef _c
   10 #define _c      const
   11 #endif
   12 
   13 typedef _c struct config {      /* Contents of a generic configuration file. */
   14 _c      struct config   *next;          /* Next configuration file thing. */
   15 _c      struct config   *list;          /* For a { sublist }. */
   16         const char      *file;          /* File and line where this is found. */
   17         unsigned        line;
   18         int             flags;          /* Special flags. */
   19         char            word[1];        /* Payload. */
   20 } config_t;
   21 
   22 #define CFG_CLONG       0x0001          /* strtol(word, &end, 0) is valid. */
   23 #define CFG_OLONG       0x0002          /* strtol(word, &end, 010). */
   24 #define CFG_DLONG       0x0004          /* strtol(word, &end, 10). */
   25 #define CFG_XLONG       0x0008          /* strtol(word, &end, 0x10). */
   26 #define CFG_CULONG      0x0010          /* strtoul(word, &end, 0). */
   27 #define CFG_OULONG      0x0020          /* strtoul(word, &end, 010). */
   28 #define CFG_DULONG      0x0040          /* strtoul(word, &end, 10). */
   29 #define CFG_XULONG      0x0080          /* strtoul(word, &end, 0x10). */
   30 #define CFG_STRING      0x0100          /* The word is enclosed in quotes. */
   31 #define CFG_SUBLIST     0x0200          /* This is a sublist, so no word. */
   32 #define CFG_ESCAPED     0x0400          /* Escapes are still marked with \. */
   33 
   34 config_t *config_read(const char *_file, int flags, config_t *_cfg);
   35 void config_delete(config_t *_cfg);
   36 int config_renewed(config_t *_cfg);
   37 size_t config_length(config_t *_cfg);
   38 #define config_issub(cfg)       (!!((cfg)->flags & CFG_SUBLIST))
   39 #define config_isatom(cfg)      (!config_issub(cfg))
   40 #define config_isstring(cfg)    (!!((cfg)->flags & CFG_STRING))
   41 
   42 #undef _c
   43 
   44 #endif /* _CONFIGFILE_H */

Cache object: bb1f2aa2b654283798a7d85d50b3fab1


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.