home *** CD-ROM | disk | FTP | other *** search
/ Carousel Volume 2 #1 / carousel.iso / mactosh / code / tcopuls_.sit / strlink.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-09-17  |  884 b   |  52 lines  |  [TEXT/MPS ]

  1. /* -*- Emacs Mode: C++ -*- */
  2.  
  3. /*    strlink.c - StrLink Class - implementation
  4.  
  5.     Copyright (C) 1989, Integrity Software
  6.     Author: Isaac J. Salzman (salzman@rand.org)
  7.  
  8.     This software may be freely used/modified/distributed
  9.     as desired so long as this copyright notice remains
  10.     in tact.
  11. */
  12.  
  13. #ifndef lint
  14. static char *RcsId = "$Header: /tmp_mnt/amnt/lh/salzman/src/class/RCS/strlink.c,v 1.1 89/09/17 15:01:29 salzman Exp Locker: salzman $";
  15. #endif
  16.  
  17. /*
  18.  * $Log:    strlink.c,v $
  19.  * Revision 1.1  89/09/17  15:01:29  salzman
  20.  * Initial revision
  21.  * 
  22.  */
  23.  
  24. #include <stdio.h>
  25. #include <string.h>
  26.  
  27. #include "strlink.h"
  28.  
  29. DEF_INIT(StrLink)(char *s)
  30. {
  31.     string = s;
  32.  
  33.     INIT_SUPER(Link,());
  34.     
  35.     RETURN_THIS;
  36. }
  37.  
  38. DEF_DEST(StrLink)(void)
  39. {
  40.     DESTROY_SUPER;
  41. }
  42.  
  43. void StrLink::showval(void)
  44. {
  45.     printf("string = %s\n", string);
  46. }
  47.  
  48. int StrLink::compare(char *item)
  49. {
  50.     return(strcmp(string, item));
  51. }
  52.