Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide 149
Programming Examples
LAN Programming Interface Examples
******************************************************************/
#include <stdio.h> /* For NULL, EOF */
#include <string.h> /* For strchr() */
char *optarg; /* Global argument pointer. */
int optind = 0; /* Global argv index. */
static char *scan = NULL; /* Private scan pointer. */
int getopt( int argc, char * const argv[], const char* optstring)
{
char c;
char *posn;
optarg = NULL;
if (scan == NULL || *scan == '\0') {
if (optind == 0)
+;
if (optind >= argc || argv[optind][0] != '-' ||
argv[optind][1] == '\0')
return(EOF);
if (strcmp(argv[optind], "--")==0) {
+;
return(EOF);
}
scan = argv[1;
+;
}
Summary of Contents for X-Series
Page 4: ...4 ...
Page 10: ...10 Contents ...