home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cweb28.zip / readme.os2 < prev   
Text File  |  1992-12-29  |  2KB  |  49 lines

  1. This package was only slightly modified in order to get it to compile
  2. under EMX/GCC.  As it turns out, there are some rather trivial problems
  3. associated with a few of the names used in EMX's STDIO.H.  Furthermore,
  4. such problems would disappear were it not for the fact that ctangle
  5. puts all of its defines at the top of the \Cee\ file it creates.  *Sigh*
  6.  
  7. from common.w:
  8. @d buf_size 100 /* for \.{WEAVE} and \.{TANGLE} */
  9. from ctangle.w:
  10. @d string 02 /* takes the place of extended ASCII \.{\char2} */
  11.  
  12. Now, when ctangle is tangled, buf_size & string are defined at the
  13. top of the file, and STDIO.H is included afterwards.  Let's look inside
  14. EMX\INCLUDE\STDIO.H:
  15.  
  16. struct _FILE
  17. {
  18.   ...
  19.   int    buf_size;
  20.   ...
  21. };
  22.  
  23. int fputs (const char *string, FILE *stream);
  24.  
  25. Well, you guessed it.  Struct _FILE now has a member int 100;, and
  26. fputs looks like this:
  27.  
  28. int fputs (const char *02, FILE *stream);
  29.  
  30. Of course, gcc chokes on this, and gives you some rather strange
  31. error messages.
  32.  
  33. So in order to get around this, I merely renamed buf_size, string,
  34. and prefix by appending an underscore to each name.  It then
  35. compiled without a hitch.
  36.  
  37. To create new \Cee\ versions of ctangle, cweave, or common, type in:
  38.  
  39.     ctangle <filename> <filename>.ch
  40.  
  41. and the corresponding \Cee\ file should work just fine.
  42.  
  43. I'm not saying I'm going to support this version, because the 'fix'
  44. was so trivial.  But if you find something wrong with the executables,
  45. send me a message.
  46.  
  47. Tom McMillan
  48. tsm@aicorp.cmhnet.org
  49.