[net.sources] Forgot MicroEmacs's ED.H ... Here it

rickf@hplsla.UUCP (rickf) (03/17/86)

># Written 11:55 am  Mar 11, 1986 by pogo!jutz in hplsla:net.micro.pc
># ---------- "MicroEmacs for PC-AT (public domain)" ---------- 
>
>
> 	Just yesterday I posted MicroEmacs for the PC-AT in 
>	net.sources.  There were two entries.  I forgot to 
>	include "ed.h" in the first submission.  The other 
>	I posted today.
>
>
>		Curt jutzi
>		tektronix!pogo!jutz
>

I pulled off the source including ed.h.  I split the large file into
its components on my UNIX machine, before tranferring them to my AT
clone (HP Vectra).  I then attempted to compile and link (MS C 3.0)
and found the following problems:

main.c had syntax errors.  The following source is taken straight
out of the un-split micro.emacs:

>/*
> * Execute a macro.
> * The command argument is the number of times to loop. Quit as soon as a
> * command gets an error. Return TRUE if all ok, else FALSE.
> */
>ctlxe(f, n)
>{
>        register int    c;
>        register int    af;
>        register int    an;
>        register int    s;
>
>        if (kbdmip!=NULL || kbdmop!=NULL) {
>                mlwrite("Not now");
>                return (FALSE);
>        }
>        if (n <= 0) 
>                return (TRUE);
>        do {
>                kbdmop = &kbdm[0];
>                do {
>                        af = FALSE;
>                        an = 1;
>                        if ((c = *kbdmop++) == (CTRL|'U')) {
>                                af = TRUE;
>                                an = *kbdmop++;
>                                c  = *kbdmop++;
>                        }
>                        s = TRUE;
>                } while (c!=(CTLX|')') && (s=execute(c, af, an))==TRUE);
>--------- meta.c
>
>#include        <stdio.h>
>#include        "ed.h"
>
>#define 	NMETA_CMDS  52
>

It looks to me as though some lines from main.c (which contain cltxe()) did
not make it into the posting.  The enclosing while to the first do in this
function is missing.

Could this missing source also explain why I get "ctrlg: Unresolved external"
when I link my files. (I took a guess at the missing while to get main.c
to compile).

I suppose that there is a chance that my site is at fault.  If any one has
a solution please help by posting it here or to net.sources.

Thanks,

Rick Freeman   (hplsla!rickf)