[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#63450: tetex-bin: Omega starts editor with empty file; patch enclosed




Package: tetex-bin
Version: 1.0.6-5
Severity: normal


When using Omega, if an error occurs, typing ``e'' at the error
prompt is supposed to start an editor, open the file being TeXed,
and go to the line at which the problem was detected.  Instead,
Omega apparently starts an editor without specifying a file -- vi
opens a new (empty) file in /tmp with a weird temporary name;
emacsclient causes an open Emacs to flash or starts Emacs; Emacs
starts with an empty document.

I discovered this problem when I was going over the failed build
log for tetex-bin from the Debian PowerPC build daemon.  The
compiler reported the following warning:

   omega3.c: In function `closefilesandterminate':
   omega3.c:253: warning: passing arg 1 of `calledit' from
      incompatible pointer type 

After investigation, the problem turned out to be caused by the
type of calledit's first argument, which was defined as an
ASCIIcode * when it was really being passed a packedASCIIcode *.
Both types are usually unsigned char *s, but in Omega, ASCIIcode
is defined to be an unsigned short.  The following patch to
texk/web2c/web2c/coerce.h and texk/web2c/lib/texmfmp.c fixes the
problem.


--- texk/web2c/web2c/coerce.h.orig	Thu Feb 11 04:01:39 1999
+++ texk/web2c/web2c/coerce.h	Sat Apr 29 00:16:38 2000
@@ -24,7 +24,11 @@
 /* And we use the opportunity to declare a few functions that could not be
    declared in texmfmp.h, because they need typedefs not yet known at that
    point.  */
-extern void calledit P4H(ASCIIcode *, poolpointer, integer, integer);
+#ifdef MP
+typedef ASCIIcode packedASCIIcode;
+#endif
+
+extern void calledit P4H(packedASCIIcode *, poolpointer, integer, integer);
 
 #ifdef MF
 extern void blankrectangle P4H(screencol, screencol, screenrow, screenrow);

--- texk/web2c/lib/texmfmp.c.orig	Thu May 20 03:19:18 1999
+++ texk/web2c/lib/texmfmp.c	Sat Apr 29 00:16:40 2000
@@ -1080,7 +1080,7 @@
    actual filename starts; FNLENGTH is how long the filename is.  */
    
 void
-calledit P4C(ASCIIcode *, filename,
+calledit P4C(packedASCIIcode *, filename,
              poolpointer, fnstart,
              integer, fnlength,
              integer, linenumber)


I have already reported this problem upstream; this patch will
allow you to fix the version in frozen.


System information
==================

Debian Release: potato
Architecture: powerpc
Kernel: Linux diziet 2.2.15pre20 #2 Tue Apr 25 17:06:54 PDT 2000 ppc



Versions of packages tetex-bin depends on:

libc6 (>= 2.1.2), libpng2, libstdc++2.10, libz1, tetex-lib, xlib6g, xlib6g (>= 3.3.6), tetex-lib (>= 1.0.6), tetex-base (>= 1.0-5), ed, debianutils (>= 1.13.1)
ii  libc6          2.1.3-8        GNU C Library: Shared libraries and Timezone
ii  libpng2        1.0.5-1        PNG library - runtime
ii  libstdc++2.10  2.95.2-7       The GNU stdc++ library
un  libz1          <none>         (no description available)
ii  zlib1g         1.1.3-5        compression library - runtime
^^^^^^^^^^ replacement for libz1; would be nice if the depends
           were updated to reflect this change
ii  tetex-lib      1.0.6-1.1      shared libkpathsea for teTeX
ii  xlib6g         3.3.6-6        shared libraries required by X clients
ii  xlib6g         3.3.6-6        shared libraries required by X clients
ii  tetex-lib      1.0.6-1.1      shared libkpathsea for teTeX
ii  tetex-base     1.0-5          basic teTeX library files
ii  ed             0.2-18         The classic unix line editor
ii  debianutils    1.13.3         Miscellaneous utilities specific to Debian.










Reply to: