Esempio n. 1
0
Integer FATR ndra_inquire_(
#ifdef F2C_HIDDEN_STRING_LENGTH_AFTER_ARGS
        Integer *d_a,
        Integer *type,
        Integer *ndim,
        Integer  dims[],
        char    *name,
        char    *filename,
        int      nlen,
        int      flen
#else
        Integer *d_a,
        Integer *type,
        Integer *ndim,
        Integer  dims[],
        char    *name,
        int      nlen,
        char    *filename,
        int      flen
#endif
        )
{
    Integer stat = ndrai_inquire(d_a, type, ndim, dims, cname, cfilename);
    *type = pnga_type_c2f(*type);
    ga_c2fstring(cname, name, nlen);
    ga_c2fstring(cfilename, filename, flen);
    return stat;
}
Esempio n. 2
0
Integer FATR eaf_stat_(
#ifdef F2C_HIDDEN_STRING_LENGTH_AFTER_ARGS
        char *path,
        Integer *avail_kb,
        char *fstype,
        int pathlen,
        int fslen
#else
        char *path,
        int pathlen,
        Integer *avail_kb,
        char *fstype,
        int fslen
#endif
        )
{
    char pbuf[1024];
    char fbuf[32];

    int  code;
    long kb;

    ga_f2cstring(path, pathlen, pbuf, sizeof(pbuf));
    /* return (Integer) EAF_ERR_TOO_LONG; TODO errcheck? */

    code = EAF_Stat(pbuf, &kb, fbuf, sizeof(fbuf));

    if (!code) {
        ga_c2fstring(fbuf, fstype, fslen);
        /* return (Integer) EAF_ERR_TOO_SHORT; TODO errcheck? */
        *avail_kb = (double) kb;
    }

    return code;
}
Esempio n. 3
0
void FATR eaf_errmsg_(Integer *code,  char *msg, int msglen)
{
    char buf[80];

    EAF_Errmsg((int) *code, buf);

    (void) ga_c2fstring(buf, msg, msglen);
}