Changeset 656


Ignore:
Timestamp:
1999-10-12T11:01:40+13:00 (25 years ago)
Author:
cs025
Message:

Got rid of regular expression calls.

Location:
trunk/gsdl/src/mgpp/text
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/mgpp/text/grbIndex.cpp

    r655 r656  
    2424/*
    2525   $Log$
     26   Revision 1.2  1999/10/11 22:01:40  cs025
     27   Got rid of regular expression calls.
     28
    2629   Revision 1.1  1999/10/11 02:57:15  cs025
    2730   Base install of MG-PP
     
    488491      post_proc = Xstrdup (start + 1);
    489492      strcpy (start, finish + 1);
    490       if (BooleanEnv (GetEnv ("verbatim"), 1) == 0)
    491     {
    492       char *s;
    493       s = re_comp (post_proc);
    494       if (!s)
    495         {
    496           Xfree (post_proc);
    497           post_proc = NULL;
    498         }
    499     }
    500493    }
    501494  else if (start != NULL)
     
    512505    return 1;
    513506
    514   if (verbatim) {
    515     return (strstr (UDoc, post_proc) != NULL);
    516   }
    517   return re_exec ((char *) UDoc);
     507  return (strstr (UDoc, post_proc) != NULL);
    518508}
    519509
  • trunk/gsdl/src/mgpp/text/mgquery.cpp

    r655 r656  
    2424/*
    2525   $Log$
     26   Revision 1.2  1999/10/11 22:01:20  cs025
     27   Got rid of regular expression calls.
     28
    2629   Revision 1.1  1999/10/11 02:58:09  cs025
    2730   Base install of MG-PP
     
    490493      post_proc = Xstrdup (start + 1);
    491494      strcpy (start, finish + 1);
    492       if (BooleanEnv (GetEnv ("verbatim"), 1) == 0)
    493     {
    494       char *s;
    495       s = re_comp (post_proc);
    496       if (!s)
    497         {
    498           Xfree (post_proc);
    499           post_proc = NULL;
    500         }
    501     }
     495      /**
     496       * GRB: Elimination regular of expression support/dependency
     497       *      removed the below from active use; assume verbatim
     498       *      mode
     499       if (BooleanEnv (GetEnv ("verbatim"), 1) == 0)
     500     {
     501       char *s;
     502       s = re_comp (post_proc);
     503       if (!s)
     504       {
     505       Xfree (post_proc);
     506       post_proc = NULL;
     507       }
     508     }
     509       */
    502510    }
    503511  else if (start != NULL)
     
    514522    return 1;
    515523
    516   if (verbatim) {
    517     return (strstr (UDoc, post_proc) != NULL);
    518   }
    519   return re_exec ((char *) UDoc);
    520 }
     524  /**
     525   * GRB: eliminating regular expressions; removed all the below and
     526   *      replaced with a strstr construct only
     527   if (verbatim) {
     528     return (strstr (UDoc, post_proc) != NULL);
     529   }
     530   return re_exec ((char *) UDoc);
     531   */
     532  return (strstr(UDoc, post_proc) != NULL);
     533}
     534
    521535
    522536
Note: See TracChangeset for help on using the changeset viewer.