home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / gwm18a.zip / wl_string.h < prev    next >
C/C++ Source or Header  |  1995-07-03  |  2KB  |  73 lines

  1. /* Copyright 1989 GROUPE BULL -- See license conditions in file COPYRIGHT
  2.  * Copyright 1989 Massachusetts Institute of Technology
  3.  */
  4. /***********************\
  5. *                 *
  6. *  WOOL_OBJECT  String  *
  7. *  DEFINITIONS            *
  8. *                 *
  9. \***********************/
  10.  
  11. #ifndef INCLUDE_WL_STRING_H
  12. #define INCLUDE_WL_STRING_H
  13.  
  14. /* type */
  15.  
  16. /* Note: the placeholder is there so that the string field of a WLString
  17.  * begins at the same place as the p_name field of a WLAtom, so that a 
  18.  * WLAtom can be handled to any function expecting an WLString as
  19.  * argument. An WLAtom is less memory_consuming for often used symbols
  20.  * ( "foo""foo" allocates two strings, 'foo 'foo only one atom), but cannot
  21.  * be released.
  22.  */
  23.  
  24. typedef struct _WOOL_String {
  25.     WOOL_HEADER;
  26.     WOOL_OBJECT     place_holder;
  27.     char            string[1];
  28. }              *WOOL_String;
  29.  
  30. /* exported functions */
  31.  
  32. EXT WOOL_String WLString_make();
  33. EXT WOOL_String WLString_n_make();
  34. EXT WOOL_OBJECT WLString_print();
  35. EXT WOOL_OBJECT WLString_equal();
  36. EXT WOOL_OBJECT add_strings();
  37. EXT WOOL_String WLString_match();
  38.  
  39. /* exported objects */
  40.  
  41. EXT WOOL_String NIL_STRING;
  42.  
  43. /* methods */
  44.  
  45. EXT WOOL_METHOD WLString[]
  46. #ifdef DO_INIT
  47. = {
  48.    (WOOL_METHOD) 0,        /* METHODS_ARRAY */
  49.    WLNumber_eval,        /* WOOL_eval 1 */
  50.    WLString_print,        /* WOOL_print 2 */
  51.    WLNumber_free,        /* WOOL_free 3 */
  52.    wool_undefined_method_2,        /* WOOL_execute 4 */
  53.    wool_undefined_method_2,        /* WOOL_set 5 */
  54.    wool_undefined_method_1,    /* WOOL_get_C_value 6 */
  55.    wool_undefined_method_1,    /* WOOL_open 7 */
  56.    wool_undefined_method_1,    /* WOOL_close 8 */
  57.    wool_undefined_method_2,    /* WOOL_process_event 9 */
  58.    wool_undefined_method_1,    /* WOOL_copy 10 */
  59.    wool_undefined_method_2,    /* WOOL_get_dimensions 11 */
  60.    wool_undefined_method_2,    /* WOOL_draw 12 */
  61.    WLString_equal,        /* WOOL_equal 13 */
  62.    wool_undefined_method_2,
  63.    wool_undefined_method_2,
  64.    wool_undefined_method_1,
  65.    wool_undefined_method_1,
  66.    wool_undefined_method_1,
  67.    wool_undefined_method_1,
  68.    wool_undefined_method_1
  69. }
  70. #endif /* DO_INIT */
  71.                ;
  72. #endif /* INCLUDE_WL_STRING_H */
  73.