ZVARS.C
上传用户:haiyue
上传日期:2007-01-05
资源大小:21k
文件大小:5k
源码类别:

通讯/手机编程

开发平台:

C/C++

  1. /*--------------------------------------------------------------------------*/
  2. /* FILE: zvars.c (global data used by zmodem)                               */
  3. /*                                                                          */
  4. /*                                                                          */
  5. /*               The Opus Computer-Based Conversation System                */
  6. /*       (c) Copyright 1986, Wynn Wagner III, All Rights Reserved           */
  7. /*                                                                          */
  8. /*      This implementation of Chuck Forsberg's ZMODEM protocol was         */
  9. /*              for Opus by Rick Huebner and Wynn Wagner III                */
  10. /*                                                                          */
  11. /* (MSC/4 with /Zp /Ox)                                                     */
  12. /*                                                                          */
  13. /*                                                                          */
  14. /*                                                                          */
  15. /*                                                                          */
  16. /*  This module is similar to a routine used by Opus-Cbcs (1.00).  It is    */
  17. /*  provided for your information only.  You will find routines that need   */
  18. /*  to be coded and identifiers to be resolved.                             */
  19. /*                                                                          */
  20. /*  There is absolutely no guarantee that anything here will work.  If you  */
  21. /*  break this routine, you own both pieces.                                */
  22. /*                                                                          */
  23. /*  USAGE:  You may use this material in any program with no obligation     */
  24. /*          as long as there is no charge for your program.  For more       */
  25. /*          information about commercial use, contact the "OPUSinfo HERE"   */
  26. /*          BBS (124/111).                                                  */
  27. /*                                                                          */
  28. /*  NOTE:   There are a couple of things the Opus implementation does that  */
  29. /*          aren't part of the original ZModem protocol.  They all deal     */
  30. /*          with WaZOO type ("ZedZap") netmail and should only show up when */
  31. /*          used under that condition.                                      */
  32. /*                                                                          */
  33. /*             * The maximum packet size can grow larger than 1k.  It is    */
  34. /*               sensitive to the baud rate.  (2400b=2048k; 9600b=8192k)    */
  35. /*             * The sender must be able to send nothing.  In other words,  */
  36. /*               the sending system must be able to initiate and terminate  */
  37. /*               a zmodem send session without having to actually send a    */
  38. /*               file.  Normally this kind of thing would never happen in   */
  39. /*               zmodem.                                                    */
  40. /*                                                                          */
  41. /*                                                                          */
  42. /*--------------------------------------------------------------------------*/
  43. #include "legible.h"
  44. #include <stdio.h>
  45.                         /*--------------------------------------------------*/
  46.                         /* B S S    S E G M E N T    S T U F F              */
  47.                         /*--------------------------------------------------*/
  48. char  Rxhdr[4];         /* Received header                                  */
  49. char  Txhdr[4];         /* Transmitted header                               */
  50. long  Rxpos;            /* Received file position                           */
  51. int   Txfcs32;          /* TURE means send binary frames with 32 bit FCS    */
  52. int   Znulls;           /* # of nulls to send at beginning of ZDATA hdr     */
  53. int   Rxtimeout;        /* Tenths of seconds to wait for something          */
  54. byte *Filename;         /* Name of the file being up/downloaded             */
  55.                         /*--------------------------------------------------*/
  56.                         /* D A T A    S E G M E N T                         */
  57.                         /*--------------------------------------------------*/
  58. byte *Skip_msg          = "SKIP command received";
  59. byte *Cancelled_msg     = "Transfer cancelled";
  60. word  z_size            = 0;
  61. /* END OF FILE: z_def.c */