projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rocco Rutte:
[apps/madmutt.git]
/
sidebar.c
diff --git
a/sidebar.c
b/sidebar.c
index
0f6c660
..
4326d22
100644
(file)
--- a/
sidebar.c
+++ b/
sidebar.c
@@
-85,7
+85,7
@@
static char *shortened_hierarchy (char *box)
int i, j;
char *new_box;
int i, j;
char *new_box;
- for (i = 0; i < strlen (box); ++i) {
+ for (i = 0; i <
mutt_
strlen (box); ++i) {
if (box[i] == '.')
++dots;
else if (isupper (box[i]))
if (box[i] == '.')
++dots;
else if (isupper (box[i]))
@@
-94,9
+94,9
@@
static char *shortened_hierarchy (char *box)
last_dot = strrchr (box, '.');
if (last_dot) {
++last_dot;
last_dot = strrchr (box, '.');
if (last_dot) {
++last_dot;
- new_box = safe_malloc (strlen (last_dot) + 2 * dots + 1);
+ new_box = safe_malloc (
mutt_
strlen (last_dot) + 2 * dots + 1);
new_box[0] = box[0];
new_box[0] = box[0];
- for (i = 1, j = 1; i < strlen (box); ++i) {
+ for (i = 1, j = 1; i <
mutt_
strlen (box); ++i) {
if (box[i] == '.') {
new_box[j++] = '.';
new_box[j] = 0;
if (box[i] == '.') {
new_box[j++] = '.';
new_box[j] = 0;
@@
-130,10
+130,10
@@
char *make_sidebar_entry (char *box, int size, int new, int flagged)
entry[SidebarWidth] = 0;
for (; i < SidebarWidth; entry[i++] = ' ');
#if USE_IMAP
entry[SidebarWidth] = 0;
for (; i < SidebarWidth; entry[i++] = ' ');
#if USE_IMAP
- if (ImapHomeNamespace && strlen (ImapHomeNamespace) > 0) {
- if (strncmp (box, ImapHomeNamespace, strlen (ImapHomeNamespace)) == 0
+ if (ImapHomeNamespace &&
mutt_
strlen (ImapHomeNamespace) > 0) {
+ if (strncmp (box, ImapHomeNamespace,
mutt_
strlen (ImapHomeNamespace)) == 0
&& strcmp (box, ImapHomeNamespace) != 0) {
&& strcmp (box, ImapHomeNamespace) != 0) {
- box += strlen (ImapHomeNamespace) + 1;
+ box +=
mutt_
strlen (ImapHomeNamespace) + 1;
}
}
#endif
}
}
#endif
@@
-146,7
+146,7
@@
char *make_sidebar_entry (char *box, int size, int new, int flagged)
box = shortened_hierarchy (box);
shortened = 1;
}
box = shortened_hierarchy (box);
shortened = 1;
}
- i = strlen (box);
+ i =
mutt_
strlen (box);
strncpy (entry, box, i < SidebarWidth - dlen ? i : SidebarWidth - dlen);
if (new) {
strncpy (entry, box, i < SidebarWidth - dlen ? i : SidebarWidth - dlen);
if (new) {
@@
-200,7
+200,7
@@
void set_curbuffy (char buf[LONG_STRING])
return;
while (1) {
return;
while (1) {
- if (!strcmp (tmp->path, buf)) {
+ if (!
mutt_
strcmp (tmp->path, buf)) {
CurBuffy = tmp;
break;
}
CurBuffy = tmp;
break;
}
@@
-219,7
+219,7
@@
void set_buffystats (CONTEXT * Context)
if (!Context)
return;
while (tmp) {
if (!Context)
return;
while (tmp) {
- if (strcmp (tmp->path, Context->path) == 0) {
+ if (
mutt_
strcmp (tmp->path, Context->path) == 0) {
tmp->new = Context->new;
tmp->msg_unread = Context->unread;
tmp->msgcount = Context->msgcount;
tmp->new = Context->new;
tmp->msg_unread = Context->unread;
tmp->msgcount = Context->msgcount;
@@
-280,9
+280,9
@@
int draw_sidebar (int menu)
move (lines, SidebarWidth - delim_len);
if (option (OPTASCIICHARS))
addstr (NONULL (SidebarDelim));
move (lines, SidebarWidth - delim_len);
if (option (OPTASCIICHARS))
addstr (NONULL (SidebarDelim));
- else if (!option (OPTASCIICHARS) && !strcmp (SidebarDelim, "|"))
+ else if (!option (OPTASCIICHARS) && !
mutt_
strcmp (SidebarDelim, "|"))
addch (ACS_VLINE);
addch (ACS_VLINE);
- else if ((Charset_is_utf8) && !strcmp (SidebarDelim, "|"))
+ else if ((Charset_is_utf8) && !
mutt_
strcmp (SidebarDelim, "|"))
addstr ("\342\224\202");
else
addstr (NONULL (SidebarDelim));
addstr ("\342\224\202");
else
addstr (NONULL (SidebarDelim));
@@
-318,7
+318,7
@@
int draw_sidebar (int menu)
move (lines, 0);
if (option (OPTSIDEBARNEWMAILONLY)) {
if (tmp->msg_unread > 0) {
move (lines, 0);
if (option (OPTSIDEBARNEWMAILONLY)) {
if (tmp->msg_unread > 0) {
- if (Context && !strcmp (tmp->path, Context->path)) {
+ if (Context && !
mutt_
strcmp (tmp->path, Context->path)) {
printw ("%.*s", SidebarWidth - delim_len,
make_sidebar_entry (basename (tmp->path),
Context->msgcount, Context->unread,
printw ("%.*s", SidebarWidth - delim_len,
make_sidebar_entry (basename (tmp->path),
Context->msgcount, Context->unread,