From 37464ec917ef795bdadba2889fc9fc4eeae58b7f Mon Sep 17 00:00:00 2001 From: hsn <> Date: Fri, 19 Sep 2003 18:57:00 +0000 Subject: [PATCH] Initial revision --- clients/fcatcmd.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 clients/fcatcmd.c diff --git a/clients/fcatcmd.c b/clients/fcatcmd.c new file mode 100644 index 0000000..d9c86c3 --- /dev/null +++ b/clients/fcatcmd.c @@ -0,0 +1,51 @@ + /*********************************************************************\ + * Copyright (c) 2003 by Radim Kolar (hsn@cybermail.net) * + * 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 "tweak.h" +#include "client_def.h" +#include "c_extern.h" +#include "bsd_extern.h" +#ifdef STDC_HEADERS +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif + +static RETSIGTYPE dont_die PROTO1(int, signum) +{ +#ifndef RELIABLE_SIGNALS + signal(SIGPIPE,dont_die); +#endif +} + +int main PROTO2(int, argc, char **, argv) +{ + char **av; + + env_client(); + + signal(SIGPIPE,dont_die); + if(isatty(1)) client_trace = 0; + + while(*++argv) { + av = glob(*argv); + if(av) + while(*av) + { + util_download(*av,stdout,0); + *av++; + } + } + + client_done(); + + exit(0); +}