Changeset fd11144 in mainline for uspace/app/barber/barber.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/barber/barber.c
re79a025 rfd11144 40 40 #include <loc.h> 41 41 #include <stats.h> 42 #include <str.h> 42 43 #include <fibril_synch.h> 43 44 #include <io/pixel.h> … … 247 248 } 248 249 250 static void print_syntax(void) 251 { 252 printf("Syntax: %s [-d <display>]\n", NAME); 253 } 254 249 255 int main(int argc, char *argv[]) 250 256 { 251 if (argc < 2) { 252 printf("Compositor server not specified.\n"); 253 return 1; 257 const char *display_svc = DISPLAY_DEFAULT; 258 int i; 259 260 i = 1; 261 while (i < argc) { 262 if (str_cmp(argv[i], "-d") == 0) { 263 ++i; 264 if (i >= argc) { 265 printf("Argument missing.\n"); 266 print_syntax(); 267 return 1; 268 } 269 270 display_svc = argv[i++]; 271 } else { 272 printf("Invalid option '%s'.\n", argv[i]); 273 print_syntax(); 274 return 1; 275 } 254 276 } 255 277 … … 277 299 278 300 winreg = argv[1]; 279 window_t *main_window = window_open( argv[1], NULL,301 window_t *main_window = window_open(display_svc, NULL, 280 302 WINDOW_MAIN | WINDOW_DECORATED, "barber"); 281 303 if (!main_window) {
Note:
See TracChangeset
for help on using the changeset viewer.