home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / adaptor / src / include / stringme.h < prev    next >
C/C++ Source or Header  |  1993-03-22  |  2KB  |  70 lines

  1. # ifndef yyStringMem
  2. # define yyStringMem
  3.  
  4. /* $Id: StringMem.h,v 1.5 1992/02/18 12:52:30 grosch rel $ */
  5.  
  6. /* $Log: StringMem.h,v $
  7.  * Revision 1.5  1992/02/18  12:52:30  grosch
  8.  * changed tString from unsigned char * to char *
  9.  *
  10.  * Revision 1.4  1992/01/30  13:12:51  grosch
  11.  * complete redesign: pointer instead of array index
  12.  *
  13.  * Revision 1.3  1991/11/21  14:28:16  grosch
  14.  * new version of RCS on SPARC
  15.  *
  16.  * Revision 1.2  91/07/17  17:23:48  grosch
  17.  * introduced ARGS trick for ANSI compatibility
  18.  * 
  19.  * Revision 1.1  90/07/04  14:34:08  grosch
  20.  * introduced conditional include
  21.  * 
  22.  * Revision 1.0  88/10/04  11:44:47  grosch
  23.  * Initial revision
  24.  * 
  25.  */
  26.  
  27. /* Ich, Doktor Josef Grosch, Informatiker, Sept. 1987 */
  28.  
  29. # include <stdio.h>
  30. # include "ratc.h"
  31.  
  32. # ifdef __STDC__
  33. # define ARGS(parameters)    parameters
  34. # else
  35. # define ARGS(parameters)    ()
  36. # endif
  37.  
  38. typedef unsigned short * tStringRef;
  39.  
  40. extern    tStringRef PutString    ARGS((register char * s, register cardinal length));
  41.    /* stores string 's' in the string memory and    */
  42.    /* returns a reference to the stored string        */
  43.  
  44. extern    void    StGetString    ARGS((register tStringRef r, register char * s));
  45.    /* returns the string 's' from the string memory    */
  46.    /* which is referenced by 'r'            */
  47.  
  48. /* extern cardinal LengthSt    ARGS((register tStringRef r)); */
  49.    /* returns the length of the string 's'        */
  50.    /* which is referenced by 'r'            */
  51.  
  52. # define LengthSt(stringref) (* stringref)
  53.  
  54. extern    bool    IsEqualSt    ARGS((tStringRef r, register char * s));
  55.    /* compares the string referenced by 'r' and        */
  56.    /* the string 's'                    */
  57.    /* returns true if both are equal            */
  58.  
  59. extern    void    WriteString    ARGS((FILE * f, tStringRef r));
  60.    /* the string referenced by 'r' is printed on    */
  61.    /* the file 'f'                    */
  62.  
  63. extern    void    WriteStringMemory ();
  64.    /* the contents of the string memory is printed    */
  65.    /* on standard output                */
  66.  
  67. extern    void    InitStringMemory ();
  68.  
  69. # endif
  70.