/*
+ * Copyright notice from original mutt:
* Copyright (C) 1996-2000 Michael R. Elkins <me@mutt.org>
- *
- * 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., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ *
+ * 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.
*/
#if HAVE_CONFIG_H
#include "mutt_crypt.h"
#include "lib.h"
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
#define BUFI_SIZE 1000
#define BUFO_SIZE 2000
if (fgets (line, MIN ((ssize_t) sizeof (line), len + 1), s->fpin) == NULL)
break;
- linelen = strlen (line);
+ linelen = mutt_strlen (line);
len -= linelen;
/*
fprintf (stderr, "flowed_max = %d\n", flowed_max);
while (bytes > 0 && fgets (line, sizeof (line), s->fpin)) {
- bytes -= strlen (line);
+ bytes -= mutt_strlen (line);
tail = NULL;
last_full = full;
*/
full = 0;
- l = strlen (t + 1);
+ l = mutt_strlen (t + 1);
t[0] = ' ';
t[1] = '\0';
{
int width;
char *pos, *oldpos;
- int len = strlen (line);
+ int len = mutt_strlen (line);
int i;
if (MaxLineLength > 0) {
/* fprintf(stderr,"print_flowed_line will print `%s' with ql = %d\n",line,ql); */
- if (strlen (line) == 0) {
+ if (mutt_strlen (line) == 0) {
if (option (OPTQUOTEEMPTY)) {
if (s->prefix)
state_puts(s->prefix,s);
while (bytes > 0 && fgets (buf, sizeof (buf), s->fpin)) {
/* fprintf(stderr,"read `%s'",buf); */
- bytes -= strlen (buf);
+ bytes -= mutt_strlen (buf);
newql = get_quote_level (buf);
if ((t = strrchr (buf, '\n')) || (t = strrchr (buf, '\r'))) {
*t = '\0';
- if (strlen (curline) > 0 && curline[strlen (curline) - 1] == ' '
+ if (mutt_strlen (curline) > 0 && curline[mutt_strlen (curline) - 1] == ' '
&& newql == quotelevel
&& strcmp (curline + quotelevel, "-- ") != 0) {
if (buf[newql] == ' ')
- curline[strlen (curline) - 1] = '\0';
+ curline[mutt_strlen (curline) - 1] = '\0';
- curline = realloc (curline, curline_len + strlen (buf));
+ curline = realloc (curline, curline_len + mutt_strlen (buf));
if (curline_len == 1)
*curline = '\0';
- curline_len += strlen (buf);
+ curline_len += mutt_strlen (buf);
safe_strncat (curline, curline_len, buf + newql,
- strlen (buf + newql));
+ mutt_strlen (buf + newql));
}
else {
if (first_line) {
}
FREE (&curline);
curline_len = 1;
- curline = realloc (curline, curline_len + strlen (buf));
+ curline = realloc (curline, curline_len + mutt_strlen (buf));
if (curline_len == 1)
*curline = '\0';
- curline_len += strlen (buf);
- safe_strncat (curline, curline_len, buf, strlen (buf));
+ curline_len += mutt_strlen (buf);
+ safe_strncat (curline, curline_len, buf, mutt_strlen (buf));
quotelevel = newql;
}
}