home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Amiga / Internet / Web / URLScan.lha / cb.h next >
C/C++ Source or Header  |  1992-09-03  |  3KB  |  80 lines

  1. /*
  2.  * Copyright (c) 1992 Commodore-Amiga, Inc.
  3.  * 
  4.  * This example is provided in electronic form by Commodore-Amiga, Inc. for 
  5.  * use with the "Amiga ROM Kernel Reference Manual: Devices", 3rd Edition, 
  6.  * published by Addison-Wesley (ISBN 0-201-56775-X).
  7.  * 
  8.  * The "Amiga ROM Kernel Reference Manual: Devices" contains additional 
  9.  * information on the correct usage of the techniques and operating system 
  10.  * functions presented in these examples.  The source and executable code 
  11.  * of these examples may only be distributed in free electronic form, via 
  12.  * bulletin board or as part of a fully non-commercial and freely 
  13.  * redistributable diskette.  Both the source and executable code (including 
  14.  * comments) must be included, without modification, in any copy.  This 
  15.  * example may not be published in printed form or distributed with any
  16.  * commercial product.  However, the programming techniques and support
  17.  * routines set forth in these examples may be used in the development
  18.  * of original executable software products for Commodore Amiga computers.
  19.  * 
  20.  * All other rights reserved.
  21.  * 
  22.  * This example is provided "as-is" and is subject to change; no
  23.  * warranties are made.  All use is at your own risk. No liability or
  24.  * responsibility is assumed.
  25.  *
  26.  ***********************************************************************
  27.  *
  28.  * cb.h -- Include file used by clipdemo.c, changehook_test.c and cbio.c
  29.  *
  30.  ***********************************************************************
  31.  */
  32.  
  33. struct cbbuf {
  34.  
  35.         ULONG size;     /* size of memory allocation            */
  36.         ULONG count;    /* number of characters after stripping */
  37.         UBYTE *mem;     /* pointer to memory containing data    */
  38. };
  39.  
  40. #define MAKE_ID(a,b,c,d) ((a<<24L) | (b<<16L) | (c<<8L) | d)
  41.  
  42. #define ID_FORM MAKE_ID('F','O','R','M')
  43. #define ID_FTXT MAKE_ID('F','T','X','T')
  44. #define ID_CHRS MAKE_ID('C','H','R','S')
  45.  
  46. #ifdef CBIO
  47.  
  48. /* prototypes */
  49.  
  50. struct IOClipReq        *CBOpen         ( ULONG );
  51. void                    CBClose         (struct IOClipReq *);
  52. int                     CBWriteFTXT     (struct IOClipReq *, char *);
  53. int                     CBQueryFTXT     (struct IOClipReq *);
  54. struct cbbuf            *CBReadCHRS     (struct IOClipReq *);
  55. void                    CBReadDone      (struct IOClipReq *);
  56. void                    CBFreeBuf       (struct cbbuf *);
  57.  
  58.  
  59. /* routines which are meant to be used internally by routines in cbio */
  60.  
  61. int                     WriteLong       (struct IOClipReq *, long *);
  62. int                     ReadLong        (struct IOClipReq *, ULONG *);
  63. struct cbbuf            *FillCBData     (struct IOClipReq *, ULONG);
  64.  
  65. #else
  66.  
  67. /* prototypes */
  68.  
  69. extern struct IOClipReq *CBOpen         ( ULONG );
  70. extern void             CBClose         (struct IOClipReq *);
  71. extern int              CBWriteFTXT     (struct IOClipReq *, char *);
  72. extern int              CBQueryFTXT     (struct IOClipReq *);
  73. extern struct cbbuf     *CBReadCHRS     (struct IOClipReq *);
  74. extern void             CBReadDone      (struct IOClipReq *);
  75. extern void             CBFreeBuf       (struct cbbuf *);
  76.  
  77. #endif
  78.  
  79.  
  80.