1 /* This file is part of the Project Athena Zephyr Notification System.
2 * It is one of the source files comprising zwgc, the Zephyr WindowGram
5 * Created by: Marc Horowitz <marc@athena.mit.edu>
9 * Copyright (c) 1989 by the Massachusetts Institute of Technology.
10 * For copying and distribution information, see the file
17 #if (!defined(lint) && !defined(SABER))
18 static const char rcsid_regexp_c[] = "$Id$";
24 ed_regexp_match_p(string test_string,
31 retval = regcomp(&RE, pattern, REG_NOSUB);
33 regerror(retval, &RE, errbuf, sizeof(errbuf));
34 fprintf(stderr,"%s in regcomp %s\n",errbuf,pattern);
37 retval = regexec(&RE, test_string, 0, NULL, 0);
38 if (retval != 0 && retval != REG_NOMATCH) {
39 regerror(retval, &RE, errbuf, sizeof(errbuf));
40 fprintf(stderr,"%s in regexec %s\n",errbuf,pattern);
45 return(retval == 0 ? 1 : 0);