Agilent Technologies E4406A VSA Programming Examples, if *scan != ’\0’ optarg = scan; scan = NULL

Models: E4406A VSA

1 406
Download 406 pages 63.49 Kb
Page 170
Image 170
if (*scan != ’\0’) { optarg = scan; scan = NULL;

Programming Examples

Using C Programming Over Socket LAN (Windows NT)

}

 

scan = argv[optind]+1;

 

optind++;

 

}

 

c = *scan++;

 

posn = strchr(optstring, c);

/* DDP */

if (posn == NULL c == ’:’) {

fprintf(stderr, "%s: unknown option -%c\n", argv[0], c); return(’?’);

}

posn++;

if (*posn == ’:’) {

if (*scan != ’\0’) { optarg = scan; scan = NULL;

} else {

optarg = argv[optind]; optind++;

}

}

return(c);

}

170

Chapter 3

Page 170
Image 170
Agilent Technologies E4406A VSA manual Programming Examples, Using C Programming Over Socket LAN Windows NT, Chapter