diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/Makefile | 2 | ||||
-rw-r--r-- | examples/echo.c | 13 |
2 files changed, 11 insertions, 4 deletions
diff --git a/examples/Makefile b/examples/Makefile index 88af46d..4bf9eac 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -16,7 +16,7 @@ CFLAGS = -xc -ansi -pedantic -Wall -Wextra ifeq '$(DEBUG)' 'yes' CFLAGS += -g -O0 else -CFLAGS += -O3 +CFLAGS += -O3 -static endif # Including magi library headers and setting linker to use it: diff --git a/examples/echo.c b/examples/echo.c index 7c840e2..52089d9 100644 --- a/examples/echo.c +++ b/examples/echo.c @@ -28,7 +28,11 @@ void list_params(magi_request *r, magi_params *current) { for (; current; current = current->next) { magi_param *p = ¤t->item; - magi_response_format(r, "[%s] is [%s]<br/>", p->name, p->data); + magi_response(r, "["); + magi_response(r, p->name); + magi_response(r, "] is ["); + magi_response(r, p->data); + magi_response(r, "]<br/>"); } } @@ -37,8 +41,11 @@ void list_files(magi_request *r) magi_files *current; for (current = r->files; current; current = current->next) { magi_file *f = ¤t->item; - magi_response_format(r, "[%s] was [%s] on clientside<br/>", - f->field, f->filename); + magi_response(r, "["); + magi_response(r, f->field); + magi_response(r, "] was ["); + magi_response(r, f->filename); + magi_response(r, "] on clientside<br/>"); } } |