1: /*
   2: char id_getarg[] = "@(#)getarg_.c	1.1";
   3:  *
   4:  * return a specified command line argument
   5:  *
   6:  * calling sequence:
   7:  *	character*20 arg
   8:  *	call getarg(k, arg)
   9:  * where:
  10:  *	arg will receive the kth unix command argument
  11: */
  12: 
  13: #include    "../libI77/fiodefs.h"
  14: 
  15: getarg_(n, s, ls)
  16: ftnint *n;
  17: register char *s;
  18: ftnlen ls;
  19: {
  20: extern int xargc;
  21: extern char **xargv;
  22: register char *t;
  23: register int i;
  24: 
  25: if(*n>=0 && *n<xargc)
  26:     t = xargv[*n];
  27: else
  28:     t = "";
  29: for(i = 0; i<ls && *t!='\0' ; ++i)
  30:     *s++ = *t++;
  31: for( ; i<ls ; ++i)
  32:     *s++ = ' ';
  33: }

Defined functions

getarg_ defined in line 15; never used
Last modified: 1983-07-08
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 590
Valid CSS Valid XHTML 1.0 Strict