qemacs-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemacs-commit] qemacs buffer.c hex.c qe.h x11.c


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs buffer.c hex.c qe.h x11.c
Date: Tue, 25 Mar 2008 10:13:38 +0000

CVSROOT:        /cvsroot/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        08/03/25 10:13:38

Modified files:
        .              : buffer.c hex.c qe.h x11.c 

Log message:
        added buffer variable EditBuffer::tab_size
        added buffer variable EditBuffer::offset
        added more tests for CONFIG_XV
        added test on GCC version for forward reference on hex_mode

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/buffer.c?cvsroot=qemacs&r1=1.34&r2=1.35
http://cvs.savannah.gnu.org/viewcvs/qemacs/hex.c?cvsroot=qemacs&r1=1.23&r2=1.24
http://cvs.savannah.gnu.org/viewcvs/qemacs/qe.h?cvsroot=qemacs&r1=1.65&r2=1.66
http://cvs.savannah.gnu.org/viewcvs/qemacs/x11.c?cvsroot=qemacs&r1=1.24&r2=1.25

Patches:
Index: buffer.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/buffer.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -b -r1.34 -r1.35
--- buffer.c    9 Jan 2008 13:41:40 -0000       1.34
+++ buffer.c    25 Mar 2008 10:13:37 -0000      1.35
@@ -472,6 +472,9 @@
     /* XXX: suppress save_log and always use flag ? */
     b->save_log = ((flags & BF_SAVELOG) != 0);
 
+    /* initialize default mode stuff */
+    b->tab_size = 8;    /* CG: not finished */
+
     /* add buffer in global buffer list (at end for system buffers) */
     pb = &qs->first_buffer;
     if (*b->name == '*') {
@@ -486,6 +489,7 @@
 
     /* add mark move callback */
     eb_add_callback(b, eb_offset_callback, &b->mark);
+    eb_add_callback(b, eb_offset_callback, &b->offset);
 
     if (strequal(name, "*trace*"))
         qs->trace_buffer = b;
@@ -714,6 +718,10 @@
     case LOGOP_INSERT:
         if (*offset_ptr > offset)
             *offset_ptr += size;
+        /* special case for buffer's own point position:
+         * edge position is pushed right */
+        if (*offset_ptr == offset && offset_ptr == &b->offset)
+            *offset_ptr += size;
         break;
     case LOGOP_DELETE:
         if (*offset_ptr > offset) {

Index: hex.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/hex.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- hex.c       24 Jan 2008 14:05:03 -0000      1.23
+++ hex.c       25 Mar 2008 10:13:37 -0000      1.24
@@ -21,7 +21,12 @@
 
 #include "qe.h"
 
+/* CG: should get rid of this forward reference */
+#if defined(__GNUC__) && (__GNUC__ >= 4)
+static ModeDef hex_mode;
+#else
 extern ModeDef hex_mode;
+#endif
 
 static int to_disp(int c)
 {

Index: qe.h
===================================================================
RCS file: /cvsroot/qemacs/qemacs/qe.h,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -b -r1.65 -r1.66
--- qe.h        24 Jan 2008 14:05:04 -0000      1.65
+++ qe.h        25 Mar 2008 10:13:37 -0000      1.66
@@ -730,6 +730,7 @@
 
     /* default mode stuff when buffer is detached from window */
     int offset;         /* used in eval.c */
+    int tab_size;
 
     EditBuffer *next; /* next editbuffer in qe_state buffer list */
     char name[MAX_BUFFERNAME_SIZE];     /* buffer name */

Index: x11.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/x11.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- x11.c       11 Jan 2008 11:29:29 -0000      1.24
+++ x11.c       25 Mar 2008 10:13:38 -0000      1.25
@@ -46,7 +46,9 @@
 
 static QEFont *term_open_font(QEditScreen *s, int style, int size);
 static void term_close_font(QEditScreen *s, QEFont *font);
+#ifdef CONFIG_XV
 static void xv_init(QEditScreen *s);
+#endif
 static void x11_handle_event(void *opaque);
 
 //static struct X11State {
@@ -1384,8 +1386,10 @@
     BMP_PIXMAP,
     BMP_XIMAGE,
     BMP_XSHMIMAGE,
+#ifdef CONFIG_XV
     BMP_XVIMAGE,
     BMP_XVSHMIMAGE,
+#endif
 };
 
 typedef struct X11Bitmap {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]