File: paramreader.h

package info (click to toggle)
craft 3.5-10
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 18,000 kB
  • ctags: 1,602
  • sloc: cpp: 3,794; makefile: 2,319; ansic: 857; sh: 385
file content (72 lines) | stat: -rw-r--r-- 2,601 bytes parent folder | download | duplicates (4)
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*======================================================================*/
/*= CHANGES AND UPDATES                                                =*/
/*======================================================================*/
/*= date   person file           subject                               =*/
/*=--------------------------------------------------------------------=*/
/*=                                                                    =*/
/*= 121192 hua    paramreader.h  add include of string.h               =*/
/*=                                                                    =*/
/*= 181192 smieja paramreader.h  increased param limit                 =*/
/*=                                                                    =*/
/*======================================================================*/

#ifndef paramreader_h
#define paramreader_h

/*======================================================================*/
/*                                                                      */
/* Includes                                                             */
/*                                                                      */
/*======================================================================*/

#include "stdlib.h"
#include "stdio.h"
#include "limits.h"
#include "float.h"
#include "math.h"
#include "ctype.h"
#include "string.h"

#include "bool.h"
#include "xmath.h"
#include "io.h"
#include "errorhandling.h"

/*----------------------------------------------------------------------*/
/* check params functions                                               */
/*----------------------------------------------------------------------*/

void check_params (int num);

/*----------------------------------------------------------------------*/
/* CLASS paramreader (deklarations)                                     */
/*----------------------------------------------------------------------*/

#define max_includes     4
#define max_params       1000
#define max_param_length 80

class paramreader
  {public:

     char name  [max_params][max_param_length];
     char value [max_params][max_param_length];
     int  num_params;
     FILE *f    [max_includes];
     int  num_includes;


          paramreader (char *param_file_name);

   void   dump       ();
   char * s_param    (char name []);
   double d_param    (char name []);
   int    i_param    (char name []);
   int    param_no   (char name []);
   void   set        (char name [], char value []);
   void   read_sym   (char sym  [], bool &is_eof);
   int    max_i_name ();

  };

#endif