projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Nico Golde:
[apps/madmutt.git]
/
complete.c
diff --git
a/complete.c
b/complete.c
index
8ff2dce
..
1066b5c
100644
(file)
--- a/
complete.c
+++ b/
complete.c
@@
-20,6
+20,8
@@
#include "nntp.h"
#endif
#include "nntp.h"
#endif
+#include "lib/str.h"
+
#include <dirent.h>
#include <string.h>
#include <sys/types.h>
#include <dirent.h>
#include <string.h>
#include <sys/types.h>
@@
-206,14
+208,14
@@
int mutt_complete (char *s, size_t slen)
/* check to see if it is a directory */
if (dirpart[0]) {
strfcpy (buf, exp_dirpart, sizeof (buf));
/* check to see if it is a directory */
if (dirpart[0]) {
strfcpy (buf, exp_dirpart, sizeof (buf));
- strfcpy (buf +
strlen (buf), "/", sizeof (buf) -
strlen (buf));
+ strfcpy (buf +
mutt_strlen (buf), "/", sizeof (buf) - mutt_
strlen (buf));
}
else
buf[0] = 0;
}
else
buf[0] = 0;
- strfcpy (buf +
strlen (buf), filepart, sizeof (buf) -
strlen (buf));
+ strfcpy (buf +
mutt_strlen (buf), filepart, sizeof (buf) - mutt_
strlen (buf));
if (stat (buf, &st) != -1 && (st.st_mode & S_IFDIR))
if (stat (buf, &st) != -1 && (st.st_mode & S_IFDIR))
- strfcpy (filepart + strlen (filepart), "/",
- sizeof (filepart) - strlen (filepart));
+ strfcpy (filepart +
mutt_
strlen (filepart), "/",
+ sizeof (filepart) -
mutt_
strlen (filepart));
init = 1;
}
}
init = 1;
}
}
@@
-224,8
+226,8
@@
int mutt_complete (char *s, size_t slen)
strfcpy (s, dirpart, slen);
if (mutt_strcmp ("/", dirpart) != 0 && dirpart[0] != '='
&& dirpart[0] != '+')
strfcpy (s, dirpart, slen);
if (mutt_strcmp ("/", dirpart) != 0 && dirpart[0] != '='
&& dirpart[0] != '+')
- strfcpy (s +
strlen (s), "/", slen -
strlen (s));
- strfcpy (s +
strlen (s), filepart, slen -
strlen (s));
+ strfcpy (s +
mutt_strlen (s), "/", slen - mutt_
strlen (s));
+ strfcpy (s +
mutt_strlen (s), filepart, slen - mutt_
strlen (s));
}
else
strfcpy (s, filepart, slen);
}
else
strfcpy (s, filepart, slen);