Agilent Technologies N5183A MXG User Manual

Page 131

Advertising
background image

Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide

121

Programming Examples

LAN Programming Interface Examples

case 'n': number = 1; break ;

case 'e': show_errs = 1; break ;

case 'u':

case '?': usage(basename); exit(1) ;

}

/* now look for hostname and optional <command>*/

if (optind < argc)

{

destination = argv[optind++] ;

strcpy(command, "");

if (optind < argc)

{

while (optind < argc) {

/* <hostname> <command> provided; only one command string */

strcat(command, argv[optind++]);

if (optind < argc) {

strcat(command, " ");

} else {

strcat(command, "\n");

}

}

}

else

{

/*Only <hostname> provided; input on <stdin> */

strcpy(command, "");

if (optind > argc)

{

usage(basename);

exit(1);

}

}

}

else

{

/* no hostname! */

usage(basename);

exit(1);

}

Advertising
This manual is related to the following products: