projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
more autoconf simplifications.
[apps/madmutt.git]
/
browser.c
diff --git
a/browser.c
b/browser.c
index
c6ee31b
..
12c41a9
100644
(file)
--- a/
browser.c
+++ b/
browser.c
@@
-11,6
+11,16
@@
# include "config.h"
#endif
# include "config.h"
#endif
+#include <stdlib.h>
+#include <dirent.h>
+#include <string.h>
+#include <ctype.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <pwd.h>
+#include <grp.h>
+
#include <lib-lib/mem.h>
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
#include <lib-lib/mem.h>
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
@@
-37,14
+47,6
@@
#include "lib/list.h"
#include "lib/list.h"
-#include <stdlib.h>
-#include <dirent.h>
-#include <string.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <sys/stat.h>
-#include <errno.h>
-
static struct mapping_t FolderHelp[] = {
{N_("Exit"), OP_EXIT},
{N_("Chdir"), OP_CHANGE_DIRECTORY},
static struct mapping_t FolderHelp[] = {
{N_("Exit"), OP_EXIT},
{N_("Chdir"), OP_CHANGE_DIRECTORY},
@@
-77,7
+79,7
@@
static char LastDirBackup[_POSIX_PATH_MAX] = "";
/* Frees up the memory allocated for the local-global variables. */
static void destroy_state (struct browser_state *state)
{
/* Frees up the memory allocated for the local-global variables. */
static void destroy_state (struct browser_state *state)
{
-
unsigned
int c;
+ int c;
for (c = 0; c < state->entrylen; c++) {
p_delete(&((state->entry)[c].name));
for (c = 0; c < state->entrylen; c++) {
p_delete(&((state->entry)[c].name));
@@
-160,7
+162,7
@@
static int link_is_dir (const char *folder, const char *path)
return 0;
}
return 0;
}
-static const char *folder_format_str (char *dest, size_t destlen, char op,
+static const char *folder_format_str (char *dest, s
s
ize_t destlen, char op,
const char *src, const char *fmt,
const char *ifstring,
const char *elsestring,
const char *src, const char *fmt,
const char *ifstring,
const char *elsestring,
@@
-324,7
+326,7
@@
static const char *folder_format_str (char *dest, size_t destlen, char op,
}
#ifdef USE_NNTP
}
#ifdef USE_NNTP
-static const char *newsgroup_format_str (char *dest, size_t destlen, char op,
+static const char *newsgroup_format_str (char *dest, s
s
ize_t destlen, char op,
const char *src, const char *fmt,
const char *ifstring,
const char *elsestring,
const char *src, const char *fmt,
const char *ifstring,
const char *elsestring,
@@
-653,7
+655,7
@@
static int select_file_search (MUTTMENU * menu, regex_t * re, int n)
(re, ((struct folder_file *) menu->data)[n].name, 0, NULL, 0));
}
(re, ((struct folder_file *) menu->data)[n].name, 0, NULL, 0));
}
-static void folder_entry (char *s, size_t slen, MUTTMENU * menu, int num)
+static void folder_entry (char *s, s
s
ize_t slen, MUTTMENU * menu, int num)
{
FOLDER folder;
{
FOLDER folder;
@@
-671,7
+673,7
@@
static void folder_entry (char *s, size_t slen, MUTTMENU * menu, int num)
}
static void init_menu (struct browser_state *state, MUTTMENU * menu,
}
static void init_menu (struct browser_state *state, MUTTMENU * menu,
- char *title, size_t titlelen, int buffy)
+ char *title, s
s
ize_t titlelen, int buffy)
{
char path[_POSIX_PATH_MAX];
{
char path[_POSIX_PATH_MAX];
@@
-729,7
+731,7
@@
static int file_tag (MUTTMENU * menu, int n, int m)
return ff->tagged - ot;
}
return ff->tagged - ot;
}
-void _mutt_select_file (char *f, size_t flen, int flags, char ***files,
+void _mutt_select_file (char *f, s
s
ize_t flen, int flags, char ***files,
int *numfiles)
{
char buf[_POSIX_PATH_MAX];
int *numfiles)
{
char buf[_POSIX_PATH_MAX];
@@
-918,7
+920,7
@@
void _mutt_select_file (char *f, size_t flen, int flags, char ***files,
url_parse_ciss (&url, state.entry[menu->current].name);
if (url.path &&
(state.entry[menu->current].delim != '\0') &&
url_parse_ciss (&url, state.entry[menu->current].name);
if (url.path &&
(state.entry[menu->current].delim != '\0') &&
- (n < sizeof (LastDir))) {
+ (n < s
s
izeof (LastDir))) {
LastDir[n] = '\0';
LastDir[n - 1] = state.entry[menu->current].delim;
}
LastDir[n] = '\0';
LastDir[n - 1] = state.entry[menu->current].delim;
}
@@
-981,7
+983,7
@@
void _mutt_select_file (char *f, size_t flen, int flags, char ***files,
if (multiple) {
char **tfiles;
int j;
if (multiple) {
char **tfiles;
int j;
-
unsigned
int h;
+ int h;
if (menu->tagged) {
*numfiles = menu->tagged;
if (menu->tagged) {
*numfiles = menu->tagged;
@@
-1112,9
+1114,9
@@
void _mutt_select_file (char *f, size_t flen, int flags, char ***files,
if (!state.imap_browse)
{
/* add '/' at the end of the directory name if not already there */
if (!state.imap_browse)
{
/* add '/' at the end of the directory name if not already there */
- size_t len = m_strlen(LastDir);
+ s
s
ize_t len = m_strlen(LastDir);
- if (len && LastDir[len - 1] != '/' && s
izeof
(buf) > len)
+ if (len && LastDir[len - 1] != '/' && s
sizeof
(buf) > len)
buf[len] = '/';
}
buf[len] = '/';
}