ftp.nice.ch/pub/next/connectivity/protocol/IBTip.NISH.bs.tar.gz#/IBTip/Source/StringResponder.h

This is StringResponder.h in view mode; [Download] [Up]

/* this object will call a specified function whenever
   a registered string is detected in it's input */

#import <objc/Object.h>

typedef struct elt {
  struct elt *next;       // link for the list
  char *s;                // registered string
  int strlen;             // length of s
  int tag;                // value returned when seen (cannot be zero)
  int matchedChars;       // current length of submatch
} listElt;

@interface StringResponder:Object
{
  listElt *list;  // list of registered strings and functions
  int maxlen;     // length of largest registered string
}

+ new;
- free;
- addString:(char *)string returnValue:(int)tag;
- (int) inputString:(char *)input;   // this is how input is provided
- (int) inputChar:(char)ichar;

@end

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.