[Commit] jove ChangeLog, NONE, 1.1 recover.c, 1.4, 1.5 screen.c, 1.3, 1.4 term.c, 1.6, 1.7

Keith Packard commit at keithp.com
Sat Dec 6 12:15:32 PST 2003


Committed by: keithp

Update of /local/src/CVS/jove
In directory home.keithp.com:/tmp/cvs-serv4775

Modified Files:
	recover.c screen.c term.c 
Added Files:
	ChangeLog 
Log Message:
	* recover.c:
	Don't try to close files twice.
	
	* screen.c: (cl_scr), (dosputc), (v_ins_line), (v_del_line),
	(Placur):
	* term.c:
	More conservative scroll region code.
	Eliminate use of M_AL/M_DL as they don't work on many 'xterm'
	emulators.


--- NEW FILE: ChangeLog ---
2003-12-06  Keith Packard  <keithp at keithp.com>

	* recover.c:
	Don't try to close files twice.
	
	* screen.c: (cl_scr), (dosputc), (v_ins_line), (v_del_line),
	(Placur):
	* term.c:
	More conservative scroll region code.
	Eliminate use of M_AL/M_DL as they don't work on many 'xterm'
	emulators.

Index: recover.c
===================================================================
RCS file: /local/src/CVS/jove/recover.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- recover.c	15 May 2003 00:01:07 -0000	1.4
+++ recover.c	6 Dec 2003 20:15:29 -0000	1.5
@@ -219,6 +219,7 @@
 
 	CurDir = dirname;
 	jove_scandir(dirname, &nmptr, add_name, (int (*)())0);
+	free (nmptr);
 }
 
 add_name(dp)
@@ -404,7 +405,7 @@
 struct rec_entry	**src;
 char	*dest;
 {
-	FILE	*outfile;
+	FILE	*outfile = 0;
 
 	if (src == 0 || dest == 0)
 		return;
@@ -419,7 +420,8 @@
 		dump_file(src - buflist, outfile);
 	} else
 		printf("\nAborted!\n");
-	fclose(outfile);
+	if (outfile)
+		fclose(outfile);
 	if (dest != tty)
 		printf(" %ld lines, %ld characters.\n", Nlines, Nchars);
 	(void) signal(SIGINT, SIG_DFL);
@@ -507,8 +509,6 @@
 		if (nlines > 0)
 			fputc('\n', out);
 	}
-	if (out != stdout)
-		fclose(out);
 }
 
 /* List all the buffers. */
@@ -739,4 +739,5 @@
 		nfound = lookup(TmpFilePath);
 	if (nfound == 0)
 		printf("There's nothing to recover.\n");
+	exit (0);
 }

Index: screen.c
===================================================================
RCS file: /local/src/CVS/jove/screen.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- screen.c	15 May 2003 00:01:07 -0000	1.3
+++ screen.c	6 Dec 2003 20:15:29 -0000	1.4
@@ -132,7 +132,7 @@
 		PhysScreen[i].s_id = 0;
 	}
 	if (doit) {
-		if (CS)
+		if (CS || BG)
 			reset_scroll ();
 		putpad(CL, LI);
 		CapCol = CapLine = 0;
@@ -156,8 +156,8 @@
 		if (i_col == CO - 1) {
 			if (i_line == LI - 1) 
 				goto dontPrint;
-			else if (CS && i_line == ScrollBot)
-				set_scroll (0, LI-1);
+			else if ((CS || BG) && i_line == ScrollBot)
+				reset_scroll ();
 		}
 		if (i_line != CapLine || i_col != CapCol)
 			Placur(i_line, i_col);
@@ -373,6 +373,7 @@
         				putpad (SR, bottom-top);
 			}
         	}
+		reset_scroll ();
 	} else {
 		Placur(bottom - num + 1, 0);
 		if (M_DL && (num > 1 || *DL == '\0')) {
@@ -433,6 +434,7 @@
 					putpad(SF,bottom-top);
 			}
 		}
+		reset_scroll ();
 	} else {
 		Placur(top, 0);
 		if (M_DL && (num > 1 || *DL == '\0')) {
@@ -700,7 +702,7 @@
 
 	/* ann arbor can't move out of scrolling region */
 	if ((XC || XM) && (line < ScrollTop || ScrollBot < line))
-		set_scroll (0, LI-1);
+		reset_scroll ();
 
 	dline = line - CapLine;
 	dcol = col - CapCol;

Index: term.c
===================================================================
RCS file: /local/src/CVS/jove/term.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- term.c	20 Nov 2003 04:29:04 -0000	1.6
+++ term.c	6 Dec 2003 20:15:29 -0000	1.7
@@ -186,6 +186,9 @@
 		*(meas[i]) = (char *) tgetstr(tst, &termp);
 		tst += 2;
 	}
+	/* don't work in many 'xterm' terminal emulators */
+	M_DL = 0;
+	M_AL = 0;
 	if (lPC)
 		PC = *lPC;
 	else




More information about the Commit mailing list