qemacs-commit
[Top][All Lists]
Advanced

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

[Qemacs-commit] qemacs input.c image.c


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs input.c image.c
Date: Mon, 11 Dec 2006 23:07:58 +0000

CVSROOT:        /cvsroot/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        06/12/11 23:07:58

Modified files:
        .              : input.c image.c 

Log message:
        simplified completion enumerators

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/input.c?cvsroot=qemacs&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/qemacs/image.c?cvsroot=qemacs&r1=1.7&r2=1.8

Patches:
Index: input.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/input.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- input.c     11 May 2005 15:48:31 -0000      1.4
+++ input.c     11 Dec 2006 23:07:58 -0000      1.5
@@ -236,11 +236,9 @@
 void input_completion(StringArray *cs, const char *input)
 {
     InputMethod *m;
-    int len;
 
-    len = strlen(input);
     for (m = input_methods; m != NULL; m = m->next) {
-        if (!strncmp(m->name, input, len))
+        if (strstart(m->name, input, NULL))
             add_string(cs, m->name);
     }
 }

Index: image.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/image.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- image.c     9 Dec 2006 19:02:07 -0000       1.7
+++ image.c     11 Dec 2006 23:07:58 -0000      1.8
@@ -789,15 +789,14 @@
                  ib->interleaved ? 'I' : ' ');
 }
 
-static void pixel_format_completion(StringArray *cs, const char *str)
+static void pixel_format_completion(StringArray *cs, const char *input)
 {
-    int len, i;
+    int i;
     const char *name;
     
-    len = strlen(str);
     for (i = 0; i < PIX_FMT_NB; i++) {
         name = avcodec_get_pix_fmt_name(i);
-        if (!strncmp(name, str, len))
+        if (strstart(name, input, NULL))
             add_string(cs, name);
     }
 }




reply via email to

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