LVM2/old-tests/regex Makefile.in matcher_t.c p ...
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2010-04-21 08:01:52
Modified files:
old-tests/regex: Makefile.in matcher_t.c parse_t.c
Log message:
Make matcher_t and parse_t compilable
These two old-test/regex utils are usable for testing output of regex processing at core level. For getting them usable configure need to create Makefile. This is currently disable by default.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/old-tests/regex/Makefile.in.diff?cvsroot=lvm2&r1=1.6&r2=1.7
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/old-tests/regex/matcher_t.c.diff?cvsroot=lvm2&r1=1.4&r2=1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/old-tests/regex/parse_t.c.diff?cvsroot=lvm2&r1=1.3&r2=1.4
old-tests/regex/Makefile.in +8 -6
@@ -1,6 +1,6 @@ # # Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved. -# Copyright (C) 2004 Red Hat, Inc. All rights reserved. +# Copyright (C) 2004-2010 Red Hat, Inc. All rights reserved. # # This file is part of LVM2. #
@@ -15,7 +15,6 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ -VPATH = @srcdir@ SOURCES=\ parse_t.c \
@@ -27,9 +26,12 @@ include $(top_builddir)/make.tmpl -parse_t: parse_t.o $(top_builddir)/lib/liblvm.a - $(CC) -o parse_t parse_t.o -L$(top_builddir)/lib -llvm +INCLUDES += -I$(top_srcdir)/libdm +DM_DEPS = $(top_builddir)/libdm/libdevmapper.so +DM_LIBS = -ldevmapper $(LIBS) -matcher_t: matcher_t.o $(top_builddir)/lib/liblvm.a - $(CC) -o matcher_t matcher_t.o -L$(top_builddir)/lib -llvm +parse_t: parse_t.o $(DM_DEPS) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ parse_t.o $(DM_LIBS) +matcher_t: matcher_t.o $(DM_DEPS) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ matcher_t.o $(DM_LIBS)
old-tests/regex/matcher_t.c +22 -20
107 lines not on this page · raw message
old-tests/regex/parse_t.c +7 -10
@@ -1,6 +1,6 @@/* * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved. -* Copyright (C) 2004 Red Hat, Inc. All rights reserved. +* Copyright (C) 2004-2010 Red Hat, Inc. All rights reserved. * * This file is part of LVM2. *
@@ -13,8 +13,8 @@* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "log.h" -#include "../../lib/regex/parse_rx.h" +/* hack - using unexported internal function */ +#include "regex/parse_rx.c" #include <stdio.h> #include <ctype.h>
@@ -50,7 +50,7 @@case CHARSET :printf ("Charset : " );for (i =0 ; i <256 ; i++) { -if (bit (rx->charset, i) &&isprint (i)) +if (dm_bit (rx->charset, i) &&isprint (i))printf ("%c" , (char ) i); }break ;
@@ -67,7 +67,6 @@_pretty_print (rx->right, depth +1 ); } -int main (int argc,char **argv) {struct dm_pool *mem;
@@ -78,15 +77,15 @@exit (0 ); } -init_log (stderr); -init_debug (_LOG_INFO); +dm_log_init_verbose (_LOG_DEBUG); -if (!(mem =dm_pool_create (1024 ))) { +if (!(mem =dm_pool_create ("parse_regex" ,1024 ))) {fprintf (stderr,"Couldn't create pool\n" );exit (1 ); }if (!(rx =rx_parse_str (mem, argv[1 ]))) { +dm_pool_destroy (mem);fprintf (stderr,"Couldn't parse regex\n" );exit (1 ); }
@@ -94,7 +93,5 @@_pretty_print (rx,0 );dm_pool_destroy (mem); -dump_memory (); -fin_log ();return 0 ; }