diff options
author | John Kohl <jtkohl@mit.edu> | 1989-11-09 07:26:05 +0000 |
---|---|---|
committer | John Kohl <jtkohl@mit.edu> | 1989-11-09 07:26:05 +0000 |
commit | cfa453758938ef83bce5d63a96a887259d8b11a5 (patch) | |
tree | fffe6f7ffab86a2a4f61f871ea43a8314a7e217a /zwgc/character_class.c | |
parent | e8ed0625613afc6dc837ced3e0484be4f02b0079 (diff) |
fixes for array & problems
Diffstat (limited to 'zwgc/character_class.c')
-rw-r--r-- | zwgc/character_class.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/zwgc/character_class.c b/zwgc/character_class.c index 79a6552..653e0e8 100644 --- a/zwgc/character_class.c +++ b/zwgc/character_class.c @@ -20,9 +20,15 @@ static char rcsid_character_class_c[] = "$Header$"; #include "character_class.h" +/* + * It may look like we are passing the cache by value, but since it's + * really an array we are passing by reference. C strikes again.... + */ + static character_class cache; -character_class *string_to_character_class(str) +/* character_class */ +char * string_to_character_class(str) string str; { int i; @@ -32,5 +38,5 @@ character_class *string_to_character_class(str) for (i=0; i<strlen(str); i++) cache[str[i]] = 1; - return(&cache); + return(cache); } |