FreeCalypso > hg > fc-rfcal-tools
comparison autocal/sockopts.c @ 21:a3f48378658d
autocal: beginning of fc-rfcal-vcxo
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 22 May 2017 20:51:55 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
20:7ac866c3baf6 | 21:a3f48378658d |
---|---|
1 /* | |
2 * This module contains the common code for handling | |
3 * -s and -t command line options. | |
4 */ | |
5 | |
6 #include <stdio.h> | |
7 #include <stdlib.h> | |
8 #include <unistd.h> | |
9 #include <rvinterf/exitcodes.h> | |
10 | |
11 extern char *rvif_socket_pathname, *tsid_socket_pathname; | |
12 | |
13 socket_pathname_options(argc, argv) | |
14 char **argv; | |
15 { | |
16 extern char *optarg; | |
17 int c; | |
18 | |
19 while ((c = getopt(argc, argv, "s:t:")) != EOF) { | |
20 switch (c) { | |
21 case 's': | |
22 rvif_socket_pathname = optarg; | |
23 continue; | |
24 case 't': | |
25 tsid_socket_pathname = optarg; | |
26 continue; | |
27 case '?': | |
28 default: | |
29 /* error msg already printed */ | |
30 exit(ERROR_USAGE); | |
31 } | |
32 } | |
33 return(0); | |
34 } |