qemacs-commit
[Top][All Lists]
Advanced

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

[Qemacs-commit] qemacs qe.c


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs qe.c
Date: Sat, 04 Jan 2014 17:35:12 +0000

CVSROOT:        /sources/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        14/01/04 17:35:12

Modified files:
        .              : qe.c 

Log message:
        fix do_goto for hex encoded offsets in chars and bytes

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/qe.c?cvsroot=qemacs&r1=1.107&r2=1.108

Patches:
Index: qe.c
===================================================================
RCS file: /sources/qemacs/qemacs/qe.c,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -b -r1.107 -r1.108
--- qe.c        4 Jan 2014 17:28:35 -0000       1.107
+++ qe.c        4 Jan 2014 17:35:12 -0000       1.108
@@ -1851,9 +1851,21 @@
     const char *p;
     int pos, line, col, rel;
 
+    /* Update s->offset from str specification:
+     * optional +- for relative moves
+     * distance in decimal, octal or hex
+     * optional space
+     * optional unit suffix:
+     *    b(bytes) c(chars) w(words) l(lines) %(percent)
+     *
+     * CG: XXX: resulting offset may fall inside a character.
+     */
     rel = (*str == '+' || *str == '-');
     pos = strtol(str, (char**)&p, 0);
 
+    /* skip space required to separate hex offset from b or c suffix */
+    if (*p == ' ')
+        p++;
     if (memchr("bcwl%", *p, 5))
         unit = *p++;
 



reply via email to

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