qemacs-commit
[Top][All Lists]
Advanced

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

[Qemacs-commit] qemacs qe.c unicode_join.c win32.c x11.c


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs qe.c unicode_join.c win32.c x11.c
Date: Wed, 12 Dec 2007 08:51:03 +0000

CVSROOT:        /cvsroot/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        07/12/12 08:51:02

Modified files:
        .              : qe.c unicode_join.c win32.c x11.c 

Log message:
        cosmetics

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/qe.c?cvsroot=qemacs&r1=1.39&r2=1.40
http://cvs.savannah.gnu.org/viewcvs/qemacs/unicode_join.c?cvsroot=qemacs&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/qemacs/win32.c?cvsroot=qemacs&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/qemacs/x11.c?cvsroot=qemacs&r1=1.13&r2=1.14

Patches:
Index: qe.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/qe.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- qe.c        12 Dec 2007 02:51:05 -0000      1.39
+++ qe.c        12 Dec 2007 08:51:02 -0000      1.40
@@ -6600,6 +6600,7 @@
 ModeSavedData *generic_mode_save_data(EditState *s)
 {
     ModeSavedData *saved_data;
+
     saved_data = malloc(sizeof(ModeSavedData));
     if (!saved_data)
         return NULL;

Index: unicode_join.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/unicode_join.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- unicode_join.c      6 Dec 2007 17:43:48 -0000       1.6
+++ unicode_join.c      12 Dec 2007 08:51:02 -0000      1.7
@@ -28,8 +28,8 @@
 static unsigned short *ligature2;
 static unsigned short *ligature_long;
 
-static int subst1_count = 0;
-static int ligature2_count = 0;
+static int subst1_count;
+static int ligature2_count;
 
 /* XXX: eof ? */
 static int uni_get_be16(FILE *f)
@@ -58,7 +58,7 @@
 {
     FILE *f;
     char filename[MAX_FILENAME_SIZE];
-    unsigned char buf[1024];
+    unsigned char sig[4];
     int long_count;
 
     if (find_resource_file(filename, sizeof(filename), "ligatures") < 0)
@@ -67,8 +67,7 @@
     f = fopen(filename, "r");
     if (!f)
         return;
-    if (fread(buf, 1, 4, f) != 4 ||
-        memcmp(buf, "liga", 4) != 0) 
+    if (fread(sig, 1, 4, f) != 4 || memcmp(sig, "liga", 4) != 0)
         goto fail;
 
     subst1_count = uni_get_be16(f);
@@ -90,6 +89,9 @@
     free(subst1);
     free(ligature2);
     free(ligature_long);
+    subst1 = NULL;
+    ligature2 = NULL;
+    ligature_long = NULL;
     subst1_count = 0;
     ligature2_count = 0;
     fclose(f);
@@ -107,7 +109,8 @@
         v2 = ligature2[3 * m + 1];
         if (v1 == l1 && v2 == l2)
             return ligature2[3 * m + 2];
-        else if (v1 > l1 || (v1 == l1 && v2 > l2)) {
+        else
+        if (v1 > l1 || (v1 == l1 && v2 > l2)) {
             b = m - 1;
         } else {
             a = m + 1;
@@ -155,7 +158,7 @@
             *q++ = l;
             i += 2;
         } else {
-            /* generic case : use ligature_long[] table */
+            /* generic case: use ligature_long[] table */
             lig = ligature_long;
             for (;;) {
                 len1 = *lig++;
@@ -231,7 +234,7 @@
         str[i] = fribidi_get_mirror_char(str[len - 1 - i]);
         str[len - 1 - i] = fribidi_get_mirror_char(tmp);
     }
-    /* do not forget central char ! */
+    /* do not forget central char! */
     if (len & 1) {
         str[len2] = fribidi_get_mirror_char(str[len2]);
     }
@@ -255,7 +258,7 @@
 
     unicode_class = unicode_classify(src, src_size);
     if (unicode_class == 0 && !reverse) {
-        /* fast case : no special treatment */
+        /* fast case: no special treatment */
         len = src_size;
         if (len > dst_size)
             len = dst_size;

Index: win32.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/win32.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- win32.c     10 Dec 2007 13:28:08 -0000      1.6
+++ win32.c     12 Dec 2007 08:51:02 -0000      1.7
@@ -64,6 +64,7 @@
    _hPrev = hPrevInst;
    _hInstance = hInstance;
 
+   /* simplistic command line parser */
    p = command_line;
    count = 0;
    for (;;) {
@@ -75,7 +76,7 @@
       count++;
    }
 
-   argv = (char **)malloc( (count + 1) * sizeof(char *) );
+   argv = (char **)malloc((count + 1) * sizeof(char *));
    if (!argv)
        return 0;
    

Index: x11.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/x11.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- x11.c       12 Dec 2007 02:21:45 -0000      1.13
+++ x11.c       12 Dec 2007 08:51:02 -0000      1.14
@@ -532,7 +532,6 @@
     if (!font)
         return NULL;
 
-
     switch (style & QE_FAMILY_MASK) {
     default:
     case QE_FAMILY_FIXED:
@@ -1464,9 +1463,9 @@
             
             /* XXX: error testing */
             shm_info = malloc(sizeof(XShmSegmentInfo));
-            ximage=XShmCreateImage(display, None, attr.depth, ZPixmap, NULL,
+            ximage = XShmCreateImage(display, None, attr.depth, ZPixmap, NULL,
                                    shm_info, b->width, b->height);
-            shm_info->shmid=shmget(IPC_PRIVATE,
+            shm_info->shmid = shmget(IPC_PRIVATE,
                                    b->height * ximage->bytes_per_line,
                                    IPC_CREAT | 0777);
             ximage->data = shmat(shm_info->shmid, 0, 0);




reply via email to

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