[comp.windows.x] texx2

margaret@ms.uky.edu (Malgorzata Marek Sturgill) (02/01/89)

Hi,
	I was wondering where can I get copy of texx2?
					Thanks,

					Margaret
-- 
Malgorzata Marek Sturgill		ARPA:   margaret@ms.uky.edu
					UUCP:   {uunet,cbosgd}!ukma!margaret
-- What did you do with that chair?	BITNET: margaret@UKMA.BITNET
-- Chair? I ate it.			CSNET:  margaret@ms.uky.csnet

grunwald@flute.cs.uiuc.edu (Dirk Grunwald) (02/14/89)

I've placed a copy of texx2 in

	expo.lcs.mit.edu	contrib/texx2.tar.Z
	a.cs.uiuc.edu		pub/TeX/texx2.tar.Z

Annoyingly enough, this software is without documentation, and I haven't
really put together an Imakefile for it (I know, boo hiss).

However, the upside is that it's significantly faster than either
texx, xdvi or even texsun. It handles tpic specials and makes a
passing attempt to do something with psfig specials (shows the
bounding box).  Pages are rendered using ``dvi'' fonts converted to X
bdf fonts.  By default, it's configured to use 300 dpi fonts at mag
500.  You can also configure it to use whatever font sizes you like.
I provided a few pre-built bdf files that handle all the documents I've
used it on.

There's a companion program, mftobdf, that converts the ``dvi'' fonts
to bdf files. If you've installed ``texx'', it should be easy to install
this.

I'm certain I'm violating X design principles left and right, so if anyone
with copious amounts of time wants to make it a nicer packager, please
do go right ahead -- I'll take patches.

However, please don't send me mail asking to distribute it -- it's
too big and I don't have time.

Dirk Grunwald
Univ. of Illinois
grunwald@m.cs.uiuc.edu

grunwald@flute.cs.uiuc.edu (Dirk Grunwald) (02/15/89)

As several people pointed, texx2 doesn't compile with a normal C compiler.
I used `gcc', which lets you initialize automatic aggregates -- it seems
this isn't a common addition (*sigh*).

Many of the changes are straight-forward (moving the automatics to the
global level), but many aren't (for those, XtSetArg needs to be used).

Also, you can't compile it with gcc 1.33 because gcc 1.33 is buggy & dies.
I used gcc 1.31.

There's another problem, which is related to a mising * in  ``mio.h''.
A correct version follows:


---mio.h---
/*
 *	This program is Copyright (C) 1987 by the Board of Trustees of the
 *	University of Illinois, and by the author Dirk Grunwald.
 */

/*
 * Memory I/O: numbers.
 *
 */

#ifdef __STDC__

static 
inline int mGetByte(char **m)
{
    unsigned char foo = **m;
    unsigned int retval = foo & 0xff;
    (*m)++;
    return retval;
}

static 
inline void mGetWord( char **m, i32 *r)
{
    int x = mGetByte( m ) << 8;
    x |= mGetByte(m); 
    *r = x;
}

static 
inline void mGet3Byte( char **m, i32 *r)
{
    long x = mGetByte( m ) << 16;
    x |= ( mGetByte(m ) << 8 ); 
    x |= mGetByte(m);
    *r = x;
}

static 
inline void mGetLong( char **m, i32 *r)
{
    long x = mGetByte( m ) << 24;
    x |= ( mGetByte(m) << 16 ); 
    x |= ( mGetByte(m) << 8 ); 
    x |= mGetByte(m); 
    *r = x;
}

#else

#define	mGetByte(m)	( *((*m)++) )

#define mGetWord(m, r)	{*(r)  = mGetByte(m) << 8;  *(r) |= mGetByte(m);}

#define mGet3Byte(m,r) {*(r)  = mGetByte(m) << 16;\
			 *(r) |= mGetByte(m) << 8;\
			 *(r) |= mGetByte(m);}

#define mGetLong(m, r)	{*(r)  = mGetByte(m) << 24;\
			 *(r) |= mGetByte(m) << 16;\
			 *(r) |= mGetByte(m) << 8;\
			 *(r) |= mGetByte(m);}

#endif

grunwald@flute.cs.uiuc.edu (Dirk Grunwald) (02/16/89)

texx2.3.tar.Z is available.

It compiles & runs on a sun using gcc 1.31 and on our Encore using
Greenhills C. Sun C raises one warning which I consider bogus.
It now lets you change the maginification level interactively.