~ubuntu-branches/ubuntu/quantal/squidguard/quantal

« back to all changes in this revision

Viewing changes to src/y.tab.c.bison

  • Committer: Bazaar Package Importer
  • Author(s): Ivan E. Moore II
  • Date: 2003-08-27 21:57:00 UTC
  • Revision ID: james.westby@ubuntu.com-20030827215700-0vqt8khq21m3amul
Tags: 1.2.0-5
* PO Debconf patch applied (Closes: #201796)
* French translation added (Closes: #202331)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
2
/*  A Bison parser, made from sg.y
3
 
    by GNU Bison version 1.28  */
 
3
 by  GNU Bison version 1.25
 
4
  */
4
5
 
5
6
#define YYBISON 1  /* Identify Bison output.  */
6
7
 
7
 
#define WORD    257
8
 
#define END     258
9
 
#define START_BRACKET   259
10
 
#define STOP_BRACKET    260
11
 
#define WEEKDAY 261
12
 
#define DESTINATION     262
13
 
#define REWRITE 263
14
 
#define ACL     264
15
 
#define TIME    265
16
 
#define TVAL    266
17
 
#define DVAL    267
18
 
#define DVALCRON        268
19
 
#define SOURCE  269
20
 
#define CIDR    270
21
 
#define IPCLASS 271
22
 
#define CONTINUE        272
 
8
#define WORD    258
 
9
#define END     259
 
10
#define START_BRACKET   260
 
11
#define STOP_BRACKET    261
 
12
#define WEEKDAY 262
 
13
#define DESTINATION     263
 
14
#define REWRITE 264
 
15
#define ACL     265
 
16
#define TIME    266
 
17
#define TVAL    267
 
18
#define DVAL    268
 
19
#define DVALCRON        269
 
20
#define SOURCE  270
 
21
#define CIDR    271
 
22
#define IPCLASS 272
23
23
#define IPADDR  273
24
24
#define DBHOME  274
25
25
#define DOMAINLIST      275
29
29
#define DOMAIN  279
30
30
#define USER    280
31
31
#define USERLIST        281
32
 
#define USERQUOTA       282
33
 
#define IP      283
34
 
#define NL      284
35
 
#define NUMBER  285
36
 
#define PASS    286
37
 
#define REDIRECT        287
38
 
#define LOGDIR  288
39
 
#define SUBST   289
40
 
#define CHAR    290
41
 
#define MINUTELY        291
42
 
#define HOURLY  292
43
 
#define DAILY   293
44
 
#define WEEKLY  294
45
 
#define DATE    295
46
 
#define WITHIN  296
47
 
#define OUTSIDE 297
48
 
#define ELSE    298
49
 
#define LOGFILE 299
50
 
#define ANONYMOUS       300
51
 
#define CONTINIOUS      301
52
 
#define SPORADIC        302
 
32
#define IP      282
 
33
#define NL      283
 
34
#define PASS    284
 
35
#define REDIRECT        285
 
36
#define LOGDIR  286
 
37
#define SUBST   287
 
38
#define CHAR    288
 
39
#define WEEKLY  289
 
40
#define DATE    290
 
41
#define WITHIN  291
 
42
#define OUTSIDE 292
 
43
#define ELSE    293
 
44
#define LOGFILE 294
 
45
#define ANONYMOUS       295
53
46
 
54
47
#line 20 "sg.y"
55
48
 
92
85
 
93
86
extern char *globalLogDir; /* from main.c */
94
87
 
95
 
extern struct Source *lastActiveSource;
96
 
 
97
88
extern int globalDebugTimeDelta;
98
89
 
99
90
static int time_switch = 0;
102
93
int numSource = 0;
103
94
 
104
95
 
105
 
#line 71 "sg.y"
 
96
#line 69 "sg.y"
106
97
typedef union {
107
98
  char *string;
108
99
  char *tval;
120
111
 
121
112
 
122
113
 
123
 
#define YYFINAL         181
 
114
#define YYFINAL         173
124
115
#define YYFLAG          -32768
125
 
#define YYNTBASE        53
 
116
#define YYNTBASE        45
126
117
 
127
 
#define YYTRANSLATE(x) ((unsigned)(x) <= 302 ? yytranslate[x] : 101)
 
118
#define YYTRANSLATE(x) ((unsigned)(x) <= 295 ? yytranslate[x] : 93)
128
119
 
129
120
static const char yytranslate[] = {     0,
130
121
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
131
122
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
132
123
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
133
 
     2,     2,    52,     2,     2,     2,     2,     2,     2,     2,
134
 
     2,     2,     2,    51,    49,     2,     2,     2,     2,     2,
135
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
136
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
137
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
138
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
139
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
140
 
     2,     2,     2,     2,    50,     2,     2,     2,     2,     2,
141
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
142
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
143
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
144
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
145
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
146
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
147
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
148
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
149
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
150
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
151
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
152
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
153
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
154
 
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
155
 
     2,     2,     2,     2,     2,     1,     3,     4,     5,     6,
156
 
     7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
157
 
    17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
158
 
    27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
159
 
    37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
160
 
    47,    48
 
124
     2,     2,    44,     2,     2,     2,     2,     2,     2,     2,
 
125
     2,     2,     2,    43,    41,     2,     2,     2,     2,     2,
 
126
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
127
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
128
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
129
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
130
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
131
     2,     2,     2,     2,    42,     2,     2,     2,     2,     2,
 
132
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
133
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
134
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
135
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
136
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
137
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
138
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
139
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
140
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
141
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
142
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
143
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
144
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
145
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
 
146
     2,     2,     2,     2,     2,     1,     2,     3,     4,     5,
 
147
     6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
 
148
    16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
 
149
    26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
 
150
    36,    37,    38,    39,    40
161
151
};
162
152
 
163
153
#if YYDEBUG != 0
165
155
     0,     2,     5,     8,    10,    12,    15,    20,    21,    24,
166
156
    27,    30,    33,    36,    39,    43,    46,    49,    52,    55,
167
157
    58,    62,    65,    68,    73,    74,    77,    80,    83,    86,
168
 
    91,    96,   101,   106,   109,   112,   115,   118,   122,   125,
169
 
   127,   128,   131,   134,   135,   138,   141,   146,   147,   150,
170
 
   152,   156,   160,   165,   166,   176,   177,   180,   183,   186,
171
 
   189,   193,   196,   197,   200,   204,   207,   209,   211,   212,
172
 
   215,   219,   223,   228,   231,   233,   236,   241,   242,   245,
173
 
   247,   250,   253,   257,   260,   263,   268,   269,   272,   273,
174
 
   274,   280,   281,   282,   288,   289,   293,   294,   300,   304,
175
 
   307,   309,   314,   318,   321,   323,   325,   327,   329,   330,
176
 
   333,   335,   337,   339,   341,   343,   345,   347,   349
 
158
    89,    92,    95,    98,   102,   105,   106,   109,   112,   113,
 
159
   116,   119,   124,   125,   128,   130,   134,   138,   143,   144,
 
160
   154,   155,   158,   161,   164,   167,   171,   174,   175,   178,
 
161
   182,   185,   187,   189,   190,   193,   197,   201,   206,   209,
 
162
   211,   214,   219,   220,   223,   225,   228,   231,   235,   238,
 
163
   241,   246,   247,   250,   251,   252,   258,   259,   260,   266,
 
164
   267,   271,   272,   278,   282,   285,   287,   292,   296,   299,
 
165
   301,   303,   305,   307,   308,   311,   313,   315,   317,   319,
 
166
   321,   323,   325,   327
177
167
};
178
168
 
179
 
static const short yyrhs[] = {    99,
180
 
     0,    20,     3,     0,    34,     3,     0,     5,     0,     6,
181
 
     0,     8,     3,     0,    58,    56,    60,    57,     0,     0,
182
 
    60,    61,     0,    21,     3,     0,    21,    49,     0,    22,
183
 
     3,     0,    22,    49,     0,    23,    49,     0,    23,    50,
184
 
     3,     0,    23,     3,     0,    33,     3,     0,     9,     3,
185
 
     0,    42,     3,     0,    43,     3,     0,    45,    46,     3,
186
 
     0,    45,     3,     0,    15,     3,     0,    62,    56,    64,
187
 
    57,     0,     0,    64,    65,     0,    25,    66,     0,    26,
188
 
    67,     0,    27,     3,     0,    28,    31,    31,    38,     0,
189
 
    28,    31,    31,    39,     0,    28,    31,    31,    40,     0,
190
 
    28,    31,    31,    31,     0,    29,    78,     0,    24,     3,
191
 
     0,    42,     3,     0,    43,     3,     0,    45,    46,     3,
192
 
     0,    45,     3,     0,    18,     0,     0,    66,     3,     0,
193
 
    66,    51,     0,     0,    67,     3,     0,    67,    51,     0,
194
 
    10,    56,    69,    57,     0,     0,    69,    71,     0,     3,
195
 
     0,     3,    42,     3,     0,     3,    43,     3,     0,    70,
196
 
    56,    73,    57,     0,     0,    70,    56,    73,    57,    44,
197
 
    72,    56,    73,    57,     0,     0,    73,    74,     0,    32,
198
 
    75,     0,     9,     3,     0,    33,     3,     0,    45,    46,
199
 
     3,     0,    45,     3,     0,     0,    75,     3,     0,    75,
200
 
    52,     3,     0,    75,    51,     0,    16,     0,    17,     0,
201
 
     0,    78,    79,     0,    78,    79,    76,     0,    78,    79,
202
 
    77,     0,    78,    79,    49,    79,     0,    78,    51,     0,
203
 
    19,     0,     9,     3,     0,    80,    56,    82,    57,     0,
204
 
     0,    82,    83,     0,    35,     0,    42,     3,     0,    43,
205
 
     3,     0,    45,    46,     3,     0,    45,     3,     0,    11,
206
 
     3,     0,    84,    56,    86,    57,     0,     0,    86,    87,
207
 
     0,     0,     0,    40,    88,     3,    89,    93,     0,     0,
208
 
     0,    40,    90,     7,    91,    93,     0,     0,    41,    92,
209
 
    95,     0,     0,    93,    94,    97,    49,    97,     0,    97,
210
 
    49,    97,     0,    96,    93,     0,    96,     0,    96,    49,
211
 
    96,    93,     0,    96,    49,    96,     0,    98,    93,     0,
212
 
    98,     0,    13,     0,    12,     0,    14,     0,     0,    99,
213
 
   100,     0,    58,     0,    63,     0,    59,     0,    54,     0,
214
 
    55,     0,    68,     0,    81,     0,    85,     0,    30,     0
 
169
static const short yyrhs[] = {    91,
 
170
     0,    19,     3,     0,    31,     3,     0,     5,     0,     6,
 
171
     0,     8,     3,     0,    50,    48,    52,    49,     0,     0,
 
172
    52,    53,     0,    20,     3,     0,    20,    41,     0,    21,
 
173
     3,     0,    21,    41,     0,    22,    41,     0,    22,    42,
 
174
     3,     0,    22,     3,     0,    30,     3,     0,     9,     3,
 
175
     0,    36,     3,     0,    37,     3,     0,    39,    40,     3,
 
176
     0,    39,     3,     0,    15,     3,     0,    54,    48,    56,
 
177
    49,     0,     0,    56,    57,     0,    24,    58,     0,    25,
 
178
    59,     0,    26,     3,     0,    27,    70,     0,    23,     3,
 
179
     0,    36,     3,     0,    37,     3,     0,    39,    40,     3,
 
180
     0,    39,     3,     0,     0,    58,     3,     0,    58,    43,
 
181
     0,     0,    59,     3,     0,    59,    43,     0,    10,    48,
 
182
    61,    49,     0,     0,    61,    63,     0,     3,     0,     3,
 
183
    36,     3,     0,     3,    37,     3,     0,    62,    48,    65,
 
184
    49,     0,     0,    62,    48,    65,    49,    38,    64,    48,
 
185
    65,    49,     0,     0,    65,    66,     0,    29,    67,     0,
 
186
     9,     3,     0,    30,     3,     0,    39,    40,     3,     0,
 
187
    39,     3,     0,     0,    67,     3,     0,    67,    44,     3,
 
188
     0,    67,    43,     0,    16,     0,    17,     0,     0,    70,
 
189
    71,     0,    70,    71,    68,     0,    70,    71,    69,     0,
 
190
    70,    71,    41,    71,     0,    70,    43,     0,    18,     0,
 
191
     9,     3,     0,    72,    48,    74,    49,     0,     0,    74,
 
192
    75,     0,    32,     0,    36,     3,     0,    37,     3,     0,
 
193
    39,    40,     3,     0,    39,     3,     0,    11,     3,     0,
 
194
    76,    48,    78,    49,     0,     0,    78,    79,     0,     0,
 
195
     0,    34,    80,     3,    81,    85,     0,     0,     0,    34,
 
196
    82,     7,    83,    85,     0,     0,    35,    84,    87,     0,
 
197
     0,    85,    86,    89,    41,    89,     0,    89,    41,    89,
 
198
     0,    88,    85,     0,    88,     0,    88,    41,    88,    85,
 
199
     0,    88,    41,    88,     0,    90,    85,     0,    90,     0,
 
200
    13,     0,    12,     0,    14,     0,     0,    91,    92,     0,
 
201
    50,     0,    55,     0,    51,     0,    46,     0,    47,     0,
 
202
    60,     0,    73,     0,    77,     0,    28,     0
215
203
};
216
204
 
217
205
#endif
218
206
 
219
207
#if YYDEBUG != 0
220
208
static const short yyrline[] = { 0,
221
 
   108,   113,   116,   119,   123,   127,   130,   134,   135,   137,
222
 
   139,   140,   141,   142,   143,   144,   145,   146,   147,   148,
223
 
   149,   150,   153,   156,   159,   160,   164,   165,   166,   167,
224
 
   169,   171,   173,   175,   176,   177,   178,   179,   180,   181,
225
 
   185,   186,   187,   190,   191,   192,   195,   198,   199,   202,
226
 
   203,   204,   207,   208,   210,   213,   214,   217,   218,   219,
227
 
   220,   221,   224,   225,   226,   227,   230,   233,   235,   236,
228
 
   237,   238,   239,   240,   243,   246,   248,   251,   252,   256,
229
 
   257,   258,   259,   260,   264,   266,   269,   270,   274,   275,
230
 
   276,   276,   277,   278,   278,   279,   282,   282,   283,   286,
231
 
   287,   288,   289,   290,   291,   294,   297,   300,   303,   304,
232
 
   307,   309,   310,   311,   312,   313,   314,   315,   316
 
209
   105,   110,   113,   116,   120,   124,   127,   131,   132,   134,
 
210
   136,   137,   138,   139,   140,   141,   142,   143,   144,   145,
 
211
   146,   147,   150,   153,   156,   157,   161,   162,   163,   164,
 
212
   165,   166,   167,   168,   169,   173,   174,   175,   178,   179,
 
213
   180,   183,   186,   187,   190,   191,   192,   195,   196,   198,
 
214
   201,   202,   205,   206,   207,   208,   209,   212,   213,   214,
 
215
   215,   218,   221,   223,   224,   225,   226,   227,   228,   231,
 
216
   234,   236,   239,   240,   244,   245,   246,   247,   248,   252,
 
217
   254,   257,   258,   262,   263,   264,   264,   265,   266,   266,
 
218
   267,   270,   270,   271,   274,   275,   276,   277,   278,   279,
 
219
   282,   285,   288,   291,   292,   295,   297,   298,   299,   300,
 
220
   301,   302,   303,   304
233
221
};
234
222
#endif
235
223
 
238
226
 
239
227
static const char * const yytname[] = {   "$","error","$undefined.","WORD","END",
240
228
"START_BRACKET","STOP_BRACKET","WEEKDAY","DESTINATION","REWRITE","ACL","TIME",
241
 
"TVAL","DVAL","DVALCRON","SOURCE","CIDR","IPCLASS","CONTINUE","IPADDR","DBHOME",
242
 
"DOMAINLIST","URLLIST","EXPRESSIONLIST","IPLIST","DOMAIN","USER","USERLIST",
243
 
"USERQUOTA","IP","NL","NUMBER","PASS","REDIRECT","LOGDIR","SUBST","CHAR","MINUTELY",
244
 
"HOURLY","DAILY","WEEKLY","DATE","WITHIN","OUTSIDE","ELSE","LOGFILE","ANONYMOUS",
245
 
"CONTINIOUS","SPORADIC","'-'","'i'","','","'!'","start","dbhome","logdir","start_block",
 
229
"TVAL","DVAL","DVALCRON","SOURCE","CIDR","IPCLASS","IPADDR","DBHOME","DOMAINLIST",
 
230
"URLLIST","EXPRESSIONLIST","IPLIST","DOMAIN","USER","USERLIST","IP","NL","PASS",
 
231
"REDIRECT","LOGDIR","SUBST","CHAR","WEEKLY","DATE","WITHIN","OUTSIDE","ELSE",
 
232
"LOGFILE","ANONYMOUS","'-'","'i'","','","'!'","start","dbhome","logdir","start_block",
246
233
"stop_block","destination","destination_block","destination_contents","destination_content",
247
234
"source","source_block","source_contents","source_content","domain","user","acl_block",
248
235
"acl_contents","acl","acl_content","@1","access_contents","access_content","access_pass",
253
240
#endif
254
241
 
255
242
static const short yyr1[] = {     0,
256
 
    53,    54,    55,    56,    57,    58,    59,    60,    60,    61,
257
 
    61,    61,    61,    61,    61,    61,    61,    61,    61,    61,
258
 
    61,    61,    62,    63,    64,    64,    65,    65,    65,    65,
259
 
    65,    65,    65,    65,    65,    65,    65,    65,    65,    65,
260
 
    66,    66,    66,    67,    67,    67,    68,    69,    69,    70,
261
 
    70,    70,    71,    72,    71,    73,    73,    74,    74,    74,
262
 
    74,    74,    75,    75,    75,    75,    76,    77,    78,    78,
263
 
    78,    78,    78,    78,    79,    80,    81,    82,    82,    83,
264
 
    83,    83,    83,    83,    84,    85,    86,    86,    88,    89,
265
 
    87,    90,    91,    87,    92,    87,    94,    93,    93,    95,
266
 
    95,    95,    95,    95,    95,    96,    97,    98,    99,    99,
267
 
   100,   100,   100,   100,   100,   100,   100,   100,   100
 
243
    45,    46,    47,    48,    49,    50,    51,    52,    52,    53,
 
244
    53,    53,    53,    53,    53,    53,    53,    53,    53,    53,
 
245
    53,    53,    54,    55,    56,    56,    57,    57,    57,    57,
 
246
    57,    57,    57,    57,    57,    58,    58,    58,    59,    59,
 
247
    59,    60,    61,    61,    62,    62,    62,    63,    64,    63,
 
248
    65,    65,    66,    66,    66,    66,    66,    67,    67,    67,
 
249
    67,    68,    69,    70,    70,    70,    70,    70,    70,    71,
 
250
    72,    73,    74,    74,    75,    75,    75,    75,    75,    76,
 
251
    77,    78,    78,    80,    81,    79,    82,    83,    79,    84,
 
252
    79,    86,    85,    85,    87,    87,    87,    87,    87,    87,
 
253
    88,    89,    90,    91,    91,    92,    92,    92,    92,    92,
 
254
    92,    92,    92,    92
268
255
};
269
256
 
270
257
static const short yyr2[] = {     0,
271
258
     1,     2,     2,     1,     1,     2,     4,     0,     2,     2,
272
259
     2,     2,     2,     2,     3,     2,     2,     2,     2,     2,
273
 
     3,     2,     2,     4,     0,     2,     2,     2,     2,     4,
274
 
     4,     4,     4,     2,     2,     2,     2,     3,     2,     1,
275
 
     0,     2,     2,     0,     2,     2,     4,     0,     2,     1,
276
 
     3,     3,     4,     0,     9,     0,     2,     2,     2,     2,
277
 
     3,     2,     0,     2,     3,     2,     1,     1,     0,     2,
278
 
     3,     3,     4,     2,     1,     2,     4,     0,     2,     1,
279
 
     2,     2,     3,     2,     2,     4,     0,     2,     0,     0,
280
 
     5,     0,     0,     5,     0,     3,     0,     5,     3,     2,
281
 
     1,     4,     3,     2,     1,     1,     1,     1,     0,     2,
282
 
     1,     1,     1,     1,     1,     1,     1,     1,     1
283
 
};
284
 
 
285
 
static const short yydefact[] = {   109,
286
 
     1,     0,     0,     0,     0,     0,     0,   119,     0,   114,
287
 
   115,   111,   113,     0,   112,   116,     0,   117,     0,   118,
288
 
   110,     6,    76,     4,    48,    85,    23,     2,     3,     8,
289
 
    25,    78,    87,     0,     0,     0,     0,     0,    50,     5,
290
 
    47,     0,    49,     0,     0,     0,     0,     0,     0,     0,
291
 
     0,     7,     9,    40,     0,    41,    44,     0,     0,    69,
292
 
     0,     0,     0,    24,    26,    80,     0,     0,     0,    77,
293
 
    79,    89,    95,    86,    88,     0,     0,    56,    18,    10,
294
 
    11,    12,    13,    16,    14,     0,    17,    19,    20,    22,
295
 
     0,    35,    27,    28,    29,     0,    34,    36,    37,    39,
296
 
     0,    81,    82,    84,     0,     0,     0,     0,    51,    52,
297
 
     0,    15,    21,    42,    43,    45,    46,     0,    75,    74,
298
 
    70,    38,    83,    90,    93,   106,   108,    96,   101,   105,
299
 
     0,    63,     0,     0,    53,    57,    33,    30,    31,    32,
300
 
    67,    68,     0,    71,    72,     0,     0,   107,     0,   100,
301
 
     0,   104,    59,    58,    60,    62,     0,    54,    73,    91,
302
 
    94,   103,     0,     0,    64,    66,     0,    61,     0,   102,
303
 
     0,    99,    65,    56,     0,     0,    98,    55,     0,     0,
304
 
     0
305
 
};
306
 
 
307
 
static const short yydefgoto[] = {   179,
 
260
     3,     2,     2,     4,     0,     2,     2,     2,     2,     2,
 
261
     2,     2,     2,     3,     2,     0,     2,     2,     0,     2,
 
262
     2,     4,     0,     2,     1,     3,     3,     4,     0,     9,
 
263
     0,     2,     2,     2,     2,     3,     2,     0,     2,     3,
 
264
     2,     1,     1,     0,     2,     3,     3,     4,     2,     1,
 
265
     2,     4,     0,     2,     1,     2,     2,     3,     2,     2,
 
266
     4,     0,     2,     0,     0,     5,     0,     0,     5,     0,
 
267
     3,     0,     5,     3,     2,     1,     4,     3,     2,     1,
 
268
     1,     1,     1,     0,     2,     1,     1,     1,     1,     1,
 
269
     1,     1,     1,     1
 
270
};
 
271
 
 
272
static const short yydefact[] = {   104,
 
273
     1,     0,     0,     0,     0,     0,     0,   114,     0,   109,
 
274
   110,   106,   108,     0,   107,   111,     0,   112,     0,   113,
 
275
   105,     6,    71,     4,    43,    80,    23,     2,     3,     8,
 
276
    25,    73,    82,     0,     0,     0,     0,     0,    45,     5,
 
277
    42,     0,    44,     0,     0,     0,     0,     0,     0,     0,
 
278
     0,     7,     9,     0,    36,    39,     0,    64,     0,     0,
 
279
     0,    24,    26,    75,     0,     0,     0,    72,    74,    84,
 
280
    90,    81,    83,     0,     0,    51,    18,    10,    11,    12,
 
281
    13,    16,    14,     0,    17,    19,    20,    22,     0,    31,
 
282
    27,    28,    29,    30,    32,    33,    35,     0,    76,    77,
 
283
    79,     0,     0,     0,     0,    46,    47,     0,    15,    21,
 
284
    37,    38,    40,    41,    70,    69,    65,    34,    78,    85,
 
285
    88,   101,   103,    91,    96,   100,     0,    58,     0,     0,
 
286
    48,    52,    62,    63,     0,    66,    67,     0,     0,   102,
 
287
     0,    95,     0,    99,    54,    53,    55,    57,     0,    49,
 
288
    68,    86,    89,    98,     0,     0,    59,    61,     0,    56,
 
289
     0,    97,     0,    94,    60,    51,     0,     0,    93,    50,
 
290
     0,     0,     0
 
291
};
 
292
 
 
293
static const short yydefgoto[] = {   171,
308
294
    10,    11,    25,    41,    12,    13,    35,    53,    14,    15,
309
 
    36,    65,    93,    94,    16,    34,    42,    43,   169,   111,
310
 
   136,   154,   144,   145,    97,   121,    17,    18,    37,    71,
311
 
    19,    20,    38,    75,   106,   146,   107,   147,   108,   150,
312
 
   163,   128,   129,   151,   130,     1,    21
 
295
    36,    63,    91,    92,    16,    34,    42,    43,   161,   108,
 
296
   132,   146,   136,   137,    94,   117,    17,    18,    37,    69,
 
297
    19,    20,    38,    73,   103,   138,   104,   139,   105,   142,
 
298
   155,   124,   125,   143,   126,     1,    21
313
299
};
314
300
 
315
301
static const short yypact[] = {-32768,
316
 
    86,    19,    39,    40,    41,    43,    44,-32768,    82,-32768,
317
 
-32768,    40,-32768,    40,-32768,-32768,    40,-32768,    40,-32768,
 
302
    91,     3,    22,    68,    28,    71,    74,-32768,    76,-32768,
 
303
-32768,    68,-32768,    68,-32768,-32768,    68,-32768,    68,-32768,
318
304
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
319
 
-32768,-32768,-32768,    20,    60,    47,    35,    73,    -5,-32768,
320
 
-32768,    40,-32768,    83,    11,    12,     9,    84,    85,    88,
321
 
    10,-32768,-32768,-32768,    95,-32768,-32768,    96,    76,-32768,
322
 
   101,   105,    16,-32768,-32768,-32768,   106,   107,    17,-32768,
323
 
-32768,   104,-32768,-32768,-32768,   109,   112,-32768,-32768,-32768,
324
 
-32768,-32768,-32768,-32768,-32768,   114,-32768,-32768,-32768,-32768,
325
 
   115,-32768,     0,     1,-32768,    90,    49,-32768,-32768,-32768,
326
 
   116,-32768,-32768,-32768,   119,   120,   117,    26,-32768,-32768,
327
 
    22,-32768,-32768,-32768,-32768,-32768,-32768,    -4,-32768,-32768,
328
 
     8,-32768,-32768,-32768,-32768,-32768,-32768,-32768,    -6,   113,
329
 
   123,-32768,   124,    18,    87,-32768,-32768,-32768,-32768,-32768,
330
 
-32768,-32768,   110,-32768,-32768,   113,   113,-32768,   121,   118,
331
 
    79,   118,-32768,    -2,-32768,-32768,   129,-32768,-32768,   118,
332
 
   118,   113,   113,   113,-32768,-32768,   130,-32768,    40,   118,
333
 
    89,-32768,-32768,-32768,   113,    22,-32768,-32768,   135,   136,
334
 
-32768
 
305
-32768,-32768,-32768,    18,    39,    10,    26,    60,   -14,-32768,
 
306
-32768,    68,-32768,    77,    11,    12,     9,    81,    82,    83,
 
307
    14,-32768,-32768,    86,-32768,-32768,    87,-32768,    88,    89,
 
308
    15,-32768,-32768,-32768,    90,   100,    16,-32768,-32768,    97,
 
309
-32768,-32768,-32768,   102,   104,-32768,-32768,-32768,-32768,-32768,
 
310
-32768,-32768,-32768,   105,-32768,-32768,-32768,-32768,   106,-32768,
 
311
     0,     1,-32768,    -5,-32768,-32768,-32768,   108,-32768,-32768,
 
312
-32768,   109,   110,   107,    13,-32768,-32768,    58,-32768,-32768,
 
313
-32768,-32768,-32768,-32768,-32768,-32768,    55,-32768,-32768,-32768,
 
314
-32768,-32768,-32768,-32768,    27,   103,   113,-32768,   114,    17,
 
315
    80,-32768,-32768,-32768,   111,-32768,-32768,   103,   103,-32768,
 
316
   112,   115,    79,   115,-32768,    -2,-32768,-32768,   118,-32768,
 
317
-32768,   115,   115,   103,   103,   103,-32768,-32768,   120,-32768,
 
318
    68,   115,    85,-32768,-32768,-32768,   103,    58,-32768,-32768,
 
319
   124,   128,-32768
335
320
};
336
321
 
337
322
static const short yypgoto[] = {-32768,
338
323
-32768,-32768,   -12,   -27,-32768,-32768,-32768,-32768,-32768,-32768,
339
 
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   -37,
340
 
-32768,-32768,-32768,-32768,-32768,    -3,-32768,-32768,-32768,-32768,
341
 
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,  -114,
342
 
-32768,-32768,   -10,  -146,-32768,-32768,-32768
 
324
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   -36,
 
325
-32768,-32768,-32768,-32768,-32768,    -4,-32768,-32768,-32768,-32768,
 
326
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   -56,
 
327
-32768,-32768,    -9,  -127,-32768,-32768,-32768
343
328
};
344
329
 
345
330
 
346
 
#define YYLAST          157
 
331
#define YYLAST          149
347
332
 
348
333
 
349
334
static const short yytable[] = {    30,
350
 
   165,    31,   114,   116,    32,   148,    33,    52,    64,    70,
351
 
    74,    84,    90,    80,    82,   152,   171,   172,   100,   104,
352
 
   156,    22,    39,   141,   142,    40,   137,    40,   177,    78,
353
 
   131,   160,   161,   138,   139,   140,    76,    77,   126,   127,
354
 
    40,    23,   149,    26,    24,    27,    28,   170,   166,   167,
355
 
   115,   117,    40,   132,   133,    91,   143,    85,    86,    81,
356
 
    83,   101,   105,   157,    54,    40,   134,   119,    44,    66,
357
 
    55,    56,    57,    58,    59,    60,    67,    68,    40,    69,
358
 
    45,    46,    47,   135,    29,    79,    87,    88,    61,    62,
359
 
    89,    63,    48,     2,     3,     4,     5,    92,    95,   120,
360
 
     6,    49,    50,    98,    51,     7,    96,    99,   102,   103,
361
 
   -92,   109,    72,    73,   110,     8,   112,   113,   122,     9,
362
 
   118,   123,   124,   125,   148,   153,   155,   164,   119,   -97,
363
 
   158,   168,   173,   126,   180,   181,   176,   175,   162,   159,
364
 
     0,     0,     0,     0,     0,     0,     0,     0,   178,     0,
365
 
     0,     0,     0,     0,     0,     0,   174
 
335
   157,    31,   111,   113,    32,    22,    33,    52,    62,    68,
 
336
    72,    82,   115,    78,    80,    40,    88,    97,   101,   148,
 
337
    39,    74,    75,    40,    23,   122,   123,   163,   164,    76,
 
338
    26,    40,    54,    55,    56,    57,    58,   116,   140,   169,
 
339
   158,   159,   112,   114,    40,    59,    60,    44,    61,    83,
 
340
    84,    79,    81,    89,    98,   102,   149,    64,    45,    46,
 
341
    47,    65,    66,    40,    67,    40,   127,   141,    48,   144,
 
342
   133,   134,    24,    27,    49,    50,    28,    51,    29,    77,
 
343
   131,   152,   153,    85,    86,    87,   128,   129,    90,    93,
 
344
    95,    96,    99,    70,    71,   135,   130,   162,     2,     3,
 
345
     4,     5,   100,   -87,   106,     6,   107,   109,   110,     7,
 
346
   118,   119,   120,   121,   140,   145,   147,   150,     8,   156,
 
347
   160,     9,   165,   172,   122,   167,   -92,   173,   115,   168,
 
348
   151,   154,     0,     0,     0,     0,     0,     0,     0,     0,
 
349
   170,     0,     0,     0,     0,     0,     0,     0,   166
366
350
};
367
351
 
368
352
static const short yycheck[] = {    12,
369
 
     3,    14,     3,     3,    17,    12,    19,    35,    36,    37,
370
 
    38,     3,     3,     3,     3,   130,   163,   164,     3,     3,
371
 
     3,     3,     3,    16,    17,     6,    31,     6,   175,    42,
372
 
     9,   146,   147,    38,    39,    40,    42,    43,    13,    14,
373
 
     6,     3,    49,     3,     5,     3,     3,   162,    51,    52,
374
 
    51,    51,     6,    32,    33,    46,    49,    49,    50,    49,
375
 
    49,    46,    46,    46,    18,     6,    45,    19,     9,    35,
376
 
    24,    25,    26,    27,    28,    29,    42,    43,     6,    45,
377
 
    21,    22,    23,   111,     3,     3,     3,     3,    42,    43,
378
 
     3,    45,    33,     8,     9,    10,    11,     3,     3,    51,
379
 
    15,    42,    43,     3,    45,    20,    31,     3,     3,     3,
380
 
     7,     3,    40,    41,     3,    30,     3,     3,     3,    34,
381
 
    31,     3,     3,     7,    12,     3,     3,    49,    19,    12,
382
 
    44,     3,     3,    13,     0,     0,   174,    49,   149,   143,
383
 
    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   176,    -1,
384
 
    -1,    -1,    -1,    -1,    -1,    -1,   169
 
353
     3,    14,     3,     3,    17,     3,    19,    35,    36,    37,
 
354
    38,     3,    18,     3,     3,     6,     3,     3,     3,     3,
 
355
     3,    36,    37,     6,     3,    13,    14,   155,   156,    42,
 
356
     3,     6,    23,    24,    25,    26,    27,    43,    12,   167,
 
357
    43,    44,    43,    43,     6,    36,    37,     9,    39,    41,
 
358
    42,    41,    41,    40,    40,    40,    40,    32,    20,    21,
 
359
    22,    36,    37,     6,    39,     6,     9,    41,    30,   126,
 
360
    16,    17,     5,     3,    36,    37,     3,    39,     3,     3,
 
361
   108,   138,   139,     3,     3,     3,    29,    30,     3,     3,
 
362
     3,     3,     3,    34,    35,    41,    39,   154,     8,     9,
 
363
    10,    11,     3,     7,     3,    15,     3,     3,     3,    19,
 
364
     3,     3,     3,     7,    12,     3,     3,    38,    28,    41,
 
365
     3,    31,     3,     0,    13,    41,    12,     0,    18,   166,
 
366
   135,   141,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
 
367
   168,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   161
385
368
};
386
369
/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
387
370
#line 3 "/local/share/bison.simple"
388
 
/* This file comes from bison-1.28.  */
389
371
 
390
372
/* Skeleton output parser for bison,
391
373
   Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
402
384
 
403
385
   You should have received a copy of the GNU General Public License
404
386
   along with this program; if not, write to the Free Software
405
 
   Foundation, Inc., 59 Temple Place - Suite 330,
406
 
   Boston, MA 02111-1307, USA.  */
 
387
   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
407
388
 
408
389
/* As a special exception, when this file is copied by Bison into a
409
390
   Bison output file, you may use that output file without restriction.
410
391
   This special exception was added by the Free Software Foundation
411
392
   in version 1.24 of Bison.  */
412
393
 
413
 
/* This is the parser code that is written into each bison parser
414
 
  when the %semantic_parser declaration is not specified in the grammar.
415
 
  It was written by Richard Stallman by simplifying the hairy parser
416
 
  used when %semantic_parser is specified.  */
417
 
 
418
 
#ifndef YYSTACK_USE_ALLOCA
419
 
#ifdef alloca
420
 
#define YYSTACK_USE_ALLOCA
421
 
#else /* alloca not defined */
 
394
#ifndef alloca
422
395
#ifdef __GNUC__
423
 
#define YYSTACK_USE_ALLOCA
424
396
#define alloca __builtin_alloca
425
397
#else /* not GNU C.  */
426
 
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
427
 
#define YYSTACK_USE_ALLOCA
 
398
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
428
399
#include <alloca.h>
429
400
#else /* not sparc */
430
 
/* We think this test detects Watcom and Microsoft C.  */
431
 
/* This used to test MSDOS, but that is a bad idea
432
 
   since that symbol is in the user namespace.  */
433
 
#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
434
 
#if 0 /* No need for malloc.h, which pollutes the namespace;
435
 
         instead, just don't use alloca.  */
 
401
#if defined (MSDOS) && !defined (__TURBOC__)
436
402
#include <malloc.h>
437
 
#endif
438
403
#else /* not MSDOS, or __TURBOC__ */
439
404
#if defined(_AIX)
440
 
/* I don't know what this was needed for, but it pollutes the namespace.
441
 
   So I turned it off.   rms, 2 May 1997.  */
442
 
/* #include <malloc.h>  */
 
405
#include <malloc.h>
443
406
 #pragma alloca
444
 
#define YYSTACK_USE_ALLOCA
445
 
#else /* not MSDOS, or __TURBOC__, or _AIX */
446
 
#if 0
447
 
#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
448
 
                 and on HPUX 10.  Eventually we can turn this on.  */
449
 
#define YYSTACK_USE_ALLOCA
450
 
#define alloca __builtin_alloca
 
407
#else /* not MSDOS, __TURBOC__, or _AIX */
 
408
#ifdef __hpux
 
409
#ifdef __cplusplus
 
410
extern "C" {
 
411
void *alloca (unsigned int);
 
412
};
 
413
#else /* not __cplusplus */
 
414
void *alloca ();
 
415
#endif /* not __cplusplus */
451
416
#endif /* __hpux */
452
 
#endif
453
417
#endif /* not _AIX */
454
418
#endif /* not MSDOS, or __TURBOC__ */
455
 
#endif /* not sparc */
456
 
#endif /* not GNU C */
457
 
#endif /* alloca not defined */
458
 
#endif /* YYSTACK_USE_ALLOCA not defined */
 
419
#endif /* not sparc.  */
 
420
#endif /* not GNU C.  */
 
421
#endif /* alloca not defined.  */
459
422
 
460
 
#ifdef YYSTACK_USE_ALLOCA
461
 
#define YYSTACK_ALLOC alloca
462
 
#else
463
 
#define YYSTACK_ALLOC malloc
464
 
#endif
 
423
/* This is the parser code that is written into each bison parser
 
424
  when the %semantic_parser declaration is not specified in the grammar.
 
425
  It was written by Richard Stallman by simplifying the hairy parser
 
426
  used when %semantic_parser is specified.  */
465
427
 
466
428
/* Note: there must be only one dollar sign in this file.
467
429
   It is replaced by the list of actions, each action
471
433
#define yyclearin       (yychar = YYEMPTY)
472
434
#define YYEMPTY         -2
473
435
#define YYEOF           0
474
 
#define YYACCEPT        goto yyacceptlab
475
 
#define YYABORT         goto yyabortlab
 
436
#define YYACCEPT        return(0)
 
437
#define YYABORT         return(1)
476
438
#define YYERROR         goto yyerrlab1
477
439
/* Like YYERROR except do call yyerror.
478
440
   This remains here temporarily to ease the
553
515
#ifndef YYMAXDEPTH
554
516
#define YYMAXDEPTH 10000
555
517
#endif
 
518
 
 
519
/* Prevent warning if -Wstrict-prototypes.  */
 
520
#ifdef __GNUC__
 
521
int yyparse (void);
 
522
#endif
556
523
 
557
 
/* Define __yy_memcpy.  Note that the size argument
558
 
   should be passed with type unsigned int, because that is what the non-GCC
559
 
   definitions require.  With GCC, __builtin_memcpy takes an arg
560
 
   of type size_t, but it can handle unsigned int.  */
561
 
 
562
524
#if __GNUC__ > 1                /* GNU C and GNU C++ define this.  */
563
525
#define __yy_memcpy(TO,FROM,COUNT)      __builtin_memcpy(TO,FROM,COUNT)
564
526
#else                           /* not GNU C or C++ */
570
532
__yy_memcpy (to, from, count)
571
533
     char *to;
572
534
     char *from;
573
 
     unsigned int count;
 
535
     int count;
574
536
{
575
537
  register char *f = from;
576
538
  register char *t = to;
585
547
/* This is the most reliable way to avoid incompatibilities
586
548
   in available built-in functions on various systems.  */
587
549
static void
588
 
__yy_memcpy (char *to, char *from, unsigned int count)
 
550
__yy_memcpy (char *to, char *from, int count)
589
551
{
 
552
  register char *f = from;
590
553
  register char *t = to;
591
 
  register char *f = from;
592
554
  register int i = count;
593
555
 
594
556
  while (i-- > 0)
598
560
#endif
599
561
#endif
600
562
 
601
 
#line 217 "/local/share/bison.simple"
 
563
#line 196 "/local/share/bison.simple"
602
564
 
603
565
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
604
566
   into yyparse.  The argument should have type void *.
619
581
#define YYPARSE_PARAM_DECL
620
582
#endif /* not YYPARSE_PARAM */
621
583
 
622
 
/* Prevent warning if -Wstrict-prototypes.  */
623
 
#ifdef __GNUC__
624
 
#ifdef YYPARSE_PARAM
625
 
int yyparse (void *);
626
 
#else
627
 
int yyparse (void);
628
 
#endif
629
 
#endif
630
 
 
631
584
int
632
585
yyparse(YYPARSE_PARAM_ARG)
633
586
     YYPARSE_PARAM_DECL
656
609
#endif
657
610
 
658
611
  int yystacksize = YYINITDEPTH;
659
 
  int yyfree_stacks = 0;
660
612
 
661
613
#ifdef YYPURE
662
614
  int yychar;
741
693
      if (yystacksize >= YYMAXDEPTH)
742
694
        {
743
695
          yyerror("parser stack overflow");
744
 
          if (yyfree_stacks)
745
 
            {
746
 
              free (yyss);
747
 
              free (yyvs);
748
 
#ifdef YYLSP_NEEDED
749
 
              free (yyls);
750
 
#endif
751
 
            }
752
696
          return 2;
753
697
        }
754
698
      yystacksize *= 2;
755
699
      if (yystacksize > YYMAXDEPTH)
756
700
        yystacksize = YYMAXDEPTH;
757
 
#ifndef YYSTACK_USE_ALLOCA
758
 
      yyfree_stacks = 1;
759
 
#endif
760
 
      yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
761
 
      __yy_memcpy ((char *)yyss, (char *)yyss1,
762
 
                   size * (unsigned int) sizeof (*yyssp));
763
 
      yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
764
 
      __yy_memcpy ((char *)yyvs, (char *)yyvs1,
765
 
                   size * (unsigned int) sizeof (*yyvsp));
 
701
      yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
 
702
      __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp));
 
703
      yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
 
704
      __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp));
766
705
#ifdef YYLSP_NEEDED
767
 
      yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
768
 
      __yy_memcpy ((char *)yyls, (char *)yyls1,
769
 
                   size * (unsigned int) sizeof (*yylsp));
 
706
      yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
 
707
      __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp));
770
708
#endif
771
709
#endif /* no yyoverflow */
772
710
 
927
865
  switch (yyn) {
928
866
 
929
867
case 2:
930
 
#line 113 "sg.y"
 
868
#line 110 "sg.y"
931
869
{ sgSetting("dbhome",yyvsp[0].string); ;
932
870
    break;}
933
871
case 3:
934
 
#line 116 "sg.y"
 
872
#line 113 "sg.y"
935
873
{ sgSetting("logdir",yyvsp[0].string); ;
936
874
    break;}
937
875
case 6:
938
 
#line 127 "sg.y"
 
876
#line 124 "sg.y"
939
877
{ sgDest(yyvsp[0].string); ;
940
878
    break;}
941
879
case 7:
942
 
#line 131 "sg.y"
 
880
#line 128 "sg.y"
943
881
{ sgDestEnd();;
944
882
    break;}
945
883
case 10:
946
 
#line 138 "sg.y"
 
884
#line 135 "sg.y"
947
885
{ sgDestDomainList(yyvsp[0].string); ;
948
886
    break;}
949
887
case 11:
950
 
#line 139 "sg.y"
 
888
#line 136 "sg.y"
951
889
{ sgDestDomainList(NULL); ;
952
890
    break;}
953
891
case 12:
954
 
#line 140 "sg.y"
 
892
#line 137 "sg.y"
955
893
{ sgDestUrlList(yyvsp[0].string); ;
956
894
    break;}
957
895
case 13:
958
 
#line 141 "sg.y"
 
896
#line 138 "sg.y"
959
897
{ sgDestUrlList(NULL); ;
960
898
    break;}
961
899
case 14:
962
 
#line 142 "sg.y"
 
900
#line 139 "sg.y"
963
901
{ sgDestExpressionList(NULL,NULL); ;
964
902
    break;}
965
903
case 15:
966
 
#line 143 "sg.y"
 
904
#line 140 "sg.y"
967
905
{ sgDestExpressionList(yyvsp[0].string,"i"); ;
968
906
    break;}
969
907
case 16:
970
 
#line 144 "sg.y"
 
908
#line 141 "sg.y"
971
909
{ sgDestExpressionList(yyvsp[0].string,"n"); ;
972
910
    break;}
973
911
case 17:
974
 
#line 145 "sg.y"
 
912
#line 142 "sg.y"
975
913
{sgDestRedirect(yyvsp[0].string); ;
976
914
    break;}
977
915
case 18:
978
 
#line 146 "sg.y"
 
916
#line 143 "sg.y"
979
917
{sgDestRewrite(yyvsp[0].string); ;
980
918
    break;}
981
919
case 19:
982
 
#line 147 "sg.y"
 
920
#line 144 "sg.y"
983
921
{ sgDestTime(yyvsp[0].string,WITHIN); ;
984
922
    break;}
985
923
case 20:
986
 
#line 148 "sg.y"
 
924
#line 145 "sg.y"
987
925
{ sgDestTime(yyvsp[0].string,OUTSIDE); ;
988
926
    break;}
989
927
case 21:
990
 
#line 149 "sg.y"
 
928
#line 146 "sg.y"
991
929
{ sgLogFile(SG_BLOCK_DESTINATION,1,yyvsp[0].string); ;
992
930
    break;}
993
931
case 22:
994
 
#line 150 "sg.y"
 
932
#line 147 "sg.y"
995
933
{ sgLogFile(SG_BLOCK_DESTINATION,0,yyvsp[0].string); ;
996
934
    break;}
997
935
case 23:
998
 
#line 153 "sg.y"
 
936
#line 150 "sg.y"
999
937
{ sgSource(yyvsp[0].string); ;
1000
938
    break;}
1001
939
case 24:
1002
 
#line 156 "sg.y"
 
940
#line 153 "sg.y"
1003
941
{sgSourceEnd();;
1004
942
    break;}
1005
943
case 29:
1006
 
#line 166 "sg.y"
 
944
#line 163 "sg.y"
1007
945
{ sgSourceUserList(yyvsp[0].string); ;
1008
946
    break;}
1009
 
case 30:
1010
 
#line 167 "sg.y"
1011
 
1012
 
                      sgSourceUserQuota(yyvsp[-2].string,yyvsp[-1].string,"3600");;
1013
 
    break;}
1014
947
case 31:
1015
 
#line 169 "sg.y"
1016
 
1017
 
                      sgSourceUserQuota(yyvsp[-2].string,yyvsp[-1].string,"86400");;
 
948
#line 165 "sg.y"
 
949
{ sgSourceIpList(yyvsp[0].string); ;
1018
950
    break;}
1019
951
case 32:
1020
 
#line 171 "sg.y"
1021
 
1022
 
                      sgSourceUserQuota(yyvsp[-2].string,yyvsp[-1].string,"604800");;
 
952
#line 166 "sg.y"
 
953
{ sgSourceTime(yyvsp[0].string,WITHIN); ;
1023
954
    break;}
1024
955
case 33:
1025
 
#line 173 "sg.y"
1026
 
1027
 
                      sgSourceUserQuota(yyvsp[-2].string,yyvsp[-1].string,yyvsp[0].string);;
1028
 
    break;}
1029
 
case 35:
1030
 
#line 176 "sg.y"
1031
 
{ sgSourceIpList(yyvsp[0].string); ;
1032
 
    break;}
1033
 
case 36:
1034
 
#line 177 "sg.y"
1035
 
{ sgSourceTime(yyvsp[0].string,WITHIN); ;
1036
 
    break;}
1037
 
case 37:
1038
 
#line 178 "sg.y"
 
956
#line 167 "sg.y"
1039
957
{ sgSourceTime(yyvsp[0].string,OUTSIDE); ;
1040
958
    break;}
1041
 
case 38:
1042
 
#line 179 "sg.y"
 
959
case 34:
 
960
#line 168 "sg.y"
1043
961
{sgLogFile(SG_BLOCK_SOURCE,1,yyvsp[0].string);;
1044
962
    break;}
1045
 
case 39:
1046
 
#line 180 "sg.y"
 
963
case 35:
 
964
#line 169 "sg.y"
1047
965
{ sgLogFile(SG_BLOCK_SOURCE,0,yyvsp[0].string); ;
1048
966
    break;}
 
967
case 37:
 
968
#line 174 "sg.y"
 
969
{ sgSourceDomain(yyvsp[0].string); ;
 
970
    break;}
1049
971
case 40:
1050
 
#line 181 "sg.y"
1051
 
{ lastSource->cont_search = 1; ;
1052
 
    break;}
1053
 
case 42:
1054
 
#line 186 "sg.y"
1055
 
{ sgSourceDomain(yyvsp[0].string); ;
 
972
#line 179 "sg.y"
 
973
{ sgSourceUser(yyvsp[0].string); ;
1056
974
    break;}
1057
975
case 45:
 
976
#line 190 "sg.y"
 
977
{sgAcl(yyvsp[0].string,NULL,0);;
 
978
    break;}
 
979
case 46:
1058
980
#line 191 "sg.y"
1059
 
{ sgSourceUser(yyvsp[0].string); ;
1060
 
    break;}
1061
 
case 50:
1062
 
#line 202 "sg.y"
1063
 
{sgAcl(yyvsp[0].string,NULL,0);;
1064
 
    break;}
1065
 
case 51:
1066
 
#line 203 "sg.y"
1067
981
{sgAcl(yyvsp[-2].string,yyvsp[0].string,WITHIN);;
1068
982
    break;}
1069
 
case 52:
1070
 
#line 204 "sg.y"
 
983
case 47:
 
984
#line 192 "sg.y"
1071
985
{ sgAcl(yyvsp[-2].string,yyvsp[0].string,OUTSIDE); ;
1072
986
    break;}
1073
 
case 54:
1074
 
#line 209 "sg.y"
 
987
case 49:
 
988
#line 197 "sg.y"
1075
989
{sgAcl(NULL,NULL,ELSE);;
1076
990
    break;}
1077
 
case 58:
1078
 
#line 217 "sg.y"
 
991
case 53:
 
992
#line 205 "sg.y"
1079
993
{ ;
1080
994
    break;}
1081
 
case 59:
1082
 
#line 218 "sg.y"
 
995
case 54:
 
996
#line 206 "sg.y"
1083
997
{ sgAclSetValue("rewrite",yyvsp[0].string,0); ;
1084
998
    break;}
1085
 
case 60:
1086
 
#line 219 "sg.y"
 
999
case 55:
 
1000
#line 207 "sg.y"
1087
1001
{ sgAclSetValue("redirect",yyvsp[0].string,0); ;
1088
1002
    break;}
1089
 
case 61:
1090
 
#line 220 "sg.y"
 
1003
case 56:
 
1004
#line 208 "sg.y"
1091
1005
{sgLogFile(SG_BLOCK_ACL,1,yyvsp[0].string);;
1092
1006
    break;}
 
1007
case 57:
 
1008
#line 209 "sg.y"
 
1009
{ sgLogFile(SG_BLOCK_ACL,0,yyvsp[0].string); ;
 
1010
    break;}
 
1011
case 59:
 
1012
#line 213 "sg.y"
 
1013
{ sgAclSetValue("pass",yyvsp[0].string,1);;
 
1014
    break;}
 
1015
case 60:
 
1016
#line 214 "sg.y"
 
1017
{ sgAclSetValue("pass",yyvsp[0].string,0);;
 
1018
    break;}
1093
1019
case 62:
 
1020
#line 218 "sg.y"
 
1021
{ sgIp(yyvsp[0].string); ;
 
1022
    break;}
 
1023
case 63:
1094
1024
#line 221 "sg.y"
1095
 
{ sgLogFile(SG_BLOCK_ACL,0,yyvsp[0].string); ;
1096
 
    break;}
1097
 
case 64:
1098
 
#line 225 "sg.y"
1099
 
{ sgAclSetValue("pass",yyvsp[0].string,1);;
 
1025
{ sgIp(yyvsp[0].string); ;
1100
1026
    break;}
1101
1027
case 65:
1102
 
#line 226 "sg.y"
1103
 
{ sgAclSetValue("pass",yyvsp[0].string,0);;
1104
 
    break;}
1105
 
case 67:
1106
 
#line 230 "sg.y"
1107
 
{ sgIp(yyvsp[0].string); ;
1108
 
    break;}
1109
 
case 68:
1110
 
#line 233 "sg.y"
1111
 
{ sgIp(yyvsp[0].string); ;
1112
 
    break;}
1113
 
case 70:
1114
 
#line 236 "sg.y"
 
1028
#line 224 "sg.y"
1115
1029
{ sgIp("255.255.255.255") ; sgSetIpType(SG_IPTYPE_HOST,NULL,0); ;
1116
1030
    break;}
1117
 
case 71:
1118
 
#line 237 "sg.y"
 
1031
case 66:
 
1032
#line 225 "sg.y"
1119
1033
{ sgSetIpType(SG_IPTYPE_CIDR,NULL,0); ;
1120
1034
    break;}
1121
 
case 72:
1122
 
#line 238 "sg.y"
 
1035
case 67:
 
1036
#line 226 "sg.y"
1123
1037
{ sgSetIpType(SG_IPTYPE_CLASS,NULL,0); ;
1124
1038
    break;}
1125
 
case 73:
1126
 
#line 239 "sg.y"
 
1039
case 68:
 
1040
#line 227 "sg.y"
1127
1041
{ sgSetIpType(SG_IPTYPE_RANGE,NULL,0); ;
1128
1042
    break;}
1129
 
case 75:
1130
 
#line 243 "sg.y"
 
1043
case 70:
 
1044
#line 231 "sg.y"
1131
1045
{ sgIp(yyvsp[0].string);;
1132
1046
    break;}
1133
 
case 76:
1134
 
#line 246 "sg.y"
 
1047
case 71:
 
1048
#line 234 "sg.y"
1135
1049
{ sgRewrite(yyvsp[0].string); ;
1136
1050
    break;}
1137
 
case 80:
1138
 
#line 256 "sg.y"
 
1051
case 75:
 
1052
#line 244 "sg.y"
1139
1053
{ sgRewriteSubstitute(yyvsp[0].string); ;
1140
1054
    break;}
1141
 
case 81:
1142
 
#line 257 "sg.y"
 
1055
case 76:
 
1056
#line 245 "sg.y"
1143
1057
{ sgRewriteTime(yyvsp[0].string,WITHIN); ;
1144
1058
    break;}
1145
 
case 82:
1146
 
#line 258 "sg.y"
 
1059
case 77:
 
1060
#line 246 "sg.y"
1147
1061
{ sgRewriteTime(yyvsp[0].string,OUTSIDE); ;
1148
1062
    break;}
1149
 
case 83:
1150
 
#line 259 "sg.y"
 
1063
case 78:
 
1064
#line 247 "sg.y"
1151
1065
{ sgLogFile(SG_BLOCK_REWRITE,1,yyvsp[0].string); ;
1152
1066
    break;}
 
1067
case 79:
 
1068
#line 248 "sg.y"
 
1069
{ sgLogFile(SG_BLOCK_REWRITE,0,yyvsp[0].string); ;
 
1070
    break;}
 
1071
case 80:
 
1072
#line 252 "sg.y"
 
1073
{ sgTime(yyvsp[0].string); ;
 
1074
    break;}
1153
1075
case 84:
1154
 
#line 260 "sg.y"
1155
 
{ sgLogFile(SG_BLOCK_REWRITE,0,yyvsp[0].string); ;
 
1076
#line 262 "sg.y"
 
1077
{sgTimeElementInit();;
1156
1078
    break;}
1157
1079
case 85:
 
1080
#line 263 "sg.y"
 
1081
{sgTimeElementAdd(yyvsp[0].string,T_WEEKLY);;
 
1082
    break;}
 
1083
case 87:
1158
1084
#line 264 "sg.y"
1159
 
{ sgTime(yyvsp[0].string); ;
1160
 
    break;}
1161
 
case 89:
1162
 
#line 274 "sg.y"
1163
1085
{sgTimeElementInit();;
1164
1086
    break;}
 
1087
case 88:
 
1088
#line 265 "sg.y"
 
1089
{sgTimeElementAdd(yyvsp[0].string,T_WEEKDAY);;
 
1090
    break;}
1165
1091
case 90:
1166
 
#line 275 "sg.y"
1167
 
{sgTimeElementAdd(yyvsp[0].string,T_WEEKLY);;
 
1092
#line 266 "sg.y"
 
1093
{sgTimeElementInit();;
 
1094
    break;}
 
1095
case 91:
 
1096
#line 267 "sg.y"
 
1097
{sgTimeElementEnd();;
1168
1098
    break;}
1169
1099
case 92:
1170
 
#line 276 "sg.y"
1171
 
{sgTimeElementInit();;
1172
 
    break;}
1173
 
case 93:
1174
 
#line 277 "sg.y"
1175
 
{sgTimeElementAdd(yyvsp[0].string,T_WEEKDAY);;
1176
 
    break;}
1177
 
case 95:
1178
 
#line 278 "sg.y"
1179
 
{sgTimeElementInit();;
1180
 
    break;}
1181
 
case 96:
1182
 
#line 279 "sg.y"
1183
 
{sgTimeElementEnd();;
1184
 
    break;}
1185
 
case 97:
 
1100
#line 270 "sg.y"
 
1101
{ sgTimeElementClone(); ;
 
1102
    break;}
 
1103
case 101:
1186
1104
#line 282 "sg.y"
1187
 
{ sgTimeElementClone(); ;
1188
 
    break;}
1189
 
case 106:
1190
 
#line 294 "sg.y"
1191
1105
{ sgTimeElementAdd(yyvsp[0].string,T_DVAL);;
1192
1106
    break;}
1193
 
case 107:
1194
 
#line 297 "sg.y"
 
1107
case 102:
 
1108
#line 285 "sg.y"
1195
1109
{ sgTimeElementAdd(yyvsp[0].tval,T_TVAL);;
1196
1110
    break;}
1197
 
case 108:
1198
 
#line 300 "sg.y"
 
1111
case 103:
 
1112
#line 288 "sg.y"
1199
1113
{ sgTimeElementAdd(yyvsp[0].string,T_DVALCRON);;
1200
1114
    break;}
1201
1115
}
1202
1116
   /* the action file gets copied in in place of this dollarsign */
1203
 
#line 543 "/local/share/bison.simple"
 
1117
#line 498 "/local/share/bison.simple"
1204
1118
 
1205
1119
  yyvsp -= yylen;
1206
1120
  yyssp -= yylen;
1395
1309
 
1396
1310
  yystate = yyn;
1397
1311
  goto yynewstate;
1398
 
 
1399
 
 yyacceptlab:
1400
 
  /* YYACCEPT comes here.  */
1401
 
  if (yyfree_stacks)
1402
 
    {
1403
 
      free (yyss);
1404
 
      free (yyvs);
1405
 
#ifdef YYLSP_NEEDED
1406
 
      free (yyls);
1407
 
#endif
1408
 
    }
1409
 
  return 0;
1410
 
 
1411
 
 yyabortlab:
1412
 
  /* YYABORT comes here.  */
1413
 
  if (yyfree_stacks)
1414
 
    {
1415
 
      free (yyss);
1416
 
      free (yyvs);
1417
 
#ifdef YYLSP_NEEDED
1418
 
      free (yyls);
1419
 
#endif
1420
 
    }
1421
 
  return 1;
1422
1312
}
1423
 
#line 319 "sg.y"
 
1313
#line 307 "sg.y"
1424
1314
 
1425
1315
 
1426
1316
#if __STDC__
1583
1473
  sp->domainDb=NULL;
1584
1474
  sp->active = 1;
1585
1475
  sp->within = 0;
1586
 
  sp->cont_search = 0;
1587
1476
  sp->time = NULL;
1588
 
  sp->userquota.seconds = 0;
1589
 
  sp->userquota.renew = 0;
1590
 
  sp->userquota.sporadic = 0;
1591
1477
  sp->next=NULL;
1592
1478
  sp->logfile = NULL;
1593
1479
  sp->name = (char  *) sgCalloc(1,strlen(source) + 1);
1630
1516
  }
1631
1517
  for(lc=user; *lc != '\0'; lc++) /* convert username to lowercase chars */
1632
1518
    *lc = tolower(*lc);
1633
 
  sgDbUpdate(sp->userDb, user, (char *) setuserquota(),
1634
 
             sizeof(struct UserQuotaInfo));
 
1519
  sgDbUpdate(sp->userDb,user);
1635
1520
}
1636
1521
 
1637
1522
#if __STDC__
1684
1569
      *s = '\0';
1685
1570
      for(lc=line; *lc != '\0'; lc++) /* convert username to lowercase chars */
1686
1571
        *lc = tolower(*lc);
1687
 
      sgDbUpdate(sp->userDb, line, (char *) setuserquota(),
1688
 
                 sizeof(struct UserQuotaInfo));
 
1572
      sgDbUpdate(sp->userDb,line);
1689
1573
    } else {
1690
1574
      do {
1691
1575
        if(c != NULL && p >= c) /*find the comment */
1692
1576
          break;
1693
1577
        for(lc=p; *lc != '\0'; lc++) /* convert username to lowercase chars */
1694
1578
          *lc = tolower(*lc);
1695
 
        sgDbUpdate(sp->userDb, p, (char *) setuserquota(),
1696
 
                   sizeof(struct UserQuotaInfo));
 
1579
        sgDbUpdate(sp->userDb,p);
1697
1580
      } while((p=strtok(NULL," \t,")) != NULL);
1698
1581
    }
1699
1582
  }
1701
1584
}
1702
1585
 
1703
1586
#if __STDC__
1704
 
void sgSourceUserQuota(char *seconds, char *sporadic, char *renew)
1705
 
#else
1706
 
void sgSourceUserQuota(seconds, sporadic, renew)
1707
 
     char *file;
1708
 
     char *sporadic;
1709
 
     char *renew;
1710
 
#endif
1711
 
{
1712
 
  int s;
1713
 
  struct UserQuota *uq;
1714
 
  struct Source *sp;
1715
 
  sp = lastSource;
1716
 
  uq = &sp->userquota;
1717
 
  s = atoi(seconds);
1718
 
  if(s <= 0)
1719
 
    sgLogError("Userquota seconds sporadic hourly|daily|weekly");
1720
 
  uq->seconds = s; 
1721
 
  s = atoi(sporadic);
1722
 
  if(s <= 0)
1723
 
    sgLogError("Userquota seconds sporadic hourly|daily|weekly");
1724
 
  uq->sporadic = s; 
1725
 
  s = atoi(renew);
1726
 
  if(s <= 0)
1727
 
    sgLogError("Userquota seconds sporadic hourly|daily|weekly");
1728
 
  uq->renew = s;
1729
 
}
1730
 
 
1731
 
 
1732
 
#if __STDC__
1733
1587
void sgSourceDomain(char *domain)
1734
1588
#else
1735
1589
void sgSourceDomain(domain)
1743
1597
    sp->domainDb->type=SGDBTYPE_DOMAINLIST;
1744
1598
    sgDbInit(sp->domainDb,NULL);
1745
1599
  }
1746
 
  sgDbUpdate(sp->domainDb,domain, NULL, 0);
 
1600
  sgDbUpdate(sp->domainDb,domain);
1747
1601
}
1748
1602
 
1749
1603
#if __STDC__
1858
1712
 */
1859
1713
 
1860
1714
#if __STDC__
1861
 
struct Source *sgFindSource (struct Source *bsrc, 
1862
 
                             char *net, char *ident, char *domain)
 
1715
struct Source *sgFindSource (char *net, char *ident, char *domain)
1863
1716
#else
1864
 
struct Source *sgFindSource (bsrc, net, ident, domain)
1865
 
     struct Source *bsrc;
 
1717
struct Source *sgFindSource (net, ident, domain)
1866
1718
     char *net;
1867
1719
     char *ident;
1868
1720
     char *domain;
1870
1722
{
1871
1723
  struct Source *s;
1872
1724
  struct Ip *ip;
1873
 
  int foundip, founduser, founddomain, unblockeduser;
 
1725
  int foundip, founduser, founddomain;
1874
1726
  unsigned long i, octet = 0, *op;
1875
 
  struct UserQuotaInfo *userquota;
1876
1727
  if(net != NULL){
1877
1728
    op = sgConvDot(net);
1878
1729
    if(op != NULL)
1879
1730
      octet = *op;
1880
1731
  }
1881
 
  for(s=bsrc; s != NULL; s = s->next){
 
1732
  for(s=Source; s != NULL; s = s->next){
1882
1733
    foundip = founduser = founddomain = 0;
1883
 
    unblockeduser = 1;
1884
1734
    if(s->active == 0)
1885
1735
      continue;
1886
1736
    if(s->ip != NULL){
1910
1760
      if(*ident == '\0')
1911
1761
        founduser = 0;
1912
1762
      else 
1913
 
        if(defined(s->userDb, ident, (char **) &userquota) == 1){
 
1763
        if(defined(s->userDb, ident, (char **) NULL) == 1)
1914
1764
          founduser = 1;
1915
 
          unblockeduser = 1;
1916
 
          if(s->userquota.seconds != 0){
1917
 
            struct UserQuotaInfo uq;
1918
 
            time_t t = time(NULL) + globalDebugTimeDelta;
1919
 
            //sgLogError("status %d time %d lasttime %d consumed %d", userquota->status, userquota->time, userquota->last, userquota->consumed);
1920
 
            //sgLogError("renew %d seconds %d", s->userquota.renew, s->userquota.seconds);
1921
 
            if(userquota->status == 0){ //first time
1922
 
              userquota->status = 1;
1923
 
              userquota->time = t;
1924
 
              userquota->last = t;
1925
 
              //sgLogError("user %s first time %d", ident, userquota->time);
1926
 
            } else if(userquota->status == 1){
1927
 
              //sgLogError("user %s other time %d %d",ident,userquota->time,t);
1928
 
              if(s->userquota.sporadic > 0){
1929
 
                if(t - userquota->last  < s->userquota.sporadic){
1930
 
                  userquota->consumed += t - userquota->last;
1931
 
                  userquota->time = t;
1932
 
                }
1933
 
                if(userquota->consumed > s->userquota.seconds){
1934
 
                  userquota->status = 2; // block this user, time is up
1935
 
                  unblockeduser = 0;
1936
 
                }
1937
 
                userquota->last = t;
1938
 
                //sgLogError("user %s consumed %d %d",ident,userquota->consumed, userquota->last);
1939
 
              } else if(userquota->time + s->userquota.seconds < t){
1940
 
                sgLogError("time is up user %s blocket", ident);
1941
 
                userquota->status = 2; // block this user, time is up
1942
 
                unblockeduser = 0;
1943
 
              } 
1944
 
            } else {
1945
 
              //sgLogError("user %s blocket %d %d %d %d", ident, userquota->status, userquota->time, t, (userquota->time + s->userquota.renew) - t);
1946
 
              if(userquota->time + s->userquota.renew < t){ // new chance
1947
 
                //sgLogError("user %s new chance", ident);
1948
 
                unblockeduser = 1;
1949
 
                userquota->status = 1;
1950
 
                userquota->time = t;
1951
 
                userquota->consumed = 0;
1952
 
              } else 
1953
 
                unblockeduser = 0;
1954
 
            }
1955
 
            sgDbUpdate(s->userDb, ident, (void *) userquota, 
1956
 
                       sizeof(struct UserQuotaInfo));
1957
 
          }
1958
 
        }
1959
 
    } else
 
1765
    }  else
1960
1766
      founduser = 1;
1961
1767
    if(s->domainDb != NULL){
1962
1768
      if(*domain == '\0')
1967
1773
      }
1968
1774
    } else
1969
1775
      founddomain = 1;
1970
 
    if(founduser && foundip && founddomain){
1971
 
      if(unblockeduser)
1972
 
        return s;
1973
 
      else {
1974
 
        lastActiveSource = s;
1975
 
        return NULL;
1976
 
      }
 
1776
    if(founduser == 1 && foundip == 1 && founddomain == 1){
 
1777
      return s;
1977
1778
    }
1978
1779
  }
1979
1780
  return NULL;
2068
1869
  sp->domainlistDb->type=SGDBTYPE_DOMAINLIST;
2069
1870
  sgLogError("init domainlist %s",sp->domainlist);
2070
1871
  sgDbInit(sp->domainlistDb,sp->domainlist);
2071
 
  if(sp->domainlistDb->entries == 0) { /* empty database */
 
1872
  if(sp->domainlistDb->dbenv == NULL) { /* empty database */
2072
1873
    sgLogError("domainlist empty, removed from memory");
2073
1874
    sgFree(sp->domainlistDb);
2074
1875
    sp->domainlistDb = NULL;
2112
1913
  sp->urllistDb->type=SGDBTYPE_URLLIST;
2113
1914
  sgLogError("init urllist %s",sp->urllist);
2114
1915
  sgDbInit(sp->urllistDb,sp->urllist);
2115
 
  if(sp->urllistDb->entries == 0) { /* empty database */
 
1916
  if(sp->urllistDb->dbenv == NULL) { /* empty database */
2116
1917
    sgLogError("urllist empty, removed from memory");
2117
1918
    sgFree(sp->urllistDb);
2118
1919
    sp->urllistDb = NULL;