diff options
author | Joseph Hunkeler <jhunk@stsci.edu> | 2011-09-30 15:36:28 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunk@stsci.edu> | 2011-09-30 15:37:23 -0400 |
commit | 82c38efd02c2938533b2e8486609b01b096edace (patch) | |
tree | ae61c0348aab7d5b1815fa4c87305c69fad82ee5 /src | |
parent | 57d2b9b7aead6333f6eaad79a7a4338872ffab9d (diff) | |
download | duser-82c38efd02c2938533b2e8486609b01b096edace.tar.gz |
Removed pcre dep. Wasn't going to work out anyway.
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/mklist.c | 20 |
2 files changed, 1 insertions, 21 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 4ec8f2c..defaac0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -4,7 +4,7 @@ AM_CFLAGS=${duser_POSIX} --std=c99 -O2 -pedantic -Wall -Wextra if HAVE_COMPAT duser_LDFLAGS=-L$(top_srcdir)/compat -ldusercompat else -duser_LDFLAGS=-lpcre +duser_LDFLAGS= endif duser_SOURCES= duser.c \ diff --git a/src/mklist.c b/src/mklist.c index 6da5cfa..521285a 100644 --- a/src/mklist.c +++ b/src/mklist.c @@ -26,7 +26,6 @@ #include <pwd.h> #include <errno.h> #include <libgen.h> -#include <pcre.h> #include "duser.h" char* str_replace(char* str, char* old, char* new) @@ -120,24 +119,5 @@ int mklist(char* filename) exit(1); } - pcre *re; - const int OVECOUNT = 30; - const char* error; - int rc; - int erroffset; - int ovector[OVECOUNT]; - - if((re = pcre_compile("%s|list", 0, &error, &erroffset, NULL)) == NULL) - { - fprintf(stderr, "%s: PCRE compilation failed at offset %d: %s\n", SELF, erroffset, error); - return -1; - } - - if((rc = pcre_exec(re, NULL, tmptpl, strlen(tmptpl), 0, 0, ovector, OVECOUNT)) < 0) - { - fprintf(stderr, "%s: PCRE match failed '%d'\n", SELF, rc); - } - - printf("%s\n", (tmptpl + ovector[1])); return 0; } |