Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergej Pupykin <ps@lx-ltd.ru>2007-07-10 23:36:15 -0400
committerDan McGee <dan@archlinux.org>2007-07-10 23:36:15 -0400
commit1646fcc5bdb71dc4d27204de88da952d95d5902c (patch)
treec72dd8191612fb0258d58dc160599b5159aa56bc /src
parent64e45a36f868ca0386393d6b6cf05ffff09b5439 (diff)
Use mbstowcs instead of strlen where applicable
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pacman/util.c b/src/pacman/util.c
index a0829e64..80a191d9 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -167,7 +167,7 @@ void indentprint(const char *str, int indent)
if(p == NULL || *p == ' ') continue;
next = strchr(p, ' ');
if(next == NULL) {
- next = p + strlen(p);
+ next = p + mbstowcs(NULL, p, 0);
}
len = next - p;
if(len > (getcols() - cidx - 1)) {
@@ -283,13 +283,13 @@ void list_display(const char *title, const alpm_list_t *list)
const alpm_list_t *i;
int cols, len;
- len = strlen(title);
+ len = mbstowcs(NULL, title, 0);
printf("%s ", title);
if(list) {
for(i = list, cols = len; i; i = alpm_list_next(i)) {
char *str = alpm_list_getdata(i);
- int s = strlen(str) + 2;
+ int s = mbstowcs(NULL, str, 0) + 2;
int maxcols = getcols();
if(s + cols >= maxcols) {
int i;