Lines 318-324
static int parse_signal(const char *str);
Link Here
|
318 |
#define isdigitch(Anychar) isdigit((u_char)(Anychar)) |
318 |
#define isdigitch(Anychar) isdigit((u_char)(Anychar)) |
319 |
#define isprintch(Anychar) isprint((u_char)(Anychar)) |
319 |
#define isprintch(Anychar) isprint((u_char)(Anychar)) |
320 |
#define isspacech(Anychar) isspace((u_char)(Anychar)) |
320 |
#define isspacech(Anychar) isspace((u_char)(Anychar)) |
321 |
#define tolowerch(Anychar) tolower((u_char)(Anychar)) |
321 |
#define toupperch(Anychar) toupper((u_char)(Anychar)) |
322 |
|
322 |
|
323 |
int |
323 |
int |
324 |
main(int argc, char **argv) |
324 |
main(int argc, char **argv) |
Lines 1397-1458
parse_file(FILE *cf, struct cflist *work_p, struct cflist *glob_p,
Link Here
|
1397 |
} |
1397 |
} |
1398 |
|
1398 |
|
1399 |
for (; q && *q && !isspacech(*q); q++) { |
1399 |
for (; q && *q && !isspacech(*q); q++) { |
1400 |
switch (tolowerch(*q)) { |
1400 |
switch (toupperch(*q)) { |
1401 |
case 'b': |
1401 |
case 'B': |
1402 |
working->flags |= CE_BINARY; |
1402 |
working->flags |= CE_BINARY; |
1403 |
break; |
1403 |
break; |
1404 |
case 'c': |
1404 |
case 'C': |
1405 |
working->flags |= CE_CREATE; |
1405 |
working->flags |= CE_CREATE; |
1406 |
break; |
1406 |
break; |
1407 |
case 'd': |
1407 |
case 'D': |
1408 |
working->flags |= CE_NODUMP; |
1408 |
working->flags |= CE_NODUMP; |
1409 |
break; |
1409 |
break; |
1410 |
case 'e': |
1410 |
case 'E': |
1411 |
working->flags |= CE_NOEMPTY; |
1411 |
working->flags |= CE_NOEMPTY; |
1412 |
break; |
1412 |
break; |
1413 |
case 'g': |
1413 |
case 'G': |
1414 |
working->flags |= CE_GLOB; |
1414 |
working->flags |= CE_GLOB; |
1415 |
break; |
1415 |
break; |
1416 |
case 'j': |
1416 |
case 'J': |
1417 |
if (compress_type_override == COMPRESS_LEGACY) |
1417 |
if (compress_type_override == COMPRESS_LEGACY) |
1418 |
working->compress = COMPRESS_BZIP2; |
1418 |
working->compress = COMPRESS_BZIP2; |
1419 |
else |
1419 |
else |
1420 |
working->compress = compress_type_override; |
1420 |
working->compress = compress_type_override; |
1421 |
compress_type_seen = true; |
1421 |
compress_type_seen = true; |
1422 |
break; |
1422 |
break; |
1423 |
case 'n': |
1423 |
case 'N': |
1424 |
working->flags |= CE_NOSIGNAL; |
1424 |
working->flags |= CE_NOSIGNAL; |
1425 |
break; |
1425 |
break; |
1426 |
case 'p': |
1426 |
case 'P': |
1427 |
working->flags |= CE_PLAIN0; |
1427 |
working->flags |= CE_PLAIN0; |
1428 |
break; |
1428 |
break; |
1429 |
case 'r': |
1429 |
case 'R': |
1430 |
working->flags |= CE_PID2CMD; |
1430 |
working->flags |= CE_PID2CMD; |
1431 |
break; |
1431 |
break; |
1432 |
case 't': |
1432 |
case 'T': |
1433 |
working->flags |= CE_RFC5424; |
1433 |
working->flags |= CE_RFC5424; |
1434 |
break; |
1434 |
break; |
1435 |
case 'u': |
1435 |
case 'U': |
1436 |
working->flags |= CE_SIGNALGROUP; |
1436 |
working->flags |= CE_SIGNALGROUP; |
1437 |
break; |
1437 |
break; |
1438 |
case 'w': |
1438 |
case 'W': |
1439 |
/* Deprecated flag - keep for compatibility purposes */ |
1439 |
/* Deprecated flag - keep for compatibility purposes */ |
1440 |
break; |
1440 |
break; |
1441 |
case 'x': |
1441 |
case 'X': |
1442 |
if (compress_type_override == COMPRESS_LEGACY) |
1442 |
if (compress_type_override == COMPRESS_LEGACY) |
1443 |
working->compress = COMPRESS_XZ; |
1443 |
working->compress = COMPRESS_XZ; |
1444 |
else |
1444 |
else |
1445 |
working->compress = compress_type_override; |
1445 |
working->compress = compress_type_override; |
1446 |
compress_type_seen = true; |
1446 |
compress_type_seen = true; |
1447 |
break; |
1447 |
break; |
1448 |
case 'y': |
1448 |
case 'Y': |
1449 |
if (compress_type_override == COMPRESS_LEGACY) |
1449 |
if (compress_type_override == COMPRESS_LEGACY) |
1450 |
working->compress = COMPRESS_ZSTD; |
1450 |
working->compress = COMPRESS_ZSTD; |
1451 |
else |
1451 |
else |
1452 |
working->compress = compress_type_override; |
1452 |
working->compress = compress_type_override; |
1453 |
compress_type_seen = true; |
1453 |
compress_type_seen = true; |
1454 |
break; |
1454 |
break; |
1455 |
case 'z': |
1455 |
case 'Z': |
1456 |
if (compress_type_override == COMPRESS_LEGACY) |
1456 |
if (compress_type_override == COMPRESS_LEGACY) |
1457 |
working->compress = COMPRESS_GZIP; |
1457 |
working->compress = COMPRESS_GZIP; |
1458 |
else |
1458 |
else |
Lines 1461-1468
parse_file(FILE *cf, struct cflist *work_p, struct cflist *glob_p,
Link Here
|
1461 |
break; |
1461 |
break; |
1462 |
case '-': |
1462 |
case '-': |
1463 |
break; |
1463 |
break; |
1464 |
case 'f': /* Used by OpenBSD for "CE_FOLLOW" */ |
1464 |
case 'F': /* Used by OpenBSD for "CE_FOLLOW" */ |
1465 |
case 'm': /* Used by OpenBSD for "CE_MONITOR" */ |
1465 |
case 'M': /* Used by OpenBSD for "CE_MONITOR" */ |
1466 |
default: |
1466 |
default: |
1467 |
badline("illegal flag in config file -- %c", |
1467 |
badline("illegal flag in config file -- %c", |
1468 |
*q); |
1468 |
*q); |
1469 |
- |
|
|