Index: Makefile =================================================================== --- Makefile (revision 2886) +++ Makefile (revision 2887) @@ -2,15 +2,20 @@ SRC=$(TRUNK)/src CFLAGS_OP = -O3 CFLAGS = -I$(TRUNK) -I$(SRC) -I$(TRUNK)/src_3rd -I$(TRUNK)/src_3rd/liblihata +LDFLAGS = -lm GDS= $(TRUNK)/src_3rd/genvector/gds_char.o -all: tester_spd +all: tester_spd prcli test: tester.diff @echo "*** all ok, QC PASS ***" @rm tester.stdout ; true +prcli: prcli.o $(SRC)/pcb-printf.o $(SRC)/unit.o $(GDS) $(SRC)/misc_util.o $(GDS) + +prcli.o: prcli.c + tester: tester.o $(SRC)/pcb-printf.o $(SRC)/unit.o $(GDS) tester_spd: tester_spd.o $(SRC)/pcb-printf_spd.o $(SRC)/unit.o $(GDS) Index: prcli.c =================================================================== --- prcli.c (nonexistent) +++ prcli.c (revision 2887) @@ -0,0 +1,29 @@ +#include +#include +#include "misc_util.h" +#include "pcb-printf.h" + + +int main(int argc, char *argv[]) +{ + const char *fmt = argv[1]; + Coord crd; + int n; + + + for(n = 2; n < argc; n++) { + bool success; + double val = GetValueEx(argv[n], NULL, NULL, NULL, "", &success); + if (!success) { + fprintf(stderr, "Unable to convert '%s' to coord\n", argv[n]); + return 1; + } + crd = val; + } + + pcb_printf(fmt, crd); + + printf("\n"); + + return 0; +} \ No newline at end of file