X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-lib%2Fbuffer.c;h=dccca24fb12900db97b7c96d33e91db5e263422a;hp=6b46380ce61b7c26b2461b4c9f81990a6e30866c;hb=ac813896ca32d850febc2d95065ac4fa040f11f9;hpb=c8bf978fc5c4f6c793620a515fa2456a3fa9eb13 diff --git a/lib-lib/buffer.c b/lib-lib/buffer.c index 6b46380..dccca24 100644 --- a/lib-lib/buffer.c +++ b/lib-lib/buffer.c @@ -35,8 +35,7 @@ #include "ascii.h" #include "buffer.h" #include "file.h" - -#include "lib/debug.h" +#include "debug.h" #include "mutt.h" @@ -88,7 +87,7 @@ void mutt_buffer_free(BUFFER **p) /* dynamically grows a BUFFER to accomodate s, in increments of 128 bytes. * Always one byte bigger than necessary for the null terminator, and * the buffer is always null-terminated */ -void mutt_buffer_add(BUFFER *buf, const char *s, size_t len) +void mutt_buffer_add(BUFFER *buf, const char *s, ssize_t len) { size_t offset; @@ -195,7 +194,7 @@ int mutt_extract_token(BUFFER *dest, BUFFER *tok, int flags) FILE *fp; pid_t pid; char *cmd, *ptr; - size_t expnlen; + ssize_t expnlen; BUFFER expn; int line = 0; @@ -259,7 +258,7 @@ int mutt_extract_token(BUFFER *dest, BUFFER *tok, int flags) 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 {