Changeset 77d8df8 in buchla-emu for emu/main.c
- Timestamp:
- 01/05/2018 04:35:58 PM (6 years ago)
- Branches:
- master
- Children:
- 9ddbf3e
- Parents:
- 379ffd9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
emu/main.c
r379ffd9 r77d8df8 45 45 SDL_atomic_t run; 46 46 47 uint32_t mid_port = 0; 48 47 49 static void usage(FILE *fh) 48 50 { 49 fprintf(fh, "usage: buchla [-h] [-v comp [-v comp [...]]] [-b bios] [-d disk] [-f font] \n");51 fprintf(fh, "usage: buchla [-h] [-v comp [-v comp [...]]] [-b bios] [-d disk] [-f font] [-m midiport] \n"); 50 52 fprintf(fh, "where comp is one of: "); 51 53 … … 55 57 56 58 fprintf(fh, "all\n"); 59 fprintf(fh, "and midiport is the number of the desired MIDI port\n"); 60 fprintf(fh, "list all available MIDI ports with: buchla [-m list]\n"); 57 61 } 58 62 … … 130 134 continue; 131 135 } 136 137 if (strcmp(argv[i], "-m") == 0) { 138 if (++i == argc) { 139 usage(stderr); 140 fprintf(stderr, "missing argument to -m\n"); 141 exit(1); 142 } 143 144 if (strcmp(argv[i], "list") == 0) { 145 mid_list(); 146 exit(0); 147 continue; 148 } 149 150 // TODO: Assign midi port number 151 mid_port = (uint32_t) atoi(argv[i]); 152 continue; 153 } 132 154 } 133 155 }
Note:
See TracChangeset
for help on using the changeset viewer.