Keysight E4428C ESG RF Programming Manual page 150

Signal generators
Table of Contents

Advertisement

Programming Examples
LAN Programming Interface Examples
close(instSock);
#endif /* WINSOCK */
return 0;
}
/***************************************************************************
getopt(3C)
PROGRAM FILE NAME: getopt.c
getopt - get option letter from argument vector
SYNOPSIS
int getopt(int argc, char * const argv[], const char *optstring);
extern char *optarg;
extern int optind, opterr, optopt;
PRORGAM DESCRIPTION:
getopt returns the next option letter in argv (starting from argv[1])
that matches a letter in optstring.
recognized option letters; if a letter is followed by a colon, the
option is expected to have an argument that may or may not be
separated from it by white space.
of the option argument on return from getopt.
getopt places in optind the argv index of the next argument to be
processed.
The external variable optind is initialized to 1 before
the first call to the function getopt.
When all options have been processed (i.e., up to the first non-option
argument), getopt returns EOF.
delimit the end of the options; EOF is returned, and -- is skipped.
***************************************************************************/
#include <stdio.h>
#include <string.h>
char
*optarg;
int
optind = 0;
142
optstring is a string of
optarg is set to point to the start
The special option -- can be used to
/* For NULL, EOF */
/* For strchr() */
/* Global argument pointer. */
/* Global argv index. */
getopt(3C)
Keysight Signal Generators Programming Guide

Advertisement

Table of Contents
loading

Table of Contents