1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
diff -uNr --exclude=*.orig work.old/ztelnet/zmodem/sz.c work/ztelnet/zmodem/sz.c
--- work.old/ztelnet/zmodem/sz.c Mon Apr 24 23:28:58 1995
+++ work/ztelnet/zmodem/sz.c Tue Jun 20 22:58:34 2000
@@ -1,3 +1,8 @@
+/*-----Apended by yongari -----*/
+#define MD 2
+#define V7
+#define strchr index
+/*----------------------------*/
#define STATIC static
#define VERSION "3.25 2-11-95"
#define PUBDIR "/usr/spool/uucppublic"
@@ -57,7 +62,10 @@
STATIC char *Copyrsz = "Copyright 1993 Omen Technology Inc All Rights Reserved";
-STATIC char *substr(), *getenv();
+/* Removed by yongari */
+/* STATIC char *substr(), *getenv(); */
+STATIC char *substr();
+char *getenv(const char *name);
#define LOGFILE "/tmp/szlog"
#define LOGFILE2 "szlog"
@@ -95,6 +103,26 @@
#define HOWMANY 250
+/*------Appended by yongari to shut up compiler------*/
+STATIC wcsend();
+STATIC wcs();
+STATIC wctxpn();
+STATIC getnak();
+STATIC wctx();
+STATIC wcputsec();
+STATIC filbuf();
+STATIC usage();
+STATIC getzrxinit();
+STATIC sendzsinit();
+STATIC zsendfile();
+STATIC zsendfdata();
+STATIC getinsync();
+STATIC zsendcmd();
+STATIC chkinvok();
+STATIC countem();
+STATIC init_sz();
+/*-----------------------------------------------------*/
+
STATIC int Zmodem=0; /* ZMODEM protocol requested by receiver */
unsigned Baudrate = 19200; /* Default, set by first mode() call */
STATIC unsigned Effbaud = 19200;
@@ -108,8 +136,7 @@
#include "rbsb.c" /* most of the system dependent stuff here */
#include "crctab.c"
-/* PMS */
-#include "sz.h"
+
STATIC int Filesleft;
STATIC unsigned long Totalleft;
@@ -176,7 +203,9 @@
STATIC unsigned long Lastsync; /* Last offset to which we got a ZRPOS */
STATIC int Beenhereb4; /* How many times we've been ZRPOS'd here */
STATIC int Ksendstr; /* 1= Send esc-?-3-4-l to remote kermit */
-STATIC char *ksendbuf = "\033[?34l";
+/*-----Modified by yongri-----------*/
+/* STATIC char *ksendbuf = "\033[?34l"; */
+STATIC char ksendbuf[80];
/*STATIC jmp_buf tohere; /* For the interrupt on RX timeout */
STATIC jmp_buf intrjmp; /* For the interrupt on RX CAN */
@@ -225,6 +254,7 @@
#include "zm.c"
#include "zmr.c"
+
sz(argc, argv)
char *argv[];
{
@@ -243,7 +273,6 @@
Znulls = atoi(cp);
if ((cp=getenv("SHELL")) && (substr(cp, "rsh") || substr(cp, "rksh")))
Restricted=TRUE;
-
chkinvok(argv[0]);
Rxtimeout = 600;
@@ -428,17 +457,20 @@
if(errcnt || Exitcode)
Exit(1);
+#define sleep(x)
#ifndef REGISTERED
/* Removing or disabling this code without registering is theft */
if (!Usevhdrs) {
printf("\n\n\nPlease read the License Agreement in sz.doc\n");
fflush(stdout);
+ /* sleep(10); */
sleep(10);
}
#endif
Exit(0);
/*NOTREACHED*/
}
+#undef sleep
/* Say "bibi" to the receiver, try to do it cleanly */
STATIC void
@@ -949,8 +981,7 @@
fprintf(stderr,"\nCopyright 1993 Omen Technology INC All Rights Reserved\n");
fprintf(stderr,
"See sz.doc for option descriptions and licensing information.\n\n");
- fprintf(stderr,"Ported into telnet by Heo, Junhyeok, 1994.3.28\n");
- fprintf(stderr,"Linux porting by Park Myeong Seok, 1995.4.23\n");
+ fprintf(stderr,"\nPorted into telnet by Heo, junhyeok 1994.3.28\n");
Exit(3);
}
@@ -1608,9 +1639,7 @@
Lastsync=0;
Beenhereb4=0;
Ksendstr=0;
-/* By PMS
- strcpy(ksendbuf,"\033[?34l");
-*/
+ strcpy(ksendbuf,"\033[?341l");
Zctlesc=0;
Nozmodem=0;
Zrwindow=1400;
|