Ejemplo n.º 1
0
static FILE *gunzip(const char *fn,const char *mode)
{
    FILE *fp;
    char buf[256];

    sprintf(buf,"gunzip -c < %s",fn);
    fprintf(stderr,"Going to execute '%s'\n",buf);
    if ((fp=popen(buf,mode)) == NULL)
        gmx_open(fn);
    push_ps(fp);

    return fp;
}
Ejemplo n.º 2
0
static FILE *uncompress(const char *fn, const char *mode)
{
    FILE *fp;
    char  buf[256];

    sprintf(buf, "uncompress -c < %s", fn);
    fprintf(stderr, "Going to execute '%s'\n", buf);
    if ((fp = popen(buf, mode)) == NULL)
    {
        gmx_open(fn);
    }
    push_ps(fp);

    return fp;
}