Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ames!mailrus!cornell!uw-beaver!ssc-vax!uvicctr!tholm
From: tholm@uvicctr.UUCP (Terrence W. Holm)
Newsgroups: comp.os.minix
Subject: "%r" for tgoto(3)
Message-ID: <505@uvicctr.UUCP>
Date: 20 Sep 88 21:25:24 GMT
Reply-To: tholm@uvicctr.UUCP (Terrence W. Holm)
Organization: University of Victoria, Victoria B.C. Canada
Lines: 43

EFTH MINIX report #46  - September 1988 -  "%r" for tgoto(3)


The following fix to V1.3 termcap(3) adds the "%r" format
option to tgoto(3).
[Now uemacs works on all our terminals.]

----------------------------------------------------------
15a16
>     - Added %r to reverse row/column			 [tgoto]
26d26
< int		incr;		/* set by %i flag */
236c236
< 	int		*dp = &destcol;
---
> 	int		incr = 0;
244,247c244,246
< 				if (dp == NULL)
< 					return("OOPS");
< 				*rp++ = *dp + *++cm;
< 				dp = (dp == &destcol) ? &destline : NULL;
---
> 				numval = (argno == 0 ? destline : destcol);
> 				argno = 1 - argno;
> 				*rp++ = numval + incr + *++cm;
255d253
< 
262c260
< 				argno++;
---
> 				argno = 1 - argno;
265a264,267
> 
> 			case 'r' :
> 				argno = 1;
> 				break;

----------------------------------------------------------

		Edwin L. Froese
		  uw-beaver!ubc-cs!mprg!handel!froese

		Terrence W. Holm
		  uw-beaver!uvicctr!tholm