|
|
1.1 ! root 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: long int *n; ! 9: register char *s; ! 10: long int ls; ! 11: { ! 12: extern int xargc; ! 13: extern char **xargv; ! 14: register char *t; ! 15: register int i; ! 16: ! 17: if(*n>=0 && *n<xargc) ! 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: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.