summaryrefslogtreecommitdiff
path: root/zwgc/text_operations.c
diff options
context:
space:
mode:
authorGravatar John Kohl <jtkohl@mit.edu>1989-11-09 07:26:05 +0000
committerGravatar John Kohl <jtkohl@mit.edu>1989-11-09 07:26:05 +0000
commitcfa453758938ef83bce5d63a96a887259d8b11a5 (patch)
treefffe6f7ffab86a2a4f61f871ea43a8314a7e217a /zwgc/text_operations.c
parente8ed0625613afc6dc837ced3e0484be4f02b0079 (diff)
fixes for array & problems
Diffstat (limited to 'zwgc/text_operations.c')
-rw-r--r--zwgc/text_operations.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/zwgc/text_operations.c b/zwgc/text_operations.c
index 69db241..ba1821a 100644
--- a/zwgc/text_operations.c
+++ b/zwgc/text_operations.c
@@ -41,12 +41,12 @@ string lany(text_ptr, str)
string lbreak(text_ptr, set)
string *text_ptr;
- character_class *set;
+ character_class set;
{
string result, whats_left;
char *p = *text_ptr;
- while (*p && !(*set)[*p]) p++;
+ while (*p && !set[*p]) p++;
result = string_CreateFromData(*text_ptr, p - *text_ptr);
whats_left = string_Copy(p);
@@ -58,12 +58,12 @@ string lbreak(text_ptr, set)
string lspan(text_ptr, set)
string *text_ptr;
- character_class *set;
+ character_class set;
{
string result, whats_left;
char *p = *text_ptr;
- while (*p && (*set)[*p]) p++;
+ while (*p && set[*p]) p++;
result = string_CreateFromData(*text_ptr, p - *text_ptr);
whats_left = string_Copy(p);
@@ -93,13 +93,13 @@ string rany(text_ptr, str)
string rbreak(text_ptr, set)
string *text_ptr;
- character_class *set;
+ character_class set;
{
string result, whats_left;
string text = *text_ptr;
char *p = text + strlen(text);
- while (text<p && !(*set)[p[-1]]) p--;
+ while (text<p && !set[p[-1]]) p--;
result = string_Copy(p);
whats_left = string_CreateFromData(text, p - text);
@@ -111,13 +111,13 @@ string rbreak(text_ptr, set)
string rspan(text_ptr, set)
string *text_ptr;
- character_class *set;
+ character_class set;
{
string result, whats_left;
string text = *text_ptr;
char *p = text + strlen(text);
- while (text<p && (*set)[p[-1]]) p--;
+ while (text<p && set[p[-1]]) p--;
result = string_Copy(p);
whats_left = string_CreateFromData(text, p - text);