home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mega Top 1
/
os2_top1.zip
/
os2_top1
/
APPS
/
TEKST
/
CWEB_2_8
/
LEESMIJ.TXT
< prev
Wrap
Text File
|
1992-12-29
|
2KB
|
49 lines
This package was only slightly modified in order to get it to compile
under EMX/GCC. As it turns out, there are some rather trivial problems
associated with a few of the names used in EMX's STDIO.H. Furthermore,
such problems would disappear were it not for the fact that ctangle
puts all of its defines at the top of the \Cee\ file it creates. *Sigh*
from common.w:
@d buf_size 100 /* for \.{WEAVE} and \.{TANGLE} */
from ctangle.w:
@d string 02 /* takes the place of extended ASCII \.{\char2} */
Now, when ctangle is tangled, buf_size & string are defined at the
top of the file, and STDIO.H is included afterwards. Let's look inside
EMX\INCLUDE\STDIO.H:
struct _FILE
{
...
int buf_size;
...
};
int fputs (const char *string, FILE *stream);
Well, you guessed it. Struct _FILE now has a member int 100;, and
fputs looks like this:
int fputs (const char *02, FILE *stream);
Of course, gcc chokes on this, and gives you some rather strange
error messages.
So in order to get around this, I merely renamed buf_size, string,
and prefix by appending an underscore to each name. It then
compiled without a hitch.
To create new \Cee\ versions of ctangle, cweave, or common, type in:
ctangle <filename> <filename>.ch
and the corresponding \Cee\ file should work just fine.
I'm not saying I'm going to support this version, because the 'fix'
was so trivial. But if you find something wrong with the executables,
send me a message.
Tom McMillan
tsm@aicorp.cmhnet.org