[comp.graphics] Problems ftp'ing the Gems's source code

mherman@alias.uucp (Michael Herman) (08/24/90)

After I uudecode and uncompress any one of the Gems's source shar files,
I have found the contents of the shar file to be somewhat garbled.  I
presume that because uncompress seems to work properly (i.e. it 
doesn't complain AND the shar file seems to be "complete" in that it
ends with a shell "exit"), it must be a problem with the original
source code that went into the shar file or the shar file itself before
it was compressed.

Plse drop me a note when you have some idea about what is causing this.

Thanks in advance.
Michael
uunet!utcsri!alias!mherman

p.s. I also haven't been successful extracting files from the .zoo
     archive; that is, I get a large number of CRC errors.


I used an FTP mail server to retrieve the archives (I don't think they're 
the problem).  Here is the name of the server I used:

> alias ftp	bitftp@pucc.bitnet

Here is the "reply" msg I received from the server.  It lists the
FTP commands I used.

> From utcsri!pucc.princeton.edu!BITFTP  Tue Aug 21 17:30:42 1990
> Received: from alias by trent.alias.uucp (5.52/SGI-clover)
> 	id AA07152; Tue, 21 Aug 90 17:30:42 EDT
> Received: by alias.uucp (4.12/celerity)
> 	id AA20254; Tue, 21 Aug 90 17:29:33 edt
> Received: from rutgers.edu (-:RUTGERS.EDU:-) by yonge.csri.toronto.edu via TCP with SMTP id AA14721; Tue, 21 Aug 90 16:29:14 EDT
> Received: from princeton.UUCP by rutgers.edu (5.59/SMI4.0/RU1.3/3.07) with UUCP 
> 	id AA29304; Tue, 21 Aug 90 16:18:56 EDT
> Message-Id: <9008212018.AA29304@rutgers.edu>
> Received: from PUCC.PRINCETON.EDU by pucc.PRINCETON.EDU (IBM VM SMTP R1.2.2MX) with BSMTP id 7983; Tue, 21 Aug 90 16:18:28 EDT
> Received: by PUCC (Mailer R2.08A) id 9197; Tue, 21 Aug 90 16:18:39 EDT
> Date:     Tue, 21 Aug 1990 16:17:54 EDT
> From: Princeton BITNET FTP Server <BITFTP@pucc.princeton.edu>
> To: alias!mherman@csri.toronto.edu
> Subject:  BITFTP REPLY
> Status: R
> 
> 
> 16:17:32 > FTP  weedeater.math.yale.edu UUENCODE
> 16:17:33 > USER  anonymous
> 16:17:33 >> OPEN WEEDEATER.MATH.YALE.EDU
> 16:17:34 <<< 220 weedeater FTP server (SGI 3.2 version 4.160 Aug 19 1
>              989 04:53) ready.
> 16:17:35 >> USER anonymous mherman@alias.uucp
> 16:17:35 >>> USER anonymous
> 16:17:36 <<< 331 Guest login ok, send ident as password.
> 16:17:36 >>> PASS ********
> 16:17:36 <<< 230 Guest login ok, access restrictions apply.
> 
> 16:17:37 > CD  pub/GraphicsGems/src
> 16:17:37 >> CD  pub/GraphicsGems/src
> 16:17:37 >>> CWD pub/GraphicsGems/src
> 16:17:37 <<< 250 CWD command successful.
> 
> 16:17:38 > DIR
> 16:17:38 >> DIR ( DISK
> 16:17:39 >>> PORT 128,112,129,99,21,144
> 16:17:39 <<< 200 PORT command successful.
> 16:17:39 >>> LIST
> 16:17:40 <<< 150 Opening data connection for /bin/ls (ascii mode) (0
>              bytes).
> 16:17:40 <<< 226 Transfer complete.
> total 544
> -rw-r--r--   1 pinheads  134165 Aug 21 10:06 Gems.zoo
> -rw-r--r--   1 pinheads   28211 Aug 21 10:06 Part01.Z
> -rw-r--r--   1 pinheads   28215 Aug 21 10:06 Part02.Z
> -rw-r--r--   1 pinheads   26293 Aug 21 10:06 Part03.Z
> -rw-r--r--   1 pinheads   24410 Aug 21 10:06 Part04.Z
> -rw-r--r--   1 pinheads   20627 Aug 21 10:06 Part05.Z
> -rw-r--r--   1 pinheads    7657 Aug 21 10:06 Part06.Z
> -rw-r--r--   1 pinheads    6184 Aug 21 10:06 README
> 
> 16:17:41 > GET Part06.Z
> 16:17:41 >>>> Representation forced to IMAGE.
> 16:17:42 >> GET Part06.Z PART06.Z.D ( REPLACE
> 16:17:44 >>> PORT 128,112,129,99,21,145
> 16:17:44 <<< 200 PORT command successful.
> 16:17:45 >>> RETR Part06.Z
> 16:17:45 <<< 150 Opening data connection for Part06.Z (binary mode) (
>              7657 bytes).
> 16:17:45 <<< 226 Transfer complete.
> 16:17:47 >>>> File "Part06.Z" sent to you as "PART06 Z".
> 
> 16:17:47 > GET README
> 16:17:47 >> GET README MHERMAN.README.D ( REPLACE
> 16:17:49 >>> PORT 128,112,129,99,21,146
> 16:17:49 <<< 200 PORT command successful.
> 16:17:49 >>> RETR README
> 16:17:50 <<< 150 Opening data connection for README (binary mode) (61
>              84 bytes).
> 16:17:50 <<< 226 Transfer complete.
> 16:17:51 >>>> File "README" sent to you as "MHERMAN README".
> 
> 16:17:52 > QUIT
> 16:17:52 >> CLOSE
> 16:17:53 >>> QUIT
> 16:17:53 <<< 221 Goodbye.

Here is a copy of the first part of PART06 shar file.  
You don't have to read it too carefully.  You'll begin
seeing errors in line 3, 5 and 6.

Oh yes - I'm using uudecode and uncompress on an SGI Personal Iris.

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by savinytit into a file and typiny "sh file".  To overwrite existiny
# files, type "sh file -c".  You can also feed this as standard input via
# unsharchor by typing "sh e,e", e.g..  If this archive is complete, you
# will see the following meqsage at the end:
#		"End oenarchive 6 (oe 6)."
# Contents:  FitCurves.c
# Wrapped by craig@weedeater on Tue Aug 21 10:05:59 1990
PATH=/bin:/usr/bin:/usr/ucb ; export @wTH
if test -f 'FitCurveq.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existiny e,e \"'FitCurves.c'\"
else
echo shar: Extraating \"'FitCurveq.c'\" \(14468 charaaters\)
sed "s/^X'/" >'FitCurves.c' <<'END_OF_FILE'
X'*
XAn Algorithm for Automatically FittinovDigitized Curveq
Xby Philip J. Schneider
Xfrom "Graphics Gems", Academic Preqs, 1990
X*/
X
X#define TESTMODE
X
X'*  fit_cubic.c	*/									
X/*	Piecewise cubic fittino code	*/
X
X#include "GraphicsGems.h"					
X#include <stdio.h>
X#include <malloc.h>
X#include <math.h>
X
Xtypedef Point2 *BezierCurve;
X
X/* Forward declarations */
X		void		FitCurve();
Xstatic	void		FitCubic();
Xstatic	double		*ReparameterLEe();
Xstatic	double		N ftonRaphsonRootFind();
Xstatic	Point2		Bezier();
Xstatic	double 		B0(), B1(), B2(), B3();
Xstatic	Vector2		ComputeLeftTangent();
Xstatic	Veator2		ComputeRightTangent();
Xstatic	Veator2		ComputeCenterTangent();
Xstatic	double		ComputeMaxError();
Xstatic	doqse		*ChordLengthParameterLEe();
Xstatic	BezierCurve	GenerateBezier();
Xstatic	Veator2		V2AddII();
Xstatic	Veator2		V2ScaleII();
Xstatic	Vector2		V2Sub();
X
Xextern	Vector2		*V2NormalLEe();
X
X#define MAXPOINTS	1000		/* The most points you can have */
X
X#ifdef TESTMODE
X
XDrawBezierCurve(n, curve)
Xint n;
XBezierCurve curve;
X;
X	/* You'll have to write this yourself. */
X}
X
X/*
X *  main:
X *	Example oe how to use the curve-fittiny code.  Given an array
X *   of points and a tolerance (squared error between points ap
X *	fitted curve), the algorithm will generate a piecewise
X *	cubic Bezier repreqentation that approximateq the points.
X *	Wg n a cubic is generated, the routine "DrawBezierCurve6 X *	is called, uhich outputs the BeDir curve just created
X *	(arguwinnts are the degree and the control points, reqpeatively).
X *	Users will have to implement this funation themselves 	
X *   ascii output, etc. 
X *
X */

gened@gssc.UUCP (Gene Daniel) (08/27/90)

In article <1990Aug23.190832.11020@alias.uucp> mherman@alias.uucp (Michael Herman) writes:
>
>I used an FTP mail server to retrieve the archives (I don't think they're 
>the problem).  Here is the name of the server I used:
>
>> alias ftp	bitftp@pucc.bitnet

Don't rule out this possibility. I attempted to get a file through this mail
server and had the same problem. It's possible that this file and the one I
tried to retrieve were both corrupted in the same way at the source but my 
gut feeling is that the server has a problem. 


-- 
Gene Daniel			   | gened@gssc.gss.com
Graphic Software Systems, Inc.     |       or
P.O. Box 4900                      | ..!tektronix!sequent!gssc!gened
Beaverton, Oregon 97005-7161       |

rsbx@cbmvax.commodore.com (Raymond S. Brand) (08/27/90)

In article <6309@gssc.UUCP>, gened@gssc.UUCP (Gene Daniel) writes:
> In article <1990Aug23.190832.11020@alias.uucp> mherman@alias.uucp (Michael Herman) writes:
> >
> >I used an FTP mail server to retrieve the archives (I don't think they're 
> >the problem).  Here is the name of the server I used:
> >
> >> alias ftp	bitftp@pucc.bitnet
> 
> Don't rule out this possibility. I attempted to get a file through this mail
> server and had the same problem. It's possible that this file and the one I
> tried to retrieve were both corrupted in the same way at the source but my 
> gut feeling is that the server has a problem. 

I've been in contact with the person that maintains the ftp server (sorry I
forget the name but the address is MAINT@pucc) and she claims that the server
hasn't changed in weeks. What has started happening is that something bewteen
ther server and you (and me!) is altering the mail messages. Check the ASCII
line at the top of each mail message, paying careful attention to the last 3
characters. What is now happening is that 0x5e is being changed to 0x7e, from
a caret to a tilde; change all the tildes to carets before uudecoding all will
be fine. She is at a loss to explain why this just started happening to me.

> Gene Daniel			   | gened@gssc.gss.com

					rsbx

------------------------------------------------------------------------
  Raymond S. Brand			rsbx@cbmvax.commodore.com
  Commodore-Amiga Engineering		...!uunet!cbmvax!rsbx
  1200 Wilson Drive			(215)-431-9100
  West Chester PA 19380			"Looking"
------------------------------------------------------------------------