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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
|
diff -uNr ../ztelnet/Config.generic ./Config.generic
--- ../ztelnet/Config.generic Wed Sep 20 19:53:28 1995
+++ ./Config.generic Sun Mar 15 06:01:32 1998
@@ -183,23 +183,22 @@
@echo " dynix3.0.12 dynix3.0.17"
@echo " ultrix3.1 ultrix4.0"
@echo " next1.0"
- @echo " linux"
4.4bsd 4.3reno:
make -f Makefile.generic ${WHAT} \
- LIBS="-lutil -ltermcap ../libtelnet/libtelnet.a" \
+ LIBS="-lutil -ltermcap ../libtelnet/libtelnet.a ../zmodem/librzsz.a" \
LIBPATH="/lib/libc.a /usr/lib/libtermcap.a \
../libtelnet/libtelnet.a" \
DEST=${DESTDIR}/usr/bin \
DEFINES="-DLINEMODE -DTERMCAP -DKLUDGELINEMODE \
- -DUSE_TERMIO -DDIAGNOSTICS" \
+ -DUSE_TERMIO -DDIAGNOSTICS -DHANGUL" \
INCLUDES="-I.." \
- LIB_OBJ="gettytab.o" \
- LIB_SRC="gettytab.c" \
+# LIB_OBJ="gettytab.o" \
+# LIB_SRC="gettytab.c" \
AR=ar ARFLAGS=cq RANLIB=ranlib \
- VPATH=/usr/src/libexec/getty \
+# VPATH=/usr/src/libexec/getty \
LIBEXEC=${DESTDIR}/usr/libexec \
- CC="${CC}" LCCFLAGS="-O"
+ CC="${CC}" LCCFLAGS="-O2"
4.3tahoe:
@echo $@ is untested... it may or may not work..."
@@ -360,7 +359,6 @@
DEST=${DESTDIR}/usr/ucb \
DEFINES="-DFILIO_H -DTERMCAP -DUSE_TERMIO \
-DKLUDGELINEMODE -DSTREAMS \
- -DAUTHENTICATE -DENCRYPT \
-DDIAGNOSTICS " \
INCLUDES="-I.." \
LIB_OBJ="getent.o strerror.o setenv.o herror.o" \
@@ -486,28 +484,3 @@
clean cleandir:
make -f Makefile.generic $@
-
-#
-# The DEFINE, BYPMS is added by Myeong Seok Park, which is for preventing
-# from annoying Linux-gcc compile errors! The DEFINE is also used to solve
-# portability problem with other operating systems!
-# In a sense to mentioned previously, these source files are compatible
-# to possible UNIX systems(I have not tested to other OSes yet ;<).
-# If you want to know modified parts of the source files by me, use grep
-# command (eg. 'grep PMS ~ztelnet/* | less' ). I have no time to write
-# notes for the modified parts...
-#
-
-linux:
- make -f Makefile.generic WHAT=$@ LINUX=linux\
- LIBS="-lncurses ../libtelnet/libtelnet.a" \
- LIBPATH="/usr/lib/libc.a /usr/lib/libncurses.a \
- ../libtelnet/libtelnet.a" \
- DEST=${DESTDIR}/usr/local \
- DEFINES="-DSYSV_TERMIO -DHAS_GETTOS -DHAVE_fd_set \
- -DMUST_ALIGN -DBYPMS -Dunix -DHAS_GETTOS \
- -DLINEMODE -DKLUDGELINEMODE -DDIAGNOSTICS"\
- INCLUDES="-I.." \
- AR=ar ARFLAGS=ru RANLIB=ranlib \
- LIBEXEC=${DEST}/bin \
- CC="${CC}" LCCFLAGS="-O -traditional -fno-strict-prototype"
diff -uNr ../ztelnet/Makefile ./Makefile
--- ../ztelnet/Makefile Tue Sep 19 20:02:01 1995
+++ ./Makefile Wed Dec 3 05:42:19 1997
@@ -1,10 +1,11 @@
-CC=cc
+CC=gcc
all:
- cd zmodem; make CC="${CC}"
cd libtelnet; make CC="${CC}"
+ cd zmodem; make CC="${CC}"
cd telnet; make CC="${CC}"
.DEFAULT:
- cd zmodem; make $@ WHAT=${WHAT} CC="${CC}"
cd libtelnet; make $@ WHAT=${WHAT} CC="${CC}"
+ #cd zmodem; make $@ WHAT=${WHAT} CC="${CC}"
+ cd zmodem; make CC="${CC}"
cd telnet; make $@ WHAT=${WHAT} CC="${CC}"
diff -uNr ../ztelnet/README.LINUX.ks ./README.LINUX.ks
--- ../ztelnet/README.LINUX.ks Wed Sep 20 21:41:15 1995
+++ ./README.LINUX.ks Thu Jan 1 00:00:00 1970
@@ -1,74 +0,0 @@
-=================================
- ztel-lnx.tgz: ztelnet for Linux
-=================================
-
-* ��ġ��
---------
-1. make linux
-2. mv ./telnet/telnet ~/bin/ztelnet
-
-* ���� ���ǻ���
------------------
-1. ȣ��Ʈ ������ escape ���ڴ� ^] (CTRL+])�Դϴ�.
-2. escape �Ŀ� set bin�� ������� ���� ���۽� ������ �ȳ��ϴ�.
-3. �ٽ� remote ȣ��Ʈ�� ���ư����� �׳� enter�� ġ����.
-4. set bin�� �ؼ� ȭ���� ������ ��쿡�� �ƿ� ztelnet -8 <host>
- �ؼ� ������ ������..
-5. �ѱ� ������� �Ǹ� set bin�� �̹� �����Ȱ��Դϴ�.
-6. ��Ÿ�� ������ escape ���� ztelnet> ��忡�� help�� �ĺ�����.
-
-* �ʺ��ڸ� ���� ��뿹
-----------------------
-myhost: telnet -8 nowcom.co.kr # -8 �ɼ��� set bin
-nowcom: ... (�ڷ�Ƿ� �̵�) ...
-nowcom: dn <�ڷ��ȣ> # �ڷ� ������
-nowcom: ... (zmodem protocol�� �Ἥ �ڷ� ����) ...
-nowcom: ^] # escape
-ztelnet> rz # �ڷ� �ޱ�
-ztelnet> help # ��Ÿ ����
-ztelnet> <����> # �ٽ� ������
-nowcom:
-
-* �����ڸ� ���� ���� ����
--------------------------
-1. Config.generic ������ ���ø� ���������� DEFINE�� �ֽ��ϴ�. ���� UNIX
- ȯ���� �� �� ���� ����� DEFINE�� �Ѱ����� �� �ڽ��ϴ�. ��
- �̴���� �е��� Config.generic���� linux: �κ��� DEFINE�� ���ϰų� ���ø�
- �˴ϴ�.
-2. ���������� �ҽ��� �ջ��Ű�� �ʱ����� BYPMS��� DEFINE�� ��������ϴ�.
- BYPMS�� ���� �ȵ����� �̸� ������ ���� �ΰ��� ���������Դϴ�.
- * ������ gcc�� ������ ������ ���ֱ� ���� :)
- * �̷��� �������� �������Ӹ� �ƴ϶� �ٸ� �ý��ۿ� ���� porting�Ǵ�
- upgrade�� �����ϰ� �Ϸ��� ;<
-3. Linux�� �ٸ� UNIX�� makefile�� cc���� �� ���� SUN 4.1.?����
- ������ �غô��� ���� �����̳�.. ���� Linux�� �ƴ� �е��� ����������
- ���� �ҽ��� �ƴٰ� ��ġ�Ͻñ⸦..
- �Ƹ� gcc�� GNU make�� ��ġ�Ǿ� �ִٸ� ������ �ȳ�����..
-4. �ð��� ��� ��ģ �κ��� ���������� �������� ���� ��ģ �κ���
- grep PMS ~ztelnet/* | less
- �� Ȯ���� �� �ֽ��ϴ�.
-5. �������� Config.local�� ����߾��µ� �ƿ� Config.generic�� linux �κ���
- �־���Ƚ��ϴ�. ������� ������ ȯ���� �����Ǿ��ٰ� �ϱ� �����Դϴ�.
-
-���� ����
----------
-1. �� ���α��� ��¥���� ���ڵ��� ������̴� ������� �뵵�� �̿�� ��
- �����ϴ�.
-2. ztelnet�� �����ڴ� ���������Դϴ�. �� �ҽ���
- ftp://dangun.kaist.ac.kr/???/ztelnet.tar.gz
- �Դϴ�.
-3. Linux�� ztelnet�� ���� �ٸ� �ý��۰� ȣȯ�� �ȵDZ� ������ �̸��� �ٸ��ϴ�.
- ftp://romance.kaist.ac.kr/pub/linux/network/ztel-lnx.tgz
- �� �� �ҽ� �����Դϴ�.
-4. ���� �츮������ ��¥�� �� ���� ���α� ���� �������ִ�
- ����� ���� �������� ���ڱ���..
-
-* ztelnet�� ����� �������Բ� ����帳�ϴ�..
-* Linux porting: 1995. 4. 23.
-* Minor revision: 1995. 9. 20.
-________________________________________________________________
- Park Myeong Seok, Dept. of Chem. Eng., KAIST, 305-701, Korea
- BioProcess Lab. (Tel. +82-42-869-3967)
- E-mail: pms@romance.kaist.ac.kr/mspark@chiak.kaist.ac.kr
-================================================================
-
diff -uNr ../ztelnet/README.ks ./README.ks
--- ../ztelnet/README.ks Sun Feb 12 14:44:25 1995
+++ ./README.ks Tue Apr 25 01:25:34 1995
@@ -7,19 +7,23 @@
> Install���
1. tar xvf ztelnet.tar
2. cd ztelnet
-3. make sun4.1 (�ٸ� machine�� ��쿡�� �� �ش��ϴ� target�� ����
- target���� make�ϸ� ������ target�� �� �� �ִ�.)
-4. ztelnet/telnet/telnet �� ���� ����� ���� ȭ��
+3. cd zmodem
+4. make bsd (�ٸ� machine�� ��쿡�� �� �ش��ϴ� target�� ����
+ - target���� make�ϸ� ������ target�� �� �� �ִ�.)
+5. cd ..
+6. make sun4.1 (�ٸ� machine�� ��쿡�� �� �ش��ϴ� target�� ����
+ - target���� make�ϸ� ������ target�� �� �� �ִ�.)
+7. ztelnet/telnet/telnet �� ���� ����� ���� ȭ��
> Down/Up���
telnet���� BBS(õ���� ������ ������)�� �����ѵ�
-down/up�غ� �ѵ� escape ���� ( default�� Ctrl-'[' )��
+down/up�غ� �ѵ� escape ���� ( default�� Ctrl-']' )��
�Է��Ͽ� telnet command �������� ���� ���´�.
binary���°� �ƴϸ� "set bin" �Ѵ�.
"rz" Ȥ�� "sz" �Ѵ�.
���� sun�迭�� ��ǻ�Ϳ����� test�� �غ��ҽ��ϴ�.
-���� ��� �߰� ��带 ���� �����ص� �Ϻ��ϰ�
+���� ��� �߰� ��带 ���� �����ص�
up/down�� �˴ϴ�.
�������� �ٿ� �߰��� Nice�ϰ� ������ ������ ����
@@ -30,15 +34,16 @@
1995. 2. 12
�� ������ jhheo@dangun.kaist.ac.kr
--
- ________
- ////|\\\\ / Nice \
- | . . | / To \
- O| ^ |O oO \ Meet you!/
- | V | .' \________/
- \_____/
+ ________ ///|\\\\
+ ////|\\\\ / Nice \ Oo ////|\\\\\
+ | . . | / To \ `.///_. ._\\\\
+ O| ^ |O oO \ Meet you!/ /// ^ \\\\
+ | V | .' \________/ ////| /O\ |\\\\\
+ \_____/ //// \_____/ \\\\\
+ ---------------> \\\\ /////
-If you ask me "what are you living for ?"
-I will just smile......
+the good time's gone!
+ remember coming soon!
CSD KAIST
the E-mail address
diff -uNr ../ztelnet/arpa/tel-lnx.h ./arpa/tel-lnx.h
--- ../ztelnet/arpa/tel-lnx.h Sat Apr 22 17:17:21 1995
+++ ./arpa/tel-lnx.h Thu Jan 1 00:00:00 1970
@@ -1,4 +0,0 @@
-#include "/usr/include/arpa/telnet.h"
-#define TELOPT_ENVIRON 36 /* Environment variables */
-#define ENV_VALUE 0
-#define ENV_VAR 1
diff -uNr ../ztelnet/libtelnet/Makefile.generic ./libtelnet/Makefile.generic
--- ../ztelnet/libtelnet/Makefile.generic Wed Sep 20 19:52:44 1995
+++ ./libtelnet/Makefile.generic Wed Dec 3 05:00:37 1997
@@ -19,32 +19,24 @@
# @(#)Makefile.generic 5.5 (Berkeley) 3/1/91
#
-LIB= libtelnet.a
-SRCS= auth.c encrypt.c genget.c \
+LIB= libtelnet.a
+SRCS= auth.c encrypt.c genget.c \
misc.c enc_des.c \
setenv.c getent.c strdup.c strcasecmp.c \
strchr.c strrchr.c strftime.c strerror.c \
${LIB_SRC}
-OBJS= auth.o encrypt.o genget.o \
+OBJS= auth.o encrypt.o genget.o \
misc.o enc_des.o \
${LIB_OBJ}
-ifeq (linux,${LINUX})
-TELNET_H= ../arpa/tel-lnx.h
-CFLAGS= ${LCCFLAGS} ${INCLUDES} ${DEFINES}
-else
-TELNET_H= ../arpa/telnet.h
-CFLAGS= -O ${DEFINES} ${INCLUDES}
-endif
+TELNET_H= ../arpa/telnet.h
+
+CFLAGS= -O2 ${DEFINES} ${INCLUDES}
${LIB}: ${OBJS}
rm -f ${LIB}
-ifeq (linux,${LINUX})
- ${AR} ${ARFLAGS} ${LIB} ${OBJS}
-else
${AR} ${ARFLAGS} ${LIB} `lorder ${OBJS} | tsort`
-endif
@if [ ${RANLIB} != NONE ]; \
then echo ${RANLIB} ${LIB}; ${RANLIB} ${LIB}; fi
diff -uNr ../ztelnet/libtelnet/strdup.c ./libtelnet/strdup.c
--- ../ztelnet/libtelnet/strdup.c Mon Mar 25 22:14:21 1991
+++ ./libtelnet/strdup.c Wed Dec 3 05:45:36 1997
@@ -28,7 +28,6 @@
#include <string.h>
#endif
-
char *
strdup(str)
char *str;
diff -uNr ../ztelnet/qbkpark ./qbkpark
--- ../ztelnet/qbkpark Thu Jan 1 00:00:00 1970
+++ ./qbkpark Sun Feb 12 15:48:38 1995
@@ -0,0 +1,32 @@
+From bkpark@netcom.com Sun Feb 12 15:37:46 1995
+Received: from netcom17.netcom.com by dangun.kaist.ac.kr (8.6.9H1/8.6.4)
+ id AAA21108; Mon, 13 Feb 1995 00:37:44 +0900
+Received: by netcom17.netcom.com (8.6.9/Netcom)
+ id HAA24753; Sun, 12 Feb 1995 07:38:54 -0800
+Date: Sun, 12 Feb 1995 07:38:54 -0800
+From: bkpark@netcom.com (Byung Kyu Park)
+Message-Id: <199502121538.HAA24753@netcom17.netcom.com>
+To: jhheo@dangun.kaist.ac.kr
+Subject: Asking about ztelnet.tar.gz
+Status: RO
+
+
+Hello!
+I was informed your ztelnet.tar.gz in kaist BBS.
+I received that by the use of anonymous FTP.
+But... I couldn't take a download to my PC.
+I think that is unix compression file. I don't know about it.
+I tried to get it after renaming as ztelnet.tar.
+And succeeded..
+I got it.
+But, I can't extract the renamed file. (ztelnet.tar) in my PC (DOS).
+
+Could you tell me how to extract that?
+Was there my fault in this process?
+Please informe me in detail...
+
+Very truly yours.
+Thank you!
+
+Byung Kyu Park. (Sorry about poor English)
+
diff -uNr ../ztelnet/telnet/Makefile.generic ./telnet/Makefile.generic
--- ../ztelnet/telnet/Makefile.generic Wed Sep 20 19:42:39 1995
+++ ./telnet/Makefile.generic Wed Dec 3 08:58:33 1997
@@ -19,28 +19,22 @@
# @(#)Makefile.generic 5.5 (Berkeley) 3/1/91
#
-INCLUDES= -I..
-
-ifeq (linux,${LINUX})
-ARPA_TELNET= ../arpa/tel-lnx.h
-CFLAGS= ${LCCFLAGS} ${INCLUDES} ${DEFINES}
-else
-ARPA_TELNET= ../arpa/telnet.h
-CFLAGS= -O ${INCLUDES} ${DEFINES}
-endif
+INCLUDES= -I..
+ARPA_TELNET= ../arpa/telnet.h
SRCS= commands.c main.c network.c ring.c \
sys_bsd.c telnet.c terminal.c \
utilities.c ${GETOPT_SRC}
+CFLAGS= -O2 ${INCLUDES} ${DEFINES}
ALLHC= ${SRCS} \
defines.h externs.h fdset.h general.h \
ring.h types.h
OBJS= authenc.o commands.o main.o network.o ring.o sys_bsd.o \
- telnet.o terminal.o utilities.o ${GETOPT_OBJ} \
- ../zmodem/rz.o ../zmodem/sz.o
+ telnet.o terminal.o utilities.o ${GETOPT_OBJ}
+
MAN= telnet.0
#
@@ -73,8 +67,8 @@
mkdep ${CFLAGS} `make clist`
install: ${MAN} FRC
- install -s -o bin -g bin -m 755 telnet ${LIBEXEC}
- install -c -o bin -g bin -m 444 telnet.0 ${DEST}/man/cat1
+ install -s -o bin -g bin -m 755 telnet ${DEST}
+ install -c -o bin -g bin -m 444 telnet.0 ${DESTDIR}/usr/man/cat1
lint: FRC ${SRCS}
lint ${CFLAGS} `make clist`
diff -uNr ../ztelnet/telnet/Makefile.generic.ORG ./telnet/Makefile.generic.ORG
--- ../ztelnet/telnet/Makefile.generic.ORG Thu Jan 1 00:00:00 1970
+++ ./telnet/Makefile.generic.ORG Wed Dec 3 00:54:17 1997
@@ -0,0 +1,90 @@
+#
+# Copyright (c) 1991 The Regents of the University of California.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms are permitted provided
+# that: (1) source distributions retain this entire copyright notice and
+# comment, and (2) distributions including binaries display the following
+# acknowledgement: ``This product includes software developed by the
+# University of California, Berkeley and its contributors'' in the
+# documentation or other materials provided with the distribution and in
+# all advertising materials mentioning features or use of this software.
+# Neither the name of the University nor the names of its contributors may
+# be used to endorse or promote products derived from this software without
+# specific prior written permission.
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+#
+# @(#)Makefile.generic 5.5 (Berkeley) 3/1/91
+#
+
+INCLUDES= -I..
+ARPA_TELNET= ../arpa/telnet.h
+
+SRCS= commands.c main.c network.c ring.c \
+ sys_bsd.c telnet.c terminal.c \
+ utilities.c ${GETOPT_SRC}
+
+CFLAGS= -g ${INCLUDES} ${DEFINES}
+
+ALLHC= ${SRCS} \
+ defines.h externs.h fdset.h general.h \
+ ring.h types.h
+
+OBJS= authenc.o commands.o main.o network.o ring.o sys_bsd.o \
+ telnet.o terminal.o utilities.o ${GETOPT_OBJ} \
+ ../zmodem/rz.o ../zmodem/sz.o
+MAN= telnet.0
+
+#
+# These next three lines are not needed in 4.4BSD
+#
+.SUFFIXES: .0 .1
+.1.0:
+ nroff -man -h $< > $@
+
+all: telnet
+
+telnet: ${OBJS} ${LIBPATH}
+ ${CC} -o $@ ${CFLAGS} ${OBJS} ${LIBS}
+
+clean: FRC
+ rm -f ${OBJS} core errs l.errs telnet
+
+cleandir: clean
+ rm -f ${MAN} tags .depend
+
+clist: FRC ${SRCS}
+ @for i in ${SRCS} ; \
+ do (echo ${DIRPATH}$$i); done
+
+hclist: FRC ${ALLHC}
+ @for i in ${ALLHC} ; \
+ do (echo ${DIRPATH}$$i); done
+
+depend: FRC ${SRCS}
+ mkdep ${CFLAGS} `make clist`
+
+install: ${MAN} FRC
+ install -s -o bin -g bin -m 755 telnet ${DEST}
+ install -c -o bin -g bin -m 444 telnet.0 ${DESTDIR}/usr/man/cat1
+
+lint: FRC ${SRCS}
+ lint ${CFLAGS} `make clist`
+
+tags: FRC ${SRCS}
+ ctags `make hclist`
+
+FRC:
+
+authenc.o: defines.h externs.h general.h ring.h types.h ${ARPA_TELNET}
+commands.o: defines.h externs.h general.h ring.h types.h ${ARPA_TELNET}
+main.o: defines.h externs.h ring.h
+network.o: defines.h externs.h fdset.h ring.h ${ARPA_TELNET}
+ring.o: general.h ring.h
+sys_bsd.o: defines.h externs.h fdset.h ring.h types.h ${ARPA_TELNET}
+telnet.o: defines.h externs.h general.h ring.h types.h ${ARPA_TELNET}
+terminal.o: externs.h ring.h types.h ${ARPA_TELNET}
+tn3270.o: defines.h externs.h fdset.h general.h ring.h ${ARPA_TELNET}
+utilities.o: defines.h externs.h fdset.h general.h ring.h ${ARPA_TELNET}
diff -uNr ../ztelnet/telnet/commands.c ./telnet/commands.c
--- ../ztelnet/telnet/commands.c Wed Sep 20 00:03:45 1995
+++ ./telnet/commands.c Wed Dec 3 02:17:45 1997
@@ -93,6 +93,10 @@
static int margc;
static char *margv[20];
+ void send_wont();
+ void send_dont();
+ void send_will();
+ void send_do();
static void
makeargv()
{
@@ -230,10 +234,8 @@
int nbyte; /* Number of bytes to send this command */
int what; /* Character to be sent (<0 ==> special) */
};
+
-/* PMS
-extern int
-*/
static int
send_esc P((void)),
send_help P((void)),
@@ -370,7 +372,6 @@
send_docmd(name)
char *name;
{
- void send_do();
return(send_tncmd(send_do, "do", name));
}
@@ -378,21 +379,18 @@
send_dontcmd(name)
char *name;
{
- void send_dont();
return(send_tncmd(send_dont, "dont", name));
}
static int
send_willcmd(name)
char *name;
{
- void send_will();
return(send_tncmd(send_will, "will", name));
}
static int
send_wontcmd(name)
char *name;
{
- void send_wont();
return(send_tncmd(send_wont, "wont", name));
}
@@ -590,11 +588,8 @@
return 1;
}
-/* PMS
-extern int togglehelp P((void));
-*/
-static int togglehelp P((void));
+static int togglehelp P((void));
#if defined(AUTHENTICATE)
extern int auth_togdebug P((int));
#endif
@@ -828,12 +823,8 @@
*/
#ifdef USE_TERMIO
-#ifdef BYPMS
-struct termios new_tc = { 0 };
-#else
struct termio new_tc = { 0 };
#endif
-#endif
struct setlist {
char *name; /* name */
@@ -1559,9 +1550,6 @@
int arg;
};
-/* PMS
-extern void slc_help();
-*/
static void slc_help();
struct slclist SlcList[] = {
@@ -1640,15 +1628,13 @@
extern struct env_lst *
env_define P((unsigned char *, unsigned char *));
-extern void
+static void
env_undefine P((unsigned char *)),
env_export P((unsigned char *)),
env_unexport P((unsigned char *)),
env_send P((unsigned char *)),
- env_list P((void));
-
-/* PMS: extern is replaced by static */
-static void env_help P((void));
+ env_list P((void)),
+ env_help P((void));
struct envlist EnvList[] = {
{ "define", "Define an environment variable",
@@ -2232,7 +2218,7 @@
register struct hostent *host = 0;
struct sockaddr_in sin;
struct servent *sp = 0;
- unsigned long temp, inet_addr();
+ unsigned long temp;/*, inet_addr();*/
extern char *inet_ntoa();
#if defined(IP_OPTIONS) && defined(IPPROTO_IP)
char *srp = 0, *strrchr();
@@ -2489,11 +2475,7 @@
envhelp[] = "change environment variables ('environ ?' for more)",
modestring[] = "try to enter line or character mode ('mode ?' for more)";
-/* PMS
-extern int help();
-*/
-
-static int help();
+static int help();
static Command cmdtab[] = {
{ "close", closehelp, bye, 1 },
diff -uNr ../ztelnet/telnet/externs.h ./telnet/externs.h
--- ../ztelnet/telnet/externs.h Tue Sep 19 22:52:29 1995
+++ ./telnet/externs.h Mon Mar 25 22:14:23 1991
@@ -35,18 +35,14 @@
#include <sys/filio.h>
#endif
#ifdef USE_TERMIO
-#ifndef BYPMS
# ifndef VINTR
-#endif /* PMS */
# ifdef SYSV_TERMIO
# include <sys/termio.h>
# else
# include <sys/termios.h>
# define termio termios
# endif
-#ifndef BYPMS
# endif
-#endif /* PMS */
#endif
#if defined(NO_CC_T) || !defined(USE_TERMIO)
# if !defined(USE_TERMIO)
@@ -315,11 +311,7 @@
# else
-#ifdef BYPMS
-extern struct termios new_tc;
-#else
extern struct termio new_tc;
-#endif /* PMS */
# define termEofChar new_tc.c_cc[VEOF]
# define termEraseChar new_tc.c_cc[VERASE]
diff -uNr ../ztelnet/telnet/main.c ./telnet/main.c
--- ../ztelnet/telnet/main.c Tue Sep 19 20:54:56 1995
+++ ./telnet/main.c Mon Mar 25 22:14:24 1991
@@ -132,7 +132,6 @@
case 'S':
{
#ifdef HAS_GETTOS
-#ifndef BYPMS
extern int tos;
if ((tos = parsetos(optarg, "tcp")) < 0)
@@ -140,7 +139,6 @@
prompt, ": Bad TOS argument '",
optarg,
"; will try to use default TOS");
-#endif /* PMS */
#else
fprintf(stderr,
"%s: Warning: -S ignored, no parsetos() support.\n",
diff -uNr ../ztelnet/telnet/sys_bsd.c ./telnet/sys_bsd.c
--- ../ztelnet/telnet/sys_bsd.c Tue Sep 19 23:35:50 1995
+++ ./telnet/sys_bsd.c Wed Dec 3 02:35:18 1997
@@ -43,13 +43,16 @@
#include "externs.h"
#include "types.h"
-/* PMS: BYPMS is added */
-#if defined(CRAY) || (defined(USE_TERMIO) && !defined(SYSV_TERMIO)) || defined(BYPMS)
+#if defined(CRAY) || (defined(USE_TERMIO) && !defined(SYSV_TERMIO))
#define SIG_FUNC_RET void
#else
#define SIG_FUNC_RET int
#endif
+#ifdef SIGINFO
+extern SIG_FUNC_RET ayt_status();
+#endif
+
int
tout, /* Output file descriptor */
tin, /* Input file descriptor */
@@ -65,16 +68,9 @@
# define old_tc ottyb
#else /* USE_TERMIO */
-
-#ifdef BYPMS
-struct termios old_tc = { 0 };
-extern struct termios new_tc;
-#else
struct termio old_tc = { 0 };
extern struct termio new_tc;
-#endif /* PMS */
-#ifndef BYPMS
# ifndef TCSANOW
# ifdef TCSETS
# define TCSANOW TCSETS
@@ -100,7 +96,6 @@
# endif
# endif /* TCSANOW */
#endif /* USE_TERMIO */
-#endif /* PMS */
static fd_set ibits, obits, xbits;
@@ -166,11 +161,11 @@
* 1 Do add this character
*/
+void xmitAO(), xmitEL(), xmitEC(), intp(), sendbrk();
int
TerminalSpecialChars(c)
int c;
{
- void xmitAO(), xmitEL(), xmitEC(), intp(), sendbrk();
if (c == termIntChar) {
intp();
@@ -382,11 +377,7 @@
struct sgttyb sb;
int lmode;
#else /* USE_TERMIO */
-#ifdef BYPMS
- struct termios tmp_tc;
-#else
struct termio tmp_tc;
-#endif /* PMS */
#endif /* USE_TERMIO */
int onoff;
int old;
diff -uNr ../ztelnet/telnet/utilities.c ./telnet/utilities.c
--- ../ztelnet/telnet/utilities.c Tue Sep 19 21:41:41 1995
+++ ./telnet/utilities.c Wed Dec 3 01:57:23 1997
@@ -40,6 +40,15 @@
#include "externs.h"
+#ifdef SLC_NAME_OK
+#undef SLC_NAME_OK
+#define SLC_NAME_OK(x) ( (x) < NSLC )
+#endif
+#ifdef TELOPT_OK
+#undef TELOPT_OK
+#define TELOPT_OK(x) ((x) <= TELOPT_LAST)
+#endif
+
FILE *NetTrace = 0; /* Not in bss, since needs to stay */
int prettydump;
@@ -282,9 +291,6 @@
register int i;
char buf[512];
extern int want_status_response;
-#ifdef BYPMS
- unsigned int bypms;
-#endif /* PMS */
if (showoptions || direction == 0 ||
(want_status_response && (pointer[0] == TELOPT_STATUS))) {
@@ -578,12 +584,7 @@
case LM_SLC:
fprintf(NetTrace, "SLC");
for (i = 2; i < length - 2; i += 3) {
-#ifdef BYPMS
- bypms = (unsigned int) pointer[i+SLC_FUNC];
- if (SLC_NAME_OK(bypms))
-#else
if (SLC_NAME_OK(pointer[i+SLC_FUNC]))
-#endif /* PMS */
fprintf(NetTrace, " %s", SLC_NAME(pointer[i+SLC_FUNC]));
else
fprintf(NetTrace, " %d", pointer[i+SLC_FUNC]);
@@ -672,12 +673,7 @@
case WONT: cp = "WONT"; goto common2;
common2:
i++;
-#ifdef BYPMS
- bypms = (unsigned int) pointer[i];
- if (TELOPT_OK(bypms))
-#else
if (TELOPT_OK((int)pointer[i]))
-#endif /* PMS */
fprintf(NetTrace, " %s %s", cp, TELOPT(pointer[i]));
else
fprintf(NetTrace, " %s %d", cp, pointer[i]);
@@ -799,12 +795,7 @@
break;
default:
-#ifdef BYPMS
- bypms = (unsigned int) pointer[0];
- if (TELOPT_OK(bypms))
-#else
- if (TELOPT_OK(pointer[0]))
-#endif /* PMS */
+ if (TELOPT_OK(pointer[0]))
fprintf(NetTrace, "%s (unknown)", TELOPT(pointer[0]));
else
fprintf(NetTrace, "%d (unknown)", pointer[i]);
diff -uNr ../ztelnet/zmodem/Makefile ./zmodem/Makefile
--- ../ztelnet/zmodem/Makefile Wed Sep 20 00:20:41 1995
+++ ./zmodem/Makefile Wed Dec 3 05:48:19 1997
@@ -1,142 +1,19 @@
-# Makefile for Unix/Xenix rz and sz programs
-# the makefile is not too well tested yet
-CFLAGS= -c -O
-OBJS=sz.o rz.o
-SRCS= rbsb.c minirb.c zm.c zmr.c crctab.c crc.c zmodem.h
-ARCFILES= README rbsb.c gz *.t minirb.c zmodem.h \
- zm.c zmr.c crctab.c sz.c rz.c mailer.rz crc.c
+LIB= librzsz.a
+SRCS= rz.c sz.c
-nothing:
- @echo
- @echo "Please study the #ifdef's in crctab.c, rbsb.c, rz.c and sz.c,"
- @echo "make any necessary hacks for oddball or merged SYSV/BSD systems,"
- @echo "then type 'make SYSTEM' where SYSTEM is one of:"
- @echo
- @echo " posix POSIX compliant systems"
- @echo " linux LINUX systems"
- @echo " odt SCO Open Desktop"
- @echo " sysvr4 SYSTEM 5.4 Unix, SCO Open Desktop"
- @echo " sysvr3 SYSTEM 5.3 Unix with mkdir(2)"
- @echo " sysv SYSTEM 3/5 Unix"
- @echo " xenix Xenix"
- @echo " x386 386 Xenix"
- @echo " bsd Berkeley 4.x BSD, Ultrix, V7"
- @echo " tandy Tandy 6000 Xenix"
- @echo " dnix DIAB Dnix 5.2"
- @echo " dnix5r3 DIAB Dnix 5.3"
- @echo " amiga 3000UX running SVR4"
- @echo " POSIX POSIX compliant systems (SCO Open Desktop, strict)"
- @echo
- @echo " doc Format the man pages with nroff"
- @echo
+OBJS= rz.o sz.o \
+ ${LIB_OBJ}
-usenet:doc
- shar -c -a -n rzsz -o /tmp/rzsz -l64 \
- README Makefile zmodem.h zm.c rz.c rbsb.c \
- crc.c crctab.c minirb.c mailer.rz zmr.c *.doc gz sz.c *.t
+CFLAGS= -O2 ${DEFINES} ${INCLUDES}
-shar:doc
- shar -c README Makefile zmodem.h zm.c \
- zmr.c sz.c rz.c crctab.c \
- mailer.rz crc.c rbsb.c minirb.c *.doc gz *.t >/tmp/rzsz
+${LIB}: ${OBJS}
+ rm -f ${LIB}
+ ${AR} ${ARFLAGS} ${LIB} `lorder ${OBJS} | tsort`
+ @if [ ${RANLIB} != NONE ]; \
+ then echo ${RANLIB} ${LIB}; ${RANLIB} ${LIB}; fi
-unixforum: shar
- compress /tmp/rzsz.sh
+clean cleandir:
+ rm -f *.o ${LIB} core a.out
-unix:
- undos $(ARCFILES)
-
-dos:
- todos $(ARCFILES)
-
-doc:rz.doc sz.doc crc.doc minirb.doc
-
-minirb.doc:minirb.1
- nroff -man minirb.1 | col >minirb.doc
-
-rz.doc:rz.1
- nroff -man rz.1 | col >rz.doc
-
-sz.doc:sz.1
- nroff -man sz.1 | col >sz.doc
-
-crc.doc:crc.1
- nroff -man crc.1 | col >crc.doc
-
-zoo: doc
- -rm -f /tmp/rzsz.zoo
- zoo ah /tmp/rzsz README Makefile zmodem.h zm.c sz.c rz.c \
- mailer.rz crctab.c rbsb.c *.doc \
- zmr.c crc.c gz *.t minirb.c
- touch /tmp/rzsz.zoo
- chmod og-w /tmp/rzsz.zoo
- mv /tmp/rzsz.zoo /u/t/yam
- -rm -f rzsz.zip
- zip rzsz readme mailer.rz makefile zmodem.h zm.c sz.c rz.c
- zip rzsz crctab.c rbsb.c *.doc
- zip rzsz zmr.c crc.c gz *.t minirb.c
- mv rzsz.zip /u/t/yam
-
-tar:doc
- tar cvf /tmp/rzsz.tar README Makefile zmodem.h zm.c sz.c rz.c \
- mailer.rz crctab.c rbsb.c \
- zmr.c crc.c *.1 *.doc gz *.t minirb.c
-
-tags:
- ctags sz.c rz.c zm.c zmr.c rbsb.c
-
-clean:
- rm -f *.o
-
-xenix:
- $(CC) $(CFLAGS) -M0 -K -i -DUSG -DNFGVMIN -DREADCHECK sz.c
- $(CC) $(CFLAGS) -M0 -K -i -DUSG -DMD rz.c
-
-x386:
- $(CC) $(CFLAGS) -DUSG -DMD sz.c
- $(CC) $(CFLAGS) -DUSG -DNFGVMIN -DREADCHECK rz.c
-
-sysv:
- $(CC) $(CFLAGS) -DUSG -DMD sz.c
- $(CC) $(CFLAGS) -DUSG -DSV -DNFGVMIN rz.c
-
-sysvr3 ultrix3.1:
- $(CC) $(CFLAGS) -DUSG -DMD=2 sz.c
- $(CC) $(CFLAGS) -DSV -DUSG -DNFGVMIN rz.c
-
-sysvr4 ultrix4.0:
- $(CC) $(CFLAGS) -DUSG -DMD=2 sz.c
- $(CC) $(CFLAGS) -DSV -DUSG rz.c
-
-odt:
- $(CC) $(CFLAGS) -strict -W2 -n -DUSG -DMD=2 sz.c
- $(CC) $(CFLAGS) -strict -W2 -n -DUSG -DREADCHECK rz.c
-
-linux posix:
- $(CC) $(CFLAGS) -DPOSIX -DMD=2 sz.c
- $(CC) $(CFLAGS) -DPOSIX rz.c
-
-POSIX:
- @echo "Well, stricter, as in *safer sex* ..."
- $(CC) $(CFLAGS) -posix -W2 -DPOSIX -DMD=2 sz.c
- $(CC) $(CFLAGS) -posix -W2 -DPOSIX rz.c
-
-bsd 4.4bsd 4.3reno 4.3tahoe 4.3bsd sun3.5 sun4.0 sun4.0.3c sun4.1:
- $(CC) $(CFLAGS) -DMD=2 -Dstrchr=index -DV7 sz.c
- $(CC) $(CFLAGS) -DV7 -DNFGVMIN rz.c
-
-tandy:
- $(CC) $(CFLAGS) -n -DUSG -DMD -DT6K sz.c
- $(CC) $(CFLAGS) -n -DUSG -DMD -DT6K rz.c
-
-dnix:
- $(CC) $(CFLAGS) -DUSG -DMD sz.c
- $(CC) $(CFLAGS) -DSV -DUSG -DNFGVMIN -DREADCHECK rz.c
-
-dnix5r3:
- $(CC) $(CFLAGS) -DUSG -DMD=2 sz.c
- $(CC) $(CFLAGS) -DUSG -DSV -DNFGVMIN -DREADCHECK rz.c
-
-amiga:
- $(CC) $(CFLAGS) -DUSG -DNFGVMIN -g sz.c
- $(CC) $(CFLAGS) -DUSG -DSV -DNFGVMIN -g rz.c
+rz.o : zmodem.h
+sz.o : zmodem.h
diff -uNr ../ztelnet/zmodem/Makefile.old ./zmodem/Makefile.old
--- ../ztelnet/zmodem/Makefile.old Thu Jan 1 00:00:00 1970
+++ ./zmodem/Makefile.old Wed Dec 3 04:04:23 1997
@@ -0,0 +1,141 @@
+# Makefile for Unix/Xenix rz and sz programs
+# the makefile is not too well tested yet
+CFLAGS= -c
+OBJS=sz.o rz.o
+SRCS= rbsb.c minirb.c zm.c zmr.c crctab.c crc.c zmodem.h
+ARCFILES= README rbsb.c gz *.t minirb.c zmodem.h \
+ zm.c zmr.c crctab.c sz.c rz.c mailer.rz crc.c
+
+nothing:
+ @echo
+ @echo "Please study the #ifdef's in crctab.c, rbsb.c, rz.c and sz.c,"
+ @echo "make any necessary hacks for oddball or merged SYSV/BSD systems,"
+ @echo "then type 'make SYSTEM' where SYSTEM is one of:"
+ @echo
+ @echo " posix POSIX compliant systems"
+ @echo " odt SCO Open Desktop"
+ @echo " sysvr4 SYSTEM 5.4 Unix, SCO Open Desktop"
+ @echo " sysvr3 SYSTEM 5.3 Unix with mkdir(2)"
+ @echo " sysv SYSTEM 3/5 Unix"
+ @echo " xenix Xenix"
+ @echo " x386 386 Xenix"
+ @echo " bsd Berkeley 4.x BSD, Ultrix, V7"
+ @echo " tandy Tandy 6000 Xenix"
+ @echo " dnix DIAB Dnix 5.2"
+ @echo " dnix5r3 DIAB Dnix 5.3"
+ @echo " amiga 3000UX running SVR4"
+ @echo " POSIX POSIX compliant systems (SCO Open Desktop, strict)"
+ @echo
+ @echo " doc Format the man pages with nroff"
+ @echo
+
+usenet:doc
+ shar -c -a -n rzsz -o /tmp/rzsz -l64 \
+ README Makefile zmodem.h zm.c rz.c rbsb.c \
+ crc.c crctab.c minirb.c mailer.rz zmr.c *.doc gz sz.c *.t
+
+shar:doc
+ shar -c README Makefile zmodem.h zm.c \
+ zmr.c sz.c rz.c crctab.c \
+ mailer.rz crc.c rbsb.c minirb.c *.doc gz *.t >/tmp/rzsz
+
+unixforum: shar
+ compress /tmp/rzsz.sh
+
+unix:
+ undos $(ARCFILES)
+
+dos:
+ todos $(ARCFILES)
+
+doc:rz.doc sz.doc crc.doc minirb.doc
+
+minirb.doc:minirb.1
+ nroff -man minirb.1 | col >minirb.doc
+
+rz.doc:rz.1
+ nroff -man rz.1 | col >rz.doc
+
+sz.doc:sz.1
+ nroff -man sz.1 | col >sz.doc
+
+crc.doc:crc.1
+ nroff -man crc.1 | col >crc.doc
+
+zoo: doc
+ -rm -f /tmp/rzsz.zoo
+ zoo ah /tmp/rzsz README Makefile zmodem.h zm.c sz.c rz.c \
+ mailer.rz crctab.c rbsb.c *.doc \
+ zmr.c crc.c gz *.t minirb.c
+ touch /tmp/rzsz.zoo
+ chmod og-w /tmp/rzsz.zoo
+ mv /tmp/rzsz.zoo /u/t/yam
+ -rm -f rzsz.zip
+ zip rzsz readme mailer.rz makefile zmodem.h zm.c sz.c rz.c
+ zip rzsz crctab.c rbsb.c *.doc
+ zip rzsz zmr.c crc.c gz *.t minirb.c
+ mv rzsz.zip /u/t/yam
+
+tar:doc
+ tar cvf /tmp/rzsz.tar README Makefile zmodem.h zm.c sz.c rz.c \
+ mailer.rz crctab.c rbsb.c \
+ zmr.c crc.c *.1 *.doc gz *.t minirb.c
+
+tags:
+ ctags sz.c rz.c zm.c zmr.c rbsb.c
+
+clean:
+ rm -f *.o
+
+xenix:
+ $(CC) $(CFLAGS) -M0 -K -i -DUSG -DNFGVMIN -DREADCHECK sz.c
+ $(CC) $(CFLAGS) -M0 -K -i -DUSG -DMD rz.c
+
+x386:
+ $(CC) $(CFLAGS) -DUSG -DMD sz.c
+ $(CC) $(CFLAGS) -DUSG -DNFGVMIN -DREADCHECK rz.c
+
+sysv:
+ $(CC) $(CFLAGS) -DUSG -DMD sz.c
+ $(CC) $(CFLAGS) -DUSG -DSV -DNFGVMIN rz.c
+
+sysvr3 :
+ $(CC) $(CFLAGS) -DUSG -DMD=2 sz.c
+ $(CC) $(CFLAGS) -DSV -DUSG -DNFGVMIN rz.c
+
+sysvr4 :
+ $(CC) $(CFLAGS) -DUSG -DMD=2 sz.c
+ $(CC) $(CFLAGS) -DSV -DUSG rz.c
+
+odt:
+ $(CC) $(CFLAGS) -strict -W2 -n -DUSG -DMD=2 sz.c
+ $(CC) $(CFLAGS) -strict -W2 -n -DUSG -DREADCHECK rz.c
+
+posix:
+ $(CC) $(CFLAGS) -DPOSIX -DMD=2 sz.c
+ $(CC) $(CFLAGS) -DPOSIX rz.c
+
+POSIX:
+ @echo "Well, stricter, as in *safer sex* ..."
+ $(CC) $(CFLAGS) -posix -W2 -DPOSIX -DMD=2 sz.c
+ $(CC) $(CFLAGS) -posix -W2 -DPOSIX rz.c
+
+bsd:
+ $(CC) $(CFLAGS) -DMD=2 -Dstrchr=index -DV7 sz.c
+ $(CC) $(CFLAGS) -DV7 -DNFGVMIN rz.c
+
+tandy:
+ $(CC) $(CFLAGS) -n -DUSG -DMD -DT6K sz.c
+ $(CC) $(CFLAGS) -n -DUSG -DMD -DT6K rz.c
+
+dnix:
+ $(CC) $(CFLAGS) -DUSG -DMD sz.c
+ $(CC) $(CFLAGS) -DSV -DUSG -DNFGVMIN -DREADCHECK rz.c
+
+dnix5r3:
+ $(CC) $(CFLAGS) -DUSG -DMD=2 sz.c
+ $(CC) $(CFLAGS) -DUSG -DSV -DNFGVMIN -DREADCHECK rz.c
+
+amiga:
+ $(CC) $(CFLAGS) -DUSG -DNFGVMIN -g sz.c
+ $(CC) $(CFLAGS) -DUSG -DSV -DNFGVMIN -g rz.c
diff -uNr ../ztelnet/zmodem/rbsb.c ./zmodem/rbsb.c
--- ../ztelnet/zmodem/rbsb.c Mon Apr 24 14:09:14 1995
+++ ./zmodem/rbsb.c Wed Dec 3 04:44:14 1997
@@ -6,7 +6,7 @@
*/
STATIC char *Copyr = "Copyright 1993 Omen Technology Inc All Rights Reserved";
-
+#define V7
#ifdef V7
#include <sys/types.h>
#include <sys/stat.h>
@@ -28,8 +28,6 @@
#define OS "SYS III/V"
#define MODE2OK
#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
#endif
#ifdef POSIX
@@ -41,8 +39,6 @@
#include <termios.h>
#define OS "POSIX"
#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
#ifndef READCHECK
#ifndef FIONREAD
#define SV
@@ -70,6 +66,10 @@
#define sendline(c) net_putchar(c & 0377)
#define xsendline(c) net_putchar(c)
+/*----Appended by yongari to shut up compiler---*/
+STATIC zmputs();
+/*----------------------------------------------*/
+
STATIC char linbuf[HOWMANY];
STATIC int Lleft=0; /* number of characters in linbuf */
STATIC jmp_buf tohere; /* For the interrupt on RX timeout */
@@ -84,8 +84,6 @@
STATIC int Twostop; /* Use two stop bits */
-/*PMS*/
-STATIC zmputs(char *s);
/*
* The following uses an external rdchk() routine if available,
@@ -292,10 +290,8 @@
STATIC init_rbsb()
{
int i;
-#ifdef LLITOUT
Locmode = 0;
Locbit = LLITOUT;
-#endif
Lleft = 0;
#ifdef ONEREAD
Readnum = 1;
diff -uNr ../ztelnet/zmodem/rz.c ./zmodem/rz.c
--- ../ztelnet/zmodem/rz.c Mon Apr 24 14:28:22 1995
+++ ./zmodem/rz.c Wed Dec 3 04:07:46 1997
@@ -1,5 +1,8 @@
-#define STATIC static
-
+/*------Appended by yongari------*/
+#define V7
+#define NFGVMIN
+/*-------------------------------*/
+#define STATIC static
#define VERSION "3.25 2-11-95"
#define PUBDIR "/usr/spool/uucppublic"
@@ -82,6 +85,27 @@
#include <errno.h>
extern int errno;
+/*-----Appended by yongari to shut up compiler------*/
+STATIC usage();
+STATIC wcreceive();
+STATIC wcrxpn();
+STATIC wcrx();
+STATIC wcgetsec();
+STATIC procheader();
+STATIC openit();
+STATIC make_dirs();
+STATIC putsec();
+STATIC chkinvok();
+STATIC checkpath();
+STATIC tryz();
+STATIC rzfiles();
+STATIC rzfile();
+STATIC closeit();
+STATIC sys2();
+STATIC exec2();
+STATIC init_rz();
+/*--------------------------------------------------*/
+
#define OK 0
#define FALSE 0
#define TRUE 1
@@ -195,10 +219,8 @@
#include "zm.c"
#include "zmr.c"
-STATIC int tryzhdrtype=ZRINIT; /* Header type to send corresponding to Last rx close */
-/* PMS */
-#include "rz.h"
+STATIC int tryzhdrtype=ZRINIT; /* Header type to send corresponding to Last rx close */
/* called by signal interrupt or terminate to clean things up */
STATIC void
@@ -339,8 +361,7 @@
fprintf(stderr,"Copyright 1993 Omen Technology INC All Rights Reserved\n");
fprintf(stderr,
"See rz.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,"Ported into telnet by Heo, Junhyeok 1994.3.28\n");
Exit(2);
}
diff -uNr ../ztelnet/zmodem/rz.h ./zmodem/rz.h
--- ../ztelnet/zmodem/rz.h Mon Apr 24 14:21:57 1995
+++ ./zmodem/rz.h Thu Jan 1 00:00:00 1970
@@ -1,27 +0,0 @@
-#ifndef STATIC
-#define STATIC static
-#endif
-
-STATIC void bibi(int n);
-int rz(int argc, char *argv[]);
-STATIC usage(void);
-STATIC wcreceive(int argc, char **argp);
-STATIC wcrxpn(char *rpn);
-STATIC wcrx(void);
-STATIC wcgetsec(char *rxbuf, int maxtime);
-STATIC procheader(char *name);
-STATIC openit(char *name, char *openmode);
-STATIC make_dirs(register char *pathname);
-STATIC putsec(char *buf, register n);
-STATIC char *substr(register char *s, register char *t);
-STATIC chkinvok(char *s);
-STATIC checkpath(char *name);
-STATIC void ackbibi(void);
-STATIC tryz(void);
-STATIC rzfiles(void);
-STATIC rzfile(void);
-STATIC closeit(void);
-STATIC sys2(register char *s);
-STATIC exec2(register char *s);
-STATIC init_rz(void);
-
diff -uNr ../ztelnet/zmodem/sz.c ./zmodem/sz.c
--- ../ztelnet/zmodem/sz.c Mon Apr 24 14:28:58 1995
+++ ./zmodem/sz.c Wed Dec 3 05:53:22 1997
@@ -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;
@@ -433,6 +462,7 @@
if (!Usevhdrs) {
printf("\n\n\nPlease read the License Agreement in sz.doc\n");
fflush(stdout);
+ /* sleep(10); */
sleep(10);
}
#endif
@@ -949,8 +979,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 +1637,7 @@
Lastsync=0;
Beenhereb4=0;
Ksendstr=0;
-/* By PMS
- strcpy(ksendbuf,"\033[?34l");
-*/
+ strcpy(ksendbuf,"\033[?341l");
Zctlesc=0;
Nozmodem=0;
Zrwindow=1400;
diff -uNr ../ztelnet/zmodem/sz.h ./zmodem/sz.h
--- ../ztelnet/zmodem/sz.h Mon Apr 24 13:37:47 1995
+++ ./zmodem/sz.h Thu Jan 1 00:00:00 1970
@@ -1,28 +0,0 @@
-#ifndef STATIC
-#define STATIC static
-#endif
-
-STATIC void bibi(int);
-STATIC void onintr(int);
-int sz(int argc, char *argv[]);
-STATIC void saybibi(void);
-STATIC wcsend(int argc, char *argp[]);
-STATIC wcs(char* oname);
-STATIC wctxpn(char *name);
-STATIC getnak(void);
-STATIC wctx(unsigned long flen);
-STATIC wcputsec(char* buf, int sectnum, int cseclen);
-STATIC filbuf(register char *buf, int count);
-STATIC zfilbuf(void);
-STATIC fooseek(FILE *fptr, unsigned long pos, int whence);
-STATIC char *substr(register char *s, register char *t);
-STATIC usage(void);
-STATIC getzrxinit(void);
-STATIC sendzsinit(void);
-STATIC zsendfile(char *buf, int blen);
-STATIC zsendfdata(void);
-STATIC getinsync(int flag);
-STATIC zsendcmd(char *buf, int blen);
-STATIC chkinvok(char *s);
-STATIC countem(int argc, register char **argv);
-STATIC init_sz(void);
diff -uNr ../ztelnet/zmodem/zm.c ./zmodem/zm.c
--- ../ztelnet/zmodem/zm.c Mon Apr 24 14:31:24 1995
+++ ./zmodem/zm.c Wed Dec 3 03:59:53 1997
@@ -72,10 +72,7 @@
STATIC char Attn[ZATTNLEN+1]; /* Attention string rx sends to tx on err */
STATIC char *Altcan; /* Alternate canit string */
-STATIC int lastsent; /* Last char we sent */
-
-/* PMS */
-#include "zm.h"
+STATIC lastsent; /* Last char we sent */
STATIC char *frametypes[] = {
"No Response to Error Correction Request", /* -4 */
@@ -110,6 +107,23 @@
STATIC char badcrc[] = "Bad CRC";
+/*---- Appended by yongari to shutu up compiler -----*/
+STATIC zsbh32();
+STATIC zsda32();
+STATIC zrdat32();
+STATIC garbitch();
+STATIC zrbhdr();
+STATIC zrbhd32();
+STATIC zrhhdr();
+STATIC zputhex();
+STATIC zsendline();
+STATIC zgethex();
+STATIC zgeth1();
+STATIC zdlread();
+STATIC noxrd7();
+/* STATIC unsigned long rclhdr();*/
+/*----------------------------------------------------*/
+
/* Send ZMODEM binary header hdr of type type */
STATIC zsbhdr(len, type, hdr)
register char *hdr;
@@ -885,8 +899,7 @@
}
/* Recover a unsigned long integer from a header */
-STATIC unsigned long
-rclhdr(hdr)
+STATIC unsigned long rclhdr(hdr)
register char *hdr;
{
register unsigned long l;
diff -uNr ../ztelnet/zmodem/zm.h ./zmodem/zm.h
--- ../ztelnet/zmodem/zm.h Mon Apr 24 14:27:16 1995
+++ ./zmodem/zm.h Thu Jan 1 00:00:00 1970
@@ -1,26 +0,0 @@
-#ifndef STATIC
-#define STATIC static
-#endif
-
-STATIC zsbhdr(int len, int type, register char *hdr);
-STATIC zsbh32(int len, register char *hdr, int type, int flavour);
-STATIC zshhdr(int len, int type, register char *hdr);
-STATIC zsdata(register char *buf, int length, int frameend);
-STATIC zsda32(register char *buf, int length, int frameend);
-STATIC zrdata(register char *buf, int length);
-STATIC zrdat32(register char *buf, int length);
-STATIC garbitch(void);
-STATIC zgethdr(char* hdr, int eflag);
-STATIC zrbhdr(register char *hdr);
-STATIC zrbhd32(register char *hdr);
-STATIC zrhhdr(char *hdr);
-STATIC zputhex(register int c);
-STATIC zsendline(int c);
-STATIC zgethex(void);
-STATIC zgeth1(void);
-STATIC zdlread(void);
-STATIC noxrd7(void);
-STATIC stohdr(unsigned long pos);
-STATIC unsigned long rclhdr(register char *hdr);
-STATIC init_zm(void);
-
diff -uNr ../ztelnet/zmodem/zmodem.h ./zmodem/zmodem.h
--- ../ztelnet/zmodem/zmodem.h Mon Apr 24 14:34:19 1995
+++ ./zmodem/zmodem.h Wed Dec 3 04:01:31 1997
@@ -117,9 +117,9 @@
/* Parameters for ZCOMMAND frame ZF0 (otherwise 0) */
#define ZCACK1 1 /* Acknowledge, then do command */
-/* PMS
-unsigned long rclhdr();
-*/
+/*-----Modified by yongari to shut up compiler------*/
+/* unsigned long rclhdr(); */
+STATIC unsigned long rclhdr();
/* Globals used by ZMODEM functions */
extern Rxframeind; /* ZBIN ZBIN32, or ZHEX type of frame */
diff -uNr ../ztelnet/zmodem/zmr.c ./zmodem/zmr.c
--- ../ztelnet/zmodem/zmr.c Mon Apr 24 14:07:17 1995
+++ ./zmodem/zmr.c Wed Dec 3 03:22:35 1997
@@ -38,9 +38,10 @@
*
* ZMODEM RLE compression and decompression functions
*/
-/*PMS*/
-static zsdar32(char*, int, int);
-static zrdatr32(register char *buf, int length);
+/*--- Appended by yongari yo shut up compiler -----*/
+STATIC zsdar32();
+STATIC zrdatr32();
+/*-------------------------------------------------*/
/* Send data subpacket RLE encoded with 32 bit FCS */
STATIC zsdar32(buf, length, frameend)
|