]> git.pld-linux.org Git - packages/ftp.git/blame - netkit-ftp-macro-quit.patch
- release 31 (by relup.sh)
[packages/ftp.git] / netkit-ftp-macro-quit.patch
CommitLineData
4836d586 1diff -ur netkit-ftp-0.17.orig/ftp/domacro.c netkit-ftp-0.17/ftp/domacro.c
2--- netkit-ftp-0.17.orig/ftp/domacro.c Thu Aug 15 01:27:28 1996
3+++ netkit-ftp-0.17/ftp/domacro.c Tue Aug 8 15:38:49 2000
4@@ -137,6 +137,18 @@
5 if (c->c_handler_v) c->c_handler_v(margc, margv);
6 else if (c->c_handler_0) c->c_handler_0();
7 else c->c_handler_1(marg);
8+
9+ if (quitflag) {
10+ switch (code) {
11+ case 0: case 1: /* ommit "good" */
12+ case 200: case 221: /* codes */
13+ case 226: case 250:
14+ break;
15+ default:
16+ printf("%d Macro failed.\n", code);
17+ quit();
18+ }
19+ }
20
21 if (bell && c->c_bell) {
22 (void) putchar('\007');
23diff -ur netkit-ftp-0.17.orig/ftp/ftp.1 netkit-ftp-0.17/ftp/ftp.1
24--- netkit-ftp-0.17.orig/ftp/ftp.1 Tue Dec 14 13:52:50 1999
25+++ netkit-ftp-0.17/ftp/ftp.1 Tue Aug 8 14:19:00 2000
26@@ -42,10 +42,10 @@
27 file transfer program
28 .Sh SYNOPSIS
29 .Nm ftp
30-.Op Fl pinegvd
31+.Op Fl pinegvdq
32 .Op Ar host
33 .Nm pftp
34-.Op Fl inegvd
35+.Op Fl inegvdq
36 .Op Ar host
37 .Sh DESCRIPTION
38 .Nm Ftp
39@@ -97,6 +97,8 @@
40 as report on data transfer statistics.
41 .It Fl d
42 Enables debugging.
43+.It Fl q
44+Quit if some macro command failed.
45 .El
46 .Pp
47 The client host with which
48diff -ur netkit-ftp-0.17.orig/ftp/ftp_var.h netkit-ftp-0.17/ftp/ftp_var.h
49--- netkit-ftp-0.17.orig/ftp/ftp_var.h Sat Oct 2 20:39:17 1999
50+++ netkit-ftp-0.17/ftp/ftp_var.h Tue Aug 8 14:14:48 2000
51@@ -74,6 +74,7 @@
52 Extern int mcase; /* map upper to lower case for mget names */
53 Extern int ntflag; /* use ntin ntout tables for name xlation */
54 Extern int mapflag; /* use mapin mapout templates on file names */
55+Extern int quitflag; /* quit if macro command failed */
56 Extern int code; /* return/reply code for ftp command */
57 Extern int crflag; /* if 1, strip car. rets. on ascii gets */
58 Extern char pasv[64]; /* passive port for proxy data connection */
59diff -ur netkit-ftp-0.17.orig/ftp/main.c netkit-ftp-0.17/ftp/main.c
60--- netkit-ftp-0.17.orig/ftp/main.c Sat Oct 2 15:25:23 1999
61+++ netkit-ftp-0.17/ftp/main.c Tue Aug 8 14:29:49 2000
62@@ -95,6 +95,7 @@
63 printf("\t -v: verbose mode\n");
64 printf("\t -t: enable packet tracing [nonfunctional]\n");
65 printf("\t -d: enable debugging\n");
66+ printf("\t -q: enable macro error quits\n");
67 printf("\n");
68 }
69
70@@ -119,6 +120,7 @@
71 interactive = 1;
72 autologin = 1;
73 passivemode = 0;
74+ quitflag = 0;
75
76 cp = strrchr(argv[0], '/');
77 cp = (cp == NULL) ? argv[0] : cp+1;
78@@ -168,6 +170,10 @@
79
80 case 'e':
81 rl_inhibit = 1;
82+ break;
83+
84+ case 'q':
85+ quitflag = 1;
86 break;
87
88 case 'h':
This page took 0.039689 seconds and 4 git commands to generate.