home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / comms / misc / xprcl014.lzh / xprclock.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-09-16  |  4.4 KB  |  92 lines

  1. /*
  2.     $Header: Welmat:src/RCS/modem7.c,v 1.11 92/09/12 20:43:25 rwm Exp Locker: rwm $
  3.  
  4.     Main include file for XPR FTS protocol
  5.  
  6.     Copyright (C) 1992 Russell McOrmond
  7.  
  8.     This program is free software; you can redistribute it and/or modify
  9.     it under the terms of the GNU General Public License as published by
  10.     the Free Software Foundation; either version 2 of the License, or
  11.     (at your option) any later version.
  12.  
  13.     This program is distributed in the hope that it will be useful,
  14.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16.     GNU General Public License for more details.
  17.  
  18.     You should have received a copy of the GNU General Public License
  19.     along with this program; if not, write to the Free Software
  20.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  
  22.  */
  23.  
  24. /* Return codes */
  25. #define OK            0
  26. #define NODCD       (-1)
  27. #define ERROR       (-2)
  28.  
  29. #define SCRATCHLEN 256
  30.  
  31. struct Vars {
  32.      /* Copy of XProtocol IO struct passed in by term prog. */
  33.   struct XPR_IO io;                   
  34.      /* Scratchpad xpr_update() control struct */
  35.   struct XPR_UPDATE __aligned xpru;  
  36.   int adjust;
  37.   long year;
  38.      /* Scratchpad buffer for printing messages */
  39.   UBYTE __aligned scratch[SCRATCHLEN];     
  40. };
  41.  
  42. /* Option settings and other variables needed outside of XProtocolSend/Receive;
  43.    separated from rest of Vars so that huge Vars struct doesn't have to be
  44.    allocated except during transfers.  Pointer to this struct kept in xpr_data. */
  45. struct SetupVars {
  46.   UBYTE *matchptr, *bufpos;
  47.   short buflen;
  48.   UBYTE year[5],adjust[10];
  49. };
  50.  
  51.  
  52. /* Function prototypes */
  53.  
  54. long  __saveds XProtocolSend(struct XPR_IO *io);
  55. long __saveds XProtocolReceive(struct XPR_IO *io);
  56. long __saveds XProtocolSetup(struct XPR_IO *io);
  57. long __saveds XProtocolCleanup(struct XPR_IO *io);
  58. long __saveds XProtocolHostMon(struct XPR_IO *io,UBYTE *serbuff,long actual,long maxsize);
  59. long __saveds XProtocolUserMon(struct XPR_IO *io,UBYTE *serbuff,long actual,long maxsize);
  60. struct Vars *setup(struct XPR_IO *io);
  61. UBYTE *find_option(UBYTE *buf,UBYTE option);
  62. void ioerr(struct XPR_IO *io,char *msg);
  63. void upderr(struct Vars *v,char *msg);
  64. void updmsg(struct Vars *v,char *msg);
  65.  
  66. /* format.asm */
  67. int SPrintF(UBYTE *buf, UBYTE *format,...);
  68.  
  69. /* debug.lib */
  70. int KPrintF(UBYTE *format,...);
  71.  
  72. void * __asm xpr_fopen(register __a3 struct XPR_IO *io,register __a0 char *filename,register __a1 char *accessmode);
  73. void __asm xpr_fclose(register __a3 struct XPR_IO *io,register __a0 void *fileptr);
  74. long __asm xpr_fread(register __a3 struct XPR_IO *io,register __a0 char *buffer,register __d0 long size,register __d1 long count,register __a1 void *fileptr);
  75. long __asm xpr_fwrite(register __a3 struct XPR_IO *io,register __a0 char *buffer,register __d0 long size,register __d1 long count,register __a1 void *fileptr);
  76. long __asm xpr_sread(register __a3 struct XPR_IO *io,register __a0 char *buffer,register __d0 long size,register __d1 long timeout);
  77. long __asm xpr_swrite(register __a3 struct XPR_IO *io,register __a0 char *buffer,register __d0 long size);
  78. long __asm xpr_sflush(register __a3 struct XPR_IO *io);
  79. void __asm xpr_update(register __a3 struct XPR_IO *io,register __a0 struct XPR_UPDATE *updatestruct);
  80. long __asm xpr_chkabort(register __a3 struct XPR_IO *io);
  81. long __asm xpr_chkmisc(register __a3 struct XPR_IO *io);
  82. long __asm xpr_gets(register __a3 struct XPR_IO *io,register __a0 char *prompt,register __a1 char *buffer);
  83. long __asm xpr_setserial(register __a3 struct XPR_IO *io,register __d0 long newstatus);
  84. long __asm xpr_ffirst(register __a3 struct XPR_IO *io,register __a0 char *buffer,register __a1 char *pattern);
  85. long __asm xpr_fnext(register __a3 struct XPR_IO *io,register __d0 long oldstate,register __a0 char *buffer,register __a1 char *pattern);
  86. long __asm xpr_finfo(register __a3 struct XPR_IO *io,register __a0 char *filename,register __d0 long typeofinfo);
  87. long __asm xpr_fseek(register __a3 struct XPR_IO *io,register __a0 void *fileptr,register __d0 long offset,register __d1 long origin);
  88. long __asm xpr_options(register __a3 struct XPR_IO *io,register __d0 long n,register __a0 struct xpr_option **opt);
  89. long __asm xpr_unlink(register __a3 struct XPR_IO *io,register __a0 char *filename);
  90. long __asm xpr_squery(register __a3 struct XPR_IO *io);
  91. long * __asm xpr_getptr(register __a3 struct XPR_IO *io,register __d0 long type);
  92.