Changeset fd11144 in mainline for uspace/app/vcalc/vcalc.c
- Timestamp:
- 2020-07-04T21:52:35Z (4 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fc4abca
- Parents:
- e79a025
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/vcalc/vcalc.c
re79a025 rfd11144 468 468 } 469 469 470 static void print_syntax(void) 471 { 472 printf("Syntax: %s [-d <display>]\n", NAME); 473 } 474 470 475 int main(int argc, char *argv[]) 471 476 { 472 if (argc < 2) { 473 printf("%s: Compositor server not specified.\n", NAME); 474 return 1; 475 } 476 477 window_t *main_window = window_open(argv[1], NULL, 477 const char *display_svc = DISPLAY_DEFAULT; 478 int i; 479 480 i = 1; 481 while (i < argc) { 482 if (str_cmp(argv[i], "-d") == 0) { 483 ++i; 484 if (i >= argc) { 485 printf("Argument missing.\n"); 486 print_syntax(); 487 return 1; 488 } 489 490 display_svc = argv[i++]; 491 } else { 492 printf("Invalid option '%s'.\n", argv[i]); 493 print_syntax(); 494 return 1; 495 } 496 } 497 498 window_t *main_window = window_open(display_svc, NULL, 478 499 WINDOW_MAIN | WINDOW_DECORATED | WINDOW_RESIZEABLE, NAME); 479 500 if (!main_window) {
Note:
See TracChangeset
for help on using the changeset viewer.