--- tclex-1.2a1.orig/src/tcLex.c +++ tclex-1.2a1/src/tcLex.c @@ -1145,7 +1145,11 @@ currentLexer = LexerGetCurrent(interp); if (currentLexer) { +#ifdef CMD_IS_DELETED + if (((Command*)currentLexer->command)->flags & CMD_IS_DELETED) +#else if (((Command*)currentLexer->command)->deleted) +#endif /* If command has been deleted, the token is meaningless. Return no result */ Tcl_ResetResult(interp); else @@ -1194,7 +1198,7 @@ Tcl_Obj *CONST objv[]; int start; { - static char * options[] = { + static const char * options[] = { "-inclusiveconditions", "-ic", "-exclusiveconditions", "-ec", "-resultvariable", @@ -1271,7 +1275,7 @@ * Get the switch */ - if (Tcl_GetIndexFromObj(interp, objv[i], options, "switch", 0, &optionIndex) == TCL_ERROR) + if (Tcl_GetIndexFromObj(interp, objv[i], options, "switch", 0, (int *) &optionIndex) == TCL_ERROR) return TCL_ERROR; switch (optionIndex) { @@ -1444,7 +1448,7 @@ int objc; Tcl_Obj *CONST objv[]; { - static char * options[] = { + static const char * options[] = { "create", "current", NULL }; @@ -1469,7 +1473,7 @@ * Get the switch */ - if (Tcl_GetIndexFromObj(interp, objv[1], options, "option", 0, &optionIndex) == TCL_ERROR) { + if (Tcl_GetIndexFromObj(interp, objv[1], options, "option", 0, (int *) &optionIndex) == TCL_ERROR) { /* * For now, an unknown subcommand is interpreted as the name of a new lexer * to create. This is for compatibility issues, and is likely to change when @@ -2533,7 +2537,7 @@ { TcLex_Lexer *lexer = (TcLex_Lexer *)clientData; TcLex_State *statePtr = lexer->states[lexer->curState]; - static char *options[] = { + static const char *options[] = { "-current", NULL}; static enum { @@ -2562,7 +2566,7 @@ * Switch to distinct subfunctions depending on the option */ - if (Tcl_GetIndexFromObj(interp, objv[2], options, "option", 0, &optionIndex) == TCL_ERROR) + if (Tcl_GetIndexFromObj(interp, objv[2], options, "option", 0, (int *) &optionIndex) == TCL_ERROR) return TCL_ERROR; switch (optionIndex) { @@ -2896,7 +2900,7 @@ Tcl_Obj *CONST objv[]; { TcLex_Lexer *lexer = (TcLex_Lexer *)clientData; - static char *options[] = { + static const char *options[] = { "eval", "start", "continue", "finish", "begin", "end", "conditions", "reject", @@ -2935,7 +2939,7 @@ * Get the subcommand */ - if (Tcl_GetIndexFromObj(interp, objv[1], options, "option", 0, &optionIndex) == TCL_ERROR) + if (Tcl_GetIndexFromObj(interp, objv[1], options, "option", 0, (int *) &optionIndex) == TCL_ERROR) return TCL_ERROR; /* --- tclex-1.2a1.orig/src/configure.in +++ tclex-1.2a1/src/configure.in @@ -14,7 +14,7 @@ fi AC_PROG_INSTALL -file=${exec_prefix}/lib/tclConfig.sh +file=${exec_prefix}/lib/tcl8.4/tclConfig.sh . $file CC=$TCL_CC --- tclex-1.2a1.orig/src/configure +++ tclex-1.2a1/src/configure @@ -611,7 +611,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -file=${exec_prefix}/lib/tclConfig.sh +file=${exec_prefix}/lib/tcl8.4/tclConfig.sh . $file CC=$TCL_CC --- tclex-1.2a1.orig/debian/README.debian +++ tclex-1.2a1/debian/README.debian @@ -0,0 +1,9 @@ +tclex for Debian +---------------------- + +Comments regarding the Package + +This package has been built specifically for inclusion in the new +version of transcriber-1.3. I have no knowledge of the software. + +David A. van Leeuwen , Thu, 23 Sep 1999 17:34:33 +0200 --- tclex-1.2a1.orig/debian/compat +++ tclex-1.2a1/debian/compat @@ -0,0 +1 @@ +4 --- tclex-1.2a1.orig/debian/changelog +++ tclex-1.2a1/debian/changelog @@ -0,0 +1,120 @@ +tclex (1.2a1-11) unstable; urgency=low + + * QA upload. + * Port to Tcl 8.4. Closes: #420183. + - src/tcLex.c: Use Command->flags instead of Command->deleted. + - src/tcLex.c: Conform more closely to the Tcl_GetIndexFromObj(3tcl) + prototype. + * Remove unnecessary dependency on Tk. + * debian/rules: Install changes.txt as the upstream changelog. + * debian/changelog: Add colon after `closes' to placate Lintian. + * debian/copyright: Update upstream URL. + * debian/watch: Add. + + -- Matej Vela Fri, 20 Apr 2007 19:32:23 +0200 + +tclex (1.2a1-10) unstable; urgency=low + + * QA upload. (ACK NMU; Closes: #359579) + * Set maintainer to QA Group; Orphaned: #406135 + * Bump compat level, depend on at least dh 4.0 + * Conforms with latest Standards Version 3.7.2 + + -- Michael Ablassmeier Tue, 23 Jan 2007 08:52:27 +0100 + +tclex (1.2a1-9.1) unstable; urgency=low + + * Non-maintainer upload. + * Get rid of the /usr/doc link in postinst (Closes: #359579). + + -- Amaya Rodrigo Sastre Mon, 17 Jul 2006 23:46:03 +0200 + +tclex (1.2a1-9) unstable; urgency=low + + * Changed dependencies to tcl/tk8.3 rather than 8.2. Closes: #183802 + + -- David A. van Leeuwen Sun, 28 Sep 2003 23:43:25 +0200 + +tclex (1.2a1-8) unstable testing; urgency=high + + * I _really_ need to get the change of 1.2a1-6 into testing or frozen + or whatever makes it go into woody. Otherwise it leaves a broken + package transcriber! Sorry for the messy uploads... Do I have to + file an RC bug against myself? + + -- David A. van Leeuwen Fri, 15 Mar 2002 17:26:49 +0100 + +tclex (1.2a1-7) unstable; urgency=low + + * changed priority from `optional' to `extra', in order to compy with + override file. + + * Changed typo in control, which actually closes: bug#125414, but hey, + I'm not going to make this urgent. + + * Changed my email address. Will this ever reduce spam? + + -- David A. van Leeuwen Fri, 15 Mar 2002 17:01:53 +0100 + +tclex (1.2a1-6) frozen; urgency=high + + * Changed build-dependency back to (tcl,tk)8.2-dev only, since `sid' has + different location of tclConfig.sh than `woody'. (closes: Bug#125414) + * Put ../tcl8.2/ in `file' variables in configure.in and configure, + for the same reason. + + -- David A. van Leeuwen Mon, 11 Mar 2002 10:03:40 +0100 + +tclex (1.2a1-5testing) testing; urgency=high + + * Changed build-dependency on (tcl,tk)8.0-dev only, since `sid' has + different location of tclConfig.sh than `woody'. (closes: Bug#125414) + * Removed ../tcl8.0/ in `file' variables in configure.in and configure, + for the same reason. + * Not that this change should _not_ go in unstable. + + -- David A. van Leeuwen Fri, 28 Dec 2001 13:47:57 +0100 + +tclex (1.2a1-5) unstable; urgency=low + + * Removed debmake build-depends, added debhelper (i was confused) + * added tk8.0-dev|tk8.2-dev (i was lazy) (closes: Bug#109497) + + -- David A. van Leeuwen Tue, 21 Aug 2001 17:45:45 +0200 + +tclex (1.2a1-4) unstable testing; urgency=low + + * Update with transcriber-1.4.3 and snack-2.0.7 + + * (Build-)Depends on tcl8.2|tcl8.0 etc. + + -- David A. van Leeuwen Mon, 20 Aug 2001 17:52:17 +0200 + +tclex (1.2a1-3) unstable testing; urgency=low + + * moving towards debhelper + + * made doc-base entry; it seems not to work with me. + + * Changed /usr/doc files to /usr/share/doc, according to FHS; (closes: + Bug#91674) + + * Added Build-Depends: tcl8.0-dev, demake to control + + * Changed Standards-version to 3.5.2.0 + + -- David A. van Leeuwen Tue, 27 Mar 2001 12:38:27 +0200 + +tclex (1.2a1-2) unstable; urgency=low + + * Adapted debian/rules to compile on Alpha (tcl8.0-dev source problem) + solves critical release-bug 47810. + + -- David A. van Leeuwen Fri, 12 Nov 1999 10:45:11 +0100 + +tclex (1.2a1-1) unstable; urgency=low + + * Initial Release. + + -- David A. van Leeuwen Thu, 23 Sep 1999 17:34:33 +0200 + --- tclex-1.2a1.orig/debian/watch +++ tclex-1.2a1/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://membres.lycos.fr/fbonnet/pub/tcLex(.*)\.tar\.gz --- tclex-1.2a1.orig/debian/control +++ tclex-1.2a1/debian/control @@ -0,0 +1,53 @@ +Source: tclex +Section: interpreters +Priority: extra +Maintainer: Debian QA Group +Build-Depends: tcl8.4-dev, debhelper (>= 4.0.0) +Standards-Version: 3.7.2 + +Package: tclex +Architecture: any +Depends: tcl8.3, ${shlibs:Depends} +Description: A lexical analyzer generator for Tcl + tcLex is a lexer (lexical analyzer) generator extension to Tcl. It is + inspired by Unix and GNU lex and flex, which are "tools for + generating programs that perform pattern-matching on text". tcLex is + very similar to these programs, except it uses Tcl philosophy and + syntax, whereas the others use their own syntax and are used in + conjunction with the C language. People used to lex or flex should + then feel familiar with tcLex. tcLex is a small extension (the + Windows compiled version is about 20kb, and the source is about + 150kb), because it extensively uses the Tcl library. However, the + current doesn't use Tcl's regexp code anymore but a patched version + is now included in tcLex, which makes it slightly bigger (by a few + KB). tcLex should work with Tcl 8.0 and later. tcLex will NEVER work + with earlier versions, because it uses Tcl 8.0's "object" system for + performance. The most interesting features are: + . + * cross-platform support, thanks to Tcl. Though it has been + developed on Windows and tested on Windows and Unix only, it + should work on other platforms as long as Tcl exists on these + platforms. Supported Tcl platforms are Windows 95/NT, Unix (Linux, + Solaris...) and Macintosh. Other platforms are VMS, OS/2, + NeXTStep, Amiga... + . + * unlike lex and flex, which only generate static lexers written in + C and intended to be compiled, tcLex dynamically generates Tcl + commands that can be used like other C commands or Tcl procedures + from within Tcl scripts or C programs. + . + * it uses Tcl regular expressions. That means you don't have to + learn another regexp language. + . + * it works with Tcl namespaces + . + * the generated lexer commands can be used in one pass or + incrementally, because they maintain state information. That way, + several instances of the same lexer (eg a HTML parser) can run at + the same time in distinct call frames and maintain distinct states + (local variables...). Lexer need not be specially designed in + order to be used incrementally, the same lexer can transparently + be used in one pass or incrementally. This feature is especially + useful when processing text from a file or an Internet socket (Web + pages for example), when data is not necessarily available at the + beginning of the processing. --- tclex-1.2a1.orig/debian/postinst +++ tclex-1.2a1/debian/postinst @@ -0,0 +1,12 @@ +#!/bin/sh +if [ "$1" = "configure" ]; then + if [ -d /usr/doc -a -h /usr/doc/tclex -a -d /usr/share/doc/tclex ]; then + rm -f /usr/doc/tclex + fi + + if command -v install-docs > /dev/null 2>&1; then + install-docs -i /usr/share/doc-base/tclex-manual + fi +fi + +#DEBHELPER# --- tclex-1.2a1.orig/debian/copyright +++ tclex-1.2a1/debian/copyright @@ -0,0 +1,63 @@ +This package was debianized by David A. van Leeuwen david@tm.tno.nl on +Thu, 23 Sep 1999 17:34:33 +0200. + +It was downloaded from http://membres.lycos.fr/fbonnet/pub/ + +Copyright: + +[file adaptated from the Tcl license] + +This software is copyrighted by Frederic BONNET +. The following terms apply to all files +associated with the software unless explicitly disclaimed in individual +files. + +The authors hereby grant permission to use, copy, modify, distribute, +and license this software and its documentation for any purpose, +provided that existing copyright notices are retained in all copies and +that this notice is included verbatim in any distributions. No written +agreement, license, or royalty fee is required for any of the authorized +uses. Modifications to this software may be copyrighted by their authors +and need not follow the licensing terms described here, provided that +the new terms are clearly indicated on the first page of each file where +they apply. + +IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY +FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES +ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY +DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +These include earthquakes, volcanoes, tsunami, traffic jams, stupid +TV programs, brain damage resulting of attempts to read and understand: +the code, my bad english, the present license, or all-caps legalese. + +THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND +DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, +UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + +GOVERNMENT USE: If you are acquiring this software on behalf of the +U.S. government, the Government shall have only "Restricted Rights" +in the software and related documentation as defined in the Federal +Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you +are acquiring the software on behalf of the Department of Defense, the +software shall be classified as "Commercial Computer Software" and the +Government shall have only "Restricted Rights" as defined in Clause +252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the +authors grant the U.S. Government and others acting in its behalf +permission to use and distribute the software in accordance with the +terms specified in this license. + +SPECIAL NOTES (the beerware clause): + +This software is freeware. However, it also falls under the beerware +special category. That is, if you find this software useful, or use it +every day, or want to grant me for my modest contribution to the Tcl +community, feel free to send me a beer from one of your local brewery. +My preference goes to Belgium abbey beers, Corona mexican cerveza, +and irish stout (Guiness for strength!), but I also appreciate exotic, +rare or original beers from everywhere (note: I live in France), +especialy those with a nice packaging or original taste. + --- tclex-1.2a1.orig/debian/rules +++ tclex-1.2a1/debian/rules @@ -0,0 +1,61 @@ +#!/usr/bin/make -f +# Made with the aid of debmake, by Christoph Lameter, +# based on the sample debian/rules file for GNU hello by Ian Jackson. + +package=tclex + +build: build-stamp +build-stamp: + dh_testdir + cd src; chmod +x configure; ./configure; + $(MAKE) -C src + touch build-stamp + +clean: + dh_testdir + dh_testroot + -rm -f build-stamp + -$(MAKE) -C src distclean + -rm -f src/*.so + -rm -f `find . -name "*~"` + -rm -rf debian/tclex debian/files* core debian/substvars + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + +binary-indep: build install +# There are no architecture-independent files to be uploaded +# generated by this package. If there were any they would be +# made here. + +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs changes.txt + dh_installdocs README.txt + dh_installexamples + $(MAKE) -C src install TCL_PREFIX=../debian/tclex/usr +# be an irritating wise-a** and change .htm in .html where possible + for a in `cd doc/en; ls *.htm`; do \ + cat doc/en/$$a | perl -pe 's/("\w+)\.htm\b/\1.html/g' > debian/tclex/usr/share/doc/$(package)/html/$${a}l; \ + done + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb +# dpkg --build debian/tclex .. + +binary: binary-indep binary-arch + +.PHONY: binary binary-arch binary-indep clean --- tclex-1.2a1.orig/debian/dirs +++ tclex-1.2a1/debian/dirs @@ -0,0 +1,2 @@ +usr/lib/tcLex1.2 +usr/share/doc/tclex/html --- tclex-1.2a1.orig/debian/prerm +++ tclex-1.2a1/debian/prerm @@ -0,0 +1,10 @@ +#!/bin/sh +if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/tclex ]; then + rm -f /usr/doc/tclex + if command -v install-docs > /dev/null 2>&1; then + install-docs -r tclex-manual + fi + +fi + +#DEBHELPER# --- tclex-1.2a1.orig/debian/doc-base +++ tclex-1.2a1/debian/doc-base @@ -0,0 +1,9 @@ +Document: tclex-manual +Title: tcLex online documentation +Author: Frederic Bonnet +Abstract: This manual describes the Tcl lexical analyzer +Section: Interpreters + +Format: HTML +Index: /usr/share/doc/tclex/html/index.html +Files: /usr/share/doc/tclex/html/*.html