Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!ucla-cs!sdcrdcf!hplabs!decwrl!decvax!tektronix!uw-beaver!ubc-vision!alberta!sask!hardie From: hardie@sask.UUCP Newsgroups: comp.sys.amiga Subject: More fixes for DBW's vc Message-ID: <584@sask.UUCP> Date: Thu, 22-Jan-87 14:09:57 EST Article-I.D.: sask.584 Posted: Thu Jan 22 14:09:57 1987 Date-Received: Fri, 30-Jan-87 04:20:20 EST Organization: University of Saskatchewan Lines: 41 Dave beat me to it. I was also working on porting the vc program to the amiga. His looks nicer but contains three bugs that I had already uncovered. The E command bombs if there is no string to be edited and the W and T commands can't open the file that you specify. The fixes are easy and follow: In 'edits' add the two lines marked with /**/ as shown: The problem is that if there is no string to edit then the sprintf prints a string from address 0 which generates garbage. edits (row, col) { register struct ent *p = lookat (row, col); sprintf (line, "%sstring %s%d = \"", ((p->flags&is_leftflush) ? "left" : "right"), coltoa(col), row); linelim = strlen(line); /**/ if(p->label) { sprintf (line+linelim, "%s", p->label); linelim += strlen (line+linelim); /**/ } } In both the printfile and tblprintfile routines add the char *fname declaration otherwise fname defaults to the wrong type. printfile (fname) char *fname; { tblprintfile (fname) char *fname; { A previous article on vc said that the earlier version I ported (that is on Fish disk 35) bombed when run with popcli etc. I am not sure why it happens but it does not occur with Dave's version so use his! Pete Hardie ihnp4!sask!hardie