-
Notifications
You must be signed in to change notification settings - Fork 0
/
0005-Fix-sidebar-compilation-errors-on-IRIX-systems.patch
77 lines (71 loc) · 2.86 KB
/
0005-Fix-sidebar-compilation-errors-on-IRIX-systems.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
From c355d27c1ec39e4be10fd35851e7a73659e95803 Mon Sep 17 00:00:00 2001
From: Heiko Schlichting <[email protected]>
Date: Sat, 5 Feb 2011 18:31:40 +0100
Subject: [PATCH 05/19] Fix sidebar compilation errors on IRIX systems
This fixes two small issues that make the sidebar patch fail to compile
on IRIX systems. Also, it changes C++-style comment signs to regular C
style ones.
Signed-off-by: Julius Plenz <[email protected]>
---
init.h | 2 +-
sidebar.c | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/init.h b/init.h
index 4d58f7f..4c81e41 100644
--- a/init.h
+++ b/init.h
@@ -1953,7 +1953,7 @@ struct option_t MuttVars[] = {
** not used.
** (PGP only)
*/
- {"sidebar_delim", DT_STR, R_BOTH, UL &SidebarDelim, "|"},
+ {"sidebar_delim", DT_STR, R_BOTH, UL &SidebarDelim, UL "|"},
/*
** .pp
** This specifies the delimiter between the sidebar (if visible) and
diff --git a/sidebar.c b/sidebar.c
index 893f69e..1e903ef 100644
--- a/sidebar.c
+++ b/sidebar.c
@@ -199,7 +199,7 @@ int draw_sidebar(int menu) {
}
-// if ( SidebarWidth == 0 ) return 0;
+ /* if ( SidebarWidth == 0 ) return 0; */
if (SidebarWidth > 0 && option (OPTSIDEBAR)
&& delim_len >= SidebarWidth) {
unset_option (OPTSIDEBAR);
@@ -273,15 +273,15 @@ int draw_sidebar(int menu) {
tmp->msgcount = Context->msgcount;
tmp->msg_flagged = Context->flagged;
}
- // check whether Maildir is a prefix of the current folder's path
+ /* check whether Maildir is a prefix of the current folder's path */
short maildir_is_prefix = 0;
if ( (strlen(tmp->path) > strlen(Maildir)) &&
(strncmp(Maildir, tmp->path, strlen(Maildir)) == 0) )
maildir_is_prefix = 1;
- // calculate depth of current folder and generate its display name with indented spaces
+ /* calculate depth of current folder and generate its display name with indented spaces */
int sidebar_folder_depth = 0;
char *sidebar_folder_name;
- sidebar_folder_name = basename(tmp->path);
+ sidebar_folder_name = mutt_basename(tmp->path);
if ( maildir_is_prefix ) {
char *tmp_folder_name;
int i;
@@ -299,11 +299,11 @@ int draw_sidebar(int menu) {
}
else
tmp_folder_name = tmp->path;
- sidebar_folder_name = malloc(strlen(basename(tmp_folder_name)) + sidebar_folder_depth + 1);
+ sidebar_folder_name = malloc(strlen(mutt_basename(tmp_folder_name)) + sidebar_folder_depth + 1);
for (i=0; i < sidebar_folder_depth; i++)
sidebar_folder_name[i]=' ';
sidebar_folder_name[i]=0;
- strncat(sidebar_folder_name, basename(tmp_folder_name), strlen(basename(tmp_folder_name)) + sidebar_folder_depth);
+ strncat(sidebar_folder_name, mutt_basename(tmp_folder_name), strlen(mutt_basename(tmp_folder_name)) + sidebar_folder_depth);
}
}
printw( "%.*s", SidebarWidth - delim_len + 1,
--
1.7.7.3