comparison scid/main.c @ 53:319979427566

misc: refactor using util_getopt
author David Demelier <markand@malikania.fr>
date Wed, 17 Aug 2022 09:52:00 +0200
parents 1d0ddf9e6efd
children 85c59fbf1407
comparison
equal deleted inserted replaced
52:95bc6b4ec753 53:319979427566
35 main(int argc, char **argv) 35 main(int argc, char **argv)
36 { 36 {
37 int ch; 37 int ch;
38 void (*run)(void) = &(http_cgi_run); 38 void (*run)(void) = &(http_cgi_run);
39 39
40 while ((ch = getopt(argc, argv, "d:ft:")) != -1) { 40 while ((ch = util_getopt(argc, argv, "d:ft:")) != -1) {
41 switch (ch) { 41 switch (ch) {
42 case 'd': 42 case 'd':
43 util_strlcpy(scid.dbpath, optarg, sizeof (scid.dbpath)); 43 util_strlcpy(scid.dbpath, optarg, sizeof (scid.dbpath));
44 break; 44 break;
45 case 'f': 45 case 'f':