From d557db7aa43147cea75e205e09ac933f61d7eb26 Mon Sep 17 00:00:00 2001 From: teodor Date: Fri, 10 Oct 2008 10:20:36 +0000 Subject: [PATCH] Use c99 instead of ansi due to support int64 in template. Add __LEVEL built-in variable for nested loop --- Makefile.global | 2 +- data/template.tmpl | 2 +- expected/tmpl | 10 +++++----- template.c | 29 ++++++++++++++++++----------- template.h | 10 ++++++---- tmpl_gram.y | 2 +- tmpl_scan.l | 5 ++++- 7 files changed, 36 insertions(+), 24 deletions(-) diff --git a/Makefile.global b/Makefile.global index 3dbeecf..3a64a8b 100644 --- a/Makefile.global +++ b/Makefile.global @@ -5,7 +5,7 @@ ifndef OS OS=$(shell uname) endif -CFLAGS=-Wall -pedantic -ansi -O2 -g -DASSERT_CORE -DHAVE_HSTRERROR +CFLAGS=-Wall -pedantic -std=c99 -O2 -g -DASSERT_CORE -DHAVE_HSTRERROR ifeq ($(OS), FreeBSD) CFLAGS+= -DHAVE_POLL_H endif diff --git a/data/template.tmpl b/data/template.tmpl index d954d08..f2b33e0 100644 --- a/data/template.tmpl +++ b/data/template.tmpl @@ -70,7 +70,7 @@ str ? "yes" : -1 = <% str ? "yes" : -1 %> <@ ENDLOOP @> <@ LOOP selfLoop@> - <@if __FIRST @>