projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
simplify charset and things in the sockets API.
[apps/madmutt.git]
/
complete.c
diff --git
a/complete.c
b/complete.c
index
e1815c7
..
2fd849a
100644
(file)
--- a/
complete.c
+++ b/
complete.c
@@
-19,7
+19,6
@@
#include <lib-lib/str.h>
#include <lib-lib/file.h>
#include <lib-lib/str.h>
#include <lib-lib/file.h>
-#include <lib-lib/debug.h>
#include "mutt.h"
#include "mx.h"
#include "mutt.h"
#include "mx.h"
@@
-33,20
+32,18
@@
*
* return 0 if ok, -1 if no matches
*/
*
* return 0 if ok, -1 if no matches
*/
-int mutt_complete (char *s, size_t slen)
+int mutt_complete (char *s, s
s
ize_t slen)
{
char *p;
DIR *dirp = NULL;
struct dirent *de;
int i, init = 0;
{
char *p;
DIR *dirp = NULL;
struct dirent *de;
int i, init = 0;
- size_t len;
+ s
s
ize_t len;
char dirpart[_POSIX_PATH_MAX], exp_dirpart[_POSIX_PATH_MAX];
char filepart[_POSIX_PATH_MAX];
char imap_path[LONG_STRING];
char dirpart[_POSIX_PATH_MAX], exp_dirpart[_POSIX_PATH_MAX];
char filepart[_POSIX_PATH_MAX];
char imap_path[LONG_STRING];
- debug_print (2, ("completing %s\n", s));
-
#ifdef USE_NNTP
if (option (OPTNEWS)) {
string_list_t *l = CurrentNewsSrv->list;
#ifdef USE_NNTP
if (option (OPTNEWS)) {
string_list_t *l = CurrentNewsSrv->list;
@@
-140,7
+137,7
@@
int mutt_complete (char *s, size_t slen)
}
else {
*p = 0;
}
else {
*p = 0;
- len =
(size_t) (p - s)
;
+ len =
p - s
;
memcpy(dirpart, s, len);
dirpart[len] = 0;
p++;
memcpy(dirpart, s, len);
dirpart[len] = 0;
p++;
@@
-159,7
+156,6
@@
int mutt_complete (char *s, size_t slen)
}
if (dirp == NULL) {
}
if (dirp == NULL) {
- debug_print (1, ("%s: %s (errno %d).\n", exp_dirpart, strerror (errno), errno));
return (-1);
}
return (-1);
}