Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-11-14 21:53:45 +0000
committerAaron Griffin <aaron@archlinux.org>2006-11-14 21:53:45 +0000
commit74e780f25df5642e19e6b8cc42ff1432fb7fe1b9 (patch)
tree75e9829ca028db36b50c382bbf3b599d99c4d505 /src
parent7d6161ccc33ce06566585fc56adf8e0ce2876658 (diff)
* has_archname additions
* additional newline for search output, as suggested on the forums
Diffstat (limited to 'src')
-rw-r--r--src/pacman/package.c8
-rw-r--r--src/pacman/sync.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/pacman/package.c b/src/pacman/package.c
index ade6f5dc..bb510838 100644
--- a/src/pacman/package.c
+++ b/src/pacman/package.c
@@ -222,11 +222,11 @@ int split_pkgname(char *target, char *name, char *version)
strncpy(tmp, p, 512);
/* trim file extension (if any) */
if((p = strstr(tmp, PM_EXT_PKG))) {
- *p = 0;
+ *p = '\0';
}
/* trim architecture */
- if((p = strrchr(tmp, '-'))) {
- *p = 0;
+ if((p = _alpm_pkgname_has_arch(tmp))) {
+ *p = '\0';
}
p = tmp + strlen(tmp);
@@ -240,7 +240,7 @@ int split_pkgname(char *target, char *name, char *version)
return(-1);
}
strncpy(version, p+1, 64);
- *p = 0;
+ *p = '\0';
strncpy(name, tmp, 256);
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 5c6c7ac5..c4932e89 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -214,7 +214,7 @@ static int sync_search(list_t *syncs, list_t *targets)
(char *)alpm_pkg_getinfo(pkg, PM_PKG_VERSION),
(group ? " (" : ""), (group ? group : ""), (group ? ") " : ""));
indentprint((char *)alpm_pkg_getinfo(pkg, PM_PKG_DESC), 4);
- printf("\n");
+ printf("\n\n");
}
alpm_list_free_outer(ret);
} else {