teTeX version: 1.0.6

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)

You might want to change my hack to provide a packedASCIIcode *
for MP (in coerce.h) by declaring it somewhere else.

   CMC

+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
 Behind the counter a boy with a shaven head stared vacantly into space, 
 a dozen spikes of microsoft protruding from the socket behind his ear.
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
   C.M. Connelly               [EMAIL PROTECTED]                   SHC, DS
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 

Reply via email to