qemacs-commit
[Top][All Lists]
Advanced

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

[Qemacs-commit] qemacs/libqhtml css.c css.h cssparse.c csstoqe....


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs/libqhtml css.c css.h cssparse.c csstoqe....
Date: Sat, 09 Dec 2006 19:04:16 +0000

CVSROOT:        /cvsroot/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        06/12/09 19:04:16

Modified files:
        libqhtml       : css.c css.h cssparse.c csstoqe.c html.css 

Log message:
        fixed typos, added comments about potential problems

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/libqhtml/css.c?cvsroot=qemacs&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/qemacs/libqhtml/css.h?cvsroot=qemacs&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/qemacs/libqhtml/cssparse.c?cvsroot=qemacs&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/qemacs/libqhtml/csstoqe.c?cvsroot=qemacs&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/qemacs/libqhtml/html.css?cvsroot=qemacs&r1=1.1.1.1&r2=1.2

Patches:
Index: css.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/libqhtml/css.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- css.c       13 May 2005 10:05:24 -0000      1.5
+++ css.c       9 Dec 2006 19:04:15 -0000       1.6
@@ -211,6 +211,7 @@
         q = name;
         for (;;) {
             ch1 = eb_nextc(b, *offset_ptr, (int *)offset_ptr);
+           /* CG: should stop on all white space */
             if (ch1 == '\n' || ch1 == ';')
                 break;
             *q++ = ch1;
@@ -449,6 +450,7 @@
         if (def->storage == CSS_STORAGE_PTR) {
             *(void **)ptr = p;
         } else {
+            /* CG: factorize this ? */
             switch (p->value.type) {
             case CSS_VALUE_COLOR:
             case CSS_UNIT_NONE:

Index: css.h
===================================================================
RCS file: /cvsroot/qemacs/qemacs/libqhtml/css.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- css.h       8 Jul 2005 09:30:44 -0000       1.3
+++ css.h       9 Dec 2006 19:04:15 -0000       1.4
@@ -250,7 +250,7 @@
 #define CSS_UNIT_PT         8
 #define CSS_UNIT_PC         9
 
-/* additionnal values */
+/* additional values */
 #define CSS_VALUE_STRING     11
 #define CSS_VALUE_COUNTER    12
 #define CSS_VALUE_ATTR       13

Index: cssparse.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/libqhtml/cssparse.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- cssparse.c  8 Jul 2005 09:30:44 -0000       1.5
+++ cssparse.c  9 Dec 2006 19:04:15 -0000       1.6
@@ -67,11 +67,14 @@
     len = p - p1;
     if (len == 0)
         return -1;
+    /* CG: use pstrncpy */
     if (len > (int)sizeof(buf) - 1)
         len = (int)sizeof(buf) - 1;
     memcpy(buf, p1, len);
     buf[len] = '\0';
     f = strtod(buf, NULL);
+    /* CG: should use define or global for consistency with
+     * CSS_UNIT_xxx values */
     unit = css_get_enum(p, "px,%,ex,em,mm,in,cm,pt,pc");
     if (unit < 0) {
         /* only 0 is valid without unit */
@@ -89,6 +92,7 @@
             break;
         case CSS_UNIT_PERCENT:
             if (f < 0) {
+               /* CG: ain't wrong ? */
                 if (f >= 100)
                     return -1;
                 f = 100 - f;
@@ -1184,4 +1188,3 @@
     printf("</STYLE>\n");
 }
 #endif
-

Index: csstoqe.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/libqhtml/csstoqe.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- csstoqe.c   11 May 2005 15:12:14 -0000      1.2
+++ csstoqe.c   9 Dec 2006 19:04:15 -0000       1.3
@@ -27,7 +27,9 @@
             /* comments */
             if (c == '/') {
                 c = getchar();
+                /* CG: allow // comments ? */
                 if (c != '*') {
+                    /* CG: incorrect if n == 0, also n++ missing */
                     putchar('/');
                     goto redo;
                 }

Index: html.css
===================================================================
RCS file: /cvsroot/qemacs/qemacs/libqhtml/html.css,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -b -r1.1.1.1 -r1.2
--- html.css    29 May 2004 10:19:56 -0000      1.1.1.1
+++ html.css    9 Dec 2006 19:04:15 -0000       1.2
@@ -87,7 +87,7 @@
 col, colgroup, td, th, caption { unicode-bidi: embed } 
 /* End bidi settings */   
 
-/* additionnal special qemacs attributes */
+/* additional special qemacs attributes */
 body {
    color: black;
 }




reply via email to

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