]> git.pld-linux.org Git - packages/poldek.git/commitdiff
- tab-completion fix from cvs
authorJakub Bogusz <qboosh@pld-linux.org>
Wed, 30 Nov 2005 08:48:35 +0000 (08:48 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    poldek-completion.patch -> 1.1

poldek-completion.patch [new file with mode: 0644]

diff --git a/poldek-completion.patch b/poldek-completion.patch
new file mode 100644 (file)
index 0000000..1e48dcd
--- /dev/null
@@ -0,0 +1,52 @@
+===================================================================
+RCS file: /cvsroot/installer/poldek/cli/shell.c,v
+retrieving revision 1.27
+retrieving revision 1.28
+diff -u -r1.27 -r1.28
+--- installer/poldek/cli/shell.c       2005/11/06 19:26:27     1.27
++++ installer/poldek/cli/shell.c       2005/11/10 19:21:04     1.28
+@@ -11,7 +11,7 @@
+ */
+ /*
+-  $Id$
++  $Id$
+ */
+ #ifdef HAVE_CONFIG_H
+@@ -76,13 +76,13 @@
+     struct pkg *ipkg = NULL;
+     tn_array *dents;
+     char name[256];
+-    int n;
++    int n, name_len;
+     dents = poclidek_get_dent_ents(cctx, POCLIDEK_INSTALLEDDIR);
+     if (dents == NULL)
+         return 1;
+     
+-    snprintf(name, sizeof(name), "%s-", pkg->name);
++    name_len = snprintf(name, sizeof(name), "%s-", pkg->name);
+     n = n_array_bsearch_idx_ex(dents, name, (tn_fn_cmp)pkg_dent_strncmp);
+     if (n == -1)
+@@ -90,14 +90,15 @@
+     while (n < n_array_size(dents)) {
+         struct pkg_dent *ent = n_array_nth(dents, n++);
++
+         if (pkg_dent_isdir(ent))
+             continue;
++
++        if (strncmp(name, ent->name, name_len) != 0) 
++            break;
+         
+         ipkg = ent->pkg_dent_pkg;
+-        if (strcmp(pkg->name, ipkg->name) != 0)
+-            break;
+-
+-        if (pkg_cmp_evr(pkg, ipkg) > 0) 
++        if (strcmp(pkg->name, ipkg->name) == 0 && pkg_cmp_evr(pkg, ipkg) > 0)
+             return 1;
+         
+     }
This page took 0.035812 seconds and 4 git commands to generate.