From: nishi Date: Fri, 26 Jan 2024 03:54:11 +0000 (+0000) Subject: url X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=1b1ffefcf63ec94216921fb56d6be54403632579;p=libw3.git url git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@76 d27a3e52-49c5-7645-884c-6793ebffc270 --- 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:; }