DERMOTT@DREA-XX.ARPA (Dave Dermott) (03/19/87)
More BUGS in MicroEmacs 3.8b for ATARI ST and MEGAMAX (also VMS) I picked up the sources for MicroEmacs 3.8b (dated Feb 13 87)from SIMTEL20. I'm using a ATARI 1040 ST with Megamax compiler V1.1 . I read a message that MicroEmacs 3.8f was available somewhere. Are there DIFF files available or do I have to get the whole source files again? I also got v 3.8b working on VAX-VMS with changes suggested by decvax!dartvax!earleh@ucbvax.berkery.edu Nov 12 1987. However screen refreshes were very slow. I found in VMSVT.C in function vmsmove that vmspad(50) is called which pads the terminal output with 50 NULLS. I changed this to 5, it speeded up screen refreshes considerably, and I have no problems up to 9600 baud. Is there a reason for this padding? Now some more BUGS in ATARI ST. ------------------------------------------------- 14/ In ST520.c, function st520cres(), /* determine the needed resolution */ the values for nurez should be 0 (LOW), 1 (MEDIUM), 2 (HIGH) instead of 1,2,3. ------------------------------------------------------- 15/ IN SPAWN.C the spawn() function (run a program) doesn't work. The worst error was the reversed arguments to Fsfirst(). I took out the pointer definitions for *STcmd,*STargs,*STenv,*STwork near the beginning of the file and made them local arrays in spawn() -- also dtabuff[44] is declared : #if ST520 int i,j,k; char *sptr,*tptr; char dtabuff[44]; /* dta for Fsetdta,Fsfirst */ char STcmd[40], /* the command filename & path */ STargs[40], /* command args (if any) */ STenv[2], /* environment */ STwork[40]; /* work area */ #endif The Fsetdta() function has to be called to set up a address to dtabuff before Fsfirst can be called. I also removed the TTclose() and TTopen() calls so the screen didn't get erased and resolution changed back to HIGH. #if ST520 if ((s=mlreply("!", line, NLINE)) != TRUE) return(s); movecursor(term.t_nrow - 1, 0); Fsetdta(dtabuff); /* * break the line into the command and its args * be cute about it, if there is no '.' in the filename, try * to find .prg, .tos or .ttp in that order * in any case check to see that the file exists before we run * amok */ STenv[0] ='\0'; STwork[0]='\0'; if((tptr = index(&line[0],' ')) == NULL) { /* no args */ strcpy(STcmd,line); STargs[0]='\0'; } else { /* seperate out the args from the command */ /* resist the temptation to do ptr arithmetic */ for(i = 0,sptr = &line[0]; sptr != tptr; sptr++,i++) STcmd[i] = *sptr; STcmd[i] = '\0'; for(; *tptr == ' ' || *tptr == '\t'; tptr++); if(*tptr == '\0') STargs[0] = '\0'; else { /* first byte of STargs is the length of the string */ STargs[0] = strlen(tptr); STargs[1] = '\0'; /* fake it for strcat */ strcat(STargs,tptr); } } /* * before we issue the command look for the '.', if it's not there * try adding .prg, .tos and .ttp to see if they exist, if not * issue the command as is */ if((tptr = index(STcmd,'.')) == NULL) { strcpy(STwork,STcmd); strcat(STwork,".prg"); tptr = index(STwork,'.'); if(Fsfirst(STwork,1) != 0) { /* try .tos */ strcpy(tptr,".tos"); if(Fsfirst(STwork,1) != 0) { /* try .ttp */ strcpy(tptr,".ttp"); if(Fsfirst(STwork,1) != 0) /* never mind */ *STwork = NULL; } } } if(*STwork != NULL) Pexec(LOAD_EXEC,STwork,STargs,STenv); else Pexec(LOAD_EXEC,STcmd,STargs,STenv); mlputs("\r\n\n[End]"); /* Pause. */ TTgetc(); /* Pause. */ sgarbf = TRUE; return (TRUE); #endif It should be possible to add a Pexec(0,"COMMAND.PRG","\0",0L) to spawncli() to run a CLI program ,depending on the name and directory path of your CLI. The spawn() function will do this e.g. give the command: ^X! A:\AUTO\COMMAND.PRG. David Dermott DREA Dartmouth NS -------