Changeset 3 in Main for trunk/Server/main.c
- Timestamp:
- Sep 13, 2024, 6:06:44 PM (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Server/main.c
r2 r3 1 1 /* $Id$ */ 2 2 3 int main() {} 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 TracChangeset
for help on using the changeset viewer.