File: testarg.c

package info (click to toggle)
ga 5.9.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 18,472 kB
  • sloc: ansic: 192,963; fortran: 53,761; f90: 11,218; cpp: 5,784; makefile: 2,248; sh: 1,945; python: 1,734; perl: 534; csh: 134; asm: 106
file content (33 lines) | stat: -rw-r--r-- 635 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#if HAVE_CONFIG_H
#   include "config.h"
#endif

#if HAVE_STDIO_H
#   include <stdio.h>
#endif

/** @file
 * This checks the functioning of the include file gaf2cp.h.
 */

#include "farg.h"
#include "typesf2c.h"

#define ARGLIMIT 256

#define PARG_ F77_FUNC(parg,PARG)

void PARG_()
{
    Integer i;
    Integer limit = F2C_IARGC();
    printf("argc=%d\n", (int)limit);

    for (i=0; i<limit; i++) {
        char fstring[ARGLIMIT];
        char cstring[ARGLIMIT];
        F2C_GETARG(&i, fstring, ARGLIMIT);
        ga_f2cstring(fstring, ARGLIMIT, cstring, ARGLIMIT);
        (void) printf("argv(%ld)=%s\n", (long)i, cstring);
    }
}