From a0bf1bed44e05a495ebca6faed5902420a6fbfcb Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Sun, 22 Apr 2007 20:00:49 +0000 Subject: [PATCH] ebl add bregtest tool git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4601 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/tools/Makefile.in | 5 ++++- bacula/src/tools/bregtest.c | 16 +--------------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/bacula/src/tools/Makefile.in b/bacula/src/tools/Makefile.in index ee4f29391f..184762e388 100644 --- a/bacula/src/tools/Makefile.in +++ b/bacula/src/tools/Makefile.in @@ -38,7 +38,7 @@ EXTRAOBJS = @OBJLIST@ DIRCONFOBJS = ../dird/dird_conf.o ../dird/run_conf.o ../dird/inc_conf.o NODIRTOOLS = bsmtp -DIRTOOLS = bsmtp dbcheck drivetype fstype testfind testls bregex bwild bbatch +DIRTOOLS = bsmtp dbcheck drivetype fstype testfind testls bregex bwild bbatch bregtest TOOLS = $(@DIR_TOOLS@) INSNODIRTOOLS = bsmtp @@ -62,6 +62,9 @@ all: Makefile $(TOOLS) gigaslam bsmtp: bsmtp.o ../lib/libbac.a $(CXX) $(LDFLAGS) -L../lib -o $@ bsmtp.o -lbac -lm $(DLIB) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) +bregtest: bregtest.o ../lib/libbac.a + $(CXX) $(LDFLAGS) -L../lib -o $@ bregtest.o -lbac -lm $(DLIB) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) + dbcheck: dbcheck.o ../lib/libbac.a ../cats/libsql.a $(DIRCONFOBJS) $(CXX) $(LDFLAGS) -L../lib -L../cats -o $@ dbcheck.o $(DIRCONFOBJS) -lsql -lbac -lm $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) diff --git a/bacula/src/tools/bregtest.c b/bacula/src/tools/bregtest.c index 52073ea00f..edf7604e7d 100644 --- a/bacula/src/tools/bregtest.c +++ b/bacula/src/tools/bregtest.c @@ -62,25 +62,11 @@ static void usage() int main(int argc, char *const *argv) { - char tab[500]; - int len = bregexp_get_build_where_size("/tmp", "/tmp/toto", ".old"); - - printf("%s\n", bregexp_build_where(tab, len, "/tmp", "/tmp/toto!", ".old")); - exit(0); - - - regex_t preg; - char prbuf[500]; char *fname = NULL; char *expr = NULL; - int rc, ch; + int ch; char data[1000]; - char pat[500]; FILE *fd; - bool match_only = true; - int lineno; - bool no_linenos = false; - setlocale(LC_ALL, ""); bindtextdomain("bacula", LOCALEDIR); -- 2.39.5