Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pacman/pacman.c22
-rw-r--r--src/pacman/util.c22
-rw-r--r--src/pacman/util.h1
3 files changed, 23 insertions, 22 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 4c24d10b..3f4af22c 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -229,28 +229,6 @@ static void cleanup(int signum)
exit(signum);
}
-/** Parse the basename of a program from a path.
-* Grabbed from the uClibc source.
-* @param path path to parse basename from
-*
-* @return everything following the final '/'
-*/
-static char *mbasename(const char *path)
-{
- const char *s;
- const char *p;
-
- p = s = path;
-
- while (*s) {
- if (*s++ == '/') {
- p = s;
- }
- }
-
- return (char *)p;
-}
-
/** Parse command-line arguments for each operation.
* @param argc argc
* @param argv argv
diff --git a/src/pacman/util.c b/src/pacman/util.c
index 77773bf5..a925be36 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -167,6 +167,28 @@ int rmrf(const char *path)
}
}
+/** Parse the basename of a program from a path.
+* Grabbed from the uClibc source.
+* @param path path to parse basename from
+*
+* @return everything following the final '/'
+*/
+char *mbasename(const char *path)
+{
+ const char *s;
+ const char *p;
+
+ p = s = path;
+
+ while (*s) {
+ if (*s++ == '/') {
+ p = s;
+ }
+ }
+
+ return (char *)p;
+}
+
/* output a string, but wrap words properly with a specified indentation
*/
void indentprint(const char *str, int indent)
diff --git a/src/pacman/util.h b/src/pacman/util.h
index 931b456b..e46555e0 100644
--- a/src/pacman/util.h
+++ b/src/pacman/util.h
@@ -42,6 +42,7 @@ int needs_transaction();
int getcols();
int makepath(const char *path);
int rmrf(const char *path);
+char *mbasename(const char *path);
void indentprint(const char *str, int indent);
char *strtoupper(char *str);
char *strtrim(char *str);