qemacs-commit
[Top][All Lists]
Advanced

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

[Qemacs-commit] qemacs hex.c unihex.c buffer.c


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs hex.c unihex.c buffer.c
Date: Thu, 20 Dec 2007 20:39:19 +0000

CVSROOT:        /cvsroot/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        07/12/20 20:39:19

Modified files:
        .              : hex.c unihex.c buffer.c 

Log message:
        comments

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/hex.c?cvsroot=qemacs&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/qemacs/unihex.c?cvsroot=qemacs&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/qemacs/buffer.c?cvsroot=qemacs&r1=1.22&r2=1.23

Patches:
Index: hex.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/hex.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- hex.c       18 Dec 2007 12:17:10 -0000      1.12
+++ hex.c       20 Dec 2007 20:39:18 -0000      1.13
@@ -151,7 +151,7 @@
     s->disp_width &= ~15;
     if (s->disp_width < 16)
        s->disp_width = 16;
-    //s->insert = 1;
+    //s->insert = 0;
     s->hex_mode = 0;
     s->wrap = WRAP_TRUNCATE;
     return 0;
@@ -169,7 +169,7 @@
     s->hex_mode = 1;
     s->unihex_mode = 0;
     s->hex_nibble = 0;
-    //s->insert = 1;
+    //s->insert = 0;
     s->wrap = WRAP_TRUNCATE;
     return 0;
 }

Index: unihex.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/unihex.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- unihex.c    18 Dec 2007 12:18:02 -0000      1.7
+++ unihex.c    20 Dec 2007 20:39:18 -0000      1.8
@@ -32,7 +32,7 @@
     s->hex_mode = 1;
     s->unihex_mode = 1;
     s->hex_nibble = 0;
-    //s->insert = 1;
+    //s->insert = 0;
     s->wrap = WRAP_TRUNCATE;
     return 0;
 }
@@ -40,6 +40,7 @@
 static int unihex_backward_offset(EditState *s, int offset)
 {
     int pos;
+
     pos = eb_get_char_offset(s->b, offset);
     pos = align(pos, s->disp_width);
     return eb_goto_char(s->b, pos);

Index: buffer.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/buffer.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- buffer.c    20 Dec 2007 16:27:21 -0000      1.22
+++ buffer.c    20 Dec 2007 20:39:18 -0000      1.23
@@ -663,8 +663,7 @@
 /************************************************************/
 /* callbacks */
 
-int eb_add_callback(EditBuffer *b, EditBufferCallback cb,
-                    void *opaque)
+int eb_add_callback(EditBuffer *b, EditBufferCallback cb, void *opaque)
 {
     EditBufferCallbackList *l;
 
@@ -678,8 +677,7 @@
     return 0;
 }
 
-void eb_free_callback(EditBuffer *b, EditBufferCallback cb,
-                      void *opaque)
+void eb_free_callback(EditBuffer *b, EditBufferCallback cb, void *opaque)
 {
     EditBufferCallbackList **pl, *l;
     
@@ -1169,6 +1167,12 @@
             p++;
         }
         pos += get_chars(p->data, offset, b->charset);
+        /* Should adjust if offset falls in the middle of a character */
+        // {
+        //    int c = p->data[offset];
+        //    if (c >= 0x80 && c < 0xc0)
+        //        pos--;
+        //}
     the_end: ;
     }
     return pos;




reply via email to

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