Line | |
---|
1 | /* $Id: main.c 3 2024-09-13 09:06:44Z nishi $ */
|
---|
2 |
|
---|
3 | #include <stdio.h>
|
---|
4 | #include <stdbool.h>
|
---|
5 | #include <string.h>
|
---|
6 |
|
---|
7 | #include <cm_log.h>
|
---|
8 |
|
---|
9 | #include "tw_version.h"
|
---|
10 |
|
---|
11 | extern bool cm_do_log;
|
---|
12 |
|
---|
13 | int main(int argc, char** argv) {
|
---|
14 | int i;
|
---|
15 | for(i = 1; i < argc; i++) {
|
---|
16 | if(argv[i][0] == '-') {
|
---|
17 | if(strcmp(argv[i], "--verbose") == 0 || strcmp(argv[i], "-v") == 0) {
|
---|
18 | if(!cm_do_log) {
|
---|
19 | cm_do_log = true;
|
---|
20 | cm_log("", "This is Tewi HTTPd, version %s", tw_get_version());
|
---|
21 | } else {
|
---|
22 | cm_do_log = true;
|
---|
23 | }
|
---|
24 | } else {
|
---|
25 | fprintf(stderr, "Unknown option: %s\n", argv[i]);
|
---|
26 | return 1;
|
---|
27 | }
|
---|
28 | }
|
---|
29 | }
|
---|
30 | cm_log("Daemon", "Ready");
|
---|
31 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.