home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / archives / ek17.zip / main.c.diff < prev    next >
Text File  |  2011-06-06  |  2KB  |  65 lines

  1. *** ../../ek16/main.c    2011-03-30 12:40:53.830806000 -0400
  2. --- main.c    2011-06-06 15:33:45.997789000 -0400
  3. ***************
  4. *** 124,130 ****
  5.   #endif /* RECVONLY */
  6.       fprintf(stderr," -p [neoms]   Parity: none, even, odd, mark, space\n");
  7.   #ifdef F_CRC
  8. !     fprintf(stderr," -b [123]     Block check type: 1, 2, or 3\n");
  9.   #endif /* F_CRC */
  10.       fprintf(stderr," -k           Keep incompletely received files\n");
  11.       fprintf(stderr," -B           Force binary mode\n");
  12. --- 124,130 ----
  13.   #endif /* RECVONLY */
  14.       fprintf(stderr," -p [neoms]   Parity: none, even, odd, mark, space\n");
  15.   #ifdef F_CRC
  16. !     fprintf(stderr," -b [1235]    Block check type: 1, 2, 3, or 5\n");
  17.   #endif /* F_CRC */
  18.       fprintf(stderr," -k           Keep incompletely received files\n");
  19.       fprintf(stderr," -B           Force binary mode\n");
  20. ***************
  21. *** 219,225 ****
  22.           }
  23.           if (c == 'b') {
  24.           check = atoi(*xargv);
  25. !         if (check < 1 || check > 3)
  26.             fatal("Invalid block check",(char *)0,(char *)0);
  27.   #ifdef DEBUG
  28.           } else if (c == 'E') {
  29. --- 219,225 ----
  30.           }
  31.           if (c == 'b') {
  32.           check = atoi(*xargv);
  33. !         if (check < 1 || check > 5 || check == 4)
  34.             fatal("Invalid block check",(char *)0,(char *)0);
  35.   #ifdef DEBUG
  36.           } else if (c == 'E') {
  37. ***************
  38. *** 338,344 ****
  39.       k.remote = remote;            /* Remote vs local */
  40.       k.binary = ftype;            /* 0 = text, 1 = binary */
  41.       k.parity = parity;                  /* Communications parity */
  42. !     k.bct = check;            /* Block check type */
  43.       k.ikeep = keep;            /* Keep incompletely received files */
  44.       k.filelist = cmlist;        /* List of files to send (if any) */
  45.       k.cancel = 0;            /* Not canceled yet */
  46. --- 338,344 ----
  47.       k.remote = remote;            /* Remote vs local */
  48.       k.binary = ftype;            /* 0 = text, 1 = binary */
  49.       k.parity = parity;                  /* Communications parity */
  50. !     k.bct = (check == 5) ? 3 : check;    /* Block check type */
  51.       k.ikeep = keep;            /* Keep incompletely received files */
  52.       k.filelist = cmlist;        /* List of files to send (if any) */
  53.       k.cancel = 0;            /* Not canceled yet */
  54. ***************
  55. *** 367,372 ****
  56. --- 367,374 ----
  57.   #else
  58.       k.dbf    = 0;
  59.   #endif /* DEBUG */
  60. +     /* Force Type 3 Block Check (16-bit CRC) on all packets, or not */
  61. +     k.bctf   = (check == 5) ? 1 : 0;
  62.   
  63.   /* Initialize Kermit protocol */
  64.   
  65.