summaryrefslogtreecommitdiff
path: root/main.c.diff
blob: 11a3808d6852e0876ed0804aada9a75676b1a4ef (plain) (blame)
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
*** ../../ek16/main.c	2011-03-30 12:40:53.830806000 -0400
--- main.c	2011-06-06 15:33:45.997789000 -0400
***************
*** 124,130 ****
  #endif /* RECVONLY */
      fprintf(stderr," -p [neoms]   Parity: none, even, odd, mark, space\n");
  #ifdef F_CRC
!     fprintf(stderr," -b [123]     Block check type: 1, 2, or 3\n");
  #endif /* F_CRC */
      fprintf(stderr," -k           Keep incompletely received files\n");
      fprintf(stderr," -B           Force binary mode\n");
--- 124,130 ----
  #endif /* RECVONLY */
      fprintf(stderr," -p [neoms]   Parity: none, even, odd, mark, space\n");
  #ifdef F_CRC
!     fprintf(stderr," -b [1235]    Block check type: 1, 2, 3, or 5\n");
  #endif /* F_CRC */
      fprintf(stderr," -k           Keep incompletely received files\n");
      fprintf(stderr," -B           Force binary mode\n");
***************
*** 219,225 ****
  	    }
  	    if (c == 'b') {
  		check = atoi(*xargv);
! 		if (check < 1 || check > 3)
  		  fatal("Invalid block check",(char *)0,(char *)0);
  #ifdef DEBUG
  	    } else if (c == 'E') {
--- 219,225 ----
  	    }
  	    if (c == 'b') {
  		check = atoi(*xargv);
! 		if (check < 1 || check > 5 || check == 4)
  		  fatal("Invalid block check",(char *)0,(char *)0);
  #ifdef DEBUG
  	    } else if (c == 'E') {
***************
*** 338,344 ****
      k.remote = remote;			/* Remote vs local */
      k.binary = ftype;			/* 0 = text, 1 = binary */
      k.parity = parity;                  /* Communications parity */
!     k.bct = check;			/* Block check type */
      k.ikeep = keep;			/* Keep incompletely received files */
      k.filelist = cmlist;		/* List of files to send (if any) */
      k.cancel = 0;			/* Not canceled yet */
--- 338,344 ----
      k.remote = remote;			/* Remote vs local */
      k.binary = ftype;			/* 0 = text, 1 = binary */
      k.parity = parity;                  /* Communications parity */
!     k.bct = (check == 5) ? 3 : check;	/* Block check type */
      k.ikeep = keep;			/* Keep incompletely received files */
      k.filelist = cmlist;		/* List of files to send (if any) */
      k.cancel = 0;			/* Not canceled yet */
***************
*** 367,372 ****
--- 367,374 ----
  #else
      k.dbf    = 0;
  #endif /* DEBUG */
+     /* Force Type 3 Block Check (16-bit CRC) on all packets, or not */
+     k.bctf   = (check == 5) ? 1 : 0;
  
  /* Initialize Kermit protocol */