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]
/
complete.c
diff --git
a/complete.c
b/complete.c
index
f21d9e8
..
2c0f14e
100644
(file)
--- a/
complete.c
+++ b/
complete.c
@@
-13,13
+13,16
@@
#include "mutt.h"
#ifdef USE_IMAP
#include "mutt.h"
#ifdef USE_IMAP
-#include "m
ailbo
x.h"
+#include "mx.h"
#include "imap.h"
#endif
#ifdef USE_NNTP
#include "nntp.h"
#endif
#include "imap.h"
#endif
#ifdef USE_NNTP
#include "nntp.h"
#endif
+#include "lib/str.h"
+#include "lib/debug.h"
+
#include <dirent.h>
#include <string.h>
#include <sys/types.h>
#include <dirent.h>
#include <string.h>
#include <sys/types.h>
@@
-45,7
+48,7
@@
int mutt_complete (char *s, size_t slen)
char imap_path[LONG_STRING];
#endif
char imap_path[LONG_STRING];
#endif
- d
print (2, (debugfile, "mutt_complete:
completing %s\n", s));
+ d
ebug_print (2, ("
completing %s\n", s));
#ifdef USE_NNTP
if (option (OPTNEWS)) {
#ifdef USE_NNTP
if (option (OPTNEWS)) {
@@
-74,7
+77,7
@@
int mutt_complete (char *s, size_t slen)
NNTP_DATA *data = (NNTP_DATA *) l->data;
if (data && data->subscribed &&
NNTP_DATA *data = (NNTP_DATA *) l->data;
if (data && data->subscribed &&
-
mutt
_strncmp (data->group, filepart, len) == 0) {
+
safe
_strncmp (data->group, filepart, len) == 0) {
if (init) {
for (i = 0; filepart[i] && data->group[i]; i++) {
if (filepart[i] != data->group[i]) {
if (init) {
for (i = 0; filepart[i] && data->group[i]; i++) {
if (filepart[i] != data->group[i]) {
@@
-110,7
+113,7
@@
int mutt_complete (char *s, size_t slen)
else
strfcpy (imap_path, s, sizeof (imap_path));
else
strfcpy (imap_path, s, sizeof (imap_path));
- if (mx_
is_imap (imap_path)
)
+ if (mx_
get_magic (imap_path) == M_IMAP
)
return imap_complete (s, slen, imap_path);
#endif
return imap_complete (s, slen, imap_path);
#endif
@@
-165,9
+168,7
@@
int mutt_complete (char *s, size_t slen)
}
if (dirp == NULL) {
}
if (dirp == NULL) {
- dprint (1,
- (debugfile, "mutt_complete(): %s: %s (errno %d).\n", exp_dirpart,
- strerror (errno), errno));
+ debug_print (1, ("%s: %s (errno %d).\n", exp_dirpart, strerror (errno), errno));
return (-1);
}
return (-1);
}
@@
-187,7
+188,7
@@
int mutt_complete (char *s, size_t slen)
}
while ((de = readdir (dirp)) != NULL) {
}
while ((de = readdir (dirp)) != NULL) {
- if (
mutt
_strncmp (de->d_name, filepart, len) == 0) {
+ if (
safe
_strncmp (de->d_name, filepart, len) == 0) {
if (init) {
for (i = 0; filepart[i] && de->d_name[i]; i++) {
if (filepart[i] != de->d_name[i]) {
if (init) {
for (i = 0; filepart[i] && de->d_name[i]; i++) {
if (filepart[i] != de->d_name[i]) {