home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 4 / CDPD_IV.bin / networking / tcpip / amitcp-support / ncftp-1.5.6 / readme < prev    next >
Encoding:
Text File  |  1994-06-29  |  14.1 KB  |  320 lines

  1. If you are a novice user, and don't know how to compile things, try
  2. contacting your local guru first (get them to do it for you :-).  Please
  3. understand that I don't have time to walk newbies through the whole
  4. installation procedure.
  5.  
  6. 1. READ this entire file.  Part A, below, tells what to do if you want to
  7.    use NcFTP with a command-line editor.  Part B tells you how to configure
  8.    the Makefile to compile the program for your system.  Part C tells you
  9.    how to configure NcFTP's optional features.  Part D tells you how to
  10.    contact me if you want to report a bug or submit new code to the
  11.    program.
  12.  
  13. 2. EDIT the Makefile, making any necessary changes described in parts
  14.    A, B, or C.  Don't forget to read the directions in the Makefile,
  15.    so you don't forget any needed libraries, etcetera.
  16.  
  17. 3. You can also change the program's default behavior by editing defaults.h.
  18.    99% of the time you don't need to do this, so you can skip this step.
  19.  
  20. If you have problems, you can mail me, but please try your best to install
  21. it without my help.  I'm quite tired of responding to lazy SunOS users
  22. because they didn't bother reading the directions so that they would have
  23. known that they needed to use GCC.  
  24.  
  25. I _do_ want to hear from you if you have comments or bug reports/fixes.  I
  26. would also like to hear from you if you had a system that wasn't covered
  27. in sys.h, so I can add an entry for other users of your system.
  28.  
  29. The latest version of ncftp is available in the directory:
  30.     cse.unl.edu:/pub/mgleason
  31. This machine is heavily used by students and faculty alike, so please
  32. do not call during working hours (9AM - 5PM American Central time).  In fact,
  33. I have a cron entry that changes all the file permissions to public
  34. unreadable during that period, so you won't be able to download anyway.
  35.  
  36. I am grateful to Shari Deiana and the University of Nebraska for making this
  37. possible!
  38.  
  39.  
  40. Part A.  Installing with a command line editor:
  41. ----------------------------------------------
  42.  
  43. As of this release, GNU Readline and Chris Thewalt's Getline command-line
  44. editing and history facilities are supported.  Neither are included with the
  45. ncftp sources.  You can find Getline at:
  46.   ce.berkeley.edu:/pub/thewalt/getline.tar.Z  (note: use 'ls', not 'dir!')
  47. and Readline is in the directory:
  48.   prep.ai.mit.edu:/pub/gnu
  49.  
  50. To install Readline, you will need to know where libreadline.a and the
  51. header <readline/readline.h> are.  You will need to link libreadline.a and
  52. libcurses.a (or libtermcap.a) with ncftp (see the Makefile).  Good luck on
  53. trying to compile it.  It is not an easy thing to do!  In the Makefile, you
  54. will need to add -DREADLINE to PDEFS, add -lreadline -lcurses to LIBS, and
  55. edit the HDRDIRS and LIBDIRS lines.  This stuff is already in the Makefile,
  56. so you can just uncomment it.
  57.  
  58. To install Getline, you need to know where libgetline.a and it's header
  59. (getline.h) are.  In the Makefile, you'll need to add -lgetline to LIBS and
  60. edit the HDRDIRS and LIBDIRS lines.  This stuff is already in the Makefile,
  61. so you can just uncomment it.
  62.  
  63. DO NOT bug me if you can't figure out how to compile Getline or Readline.
  64. Contact their respective authors instead.  It is not essential that you use
  65. them.
  66.  
  67.  
  68. Part B.  System Dependencies:
  69. ----------------------------
  70.  
  71. NcFTP may need work-arounds for some things due to the differences
  72. in implementations of unix.  The following systems are taken care
  73. of automatically.  For these systems, you should just be able to type
  74. 'make' (but proceed to part C):
  75.  
  76.    Silicon Graphics IRIX
  77.    AIX
  78.    SINIX
  79.    Ultrix
  80.    NeXT
  81.    Pyramid OSx
  82.  
  83. Otherwise you will have to configure ncftp manually.
  84.  
  85. Important for "Yellow Pages" users:  Don't forget to link the library
  86. that includes the YP/NIS version of getpwuid(), etc.  Otherwise the program
  87. won't be able to expand ~username/path/name type pathnames, and maybe even
  88. ~/path/name types of pathnames.  If you're wondering why the program isn't
  89. opening your rc file, this could be the cause.
  90.  
  91. You will need to add these things to the SDEFS line in the Makefile
  92. as applicable.  As an example, if I say 'add -DFoobar to SDEFS,' find
  93. the line in the Makefile that reads 'SDEFS=' (or 'SDEFS=-DFoo2') and
  94. change it to 'SDEFS=-DFoobar' (or 'SDEFS=-DFoo2 -DFoobar).  If your
  95. system is listed below, follow the directions and then you ready to
  96. go to part C, below.
  97.  
  98.     Sun Microsystems' SunOS/Solaris:  Use an ANSI compiler such as
  99.       gcc (set CC=gcc in the Makefile), or acc (set CC=acc).
  100.       The regular 'cc' is not an ANSI compiler.  You could also run
  101.       something like 'ansi2knr' on the sources and hope it works.
  102.       You will probably need to link both the curses and termcap
  103.       libraries if you use -DCURSES (see below).
  104.  
  105.     Hewlett-Packard HP-UX:  If you have 7.0, you'll need to find
  106.       a copy of <ftp.h> from somewhere (8.0 has it though). Then
  107.       set CFLAGS= -Aa.  You may also need to use gcc if your
  108.       compiler is non-ANSI.  Note that for HP-UX, the default
  109.       terminal escape codes are for HP terminals, so you should
  110.       probably link termcap/curses in so it will get the ANSI
  111.       sequences if you're on a vt100, etc., terminal connected
  112.       to your HP-UX machine.
  113.  
  114.     SCO Unix:  Add -DSCO324 or -DSCO322 (as appropriate) to SDEFS,
  115.       and -lsocket to LIBS.
  116.  
  117.     SCO Xenix 2.3.4: Add -DSCOXNX to SDEFS and add "-lsocket -ldir" to LIBS.
  118.  
  119.     Bull DPX/2: Add -DBULL to SDEFS, add -linet to LIBS, and
  120.       use gcc.
  121.  
  122.     Sequent's DYNIX: Use gcc and add -DDYNIX (if necessary) to SDEFS.
  123.       You may also be short several string functions which you will
  124.       have to get elsewhere, and perhaps mktime and strftime.
  125.       You can get all that stuff from the BSD sources (like ftp.uu.net).
  126.       Please bug Sequent to update their libc library!
  127.  
  128. If your system doesn't fit any of those, things will be trickier.  Answer
  129. all these questions and add to the SDEFS line.  You may want to try
  130. each option one at a time until everything works.
  131.  
  132. *  Is your system closer to System V or BSD?  Your SDEFS line should have
  133. either -DBSD or -DSYSV.  If you don't know, try leaving it blank first;
  134. some compilers automatically define it for you.
  135.  
  136. *  Add -DNO_CONST if your compiler chokes on the const directive.  You
  137. will know if you need to add this if the compiler spits out errors saying
  138. it doesn't know what 'const' is.
  139.  
  140. *  As I said above, you will need to link special libraries if your system
  141. is running Yellow Pages.
  142.  
  143. *  Add -DSYSSELECTH if you need <sys/select.h> included for definitions
  144. of fd_set, etc.
  145.  
  146. *  Add -DNO_UNISTDH if you don't have <unistd.h>.  If the compiler complains
  147. about not being able to open <unistd.h> add this.
  148.  
  149. *  Add -DNO_STDLIBH if you don't have <stdlib.h>.  If the compiler complains
  150. about not being able to open <stdlib.h> add this.
  151.  
  152. *  Add -DNO_UTIMEH if you don't have <utime.h>.  If the compiler complains
  153. about not being able to open <utime.h> add this.
  154.  
  155. *  Add -DNO_MKTIME if you don't have the mktime() system call, and don't
  156. feel like getting the source for it and compiling it in with the program.
  157. If you define this, the program will not set the file modification times
  158. to match the ones on the remote host (no big deal).
  159.  
  160. *  Add -DGETPASS if you would rather use the standard getpass() system
  161. call, instead of our version, Getpass(), which takes more than 8
  162. characters.  You may want to define this if you are having problems
  163. compiling getpass.c.
  164.  
  165. If you haven't given up on our Getpass(), you can try adding -DSGTTYB
  166. if you want to use a struct sgttyb instead of a struct termio.  By default,
  167. BSD systems define SGTTYB automatically.  You can also try adding -DTERMIOS
  168. to use a POSIX compliant struct termios instead.  Don't pull your hair out
  169. trying to get the Getpass code to compile;  if it gives you problems just
  170. define -DGETPASS and hope your system's getpass can handle passwords
  171. longer than 8 characters.
  172.  
  173. *  Add -DBAD_INETADDR if your inet_addr() function returns a struct in_addr
  174. instead of a u_long, as it should (in DG/UX 5.4.1).
  175.  
  176. *  Add -DBROKEN_MEMCPY if ncftp mysteriously dumps core when trying to open
  177. a remote host.  I'm told that this happens because of some problem in System
  178. V's sockets don't like fprintf (and memcpy).
  179.  
  180. *  Add -DPTRTYPE=char if your pre-ANSI compiler complains about the
  181. way malloc() or free() are used, and in general does not like (void *)
  182. as a generic pointer type.
  183.  
  184. *  Add -DNO_STRFTIME if your system does not have strftime().  If you do,
  185. we won't try to use it.  This means, however, you cannot use ``%'' values
  186. in your prompt.
  187.  
  188. *  Add -DNO_RENAME if your system does not have rename() (or the one it
  189. has is broken).  If you do, we will use our own.
  190.  
  191. * Add -DNO_STRSTR if your system does not have strstr().  If you do, we
  192. will use our own.
  193.  
  194. *  (Optional) Add -DGETCWDSIZET if your system's getcwd() takes a size_t
  195. as the second parameter instead of an int.
  196.  
  197. *  (Optional) Add -DHERROR if you know you have the herror() system
  198. call.
  199.  
  200. *  (Optional) Add -DU_WAIT if you know your wait system call takes
  201. a pointer to a 'union wait.'  Defined automatically if you define
  202. BSD.
  203.  
  204. *  (Optional) Add -DHOSTNAME=\"machine.domain.nam\" if your system
  205. doesn't generate it's own hostname.  To check this, compile ncftp
  206. then run it and type 'set.'  Look at the variable anon-password.
  207. If the hostname is wrong, or if it is in the form of 'yourlogin' or
  208. 'yourlogin@machine' instead of 'yourlogin@machine.xxx.yyy,'
  209. re-compile it with HOSTNAME set to your machine's address, in the
  210. form of 'machine.xxx.yyy.'
  211.  
  212. *  (Optional) Add -DSTRICT_PROTOS if your compiler wants function prototypes
  213. for all functions, not just non-int-returning ones.
  214.  
  215.  
  216. Part C.  Program Options:
  217. ------------------------
  218.  
  219. Add these as applicable to the PDEFS line in the Makefile.
  220.  
  221. * -DGZCAT="path": If you have the GNU gzip package installed on your system,
  222.     the program can try paging remote files compressed with gzip _and_ 
  223.     compress (instead of just compress).  Add -DGZCAT=\"/full/path/to/zcat\"
  224.     with GZCAT set to the path name of GNU's zcat/gzcat.
  225.  
  226. *   -DCURSES:  Uses curses library to display boldface, underline, etc.
  227.     By default ncftp uses hard-coded ANSI escapes (^[[1m etc.) to
  228.     save the 100k or so the curses library adds.  You will also need
  229.     to edit the LIBS line in the Makefile to add -lcurses.  You may
  230.     need to add -ltermcap instead, or both -lcurses and -ltermcap.
  231.  
  232. *   -DSYSLOG:  Define this to have ncftp log connections and transfers
  233.     to the syslog.
  234.  
  235. *   -DNO_TIPS:  Define if you want to cut a little fat at the expense of
  236.      novice users.
  237.  
  238. *   -DGETLINE: If you want to use Chris Thewalt's getline input line editor
  239.     and history facility, add this (and see below).
  240.  
  241. *   -DREADLINE:  If you want to use GNU's readline input line editor and
  242.     history facility, add this (and see the Makefile). If you do this, you
  243.     also need to add -DCURSES (see above).
  244.  
  245. *    -DSOCKS: NcFTP is now compatible with the Socks library by David Koblas,
  246.     at koblas@sgi.com.  This lets you use NcFTP with a "firewall" gateway
  247.     for enhanced site security.  You can get the latest version from
  248.     netcom.com:/pub/koblas.  After you have compiled it, compile NcFTP
  249.     with -DSOCKS added to PDEFS, and the pathname of the Rconnect.o file
  250.     added to LIBS.
  251.     
  252. *    -DTRY_ABOR:  Define if you want to try the 'ABOR' command from ncftp;
  253.     The aborting code has had some problems, so by default the program
  254.     'aborts' by continuing to read input but not echoing output.
  255.  
  256. *   -DDB_ERRS:  Define this if you want my Perror() function to be more
  257.     verbose.  You may want to do this if you are a programmer examining this
  258.     code, and want to know where in the source the Perror's are coming
  259.     from.
  260.  
  261. Part D.  Sending me patches:
  262. ---------------------------
  263.  
  264. I apologize in advance for problems that my coding style may cause.  The code
  265. itself is formatted such that each indent-level is a tab (intended to be
  266. equivalent to 4 spaces), and not spaces nor a combination of tabs and spaces.
  267. The reason for this, besides being more logical to me, is that I use a
  268. Macintosh editor to compose the code and I prefer it's indenting method.
  269. Another problem in my coding-style is that I write C-code intended for ANSI
  270. C compilers.  This means that I will use the new-style function declarations
  271. and function prototypes, like:
  272.  
  273.  
  274.    long Foobar(long, long, char *);
  275.    long Foobar(long t0, long t1, char *str)
  276.    {
  277.    }
  278.  
  279. as opposed to:
  280.  
  281.    long Foobar();
  282.    long Foobar(t0, t1, str)
  283.        long t0, t1;
  284.        char *str;
  285.    {
  286.    }
  287.  
  288. Another thing may annoy you is that I always use function prototypes for any
  289. function I call, including functions that return an int.  This is a good
  290. practice that I learned from the Macintosh programming world.  
  291.  
  292. So if you send me patches, please conform to my coding style so that 'patch'
  293. won't screw up, and also that some continuity will be preserved.
  294.  
  295. Before you make your patch, you should be sure that you are using the most
  296. current version of the program.  This is especially important if you are
  297. reporting a bug; I may have already fixed it!  See the above info to get it
  298. via ftp.  Major versions are always posted to comp.sources.misc.  Bug reports
  299. are posted to comp.sources.bugs.  Patches that need to be posted ASAP are
  300. posted to this group first, so it is advisable that you check this group.
  301.  
  302. If you make changes to the code, surround your code in #ifdef/#endif blocks.
  303. Instead of doing things like #ifdef SunOS, use a name that describes the
  304. bug fix or feature, and not your system type, like #ifdef NO_UNISTDH,
  305. or #ifdef GETLINE.  That way in case another system has the same problem,
  306. it can be added to sys.h without cluttering up the source code.  Then, add
  307. the symbol you used to the end of cmds.c, in the 'CPP Hell' part of the
  308. version() command.  You'll see a list of CPP symbols, so just add yours in
  309. a similar fashion, like #ifdef GETLINE/DStrs[nDStrs++] = "GETLINE";/#endif.
  310.  
  311. If you don't know how to make a patch, here's how to do it.  Things are easy
  312. if you've only changed one file.  Then all you need to do pipe the output of
  313. diff -c into a file and send it to me, i.e. "diff -c cmds.c cmds.c.hack >pch."
  314. If you've hacked several files, the way I do it is to keep the originals in
  315. one directory (you did make a copy of everything first didn't you?) and the
  316. revisions in another directory.  Then you change directory to the one with the
  317. originals and do "diff -c . ../revisions > ../pch."
  318.  
  319. --mg (mgleason@cse.unl.edu)
  320.