Changeset fd11144 in mainline for uspace/app/vterm/vterm.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/vterm/vterm.c
re79a025 rfd11144 1 1 /* 2 * Copyright (c) 2020 Jiri Svoboda 2 3 * Copyright (c) 2012 Petr Koupy 3 4 * All rights reserved. … … 42 43 #define NAME "vterm" 43 44 45 static void print_syntax(void) 46 { 47 printf("Syntax: %s [-d <display>]\n", NAME); 48 } 49 44 50 int main(int argc, char *argv[]) 45 51 { 46 if (argc < 2) { 47 printf("%s: Compositor server not specified.\n", NAME); 48 return 1; 52 const char *display_svc = DISPLAY_DEFAULT; 53 int i; 54 55 i = 1; 56 while (i < argc) { 57 if (str_cmp(argv[i], "-d") == 0) { 58 ++i; 59 if (i >= argc) { 60 printf("Argument missing.\n"); 61 print_syntax(); 62 return 1; 63 } 64 65 display_svc = argv[i++]; 66 } else { 67 printf("Invalid option '%s'.\n", argv[i]); 68 print_syntax(); 69 return 1; 70 } 49 71 } 50 72 51 window_t *main_window = window_open( argv[1], NULL,73 window_t *main_window = window_open(display_svc, NULL, 52 74 WINDOW_MAIN | WINDOW_DECORATED, "vterm"); 53 75 if (!main_window) {
Note:
See TracChangeset
for help on using the changeset viewer.