-
Notifications
You must be signed in to change notification settings - Fork 6
/
chkentry.c
622 lines (580 loc) · 20.7 KB
/
chkentry.c
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
/*
* chkentry - check JSON files in an IOCCC submission
*
* "Because grammar and syntax alone do not make a complete language." :-)
*
* This tool and the JSON parser were co-developed in 2022-2024 by Cody Boone
* Ferguson and Landon Curt Noll:
*
* @xexyl
* https://xexyl.net Cody Boone Ferguson
* https://ioccc.xexyl.net
* and:
* chongo (Landon Curt Noll, http://www.isthe.com/chongo/index.html) /\oo/\
*
* "Because sometimes even the IOCCC Judges need some help." :-)
*
* The concept of the JSON semantics tables was developed by Landon Curt Noll.
*
* "Share and Enjoy!"
* -- Sirius Cybernetics Corporation Complaints Division, JSON spec department. :-)
*/
/* special comments for the seqcexit tool */
/* exit code out of numerical order - ignore in sequencing - ooo */
/* exit code change of order - use new value in sequencing - coo */
#include <stdio.h>
#include <unistd.h>
#include <ctype.h>
/*
* chkentry - check JSON files in an IOCCC submission
*/
#include "chkentry.h"
/*
* definitions
*/
/*
* globals
*/
static bool quiet = false; /* true ==> quiet mode */
/*
* usage message
*
* Use the usage() function to print the usage_msg([0-9]?)+ strings.
*/
static const char * const usage_msg =
"usage: %s [-h] [-v level] [-J level] [-V] [-q] info.json auth.json\n"
"\n"
"\t-h\t\tprint help message and exit\n"
"\t-v level\tset verbosity level (def level: %d)\n"
"\t-J level\tset JSON verbosity level (def level: %d)\n"
"\t-V\t\tprint version string and exit\n"
"\t-q\t\tquiet mode (def: loud :-) )\n"
"\t\t\t NOTE: -q will also silence msg(), warn(), warnp() if -v 0\n"
"\n"
"\tinfo.json\tcheck info.json file, . ==> skip IOCCC .info.json style check\n"
"\tauth.json\tcheck auth.json file, . ==> skip IOCCC .auth.json style check\n"
"\n"
"Exit codes:\n"
" 0\t\tall is OK\n"
" 1\t\tJSON files(s) are valid JSON but one or more semantic checks failed\n"
" 2\t\t-h and help string printed or -V and version string printed\n"
" 3\t\tcommand line error\n"
" 4\t\tfile(s) not valid JSON; no semantic checks were performed\n"
" >=10\tinternal error\n"
"\n"
"%s version: %s\n"
"jparse UTF-8 version: %s\n"
"jparse library version: %s";
/*
* functions
*/
static void usage(int exitcode, char const *prog, char const *str) __attribute__((noreturn));
/*
* usage - print usage to stderr
*
* Example:
* usage(3, program, "wrong number of arguments");
*
* given:
* exitcode value to exit with
* str top level usage message
* prog our program name
*
* NOTE: We warn with extra newlines to help internal fault messages stand out.
* Normally one should NOT include newlines in warn messages.
*
* This function does not return.
*/
static void
usage(int exitcode, char const *prog, char const *str)
{
/*
* firewall
*/
if (prog == NULL) {
prog = CHKENTRY_BASENAME;
warn(__func__, "\nin usage(): prog was NULL, forcing it to be: %s\n", prog);
}
if (str == NULL) {
str = "((NULL str))";
warn(__func__, "\nin usage(): str was NULL, forcing it to be: %s\n", str);
}
/*
* print the formatted usage stream
*/
if (*str != '\0') {
fprintf_usage(DO_NOT_EXIT, stderr, "%s\n", str);
}
fprintf_usage(exitcode, stderr, usage_msg, prog, DBG_DEFAULT, JSON_DBG_DEFAULT,
CHKENTRY_BASENAME, CHKENTRY_VERSION, JPARSE_UTF8_VERSION, JPARSE_LIBRARY_VERSION);
exit(exitcode); /*ooo*/
not_reached();
}
int
main(int argc, char *argv[])
{
char const *program = NULL; /* our name */
extern char *optarg; /* option argument */
extern int optind; /* argv index of the next arg */
char const *submission_dir = "."; /* submission directory to process, or NULL ==> process files */
char const *info_filename = "."; /* .info.json file to process, or NULL ==> no .info.json to process */
char const *auth_filename = "."; /* .auth.json file to process, or NULL ==> no .auth.json to process */
char *info_path = NULL; /* full path of .info.json or NULL */
char *auth_path = NULL; /* full path of .auth.json or NULL */
FILE *info_stream = NULL; /* open .info.json file stream */
FILE *auth_stream = NULL; /* open .auth.json file stream */
struct json *info_tree = NULL; /* JSON parse tree for .info.json, or NULL ==> not parsed */
struct json *auth_tree = NULL; /* JSON parse tree for .auth.json, or NULL ==> not parsed */
bool info_valid = false; /* .info.json is valid JSON */
bool auth_valid = false; /* .auth.json is valid JSON */
struct dyn_array *info_count_err = NULL; /* JSON semantic count errors for .info.json */
struct dyn_array *info_val_err = NULL; /* JSON semantic validation errors for .info.json */
struct dyn_array *auth_count_err = NULL; /* JSON semantic count errors for .auth.json */
struct dyn_array *auth_val_err = NULL; /* JSON semantic validation errors for .auth.json */
uintmax_t info_count_err_count = 0; /* semantic count error count from json_sem_check() for .info.json */
uintmax_t info_val_err_count = 0; /* semantic validation error count from json_sem_check() for .info.json */
uintmax_t info_int_err_count = 0; /* internal error count from json_sem_check() for .info.json */
uintmax_t info_all_err_count = 0; /* number of errors (count+validation+internal) from json_sem_check() for .info.json */
uintmax_t auth_count_err_count = 0; /* semantic count error count from json_sem_check() for .auth.json */
uintmax_t auth_val_err_count = 0; /* semantic validation count from json_sem_check() for .auth.json */
uintmax_t auth_int_err_count = 0; /* internal error count from json_sem_check() for .auth.json */
uintmax_t auth_all_err_count = 0; /* number of errors (count+validation+internal) from json_sem_check() for .auth.json */
uintmax_t all_count_err_count = 0; /* semantic count error count from json_sem_check() for .auth.json */
uintmax_t all_val_err_count = 0; /* semantic validation error count from json_sem_check() for .auth.json */
uintmax_t all_int_err_count = 0; /* internal error count from json_sem_check() for .auth.json */
uintmax_t all_all_err_count = 0; /* number of errors (count+validation+internal) from json_sem_check() for .auth.json */
struct json_sem_count_err *sem_count_err = NULL; /* semantic count error to print */
struct json_sem_val_err *sem_val_err = NULL; /* semantic validation error to print */
uintmax_t c; /* dynamic array index */
int i;
/*
* parse args
*/
program = argv[0];
while ((i = getopt(argc, argv, ":hv:J:Vq")) != -1) {
switch (i) {
case 'h': /* -h - print help to stderr and exit 0 */
usage(2, program, ""); /*ooo*/
not_reached();
break;
case 'v': /* -v verbosity */
/*
* parse verbosity
*/
verbosity_level = parse_verbosity(optarg);
if (verbosity_level < 0) {
usage(3, program, "invalid -v verbosity"); /*ooo*/
not_reached();
}
break;
case 'J': /* -J json_verbosity */
/*
* parse JSON verbosity level
*/
json_verbosity_level = parse_verbosity(optarg);
if (verbosity_level < 0) {
usage(3, program, "invalid -J json_verbosity"); /*ooo*/
not_reached();
}
break;
case 'V': /* -V - print version and exit */
print("%s version: %s\n", CHKENTRY_BASENAME, CHKENTRY_VERSION);
print("jparse UTF-8 version: %s\n", JPARSE_UTF8_VERSION);
print("jparse library version: %s\n", JPARSE_LIBRARY_VERSION);
exit(2); /*ooo*/
not_reached();
break;
case 'q':
quiet = true;
msg_warn_silent = true;
break;
case ':': /* option requires an argument */
case '?': /* illegal option */
default: /* anything else but should not actually happen */
check_invalid_option(program, i, optopt);
usage(3, program, ""); /*ooo*/
not_reached();
break;
}
}
argc -= optind;
argv += optind;
switch (argc) {
case 1:
usage(3, program, "single argument mode is reserved for future use"); /*ooo*/
not_reached();
break;
case 2:
submission_dir = NULL;
info_filename = argv[0];
auth_filename = argv[1];
break;
default:
usage(3, program, "wrong number of arguments"); /*ooo*/
not_reached();
break;
}
if (info_filename != NULL && strcmp(info_filename, ".") == 0 &&
auth_filename != NULL && strcmp(auth_filename, ".") == 0 && submission_dir == NULL) {
vrergfB(-1, -1); /* Easter egg */
not_reached();
}
if (submission_dir == NULL) {
dbg(DBG_LOW, "submission_dir is NULL");
} else {
dbg(DBG_LOW, "submission_dir: %s", submission_dir);
}
if (info_filename == NULL) {
dbg(DBG_LOW, "info_filename is NULL");
} else if (strcmp(info_filename, ".") == 0) {
dbg(DBG_LOW, "info_filename is .");
} else {
dbg(DBG_LOW, "info_filename: %s", info_filename);
}
if (auth_filename == NULL) {
dbg(DBG_LOW, "auth_filename is NULL");
} else if (strcmp(auth_filename, ".") == 0) {
dbg(DBG_LOW, "auth_filename is .");
} else {
dbg(DBG_LOW, "auth_filename: %s", auth_filename);
}
/*
* case: 1 arg - directory
*/
if (submission_dir != NULL && info_filename == NULL && auth_filename == NULL) {
/*
* open the .info.json file under submission_dir
*/
info_filename = ".info.json";
info_stream = open_dir_file(submission_dir, info_filename);
if (info_stream == NULL) { /* paranoia */
err(22, __func__, "info_stream = open_dir_file(%s, %s) returned NULL", submission_dir, info_filename);
not_reached();
}
/*
* open the .auth.json file under submission_dir
*/
auth_filename = ".auth.json";
auth_stream = open_dir_file(submission_dir, auth_filename);
if (auth_stream == NULL) { /* paranoia */
err(23, __func__, "auth_stream = open_dir_file(%s, %s) returned NULL", submission_dir, auth_filename);
not_reached();
}
/*
* case: 2 args - info path and auth path
*/
} else if (submission_dir == NULL && info_filename != NULL && auth_filename != NULL) {
/*
* open the .info.json file unless it is .
*/
if (strcmp(info_filename, ".") != 0) {
info_stream = open_dir_file(NULL, info_filename);
if (info_stream == NULL) { /* paranoia */
err(24, __func__, "open_dir_file returned NULL for .info.json path: %s", info_filename);
not_reached();
}
} else {
info_stream = NULL;
}
/*
* open the .auth.json file unless it is .
*/
if (strcmp(auth_filename, ".") != 0) {
auth_stream = open_dir_file(NULL, auth_filename);
if (auth_stream == NULL) { /* paranoia */
err(25, __func__, "open_dir_file returned NULL for .auth.json path: %s", auth_filename);
not_reached();
}
} else {
auth_stream = NULL;
}
/*
* case: paranoia
*/
} else {
err(26, __func__, "we should not get here; please report, making sure to use 'make bug_report'");
not_reached();
}
info_path = calloc_path(submission_dir, info_filename);
if (info_path == NULL) {
err(27, __func__, "info_path is NULL");
not_reached();
}
auth_path = calloc_path(submission_dir, auth_filename);
if (auth_path == NULL) {
err(28, __func__, "auth_path is NULL");
not_reached();
}
/*
* parse .info.json if it is open
*/
if (info_stream != NULL) {
info_tree = parse_json_stream(info_stream, info_path, &info_valid);
if (info_valid == false || info_tree == NULL) {
err(4, __func__, "failed to parse JSON in .info.json file: %s", info_path); /*ooo*/
not_reached();
}
dbg(DBG_LOW, "successful parse of JSON in .info.json file: %s", info_path);
}
/*
* parse .auth.json if it is open
*/
if (auth_stream != NULL) {
auth_tree = parse_json_stream(auth_stream, auth_path, &auth_valid);
if (auth_valid == false || auth_tree == NULL) {
err(4, __func__, "failed to parse JSON in .auth.json file: %s", auth_path); /*ooo*/
not_reached();
}
dbg(DBG_LOW, "successful parse of JSON in .auth.json file: %s", auth_path);
}
/*
* check a JSON parse tree against a JSON semantic table for .info.json, if open
*/
if (info_stream != NULL) {
/*
* perform JSON semantic analysis on the .info.json JSON parse tree
*/
dbg(DBG_HIGH, "about to perform JSON semantic check for .info.json file: %s", info_path);
info_all_err_count = json_sem_check(info_tree, JSON_DEFAULT_MAX_DEPTH, sem_info,
&info_count_err, &info_val_err);
/*
* firewall on json_sem_check() results AND count errors for .info.json
*/
if (info_count_err == NULL) {
err(29, __func__, "json_sem_check() left info_count_err as NULL for .info.json file: %s", info_path);
not_reached();
}
if (dyn_array_tell(info_count_err) < 0) {
err(30, __func__, "dyn_array_tell(info_count_err): %jd < 0 "
"for .info.json file: %s",
dyn_array_tell(info_count_err), info_path);
not_reached();
}
info_count_err_count = (uintmax_t)dyn_array_tell(info_count_err);
if (info_val_err == NULL) {
err(31, __func__, "json_sem_check() left info_val_err as NULL for .info.json file: %s", info_path);
not_reached();
}
if (dyn_array_tell(info_val_err) < 0) {
err(32, __func__, "dyn_array_tell(info_val_err): %jd < 0 "
"for .info.json file: %ss",
dyn_array_tell(info_val_err), info_path);
not_reached();
}
info_val_err_count = (uintmax_t)dyn_array_tell(info_val_err);
if (info_all_err_count < info_count_err_count+info_val_err_count) {
err(33, __func__, "info_all_err_count: %ju < info_count_err_count: %ju + info_val_err_count: %ju "
"for .info.json file: %s",
info_all_err_count, info_count_err_count, info_val_err_count, info_path);
not_reached();
}
info_int_err_count = info_all_err_count - (info_count_err_count+info_val_err_count);
}
/*
* check a JSON parse tree against a JSON semantic table for .auth.json, if open
*/
if (auth_stream != NULL) {
/*
* perform JSON semantic analysis on the .auth.json JSON parse tree
*/
dbg(DBG_HIGH, "about to perform JSON semantic check for .auth.json file: %s", auth_path);
auth_all_err_count = json_sem_check(auth_tree, JSON_DEFAULT_MAX_DEPTH, sem_auth,
&auth_count_err, &auth_val_err);
/*
* firewall on json_sem_check() results AND count errors for .auth.json
*/
if (auth_count_err == NULL) {
err(34, __func__, "json_sem_check() left auth_count_err as NULL for .auth.json file: %s", auth_path);
not_reached();
}
if (dyn_array_tell(auth_count_err) < 0) {
err(35, __func__, "dyn_array_tell(auth_count_err): %jd < 0 "
"for .auth.json file: %s", dyn_array_tell(auth_count_err), auth_path);
not_reached();
}
auth_count_err_count = (uintmax_t) dyn_array_tell(auth_count_err);
if (auth_val_err == NULL) {
err(36, __func__, "json_sem_check() left auth_val_err as NULL for .auth.json file: %s", auth_path);
not_reached();
}
if (dyn_array_tell(auth_val_err) < 0) {
err(37, __func__, "dyn_array_tell(auth_val_err): %jd < 0 "
"for .auth.json file: %s", dyn_array_tell(auth_val_err), auth_path);
not_reached();
}
auth_val_err_count = (uintmax_t)dyn_array_tell(auth_val_err);
if (auth_all_err_count < auth_count_err_count+auth_val_err_count) {
err(38, __func__, "auth_all_err_count: %ju < auth_count_err_count: %ju + auth_val_err_count: %ju "
"for .auth.json file: %s",
auth_all_err_count, auth_count_err_count, auth_val_err_count, auth_path);
not_reached();
}
auth_int_err_count = auth_all_err_count - (auth_count_err_count+auth_val_err_count);
}
/*
* count all errors
*/
all_count_err_count = info_count_err_count + auth_count_err_count;
all_val_err_count = info_val_err_count + auth_val_err_count;
all_int_err_count = info_int_err_count + auth_int_err_count;
all_all_err_count = info_all_err_count + auth_all_err_count;
/*
* report details of any .info.json semantic errors
*/
if (info_all_err_count > 0) {
fpr(stderr, __func__, "What follows are semantic errors for .info.json file: %s\n", info_path);
if (info_count_err == NULL) {
fpr(stderr, __func__, "info_count_err is NULL!!!\n");
} else {
for (c=0; c < info_count_err_count; ++c) {
sem_count_err = dyn_array_addr(info_count_err, struct json_sem_count_err, c);
fprint_count_err(stderr, ".info.json count error ", sem_count_err, "\n");
}
for (c=0; c < info_val_err_count; ++c) {
sem_val_err = dyn_array_addr(info_val_err, struct json_sem_val_err, c);
fprint_val_err(stderr, ".info.json validation error ", sem_val_err, "\n");
}
}
if (info_int_err_count > 0) {
fpr(stderr, __func__, ".info.json internal errors found: %ju", info_int_err_count);
}
}
/*
* report details of any .auth.json semantic errors
*/
if (auth_all_err_count > 0) {
fpr(stderr, __func__, "What follows are semantic errors for .auth.json file: %s\n", auth_path);
if (auth_count_err == NULL) {
fpr(stderr, __func__, "auth_count_err is NULL!!!\n");
} else {
for (c=0; c < auth_count_err_count; ++c) {
sem_count_err = dyn_array_addr(auth_count_err, struct json_sem_count_err, c);
fprint_count_err(stderr, ".auth.json count error ", sem_count_err, "\n");
}
for (c=0; c < auth_val_err_count; ++c) {
sem_val_err = dyn_array_addr(auth_val_err, struct json_sem_val_err, c);
fprint_val_err(stderr, ".auth.json validation error ", sem_val_err, "\n");
}
}
if (auth_int_err_count > 0) {
fpr(stderr, __func__, ".auth.json internal errors found: %ju", auth_int_err_count);
}
}
/*
* report on semantic count errors
*/
if (all_count_err_count > 0) {
if (info_count_err_count > 0) {
dbg(DBG_LOW, "count errors for .info.json: %ju", info_count_err_count);
}
if (auth_count_err_count > 0) {
dbg(DBG_LOW, "count errors for .auth.json: %ju", auth_count_err_count);
}
dbg(DBG_LOW, "count errors for both files: %ju", all_count_err_count);
}
/*
* report on semantic validation errors
*/
if (all_val_err_count > 0) {
if (info_val_err_count > 0) {
dbg(DBG_LOW, "validation errors for .info.json: %ju", info_val_err_count);
}
if (auth_val_err_count > 0) {
dbg(DBG_LOW, "validation errors for .auth.json: %ju", auth_val_err_count);
}
dbg(DBG_LOW, "validation errors for both files: %ju", all_val_err_count);
}
/*
* report on internal errors
*/
if (all_int_err_count > 0) {
if (info_int_err_count > 0) {
dbg(DBG_LOW, "internal errors for .info.json: %ju", info_int_err_count);
}
if (auth_int_err_count > 0) {
dbg(DBG_LOW, "internal errors for .auth.json: %ju", auth_int_err_count);
}
dbg(DBG_LOW, "internal errors for both files: %ju", all_int_err_count);
}
/*
* report on total error counts
*/
if (all_all_err_count > 0) {
if (info_all_err_count > 0) {
dbg(DBG_LOW, "total semantic errors for .info.json: %ju", info_all_err_count);
}
if (auth_all_err_count > 0) {
dbg(DBG_LOW, "total semantic errors for .auth.json: %ju", auth_all_err_count);
}
dbg(DBG_LOW, "total semantic errors for both files: %ju", all_all_err_count);
}
/*
* summarize the JSON semantic check status
*/
if (info_all_err_count > 0) {
if (info_path == NULL) {
werr(1, __func__, "JSON semantic check failed for .info.json file: ((NULL))"); /*ooo*/
} else {
werr(1, __func__, "JSON semantic check failed for .info.json file: %s", info_path); /*ooo*/
}
}
if (auth_all_err_count > 0) {
if (auth_path == NULL) {
werr(1, __func__, "JSON semantic check failed for .auth.json file: ((NULL))"); /*ooo*/
} else {
werr(1, __func__, "JSON semantic check failed for .auth.json file: %s", auth_path); /*ooo*/
}
}
if (all_all_err_count == 0) {
dbg(DBG_LOW, "JSON semantic check OK");
}
/*
* cleanup - except for info_stream and auth_stream.
*
* We don't try closing info_stream or auth_stream because the json parser
* already does that at this point. This is because we no longer use yyin
* due to complications introduced when making the lexer re-entrant. This is
* not a problem under macOS but it is under linux.
*/
if (info_tree != NULL) {
json_tree_free(info_tree, JSON_DEFAULT_MAX_DEPTH);
info_tree = NULL;
}
if (auth_tree != NULL) {
json_tree_free(auth_tree, JSON_DEFAULT_MAX_DEPTH);
auth_tree = NULL;
}
if (info_count_err != NULL) {
free_count_err(info_count_err);
info_count_err = NULL;
}
if (info_val_err != NULL) {
free_val_err(info_val_err);
info_val_err = NULL;
}
if (auth_count_err != NULL) {
free_count_err(auth_count_err);
auth_count_err = NULL;
}
if (auth_val_err != NULL) {
free_val_err(auth_val_err);
auth_val_err = NULL;
}
if (info_path != NULL) {
free(info_path);
info_path = NULL;
}
if (auth_path != NULL) {
free(auth_path);
auth_path = NULL;
}
/*
* All Done!!! All Done!!! -- Jessica Noll, Age 2
*
*/
if (all_all_err_count > 0) {
err(1, __func__, "JSON semantic check failed"); /*ooo*/
not_reached();
}
exit(0); /*ooo*/
}