projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
a whole lot of size_t -> ssize_t.
[apps/madmutt.git]
/
lib-lib
/
file.c
diff --git
a/lib-lib/file.c
b/lib-lib/file.c
index
22bb68c
..
985015f
100644
(file)
--- a/
lib-lib/file.c
+++ b/
lib-lib/file.c
@@
-259,9
+259,9
@@
int safe_fclose(FILE **f)
* 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, s
s
ize_t *size, FILE * fp, int *line)
{
{
- size_t offset = 0;
+ s
s
ize_t offset = 0;
char *ch;
if (!s) {
char *ch;
if (!s) {
@@
-310,7
+310,7
@@
int mutt_copy_stream(FILE *fin, FILE *fout)
char buf[BUFSIZ];
size_t l;
char buf[BUFSIZ];
size_t l;
- while ((l = fread(buf, 1, sizeof
(buf), fin)) > 0) {
+ while ((l = fread(buf, 1, sizeof(buf), fin)) > 0) {
if (fwrite(buf, 1, l, fout) != l)
return -1;
}
if (fwrite(buf, 1, l, fout) != l)
return -1;
}
@@
-318,12
+318,12
@@
int mutt_copy_stream(FILE *fin, FILE *fout)
return 0;
}
return 0;
}
-int mutt_copy_bytes(FILE *in, FILE *out, size_t size)
+int mutt_copy_bytes(FILE *in, FILE *out, s
s
ize_t size)
{
char buf[BUFSIZ];
while (size > 0) {
{
char buf[BUFSIZ];
while (size > 0) {
- size_t chunk = MIN(size, sizeof(buf));
+ size_t chunk = MIN(size, s
s
izeof(buf));
if ((chunk = fread(buf, 1, chunk, in)) < 1)
break;
if ((chunk = fread(buf, 1, chunk, in)) < 1)
break;