projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
small leftovers
[apps/madmutt.git]
/
lib-lib
/
buffer.c
diff --git
a/lib-lib/buffer.c
b/lib-lib/buffer.c
index
2abfa39
..
47e58ba
100644
(file)
--- a/
lib-lib/buffer.c
+++ b/
lib-lib/buffer.c
@@
-30,15
+30,16
@@
#include <string.h>
#include <ctype.h>
#include <string.h>
#include <ctype.h>
-#include <lib-lib/mem.h>
-#include <lib-lib/str.h>
-#include <lib-lib/ascii.h>
-#include <lib-lib/buffer.h>
-
-#include "mutt.h"
+#include "mem.h"
+#include "str.h"
+#include "ascii.h"
+#include "buffer.h"
+#include "file.h"
#include "lib/debug.h"
#include "lib/debug.h"
+#include "mutt.h"
+
/*
* Creates and initializes a BUFFER*. If passed an existing BUFFER*,
* just initializes. Frees anything already in the buffer.
/*
* Creates and initializes a BUFFER*. If passed an existing BUFFER*,
* just initializes. Frees anything already in the buffer.
@@
-111,7
+112,7
@@
int mutt_extract_token(BUFFER *dest, BUFFER *tok, int flags)
/* reset the destination pointer to the beginning of the buffer */
dest->dptr = dest->data;
/* reset the destination pointer to the beginning of the buffer */
dest->dptr = dest->data;
-
SKIPWS
(tok->dptr);
+
tok->dptr = vskipspaces
(tok->dptr);
while ((ch = *tok->dptr)) {
if (!qc) {
if ((ISSPACE(ch) && !(flags & M_TOKEN_SPACE))
while ((ch = *tok->dptr)) {
if (!qc) {
if ((ISSPACE(ch) && !(flags & M_TOKEN_SPACE))
@@
-258,7
+259,7
@@
int mutt_extract_token(BUFFER *dest, BUFFER *tok, int flags)
if (*tok->dptr == '{') {
tok->dptr++;
if ((pc = strchr (tok->dptr, '}'))) {
if (*tok->dptr == '{') {
tok->dptr++;
if ((pc = strchr (tok->dptr, '}'))) {
- var =
str_substrdup (tok->dptr, pc
);
+ var =
p_dupstr(tok->dptr, pc - tok->dptr
);
tok->dptr = pc + 1;
}
} else {
tok->dptr = pc + 1;
}
} else {
@@
-281,7
+282,7
@@
int mutt_extract_token(BUFFER *dest, BUFFER *tok, int flags)
}
}
mutt_buffer_addch(dest, 0); /* terminate the string */
}
}
mutt_buffer_addch(dest, 0); /* terminate the string */
-
SKIPWS
(tok->dptr);
+
tok->dptr = vskipspaces
(tok->dptr);
return 0;
}
return 0;
}