Jabber WindowGram Client (JWGC)

Introduction Screenshots Installation Downloads
Documentation Browse Source Resources Project Site

Stable Version
-none-

Latest Version
beta5



Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

regexp.c File Reference

#include "mit-copyright.h"
#include "main.h"
#include "regexp.h"

Go to the source code of this file.

Functions

char * re_comp ()
int re_exec ()
int ed_regexp_match_p (string test_string, string pattern)
char * re_comp (char *s)
int re_exec (char *s)


Function Documentation

int ed_regexp_match_p string  test_string,
string  pattern
 

Definition at line 52 of file regexp.c.

References re_comp(), and re_exec().

00055 {
00056         char *comp_retval;
00057         int exec_retval;
00058 
00059         if (comp_retval = re_comp(pattern)) {
00060                 fprintf(stderr, "%s in regex %s\n", comp_retval, pattern);
00061                 return (0);
00062         }
00063         if ((exec_retval = re_exec(test_string)) == -1) {
00064                 fprintf(stderr, "Internal error in re_exec()");
00065                 return (0);
00066         }
00067 
00068         return (exec_retval);
00069 }

char* re_comp char *  s  ) 
 

Definition at line 81 of file regexp.c.

00083 {
00084         if (!s)
00085                 return 0;
00086         if (re)
00087                 free(re);
00088 
00089         if (!(re = regcmp(s, (char *) 0)))
00090                 return "Bad argument to re_comp";
00091 
00092         return 0;
00093 }

char* re_comp  ) 
 

Referenced by ed_regexp_match_p().

int re_exec char *  s  ) 
 

Definition at line 96 of file regexp.c.

00098 {
00099         return regex(re, s) != 0;
00100 }

int re_exec  ) 
 

Referenced by ed_regexp_match_p().



Last updated at Tue Dec 18 21:07:42 PST 2007. This site and project hosted by...SourceForge.net Logo

Source Perspective by Fisheye