Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <unistd.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include "audio_len.h"
- struct fileDir cli(int argc, char *argv[]) {
- void help();
- int opt;
- struct fileDir dir = {".", ".", ""};
- while ((opt = getopt(argc, argv, "s:d:n:")) != -1) {
- switch (opt) {
- case 's':
- dir.src = optarg;
- break;
- case 'd':
- dir.dst = optarg;
- break;
- case 'n':
- dir.op = optarg;
- break;
- default:
- printf("Unknown option: %c\n", optopt);
- help();
- exit(1);
- }
- }
- return dir;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement