    /*********************************************************************\
    *  Copyright (c) 1991 by Wen-King Su (wen-king@vlsi.cs.caltech.edu)   *
    *                                                                     *
    *  You may copy or modify this file in any manner you wish, provided  *
    *  that this notice is always included, and that you hold the author  *
    *  harmless for any loss or damage resulting from the installation or *
    *  use of this software.                                              *
    \*********************************************************************/

#include "client_def.h"

extern char **glob();

static void dont_die(){}

static get_file(path)
    char *path;
{
    char *name, *t2;
    FILE *fp;

    for(name = t2 = path; *t2; t2++) if(*t2 == '/') name = t2 + 1;
    util_download(path,stdout,0);
}

main(argc,argv,envp)
    int argc;
    char **argv,**envp;
{
    char **av, *av2[2];

    env_client();

    signal(SIGPIPE,dont_die);
    if(isatty(1)) client_trace = 0;

    while(*++argv)
    {
	if(!(av = glob(*argv))) { av = av2; av2[0] = *argv; av2[1] = 0; }
	while(*av) get_file(*av++);
    }

    client_done();

    exit(0);
}
