home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume39 / ncftp / patch03 < prev    next >
Encoding:
Text File  |  1993-09-08  |  25.1 KB  |  963 lines

  1. Newsgroups: comp.sources.misc
  2. From: mgleason@cse.unl.edu (Mike Gleason)
  3. Subject: v39i077:  ncftp - Alternative User Interface for FTP, v1.5.0, Patch03
  4. Message-ID: <1993Sep8.114930.18854@sparky.sterling.com>
  5. X-Md4-Signature: c1d38f095c57cc6d89b1f5b4ac18fe70
  6. Sender: kent@sparky.sterling.com (Kent Landfield)
  7. Organization: NCEMRSoft
  8. Date: Wed, 8 Sep 1993 11:49:30 GMT
  9. Approved: kent@sparky.sterling.com
  10.  
  11. Submitted-by: mgleason@cse.unl.edu (Mike Gleason)
  12. Posting-number: Volume 39, Issue 77
  13. Archive-name: ncftp/patch03
  14. Environment: UNIX, ANSI-C, !SVR4
  15. Patch-To: ncftp: Volume 39, Issue 53-57
  16.  
  17. This is the third official patch to ncftp 1.5.
  18.  
  19. /*  Changed 'sig_t' to 'Sig_t.'  Fixed another error in the termcap crap.
  20.  *  Made having mktime() optional, at the expense of setting file dates
  21.  *  to the same as the remote file.  Fixed an error during 'account'
  22.  *  validation.  Added a warning about a bug I haven't fixed yet with
  23.  *  non-UNIX systems hanging after listings.  Fixed bug where colon-mode
  24.  *  sitenames weren't expanded.  Fixed a tip.  Using <readline/readline.h>
  25.  *  and <getline/getline.h> instead of <readline.h> etc.  Fixed daylight
  26.  *  savings time bug.  LocalPath checks $HOME now.
  27.  */
  28.  
  29. NcFTP 1.5.0 was posted at the end of August to comp.sources.misc; you'll need
  30. that code with patch 1 and 2 applied for this patch to work.
  31.  
  32. diff -c ./Makefile ../ncftp153/Makefile
  33. *** ./Makefile    Tue Sep  7 23:29:25 1993
  34. --- ../ncftp153/Makefile    Tue Sep  7 23:25:50 1993
  35. ***************
  36. *** 13,23 ****
  37.   
  38.   # Program definitions.  See the README, part C.
  39.   #--------------------------------------------------------------------------
  40. ! #PDEFS =
  41.   #PDEFS = -DGETLINE
  42.   #PDEFS = -DREADLINE -DCURSES
  43.   #PDEFS = -DSOCKS
  44. ! PDEFS = -DDEBUG -DDB_ERRS
  45.   
  46.   
  47.   # Choose your compiler and flags below.  Make sure you use an ANSI compiler
  48. --- 13,23 ----
  49.   
  50.   # Program definitions.  See the README, part C.
  51.   #--------------------------------------------------------------------------
  52. ! PDEFS =
  53.   #PDEFS = -DGETLINE
  54.   #PDEFS = -DREADLINE -DCURSES
  55.   #PDEFS = -DSOCKS
  56. ! #PDEFS = -DDEBUG -DDB_ERRS
  57.   
  58.   
  59.   # Choose your compiler and flags below.  Make sure you use an ANSI compiler
  60. ***************
  61. *** 27,36 ****
  62.   #CC = gcc
  63.   
  64.   #CFLAGS = -O
  65. ! CFLAGS = -g
  66.   
  67. ! #LFLAGS = -s
  68. ! LFLAGS =
  69.   
  70.   
  71.   # Additional libraries and/or object files.
  72. --- 27,37 ----
  73.   #CC = gcc
  74.   
  75.   #CFLAGS = -O
  76. ! CFLAGS = -O2
  77. ! #CFLAGS = -g
  78.   
  79. ! LFLAGS = -s
  80. ! #LFLAGS =
  81.   
  82.   
  83.   # Additional libraries and/or object files.
  84. ***************
  85. *** 46,55 ****
  86.   #   want to use the GNU Readline library.
  87.   # You'll need -lgetline (compile it as a library) if you want to use
  88.   #   getline.
  89.   # You'll need to know where the Rconnect.o object file is if you want
  90.   #   to use Socks.
  91.   #--------------------------------------------------------------------------
  92. ! #LIBS =
  93.   #LIBS = -ldbmalloc
  94.   #LIBS = -lgetline
  95.   #LIBS = -lreadline -lcurses
  96. --- 47,58 ----
  97.   #   want to use the GNU Readline library.
  98.   # You'll need -lgetline (compile it as a library) if you want to use
  99.   #   getline.
  100. + # If your system is running Yellow Pages, you'll need to add the library
  101. + #   that has the YP/NIS version of getpwuid() in it (Important!)
  102.   # You'll need to know where the Rconnect.o object file is if you want
  103.   #   to use Socks.
  104.   #--------------------------------------------------------------------------
  105. ! LIBS =
  106.   #LIBS = -ldbmalloc
  107.   #LIBS = -lgetline
  108.   #LIBS = -lreadline -lcurses
  109. ***************
  110. *** 60,79 ****
  111.   # getline or readline and they aren't installed system-wide, add the
  112.   # extra directories to look in here, using -L's.
  113.   #--------------------------------------------------------------------------
  114. ! #LIBDIRS =
  115. ! LIBDIRS = -L$(HOME)/src
  116. ! #LIBDIRS = -L./getline
  117. ! #LIBDIRS = -L./readline
  118.   
  119.   
  120.   # Additional headers.
  121.   # If you defined READLINE or GETLINE, you have to tell where it's header
  122.   # file can be found.
  123.   #--------------------------------------------------------------------------
  124. ! #HDRDIRS = -I.
  125. ! HDRDIRS = -I$(HOME)/src
  126. ! #HDRDIRS = -I./getline
  127. ! #HDRDIRS = -I./readline
  128.   
  129.   
  130.   # If you want to 'make install,' edit these variables, otherwise don't
  131. --- 63,86 ----
  132.   # getline or readline and they aren't installed system-wide, add the
  133.   # extra directories to look in here, using -L's.
  134.   #--------------------------------------------------------------------------
  135. ! LIBDIRS =
  136. ! #LIBDIRS = -L../getline
  137. ! #LIBDIRS = -L../readline
  138.   
  139.   
  140.   # Additional headers.
  141. + #
  142.   # If you defined READLINE or GETLINE, you have to tell where it's header
  143.   # file can be found.
  144. + #
  145. + # For READLINE, provide a path which would find <readline/readline.h>,
  146. + #   so you would put the parent directory of the readline directory below.
  147. + #   If you had '/usr/local/readline' you would use -I/usr/local.
  148. + # For GETLINE, the same thing for <getline/getline.h>
  149.   #--------------------------------------------------------------------------
  150. ! HDRDIRS =
  151. ! #HDRDIRS = -I..   # I have ../getline and ../readline directories.
  152. ! #HDRDIRS = -I.    # Maybe you have ./getline and ./readline directories.
  153.   
  154.   
  155.   # If you want to 'make install,' edit these variables, otherwise don't
  156. ***************
  157. *** 91,105 ****
  158.   
  159.   DEFS = $(PDEFS) $(SDEFS)
  160.   MK = $(CC) $(CFLAGS) $(DEFS) $(HDRDIRS) $(LFLAGS) $(LIBDIRS) $(LIBS)
  161. - NAME = ncftp
  162. - MAN = ncftp.1
  163. - ALL = $(SRCS) $(HEADERS) patchlevel.h Blurb README Makefile $(MAN) \
  164. - v2_Note
  165. - VERS=150
  166. - PKGNAME = ncftp$(VERS)
  167. - TARNAME = $(PKGNAME).tar
  168.    
  169.   SRCS = cmds.c cmdtab.c ftp.c ftprc.c getpass.c glob.c main.c open.c set.c \
  170.   tips.c util.c
  171. --- 98,103 ----
  172. ***************
  173. *** 110,115 ****
  174. --- 108,118 ----
  175.   OBJS = cmds.o cmdtab.o ftp.o ftprc.o getpass.o glob.o main.o open.o set.o \
  176.   tips.o util.o
  177.   
  178. + NAME = ncftp
  179. + MAN = ncftp.1
  180. + ALL = $(SRCS) $(HEADERS) patchlevel.h Blurb README Makefile $(MAN) \
  181. + v2_Note
  182.   C_COMPILE = $(CC) $(CFLAGS) $(DEFS) $(HDRDIRS)
  183.   C_COMPILE2 = $(CC) $(CFLAGS) $(DEFS) -DMK='"$(MK)"' $(HDRDIRS)
  184.   
  185. ***************
  186. *** 132,254 ****
  187.   .c.o:
  188.       $(C_COMPILE) -c $<
  189.   
  190. - clean:
  191. -     rm -f $(OBJS) core $(NAME)
  192. - SGI_CFLAGS = -prototypes -xansi -fullwarn -woff 211,269,270,303,309,24,51
  193. - FTPDIR=/usr/people/ftp/pub/mgleason
  194. - shared: $(OBJS)
  195. -      $(CC) $(OBJS)  $(LIBDIRS) -o $(NAME) -lc_s $(LIBS) -s
  196. -      -@ls -l $(NAME)
  197. - lint: $(SRCS)
  198. -     lint $(SRCS) $(CFLAGS) $(DEFS) > './Junk/lint'
  199. - tags:
  200. -     ctags -x $(SRCS) $(HEADERS) | sort -f > tags
  201. -     
  202. - tar:
  203. -     tar cvf - $(ALL) | compress > $(TARNAME).Z
  204. -     ls -l $(TARNAME).Z
  205. - gz:
  206. -     tar cvf - $(ALL) | gzip > $(TARNAME).z
  207. -     ls -l $(TARNAME).z
  208. - shar2:
  209. -     shar $(ALL) > $(NAME).shar
  210. - shar:
  211. -     shar $(ALL) | cat Blurb - > $(NAME).shar
  212.   done: $(NAME)
  213.       -@ls -l $(NAME)
  214.       -@echo 'Done.'
  215. - pixie: $(NAME) $(NAME).Counts $(NAME).Addrs
  216. -     prof -pixie $(NAME) $(NAME).Addrs $(NAME).Counts -feedback Feedback
  217. - $(NAME).Addrs: $(NAME)
  218. -     pixie -o $(NAME).pixie $(NAME)
  219. - $(NAME).Counts: ftp $(NAME).Addrs
  220. -     $(NAME).pixie
  221. - profile:
  222. -     rm -f *.[ou]
  223. -     cc $(SGI_CFLAGS) $(SRCS) $(DEFS)  -g -p -o ncftp.prof
  224. -     ncftp.prof
  225. -     prof ncftp.prof mon.out
  226. - rmobjs:
  227. -     -@rm -f *.[ou]
  228. - freshdebug: rmobjs
  229. -     pmake "CFLAGS=$(SGI_CFLAGS) -g" LFLAGS=-g
  230. - debug:
  231. -     pmake "CFLAGS=$(SGI_CFLAGS) -g" LFLAGS=-g
  232. - opt: rmobjs
  233. -     pmake "CFLAGS=-O2 $(SGI_CFLAGS)" LFLAGS=-s
  234. -     -@ls -l $(NAME)
  235. - shopt: opt shared
  236. - gopt: rmobjs
  237. -     pmake CC=gcc "CFLAGS=-O2 $(SGI_CFLAGS)" LFLAGS=-s
  238. -     -@ls -l $(NAME)
  239. - JUNK = ~/N/Junk
  240. - mantst: ncftp.1
  241. -     nroff -man ncftp.1 > $(JUNK)/ncftp.man
  242. -     less $(JUNK)/ncftp.man
  243. - sz:
  244. -     sz -e $(ALL)
  245. - getline:
  246. -     -rm util.o cmds.o tips.o
  247. -     make PDEFS=-DGETLINE LIBS=-lgetline LIBDIRS=-L$(HOME)/src/ncftp/getline \
  248. -         HDRDIRS=-I$(HOME)/src/ncftp/getline
  249. - finst:
  250. -     -@mkdir /tmp/$(PKGNAME)
  251. -     cp -r $(ALL) /tmp/$(PKGNAME)
  252. -     (cd /tmp ; tar cvf - $(PKGNAME) | gzip -f > $(FTPDIR)/$(TARNAME).z )
  253. -     chmod 644 $(FTPDIR)/$(TARNAME).z
  254. -     -@ls -l $(FTPDIR)/$(TARNAME).z
  255. -     -@rm -rf /tmp/$(PKGNAME)
  256. - depend:
  257. -     cc -M $(SRCS) | grep -v '/' >> Makefile
  258. - protos:
  259. -     apply "mkptypes -x -A %1 > %1.pr" $(SRCS)
  260. -     -@echo 'Done.'
  261. - patch:
  262. -     -rm -rf /tmp/old /tmp/new
  263. -     -mkdir /tmp/old /tmp/new
  264. -     cp ~/ncftp.shar /tmp/old/oldncftp.shar
  265. -     (cd /tmp/old ; unshar -n oldncftp.shar )
  266. -     make shar
  267. -     cp ncftp.shar /tmp/new
  268. -     (cd /tmp/new; unshar -n ncftp.shar )
  269. -     rm /tmp/new/ncftp.shar /tmp/old/oldncftp.shar
  270. -     (cd /tmp/old ; diff -c . ../new > ../pch)
  271. - coall:
  272. -     co -u -f $(SRCS) $(HEADERS)
  273. - newver:
  274. -     ci -Nv$(VERS) -f "-mv$(VERS) release" -M -u $(SRCS) $(HEADERS)
  275. - ciall:
  276. -     ci -q -M -u $(SRCS) $(HEADERS)
  277.   
  278.   # Dependencies:
  279.   cmds.o: cmds.c 
  280. --- 135,143 ----
  281. Only in ../ncftp153: NcMakefile
  282. diff -c ./README ../ncftp153/README
  283. *** ./README    Tue Sep  7 23:33:35 1993
  284. --- ../ncftp153/README    Tue Sep  7 23:25:50 1993
  285. ***************
  286. *** 82,87 ****
  287. --- 82,93 ----
  288.   
  289.   Otherwise you will have to configure ncftp manually.
  290.   
  291. + Important for "Yellow Pages" users:  Don't forget to link the library
  292. + that includes the YP/NIS version of getpwuid(), etc.  Otherwise the program
  293. + won't be able to expand ~username/path/name type pathnames, and maybe even
  294. + ~/path/name types of pathnames.  If you're wondering why the program isn't
  295. + opening your rc file, this could be the cause.
  296.   You will need to add these things to the SDEFS line in the Makefile
  297.   as applicable.  As an example, if I say 'add -DFoobar to SDEFS,' find
  298.   the line in the Makefile that reads 'SDEFS=' (or 'SDEFS=-DFoo2') and
  299. ***************
  300. *** 125,130 ****
  301. --- 131,139 ----
  302.   will know if you need to add this if the compiler spits out errors saying
  303.   it doesn't know what 'const' is.
  304.   
  305. + *  As I said above, you will need to link special libraries if your system
  306. + is running Yellow Pages.
  307.   *  Add -DSYSSELECTH if you need <sys/select.h> included for definitions
  308.   of fd_set, etc.
  309.   
  310. ***************
  311. *** 136,141 ****
  312. --- 145,155 ----
  313.   
  314.   *  Add -DNO_UTIMEH if you don't have <utime.h>.  If the compiler complains
  315.   about not being able to open <utime.h> add this.
  316. + *  Add -DNO_MKTIME if you don't have the mktime() system call, and don't
  317. + feel like getting the source for it and compiling it in with the program.
  318. + If you define this, the program will not set the file modification times
  319. + to match the ones on the remote host (no big deal).
  320.   
  321.   *  Add -DGETPASS if you would rather use the standard getpass() system
  322.   call, instead of our version, Getpass(), which takes more than 8
  323. diff -c ./cmds.c ../ncftp153/cmds.c
  324. *** ./cmds.c    Tue Sep  7 23:33:13 1993
  325. --- ../ncftp153/cmds.c    Tue Sep  7 23:25:50 1993
  326. ***************
  327. *** 301,307 ****
  328.   int mput(int argc, char **argv)
  329.   {
  330.       register int i;
  331. !     sig_t oldintr;
  332.       char *tp;
  333.   
  334.       if (argc < 2)
  335. --- 301,307 ----
  336.   int mput(int argc, char **argv)
  337.   {
  338.       register int i;
  339. !     Sig_t oldintr;
  340.       char *tp;
  341.   
  342.       if (argc < 2)
  343. ***************
  344. *** 486,492 ****
  345.   {
  346.       char *cp;
  347.       longstring local;
  348. !     sig_t oldintr;
  349.   
  350.       if (argc < 2)
  351.           argv = re_makeargv("(remote-files) ", &argc);
  352. --- 486,492 ----
  353.   {
  354.       char *cp;
  355.       longstring local;
  356. !     Sig_t oldintr;
  357.   
  358.       if (argc < 2)
  359.           argv = re_makeargv("(remote-files) ", &argc);
  360. ***************
  361. *** 749,755 ****
  362.   int mdelete(int argc, char **argv)
  363.   {
  364.       char *cp;
  365. !     sig_t oldintr;
  366.       string str;
  367.   
  368.       if (argc < 2)
  369. --- 749,755 ----
  370.   int mdelete(int argc, char **argv)
  371.   {
  372.       char *cp;
  373. !     Sig_t oldintr;
  374.       string str;
  375.   
  376.       if (argc < 2)
  377. ***************
  378. *** 943,949 ****
  379.   int shell(int argc, char **argv)
  380.   {
  381.       int                pid;
  382. !     sig_t            old1, old2;
  383.       char            *theShell, *namep;
  384.   #ifndef U_WAIT
  385.       int                Status;
  386. --- 943,949 ----
  387.   int shell(int argc, char **argv)
  388.   {
  389.       int                pid;
  390. !     Sig_t            old1, old2;
  391.       char            *theShell, *namep;
  392.   #ifndef U_WAIT
  393.       int                Status;
  394. ***************
  395. *** 1808,1813 ****
  396. --- 1808,1816 ----
  397.   #ifdef NO_VARARGS 
  398.       DStrs[nDStrs++] = "NO_VARARGS";
  399.   #endif
  400. + #ifdef NO_MKTIME
  401. +     DStrs[nDStrs++] = "NO_MKTIME";
  402. + #endif
  403.   #ifdef TRY_ABOR
  404.       DStrs[nDStrs++] = "TRY_ABOR";
  405.   #endif
  406. ***************
  407. *** 1884,1890 ****
  408.       register struct lslist *a = lshead;
  409.       int pagemode;
  410.       FILE *fp;
  411. !     sig_t oldintp;
  412.   
  413.       if (a == NULL)
  414.           return CMDERR;
  415. --- 1887,1893 ----
  416.       register struct lslist *a = lshead;
  417.       int pagemode;
  418.       FILE *fp;
  419. !     Sig_t oldintp;
  420.   
  421.       if (a == NULL)
  422.           return CMDERR;
  423. diff -c ./ftp.c ../ncftp153/ftp.c
  424. *** ./ftp.c    Tue Sep  7 23:33:13 1993
  425. --- ../ncftp153/ftp.c    Tue Sep  7 23:25:51 1993
  426. ***************
  427. *** 287,295 ****
  428.           n = command(str);
  429.           if (n == CONTINUE) {
  430.               /* The remote site is requesting us to send the account now. */
  431. !             (void) sprintf(str, "ACCT %s", Getpass("Account:"));
  432.               ++sentAcct;    /* Keep track that we've sent the account already. */
  433. -             ++userWasPrompted;
  434.               n = command(str);
  435.           }
  436.       }
  437. --- 287,300 ----
  438.           n = command(str);
  439.           if (n == CONTINUE) {
  440.               /* The remote site is requesting us to send the account now. */
  441. !             if (accountPtr == NULL) {
  442. !                 /* Prompt for a username. */
  443. !                 (void) sprintf(str, "ACCT %s", Getpass("Account:"));
  444. !                 ++userWasPrompted;
  445. !             } else {
  446. !                 (void) sprintf(str, "ACCT %s", accountPtr);
  447. !             }
  448.               ++sentAcct;    /* Keep track that we've sent the account already. */
  449.               n = command(str);
  450.           }
  451.       }
  452. ***************
  453. *** 372,378 ****
  454.   int command(char *cmd)
  455.   {
  456.       int r;
  457. !     sig_t oldintr;
  458.       string str;
  459.   
  460.       abrtflag = 0;
  461. --- 377,383 ----
  462.   int command(char *cmd)
  463.   {
  464.       int r;
  465. !     Sig_t oldintr;
  466.       string str;
  467.   
  468.       abrtflag = 0;
  469. ***************
  470. *** 446,452 ****
  471.       int dig;
  472.       char *cp, *end, *dp;
  473.       int thiscode, originalcode = 0, continuation = 0;
  474. !     sig_t oldintr;
  475.   
  476.       if (cin == NULL)
  477.           return (-1);
  478. --- 451,457 ----
  479.       int dig;
  480.       char *cp, *end, *dp;
  481.       int thiscode, originalcode = 0, continuation = 0;
  482. !     Sig_t oldintr;
  483.   
  484.       if (cin == NULL)
  485.           return (-1);
  486. ***************
  487. *** 583,590 ****
  488.               lostpeer(0);
  489.           if (abrtflag && oldintr != cmdabort && oldintr != SIG_IGN && oldintr)
  490.               (*oldintr)(0);
  491. !         return (n - '0');
  492.       }    /* end for(;;) #1 */
  493.   }    /* getreply */
  494.   
  495.   
  496. --- 588,596 ----
  497.               lostpeer(0);
  498.           if (abrtflag && oldintr != cmdabort && oldintr != SIG_IGN && oldintr)
  499.               (*oldintr)(0);
  500. !         break;
  501.       }    /* end for(;;) #1 */
  502. +     return (n - '0');
  503.   }    /* getreply */
  504.   
  505.   
  506. ***************
  507. *** 819,825 ****
  508.   int sendrequest(char *cmd, char *local, char *remote)
  509.   {
  510.       FILE                    *fin, *dout = NULL;
  511. !     sig_t                    oldintr, oldintp;
  512.       string                    str;
  513.       register int            c, d;
  514.       struct stat                st;
  515. --- 825,831 ----
  516.   int sendrequest(char *cmd, char *local, char *remote)
  517.   {
  518.       FILE                    *fin, *dout = NULL;
  519. !     Sig_t                    oldintr, oldintp;
  520.       string                    str;
  521.       register int            c, d;
  522.       struct stat                st;
  523. ***************
  524. *** 1123,1129 ****
  525.   
  526.   
  527.   
  528. ! FILE *OpenOutputFile(int filetype, char *local, char *mode, sig_t *oldintp)
  529.   {
  530.       FILE *fout;
  531.   
  532. --- 1129,1135 ----
  533.   
  534.   
  535.   
  536. ! FILE *OpenOutputFile(int filetype, char *local, char *mode, Sig_t *oldintp)
  537.   {
  538.       FILE *fout;
  539.   
  540. ***************
  541. *** 1371,1377 ****
  542.   int recvrequest(char *cmd, char *local, char *remote, char *mode)
  543.   {
  544.       FILE                        *fout = NULL, *din = NULL;
  545. !     sig_t                        oldintr = NULL, oldintp = NULL;
  546.       int                            oldtype = 0, is_retr;
  547.       int                            nfnd;
  548.       char                        msg;
  549. --- 1377,1383 ----
  550.   int recvrequest(char *cmd, char *local, char *remote, char *mode)
  551.   {
  552.       FILE                        *fout = NULL, *din = NULL;
  553. !     Sig_t                        oldintr = NULL, oldintp = NULL;
  554.       int                            oldtype = 0, is_retr;
  555.       int                            nfnd;
  556.       char                        msg;
  557. ***************
  558. *** 1511,1517 ****
  559.       int                    result, len, tmpno = 0;
  560.       int                    on = 1, rval;
  561.       string                str;
  562. !     sig_t                oldintr;
  563.   
  564.       oldintr = Signal(SIGINT, SIG_IGN);
  565.   noport:
  566. --- 1517,1523 ----
  567.       int                    result, len, tmpno = 0;
  568.       int                    on = 1, rval;
  569.       string                str;
  570. !     Sig_t                oldintr;
  571.   
  572.       oldintr = Signal(SIGINT, SIG_IGN);
  573.   noport:
  574. diff -c ./ftp.h ../ncftp153/ftp.h
  575. *** ./ftp.h    Tue Sep  7 23:29:25 1993
  576. --- ../ncftp153/ftp.h    Tue Sep  7 23:25:52 1993
  577. ***************
  578. *** 38,44 ****
  579.   int AdjustLocalFileName(char *);
  580.   int SetToAsciiForLS(int, int);
  581.   int IssueCommand(char *, char *);
  582. ! FILE *OpenOutputFile(int, char *, char *, sig_t *);
  583.   void ReceiveBinary(FILE *, FILE *, int *, char *);
  584.   void AddRedirLine(char *);
  585.   void ReceiveAscii(FILE *, FILE *, int *, char *, int);
  586. --- 38,44 ----
  587.   int AdjustLocalFileName(char *);
  588.   int SetToAsciiForLS(int, int);
  589.   int IssueCommand(char *, char *);
  590. ! FILE *OpenOutputFile(int, char *, char *, Sig_t *);
  591.   void ReceiveBinary(FILE *, FILE *, int *, char *);
  592.   void AddRedirLine(char *);
  593.   void ReceiveAscii(FILE *, FILE *, int *, char *, int);
  594. diff -c ./getpass.c ../ncftp153/getpass.c
  595. *** ./getpass.c    Tue Sep  7 23:33:14 1993
  596. --- ../ncftp153/getpass.c    Tue Sep  7 23:25:52 1993
  597. ***************
  598. *** 118,124 ****
  599.       register int ch;
  600.       register char *p;
  601.       FILE *fp, *outfp;
  602. !     sig_t oldintr;
  603.       static char buf[kMaxPassLen + 1];
  604.   
  605.       /*
  606. --- 118,124 ----
  607.       register int ch;
  608.       register char *p;
  609.       FILE *fp, *outfp;
  610. !     Sig_t oldintr;
  611.       static char buf[kMaxPassLen + 1];
  612.   
  613.       /*
  614. diff -c ./main.c ../ncftp153/main.c
  615. *** ./main.c    Tue Sep  7 23:33:36 1993
  616. --- ../ncftp153/main.c    Tue Sep  7 23:25:53 1993
  617. ***************
  618. *** 8,14 ****
  619.   #define _main_c_
  620.   
  621.   #define FTP_VERSION \
  622. ! "NcFTP 1.5.2 (Aug 30, 1993) by Mike Gleason, NCEMRSoft."
  623.   
  624.   /* #define BETA 1 */ /* If defined, it prints a little warning message. */
  625.   
  626. --- 8,14 ----
  627.   #define _main_c_
  628.   
  629.   #define FTP_VERSION \
  630. ! "NcFTP 1.5.3 (September 2, 1993) by Mike Gleason, NCEMRSoft."
  631.   
  632.   /* #define BETA 1 */ /* If defined, it prints a little warning message. */
  633.   
  634. ***************
  635. *** 979,997 ****
  636.   void termcap_get(char **dest, char *attr)
  637.   {
  638.       static char area[1024];
  639. !     static char *s = area;
  640.       char buf[64];
  641.       int foo;
  642.   
  643. !     (void) Strncpy(buf, tgetstr(attr, &s));
  644.       if (buf[0]) {
  645.            for (foo = 0; (buf[foo] <= '9') && (buf[foo] >= '0'); foo++); 
  646.            if ((*dest = (char *)malloc(strlen(&(buf[foo])) + 1)) == NULL) 
  647. !              **dest = 0;
  648.            else 
  649.                (void) strcpy(*dest, &(buf[foo]));
  650.        } else 
  651. !          **dest = 0;
  652.   }    /* termcap_get */
  653.   
  654.   
  655. --- 979,1001 ----
  656.   void termcap_get(char **dest, char *attr)
  657.   {
  658.       static char area[1024];
  659. !     static char *s = area, *t;
  660.       char buf[64];
  661.       int foo;
  662.   
  663. !     t = tgetstr(attr, &s);
  664. !     if (t)
  665. !         (void) Strncpy(buf, t);
  666. !     else
  667. !         buf[0] = '\0';
  668.       if (buf[0]) {
  669.            for (foo = 0; (buf[foo] <= '9') && (buf[foo] >= '0'); foo++); 
  670.            if ((*dest = (char *)malloc(strlen(&(buf[foo])) + 1)) == NULL) 
  671. !              *dest = "";
  672.            else 
  673.                (void) strcpy(*dest, &(buf[foo]));
  674.        } else 
  675. !          *dest = "";
  676.   }    /* termcap_get */
  677.   
  678.   
  679. diff -c ./open.c ../ncftp153/open.c
  680. *** ./open.c    Tue Sep  7 23:33:36 1993
  681. --- ../ncftp153/open.c    Tue Sep  7 23:25:54 1993
  682. ***************
  683. *** 328,333 ****
  684. --- 328,338 ----
  685.                   *cp = c;
  686.           }
  687.           remote_is_unix = !strncmp(reply_string + 4, "UNIX", (size_t) 4);
  688. +         if (!remote_is_unix) 
  689. +             (void) printf("\n\
  690. + WARNING:  Due to a bug in the program, ncftp may hang while connected to\n\
  691. + a non-UNIX system.  You probably should use the regular 'ftp' program\n\
  692. + for those sites until this is fixed.\n\n");
  693.       }
  694.   
  695.       /* Set to binary mode if any of the following are true:
  696. ***************
  697. *** 436,441 ****
  698. --- 441,454 ----
  699.       char *user, *pass, *acct;    
  700.       int                    login_verbosity;
  701.   
  702. +     /* If the hostname supplied is in the form host.name.str:/path/file,
  703. +      * then colon mode was used, and we need to fix the hostname to be
  704. +      * just the hostname, copy the /path/file to colonmode path, and init
  705. +      * the login_verbosity variable.
  706. +      */
  707. +     if (CheckForColonMode(openopt, &login_verbosity) == USAGE)
  708. +         return USAGE;
  709.       /* If the hostname supplied was an abbreviation, such as just
  710.        * "wu" (wuarchive.wustl.edu), look through the list of sites
  711.        * we know about and get the whole name.  We also would like
  712. ***************
  713. *** 477,491 ****
  714.               }
  715.           }        
  716.       }
  717. -     /* If the hostname supplied is in the form host.name.str:/path/file,
  718. -      * then colon mode was used, and we need to fix the hostname to be
  719. -      * just the hostname, copy the /path/file to colonmode path, and init
  720. -      * the login_verbosity variable.
  721. -      */
  722. -     if (CheckForColonMode(openopt, &login_verbosity) == USAGE)
  723. -         return USAGE;
  724.   
  725.       for (
  726.               dials = 0;
  727. --- 490,495 ----
  728. diff -c ./patchlevel.h ../ncftp153/patchlevel.h
  729. *** ./patchlevel.h    Tue Sep  7 23:33:36 1993
  730. --- ../ncftp153/patchlevel.h    Tue Sep  7 23:25:55 1993
  731. ***************
  732. *** 111,119 ****
  733.    *  DYNIX entry.  Hacks added for SCO322.  Shortened bargraph prog meter
  734.    *  by one char.  Better compat with getline.  Man page fixed by DWS again :)
  735.    *
  736. !  * v1.5.1 - August 30, 1993.
  737.    *  Back to using "me" instead of "se" to for termcap_normal.  Fixed Netrc
  738.    *  site abbrev problem in a different way (by getting the fullsite name
  739.    *  before calling ruserpass2).
  740.    */
  741.   
  742. --- 111,129 ----
  743.    *  DYNIX entry.  Hacks added for SCO322.  Shortened bargraph prog meter
  744.    *  by one char.  Better compat with getline.  Man page fixed by DWS again :)
  745.    *
  746. !  * v1.5.2 - August 30, 1993.
  747.    *  Back to using "me" instead of "se" to for termcap_normal.  Fixed Netrc
  748.    *  site abbrev problem in a different way (by getting the fullsite name
  749.    *  before calling ruserpass2).
  750. +  *
  751. +  * v1.5.3 - September 2, 1993.
  752. +  *  Changed 'sig_t' to 'Sig_t.'  Fixed another error in the termcap crap.
  753. +  *  Made having mktime() optional, at the expense of setting file dates
  754. +  *  to the same as the remote file.  Fixed an error during 'account'
  755. +  *  validation.  Added a warning about a bug I haven't fixed yet with
  756. +  *  non-UNIX systems hanging after listings.  Fixed bug where colon-mode
  757. +  *  sitenames weren't expanded.  Fixed a tip.  Using <readline/readline.h>
  758. +  *  and <getline/getline.h> instead of <readline.h> etc.  Fixed daylight
  759. +  *  savings time bug.  LocalPath checks $HOME now.
  760.    */
  761.   
  762. Only in .: pch1
  763. Only in .: pch2
  764. diff -c ./tips.c ../ncftp153/tips.c
  765. *** ./tips.c    Tue Sep  7 23:33:16 1993
  766. --- ../ncftp153/tips.c    Tue Sep  7 23:25:55 1993
  767. ***************
  768. *** 107,113 ****
  769.   
  770.       "Don't put a site in your .ncftprc unless you want an 'init' macro.  The \n\
  771.        recent-file saves sites with the last directory you were in, unlike \n\
  772. !      the rc file, while still letting you use sitename abbreviations."
  773.   
  774.       "Sick and tired of these tips?  Put '#unset tips' in your .ncftprc."
  775.   };
  776. --- 107,113 ----
  777.   
  778.       "Don't put a site in your .ncftprc unless you want an 'init' macro.  The \n\
  779.        recent-file saves sites with the last directory you were in, unlike \n\
  780. !      the rc file, while still letting you use sitename abbreviations.",
  781.   
  782.       "Sick and tired of these tips?  Put '#unset tips' in your .ncftprc."
  783.   };
  784. diff -c ./util.c ../ncftp153/util.c
  785. *** ./util.c    Tue Sep  7 23:33:17 1993
  786. --- ../ncftp153/util.c    Tue Sep  7 23:25:56 1993
  787. ***************
  788. *** 23,33 ****
  789.   #endif
  790.   
  791.   #ifdef READLINE
  792. ! #    include <readline.h>
  793.   #endif /* READLINE */
  794.   
  795.   #ifdef GETLINE
  796. ! #    include <getline.h>
  797.   #endif
  798.   
  799.   #include "util.h"
  800. --- 23,33 ----
  801.   #endif
  802.   
  803.   #ifdef READLINE
  804. ! #    include <readline/readline.h>
  805.   #endif /* READLINE */
  806.   
  807.   #ifdef GETLINE
  808. ! #    include <getline/getline.h>
  809.   #endif
  810.   
  811.   #include "util.h"
  812. ***************
  813. *** 54,59 ****
  814. --- 54,60 ----
  815.   extern int            debug, mprompt, activemcmd;
  816.   extern string        progname;
  817.   extern struct cmd    cmdtab[];
  818. + extern struct userinfo uinfo;
  819.   
  820.   #ifndef NO_VARARGS
  821.   void dbprintf(char *fmt, ...)
  822. ***************
  823. *** 241,246 ****
  824. --- 242,250 ----
  825.    */
  826.   unsigned long UnLSDate(char *dstr)
  827.   {
  828. + #ifdef NO_MKTIME
  829. +     return (0);
  830. + #else
  831.       char *cp = dstr;
  832.       int long mon, day, year, hr, min;
  833.       time_t now;
  834. ***************
  835. *** 299,313 ****
  836.           (void) sscanf(cp, "%ld", &year);
  837.           year -= 1900;
  838.       }
  839. !     ut.tm_sec = 0;
  840.       ut.tm_min = min;
  841.       ut.tm_hour = hr;
  842.       ut.tm_mday = day;
  843.       ut.tm_mon = mon;
  844.       ut.tm_year = year;
  845. !     ut.tm_isdst = 0;
  846.       ut.tm_wday = ut.tm_yday = 0;
  847.       return ((unsigned long) mktime(&ut));
  848.   }    /* UnLSDate */
  849.   
  850.   
  851. --- 303,318 ----
  852.           (void) sscanf(cp, "%ld", &year);
  853.           year -= 1900;
  854.       }
  855. !     ut.tm_sec = 1;
  856.       ut.tm_min = min;
  857.       ut.tm_hour = hr;
  858.       ut.tm_mday = day;
  859.       ut.tm_mon = mon;
  860.       ut.tm_year = year;
  861. !     ut.tm_isdst = t->tm_isdst;
  862.       ut.tm_wday = ut.tm_yday = 0;
  863.       return ((unsigned long) mktime(&ut));
  864. + #endif    /* NO_MKTIME */
  865.   }    /* UnLSDate */
  866.   
  867.   
  868. ***************
  869. *** 708,719 ****
  870.           rest = cp + 1;
  871.           if (orig[0] == '~') {
  872.               if (orig[1] == 0) {
  873. !                 pw = getpwuid(getuid());
  874.               } else {
  875.                   pw = getpwnam(orig + 1);
  876.               }
  877. -             if (pw != NULL)
  878. -                 firstent = pw->pw_dir;
  879.           } else if (orig[0] == '$') {
  880.               cp = orig + 1;
  881.               dp = orig + strlen(orig) - 1;
  882. --- 713,724 ----
  883.           rest = cp + 1;
  884.           if (orig[0] == '~') {
  885.               if (orig[1] == 0) {
  886. !                 firstent = uinfo.homedir;
  887.               } else {
  888.                   pw = getpwnam(orig + 1);
  889. +                 if (pw != NULL)
  890. +                     firstent = pw->pw_dir;
  891.               }
  892.           } else if (orig[0] == '$') {
  893.               cp = orig + 1;
  894.               dp = orig + strlen(orig) - 1;
  895. diff -c ./util.h ../ncftp153/util.h
  896. *** ./util.h    Tue Sep  7 23:29:28 1993
  897. --- ../ncftp153/util.h    Tue Sep  7 23:25:56 1993
  898. ***************
  899. *** 55,63 ****
  900.   #ifndef SIG_PARAMS
  901.   #define SIG_PARAMS (int sig)
  902.   #endif
  903. ! typedef void (*sig_t) SIG_PARAMS;
  904.   
  905. ! #define Signal(a,proc) signal((a), (sig_t)(proc))
  906.   
  907.   /* Protos. */
  908.   char *_Strncat(char *dst, char *src, register size_t n);
  909. --- 55,63 ----
  910.   #ifndef SIG_PARAMS
  911.   #define SIG_PARAMS (int sig)
  912.   #endif
  913. ! typedef void (*Sig_t) SIG_PARAMS;
  914.   
  915. ! #define Signal(a,proc) signal((a), (Sig_t)(proc))
  916.   
  917.   /* Protos. */
  918.   char *_Strncat(char *dst, char *src, register size_t n);
  919. --
  920. ______________________________________________________________________________
  921. mike gleason                 mgleason@cse.unl.edu             NCEMRSoft, baby!
  922.  
  923. exit 0 # Just in case...
  924.