X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=buffer.h;fp=buffer.h;h=0000000000000000000000000000000000000000;hb=21595f98b7c8132f99abb9fee60ecdce31fc980f;hp=bd3499dbc924209d6df9062e2083496822e6d0b2;hpb=9aae63e2d1cce39bb0928362416a8d17b953ca5e;p=apps%2Fmadmutt.git diff --git a/buffer.h b/buffer.h deleted file mode 100644 index bd3499d..0000000 --- a/buffer.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - * - * Copyright © 2006 Pierre Habouzit - */ - -/* - * Copyright notice from original mutt: - * Copyright (C) 1996-2000 Michael R. Elkins - * - * This file is part of mutt-ng, see http://www.muttng.org/. - * It's licensed under the GNU General Public License, - * please see the file GPL in the top level source directory. - */ - -#ifndef _MUTT_BUFFER_H -#define _MUTT_BUFFER_H - -#include - -typedef struct { - char *data; /* pointer to data */ - char *dptr; /* current read/write position */ - size_t dsize; /* length of data */ - int destroy; /* destroy `data' when done? */ -} BUFFER; - -BUFFER *mutt_buffer_init(BUFFER *); -void mutt_buffer_free(BUFFER **); - -BUFFER *mutt_buffer_from(BUFFER *, const char *); -int mutt_extract_token(BUFFER *, BUFFER *, int); - -void mutt_buffer_add(BUFFER *, const char *, size_t); -static inline void mutt_buffer_addstr(BUFFER *b, const char *s) { - mutt_buffer_add(b, s, m_strlen(s)); -} - -static inline void mutt_buffer_addch(BUFFER *b, char c) { - mutt_buffer_add(b, &c, 1); -} - -#endif /* !_MUTT_BUFFER_H */