home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Gadgets 1
/
ADE-1.bin
/
ade-dist
/
gettext-0.10.24-src.tgz
/
tar.out
/
fsf
/
gettext
/
checks
/
xgettext-9
< prev
Wrap
Lisp/Scheme
|
1996-09-28
|
2KB
|
98 lines
#! /bin/sh
trap 'rm -fr $tmpfiles' 1 2 3 15
tmpfiles="$tmpfiles xg-test9.c"
cat <<EOF > xg-test9.c
int
main()
{
/* This is a comment which immediately before a keyword. */
gettext ("1");
// This
// one
// too
// although many blank lines come before the token itself.
gettext("2");
/* this one also counts */ gettext ("3");
gettext("4");
/* this one is also copied */ nada
gettext ("5");
/* I hope you do not see the following */
break;
gettext("6");
/* An unnice
multi-line comment */ evil;
gettext("7");
}
EOF
tmpfiles="$tmpfiles xg-test9.po"
: ${XGETTEXT=xgettext}
${XGETTEXT} --omit-header -c --c++ -d xg-test9 xg-test9.c
tmpfiles="$tmpfiles xg-test9.ok"
cat <<EOF > xg-test9.ok
#. This is a comment which immediately before a keyword.
msgid "1"
msgstr ""
#. This
#. one
#. too
#. although many blank lines come before the token itself.
msgid "2"
msgstr ""
#. this one also counts
msgid "3"
msgstr ""
msgid "4"
msgstr ""
#. this one is also copied
msgid "5"
msgstr ""
msgid "6"
msgstr ""
#. An unnice
#. multi-line comment
msgid "7"
msgstr ""
EOF
: ${DIFF=diff}
${DIFF} xg-test9.ok xg-test9.po
result=$?
rm -fr $tmpfiles
exit $result
Local Variables:
nuke-trailing-whitespace-p:nil
End:
# Preserve executable bits for this shell script.
# Thanks to Noah Friedman for this great trick.
Local Variables:
Eval: (defun frobme () (set-file-modes buffer-file-name file-mode))
Eval: (make-local-variable 'file-mode)
Eval: (setq file-mode (file-modes (buffer-file-name)))
Eval: (make-local-variable 'after-save-hook)
Eval: (add-hook 'after-save-hook 'frobme)
End: