1 /*****************************************************************************/ 2 /* */ 3 /* (C) Copyright 1992-1997 Alberto Pasquale */ 4 /* */ 5 /* A L L R I G H T S R E S E R V E D */ 6 /* */ 7 /*****************************************************************************/ 8 /* */ 9 /* This source code is NOT in the public domain and it CANNOT be used or */ 10 /* distributed without written permission from the author. */ 11 /* */ 12 /*****************************************************************************/ 13 /* */ 14 /* How to contact the author: Alberto Pasquale of 2:332/504@fidonet */ 15 /* Viale Verdi 106 */ 16 /* 41100 Modena */ 17 /* Italy */ 18 /* */ 19 /*****************************************************************************/ 20 21 // ParseCfg.Hpp 22 23 #ifndef __PARSECFG_HPP_ 24 #define __PARSECFG_HPP_ 25 26 #include "export.hpp" 27 #include "parsetyp.hpp" 28 29 30 class Config { 31 32 private: 33 34 OUTBLK *cob; // current outblk 35 OUTBLK **ob; // pointer to first outblk 36 37 InpAll inpall; // inpblk default (from global section) 38 InpAll *cia; // current InpAll blk 39 InpNnc inpnnc; // inpblk default (from global section) 40 InpNnc *cin; // current InpNnc blk 41 42 InpLoc *cil; // current InpLoc blk 43 InpOut *cio; // current InpOut blk 44 CioThis ciothis; // current data for cio: pointers to tail of lists 45 46 InpncBlk **cib; // address of pointer to current inpblk 47 48 SegAll segall; // current "all" blk for Export. 49 SegAll *csa; 50 SegLoc *csl; // current "loc" blk for Export. 51 52 int cs; // cfg parsing status 53 54 time_t maxtime; // max time of cfg files 55 56 void ParseCfg (pcsz filename); 57 58 public: 59 Config (); 60 61 time_t parse (pcsz filename); // returns max time of cfg files 62 }; 63 64 65 int GetUserFlags (const char *p, word *flags); 66 67 // Adds to *flags the user defined flags specified in p. 68 // Other bits of *flags are NOT changed: it's up to you to correctly 69 // initialize *flags ! 70 // Returns 0 on success; in case of invalid flags -1 is returned. 71 72 #endif 73