Annotation of researchv10no/libF77/getarg_.c, revision 1.1

1.1     ! root        1: #include "f2c.h"
        !             2: 
        !             3: /*
        !             4:  * subroutine getarg(k, c)
        !             5:  * returns the kth unix command argument in fortran character
        !             6:  * variable argument c
        !             7: */
        !             8: 
        !             9: #ifdef KR_headers
        !            10: VOID getarg_(n, s, ls) ftnint *n; register char *s; ftnlen ls;
        !            11: #else
        !            12: void getarg_(ftnint *n, register char *s, ftnlen ls)
        !            13: #endif
        !            14: {
        !            15: extern int xargc;
        !            16: extern char **xargv;
        !            17: register char *t;
        !            18: register int i;
        !            19: 
        !            20: if(*n>=0 && *n<xargc)
        !            21:        t = xargv[*n];
        !            22: else
        !            23:        t = "";
        !            24: for(i = 0; i<ls && *t!='\0' ; ++i)
        !            25:        *s++ = *t++;
        !            26: for( ; i<ls ; ++i)
        !            27:        *s++ = ' ';
        !            28: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.