Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site bbnccv.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!bbnccv!jlowry From: jlowry@bbnccv.UUCP (John Lowry) Newsgroups: net.micro.pc,net.lang.c Subject: Eco-C Compiler Message-ID: <436@bbnccv.UUCP> Date: Wed, 31-Jul-85 17:43:47 EDT Article-I.D.: bbnccv.436 Posted: Wed Jul 31 17:43:47 1985 Date-Received: Fri, 2-Aug-85 00:36:21 EDT Reply-To: jlowry@bbnccv.UUCP (John Lowry) Distribution: net Organization: Bolt Beranek and Newman, Cambridge, MA Lines: 146 Xref: watmath net.micro.pc:4756 net.lang.c:5862 Despite my earlier posting praising Ecosoft's Eco-C Compiler, I now have to add some warnings and complaints. (For $49.95 what did I expect ...) 1. It is true that the parser barfs on "printf (...)" and not on "printf(...)". (note the space). Frustrating but livable. Only one I've found so far ... 2. Functions may be a little different. From examples in K&R putc() uses an int c;. putc() in Eco-C expects a char. 3. The compiler hates my ramdisk. I have the QuadRam board and use the supplied ramdisk. Because the compiler, library, header files, linker, editor, etc. consume so much room, I have been forced to use 3 floppies. I tried to load the compiler into the ramdisk, and when it came time to link the ramdisk FAT was trashed. So I tried to load the library into the ramdisk... same problem. Apparently, the parser gets available memory from BIOS and does all it's work at some offset from high memory. Since this is where my ramdisk lives ... This means that you can't use the 'make' function of the compiler or the auto-link because there isn't enough room for all that is needed and your sources. (I know, buy a hard-disk. Of course, if I could afford a hard-disk, I wouldn't be playing with a $49.95 compiler.) 4. Included below is a (large) fragment of code that will compile fine but will not open and read the correct file. Specifically, this is part of a small nroff-like program that I got from a BBS. The problems occur when the file name of the macro file is passed to a function for reading. fopen() returns NULL consistently. This fragment compiles on the Mark Williams compiler, and two other mini-computer compilers, and runs. If you can see what is questionable with this code, please respond. After compiling, run with "nro -m", same format as loading a macrofile into nroff. Header File: nroall.h ----------------------------------------- #define NFILES 4 /* nesting depth for input files */ #define ERR -1 #ifndef EXTERN #define EXTERN extern #endif EXTERN FILE *sofile[NFILES]; /* input file buffers */ C Source File: nro.c --------------------------------------------- /* * Word Processor * similar to Unix NROFF or RSX-11M RNO - * adaptation of text processor given in * "Software Tools", Kernighan and Plauger. * * Stephen L. Browning * 5723 North Parker Avenue * Indianapolis, Indiana 46220 */ #include #define TRUE 1 #define FALSE 0 #define EXTERN #include "nroall.h" main(argc, argv) int argc; char *argv[]; { int i,c; int swflg; int ifp, ofp; FILE *fopen(); swflg = FALSE; pout = stdout; ifp = ofp = 0; for (i=1; ioutfile]\n"); exit(-1); } } /* * process switch values from command line */ pswitch(p,q) char *p; int *q; { int swgood, c; swgood = TRUE; if (*p == '-') { switch (*++p) { /* here is the offending(?) code. */ case 'm': if ((sofile[0] = fopen(++p, "r")) == NULL) { printf("***nro: unable to open file %s\n",p); exit(-1); } while((c=getc(sofile[0])) != EOF) putchar(c); fclose(sofile[0]); break; default: swgood = FALSE; break; } } if (swgood == FALSE) { printf("nro: illegal switch %s",p); return(ERR); } return(TRUE); } John Lowry jlowry@bbnz jlowry@bbnccv