comparison sip-in/readconf.c @ 90:736c2d68595f

sip-in/readconf.c: second step toward non-trivial settings
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 23 Sep 2022 18:53:35 -0800
parents e64d4d44025d
children fd23e2747b45
comparison
equal deleted inserted replaced
89:e64d4d44025d 90:736c2d68595f
49 if (*cp != '\0' && *cp != '#') 49 if (*cp != '\0' && *cp != '#')
50 goto inv_syntax; 50 goto inv_syntax;
51 } 51 }
52 52
53 static void 53 static void
54 handle_ip(st, kw, var, arg) 54 handle_ip(st, kw, arg, var)
55 struct parse_state *st; 55 struct parse_state *st;
56 char *kw, *arg; 56 char *kw, *arg;
57 struct in_addr *var; 57 struct in_addr *var;
58 { 58 {
59 require_one_arg(st, kw, arg); 59 require_one_arg(st, kw, arg);
65 exit(1); 65 exit(1);
66 } 66 }
67 } 67 }
68 68
69 static void 69 static void
70 handle_num(st, kw, var, arg) 70 handle_num(st, kw, arg, var)
71 struct parse_state *st; 71 struct parse_state *st;
72 char *kw, *arg; 72 char *kw, *arg;
73 unsigned *var; 73 unsigned *var;
74 { 74 {
75 char *endp; 75 char *endp;
82 exit(1); 82 exit(1);
83 } 83 }
84 } 84 }
85 85
86 static void 86 static void
87 handle_bool(st, kw, var, arg) 87 handle_bool(st, kw, arg, var)
88 struct parse_state *st; 88 struct parse_state *st;
89 char *kw, *arg; 89 char *kw, *arg;
90 int *var; 90 int *var;
91 { 91 {
92 require_one_arg(st, kw, arg); 92 require_one_arg(st, kw, arg);
149 config_file_pathname, st->lineno, kw); 149 config_file_pathname, st->lineno, kw);
150 exit(1); 150 exit(1);
151 } 151 }
152 while (isspace(*cp)) 152 while (isspace(*cp))
153 cp++; 153 cp++;
154 handler(st, kw, var, cp); 154 handler(st, kw, cp, var);
155 st->set_mask |= set_id; 155 st->set_mask |= set_id;
156 } 156 }
157 157
158 read_config_file() 158 read_config_file()
159 { 159 {