[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemacs-commit] qemacs buffer.c hex.c qe.h tty.c
From: |
Charlie Gordon |
Subject: |
[Qemacs-commit] qemacs buffer.c hex.c qe.h tty.c |
Date: |
Wed, 26 Dec 2007 11:09:34 +0000 |
CVSROOT: /cvsroot/qemacs
Module name: qemacs
Changes by: Charlie Gordon <chqrlie> 07/12/26 11:09:34
Modified files:
. : buffer.c hex.c qe.h tty.c
Log message:
cosmetics, comments
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/buffer.c?cvsroot=qemacs&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/qemacs/hex.c?cvsroot=qemacs&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/qemacs/qe.h?cvsroot=qemacs&r1=1.50&r2=1.51
http://cvs.savannah.gnu.org/viewcvs/qemacs/tty.c?cvsroot=qemacs&r1=1.32&r2=1.33
Patches:
Index: buffer.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/buffer.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- buffer.c 26 Dec 2007 09:49:52 -0000 1.26
+++ buffer.c 26 Dec 2007 11:09:34 -0000 1.27
@@ -1453,13 +1453,11 @@
/* Associate a buffer with a file and rename it to match the
filename. Find a unique buffer name */
+// should rename to eb_set_filename?
void set_filename(EditBuffer *b, const char *filename)
{
- const char *p;
-
pstrcpy(b->filename, sizeof(b->filename), filename);
- p = basename(filename);
- set_buffer_name(b, p);
+ set_buffer_name(b, basename(filename));
}
int eb_printf(EditBuffer *b, const char *fmt, ...)
Index: hex.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/hex.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- hex.c 20 Dec 2007 20:39:18 -0000 1.13
+++ hex.c 26 Dec 2007 11:09:34 -0000 1.14
@@ -268,13 +268,16 @@
len = 1;
buf[0] = ch;
}
-
+#if 1
+ eb_replace(s->b, s->offset, cur_len, buf, len);
+#else
if (cur_len == len) {
eb_write(s->b, s->offset, buf, len);
} else {
eb_delete(s->b, s->offset, cur_len);
eb_insert(s->b, s->offset, buf, len);
}
+#endif
}
if (++s->hex_nibble == hsize) {
s->hex_nibble = 0;
Index: qe.h
===================================================================
RCS file: /cvsroot/qemacs/qemacs/qe.h,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -b -r1.50 -r1.51
--- qe.h 26 Dec 2007 10:20:09 -0000 1.50
+++ qe.h 26 Dec 2007 11:09:34 -0000 1.51
@@ -944,7 +944,7 @@
int width, height;
int ytop, xleft;
/* full window size, including borders */
- int x1, y1, x2, y2;
+ int x1, y1, x2, y2; /* window coordinates in device units */
int flags; /* display flags */
#define WF_POPUP 0x0001 /* popup window (with borders) */
Index: tty.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/tty.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- tty.c 24 Dec 2007 10:22:22 -0000 1.32
+++ tty.c 26 Dec 2007 11:09:34 -0000 1.33
@@ -651,9 +651,7 @@
int fgcolor, w, n;
unsigned int cc;
- if (y < s->clip_y1 ||
- y >= s->clip_y2 ||
- x >= s->clip_x2)
+ if (y < s->clip_y1 || y >= s->clip_y2 || x >= s->clip_x2)
return;
ts->line_updated[y] = 1;
@@ -768,7 +766,6 @@
TTY_FPRINTF(s->STDOUT, "\033[%dm",
(fgcolor > 7) ? 1 : 22);
TTY_FPRINTF(s->STDOUT, "\033[%d;%dm",
- //(fgcolor > 7) ? 1 : 22,
30 + (fgcolor & 7), 40 + bgcolor);
}
/* do not display escape codes or invalid codes */
@@ -802,6 +799,20 @@
TTY_FPUTS("\033(B", s->STDOUT);
shifted = 0;
}
+ //if (s->charset == CHARSET_LATIN1) {
+ // if (cc < 256) {
+ // buf[0] = cc;
+ // buf[1] = '\0';
+ // } else {
+ // buf[0] = 0xBF; /* upside down question */
+ // buf[1] = '\0';
+ // if (tty_term_glyph_width(s, NULL, cc) == 2) {
+ // buf[1] = '?';
+ // buf[2] = '\0';
+ // }
+ // }
+ //} else
+ {
nc = unicode_to_charset(buf, cc, s->charset);
if (nc == 1) {
TTY_PUTC(*(u8 *)buf, s->STDOUT);
@@ -812,6 +823,7 @@
}
}
}
+ }
if (shifted) {
TTY_FPUTS("\033(B", s->STDOUT);
shifted = 0;
@@ -823,7 +835,6 @@
fflush(s->STDOUT);
}
-
static QEDisplay tty_dpy = {
"vt100",
tty_term_probe,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemacs-commit] qemacs buffer.c hex.c qe.h tty.c,
Charlie Gordon <=