1: /*
   2:  * subroutine getarg(k, c)
   3:  * returns the kth unix command argument in fortran character
   4:  * variable argument c
   5: */
   6: 
   7: getarg_(n, s, ls)
   8: int *n;
   9: char *s;
  10: long int ls;
  11: {
  12: extern int xargc;
  13: extern char **xargv;
  14: char *t;
  15: int i;
  16: 
  17: if(*n>=0 && *n<xargc)  /*! changed > to >=  --JWHerriot, USGS, Apr80 */
  18:     t = xargv[*n];
  19: else
  20:     t = "";
  21: for(i = 0; i<ls && *t!='\0' ; ++i)
  22:     *s++ = *t++;
  23: for( ; i<ls ; ++i)
  24:     *s++ = ' ';
  25: }

Defined functions

getarg_ defined in line 7; never used
Last modified: 1981-07-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 267
Valid CSS Valid XHTML 1.0 Strict