From 1b1ffefcf63ec94216921fb56d6be54403632579 Mon Sep 17 00:00:00 2001 From: nishi Date: Fri, 26 Jan 2024 03:54:11 +0000 Subject: [PATCH] url git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@76 d27a3e52-49c5-7645-884c-6793ebffc270 --- Example/W3B/Makefile | 7 +++++-- Example/W3B/url.c | 4 ++++ Example/W3B/w3b.c | 3 ++- 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 Example/W3B/url.c diff --git a/Example/W3B/Makefile b/Example/W3B/Makefile index de9db0e..c630806 100644 --- a/Example/W3B/Makefile +++ b/Example/W3B/Makefile @@ -1,8 +1,11 @@ # $Id$ .PHONY: clean install -./w3b: ./w3b.c $(RESFILE) - $(CC) -o $@ -I ../../Library -L ../../Library $^ -lw3 +./w3b: ./w3b.o ./url.o $(RESFILE) + $(CC) -o $@ -L ../../Library $^ -lw3 + +./%.o: ./%.c + $(CC) -c -o $@ -I ../../Library $< ../libw3.res: $(MAKE) -C .. ./libw3.res WINDRES=$(WINDRES) diff --git a/Example/W3B/url.c b/Example/W3B/url.c new file mode 100644 index 0000000..354d6f4 --- /dev/null +++ b/Example/W3B/url.c @@ -0,0 +1,4 @@ +/* $Id$ + * + * URL parser + */ diff --git a/Example/W3B/w3b.c b/Example/W3B/w3b.c index 621099c..1f2af9a 100644 --- a/Example/W3B/w3b.c +++ b/Example/W3B/w3b.c @@ -39,7 +39,7 @@ int main(int argc, char** argv) { printf("(O)pen, (Q)uit? "); fflush(stdout); } - scanf("%c", &c); + if(scanf("%c", &c) < 0) break; switch(tolower(c)){ case 'q': goto exitnow; @@ -59,5 +59,6 @@ int main(int argc, char** argv) { } } } + printf("\n"); exitnow:; } -- 2.43.0