view autocal/sockopts.c @ 133:c99b1dce04ec default tip

fc-rfcal-txcheck: check and report ramp tolerance
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 20 Dec 2021 04:22:19 +0000
parents a3f48378658d
children
line wrap: on
line source

/*
 * This module contains the common code for handling
 * -s and -t command line options.
 */

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <rvinterf/exitcodes.h>

extern char *rvif_socket_pathname, *tsid_socket_pathname;

socket_pathname_options(argc, argv)
	char **argv;
{
	extern char *optarg;
	int c;

	while ((c = getopt(argc, argv, "s:t:")) != EOF) {
		switch (c) {
		case 's':
			rvif_socket_pathname = optarg;
			continue;
		case 't':
			tsid_socket_pathname = optarg;
			continue;
		case '?':
		default:
			/* error msg already printed */
			exit(ERROR_USAGE);
		}
	}
	return(0);
}