projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
drop mem_alloc and mem_free, use my own hand crafted optmized macros that
[apps/madmutt.git]
/
lib.c
diff --git
a/lib.c
b/lib.c
index
4f1fee3
..
e683c6d
100644
(file)
--- a/
lib.c
+++ b/
lib.c
@@
-34,6
+34,8
@@
#define EX_OK 0
#endif
#define EX_OK 0
#endif
+#include <lib-lib/mem.h>
+
#include "lib.h"
#include "lib/mem.h"
#include "lib.h"
#include "lib/mem.h"
@@
-391,19
+393,19
@@
int mutt_rx_sanitize_string (char *dest, size_t destlen, const char *src)
* If a line ends with "\", this char and the linefeed is removed,
* and the next line is read too.
*/
* If a line ends with "\", this char and the linefeed is removed,
* and the next line is read too.
*/
-char *mutt_read_line
(char *s, size_t * size, FILE * fp, int *line)
+char *mutt_read_line(char *s, size_t * size, FILE * fp, int *line)
{
size_t offset = 0;
char *ch;
if (!s) {
{
size_t offset = 0;
char *ch;
if (!s) {
- s =
mem_malloc (
STRING);
+ s =
p_new(char,
STRING);
*size = STRING;
}
FOREVER {
if (fgets (s + offset, *size - offset, fp) == NULL) {
*size = STRING;
}
FOREVER {
if (fgets (s + offset, *size - offset, fp) == NULL) {
-
mem_free
(&s);
+
p_delete
(&s);
return NULL;
}
if ((ch = strchr (s + offset, '\n')) != NULL) {
return NULL;
}
if ((ch = strchr (s + offset, '\n')) != NULL) {