"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "intl/gen-intl" between
links-1.03.tar.gz and links-1.04.tar.gz

About: Links is a Lynx-like text WWW browser (table support and pop-up dialog boxes).

gen-intl  (links-1.03):gen-intl  (links-1.04)
#!/bin/sh #!/bin/sh
LC_ALL=C LC_ALL=C
export LC_ALL export LC_ALL
echo echo
echo Generating language table. echo Generating language table.
mangle_unprintable_command="`./mangle-unprintable`"
languages=`cat index.txt|sed 's///g'` languages=`cat index.txt|sed 's///g'`
if [ -n "$languages" ]; then if [ -n "$languages" ]; then
( (
n=0 n=0
echo '/* Automatically generated by gen-intl */' echo '/* Automatically generated by gen-intl */'
for i in $languages; do for i in $languages; do
echo -n $i" " 1>&2 echo -n $i" " 1>&2
echo echo
echo 'struct translation translation_'$i' [] = {' echo 'struct translation translation_'$i' [] = {'
echo ' { 0, NULL },' echo ' { 0, NULL },'
cat $i.lng | ./mangle-unprintable | sed 's/^/ {/' | sed 's/,[ ]*$/ },/' cat $i.lng | eval "$mangle_unprintable_command" | sed 's/^/ {/' | sed 's /,[ ]*$/ },/'
echo ' { 0, NULL }' echo ' { 0, NULL }'
echo '};' echo '};'
n=`expr $n + 1` n=`expr $n + 1`
done done
echo echo
echo 'struct translation_desc translations [] = {' echo 'struct translation_desc translations [] = {'
for i in $languages; do for i in $languages; do
echo ' { translation_'$i' },' echo ' { translation_'$i' },'
done done
echo ' { NULL }' echo ' { NULL }'
echo '};' echo '};'
echo echo
( (
echo '/* Automatically generated by gen-intl */' echo '/* Automatically generated by gen-intl */'
echo echo
echo '#define N_LANGUAGES '$n echo '#define N_LANGUAGES '$n
echo echo
cat english.lng | grep '^T_' | (cat; echo T__N_TEXTS) | sed 's/,.*//' | c at -n | sed 's/^\([^T]*\)\(.*\)$/#define \2 \1/' cat english.lng | grep '^T_' | (cat; echo T__N_TEXTS) | sed 's/,.*//' | c at -n | sed 's/^\([^T]*\)\(.*\)$/#define \2 \1/'
) | sed 's///g' > ../language.h ) | sed 's///g' > language.h
) | sed 's///g' > ../language.inc ) | sed 's///g' > ../language.inc
if cmp -s ../language.h language.h; then
rm -f language.h
else
mv language.h ..
fi
echo echo
echo Done. echo Done.
fi fi
echo echo
 End of changes. 4 change blocks. 
2 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)