[Klone-users] Translation error kl1 to C file
Mickael Auger
mickael.auger at gmail.com
Wed Nov 12 12:05:14 EST 2008
Hi,
I have a KL1 page as :
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
<%!
static const char *val;
%><%
val = "coucou";
io_printf(out,"%s",val);
%>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-> any "\n" after all "%>" tag
This can be use to generate a file without html format (image, ...)
I compile this page and I have an error :
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
m68k-elf-gcc -I/opt/uClinux-dist/uClibc/include -Os -m5307 -msep-data
-D__UCLINUX__ -pipe
-I/home/all_user/ug_ma/ug_web-v3/klone-2.1.1rc0/build/target/klone-core-2.1.1rc0/libu/include
-I/home/all_user/ug_ma/ug_web-v3/klone-2.1.1rc0/build/target/klone-core-2.1.1rc0
-DHAVE_CONF_H -I/usr/local/include -O2 -I/home/all_user/ug_ma/ug_web-v3/
-I/home/all_user/ug_ma/ug_web-v3/include
-I/home/all_user/ug_ma/ug_web-v3/klone-2.1.1rc0/ -c
pg_2a7de1a33a2202bac8fcb632e6150421.c -o
pg_2a7de1a33a2202bac8fcb632e6150421.o
/home/all_user/ug_ma/ug_web-v3/webapp/www/utilisateur.kl1:21: invalid format
`#line' directive
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The C file equivalente of KL1 page contains at line 21 :
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#line 65 "pg_2a7de1a33a2202bac8fcb632e6150421.c"goto klone_script_exit;
klone_script_exit:
return;
}
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Man misses an "\n" before "goto" word.
To resolve this problem, add a "\n" at line 257 of "/src/libtrans/translat.c
as :
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
io_printf(tmp, "#line %d \"%s\"", ln + 2, pti->file_out);
=> io_printf(tmp, "#line %d \"%s\"\n", ln + 2, pti->file_out);
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Bye.
--
Mickaël AUGER
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://koanlogic.com/pipermail/klone-users/attachments/20081112/9d0b98ba/attachment.htm
More information about the klone-users
mailing list