From owner-freebsd-hackers Fri Jan 20 05:33:44 1995 Return-Path: hackers-owner Received: (from root@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id FAA10020 for hackers-outgoing; Fri, 20 Jan 1995 05:33:44 -0800 Received: from UUCP-GW.CC.UH.EDU (root@UUCP-GW.CC.UH.EDU [129.7.1.11]) by freefall.cdrom.com (8.6.9/8.6.6) with SMTP id FAA10014 for ; Fri, 20 Jan 1995 05:33:37 -0800 Received: from Taronga.COM by UUCP-GW.CC.UH.EDU with UUCP id AA12703 (5.67a/IDA-1.5 for freebsd.org!hackers); Fri, 20 Jan 1995 07:06:30 -0600 Received: by bonkers.taronga.com (smail2.5p) id AA16901; 20 Jan 95 07:05:52 CST (Fri) Received: from localhost (localhost [127.0.0.1]) by bonkers.taronga.com (8.6.8/8.6.6) with SMTP id HAA16898 for ; Fri, 20 Jan 1995 07:05:52 -0600 Message-Id: <199501201305.HAA16898@bonkers.taronga.com> X-Authentication-Warning: bonkers.taronga.com: Host localhost didn't use HELO protocol To: hackers@FreeBSD.org Subject: uftp X-Mailer: exmh version 1.4.1 7/21/94 Date: Fri, 20 Jan 1995 07:05:50 -0600 From: Peter da Silva Sender: hackers-owner@FreeBSD.org Precedence: bulk The recently posted libftp software might be the solution to the problem of getting a reasonable FTP environment for installing. I understand the disks currently use ncftp but its error handling sucks. This is way better and quite clean. Author of uftp and libftp Oleg Orel Department of Electronics and automatisation. Institute for High Energy Physics Protvino, Russia E-mail: orel@oea.ihep.su, orel@dxcern.cern.ch Here's an example of a "dumb copy" program using libftp. /* Include standard libftp's header */ #include main(int argc, char *argv[]) { FILE *input,*output; int c; if (argc<3) exit(fprintf(stderr,"Usage: %s input-file output-file\n",argv[0])); FtplibDebug(yes); if ((input=Ftpfopen(argv[1],"r"))==NULL) { perror(argv[1]); exit(1); } if ((output=Ftpfopen(argv[2],"w"))==NULL) { perror(argv[2]); exit(1); } while ( (c=getc(input)) != EOF && (putc(c,output)!=EOF) ); if (ferror(input)) { perror(argv[1]); exit(1); } if (ferror(output)) { perror(argv[1]); exit(1); } Ftpfclose(input); Ftpfclose(output); exit(0); }