diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-02-01 01:37:08 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-02-01 01:37:08 +0000 |
commit | a9fe81af3b8d02e1529b3f1f2a679b93cd9c36e1 (patch) | |
tree | 4b30cdf598ee6a8b24903fba52bb3e0c06bf459b /libf2c/libF77/getarg_.c | |
parent | 9682c2b47acc059592d168a09c7162f2bf333ee2 (diff) | |
download | gcc-a9fe81af3b8d02e1529b3f1f2a679b93cd9c36e1.tar.gz |
* Previous contents of gcc/f/runtime moved into toplevel
"libf2c" directory.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@17568 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libf2c/libF77/getarg_.c')
-rw-r--r-- | libf2c/libF77/getarg_.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/libf2c/libF77/getarg_.c b/libf2c/libF77/getarg_.c new file mode 100644 index 00000000000..eaded2e4c9b --- /dev/null +++ b/libf2c/libF77/getarg_.c @@ -0,0 +1,28 @@ +#include "f2c.h" + +/* + * subroutine getarg(k, c) + * returns the kth unix command argument in fortran character + * variable argument c +*/ + +#ifdef KR_headers +VOID G77_getarg_0 (n, s, ls) ftnint *n; register char *s; ftnlen ls; +#else +void G77_getarg_0 (ftnint *n, register char *s, ftnlen ls) +#endif +{ +extern int xargc; +extern char **xargv; +register char *t; +register int i; + +if(*n>=0 && *n<xargc) + t = xargv[*n]; +else + t = ""; +for(i = 0; i<ls && *t!='\0' ; ++i) + *s++ = *t++; +for( ; i<ls ; ++i) + *s++ = ' '; +} |