Index: strflags/Makefile =================================================================== --- strflags/Makefile (revision 34777) +++ strflags/Makefile (revision 34778) @@ -1,21 +1,20 @@ -include ../../Makefile.conf +ROOT=../.. +include $(ROOT)/Makefile.conf +include $(LIBRND_MAK) -TRUNK=../.. -IO=$(TRUNK)/src_plugins/io_pcb -CFLAGS = $(PCB_RND_C89FLAGS) -O3 -I$(TRUNK) -I$(TRUNK)/src -I$(IO) -I$(TRUNK)/src_3rd + +IO=$(ROOT)/src_plugins/io_pcb +CFLAGS = $(PCB_RND_C89FLAGS) -O3 -I$(ROOT) -I$(ROOT)/src -I$(IO) -I$(ROOT)/src_3rd -I$(LIBRND_INCDIR) LDLIBS = -lm -LIBRND_LIBS = $(TRUNK)/src_3rd/librnd-local/src/librnd-3rd.a +LIBRND_LIBS = -lrnd-3rd all: tester -ROOT=../.. -include $(ROOT)/Makefile.conf - test: tester.diff @echo "strflags: *** QC PASS ***" @rm tester.stdout -tester: tester.o $(LIBRND_LIBS) +tester: tester.o $(CC) $(LDFLAGS) -o tester tester.o $(LIBRND_LIBS) $(LDLIBS) tester.o: tester.c Index: strflags/tester.c =================================================================== --- strflags/tester.c (revision 34777) +++ strflags/tester.c (revision 34778) @@ -36,8 +36,20 @@ #define FLAG_TEST #include "flag_str.c" #include "flag.c" -#include +char *rnd_strndup(const char *s, int len) +{ + int a, l = strlen(s); + char *o; + + a = (len < l) ? len : l; + o = malloc(a+1); + memcpy(o, s, a); + o[a] = '\0'; + return o; +} + + static void dump_flag(pcb_flag_t * f) { int l;