[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fw: [PATCH] split: --chunks option
From: |
Chen Guo |
Subject: |
Fw: [PATCH] split: --chunks option |
Date: |
Thu, 26 Nov 2009 17:00:34 -0800 (PST) |
I replied to my own email and forgot to CC the mailing list last night:
Hi all,
I knew there were bugs still, but I didn't know they were such embarrassing
ones. This is what happens when the biggest file you test on is 14 Kb, I guess.
Apologies for any inconveniences.
One thing I forgot was to ask, for a --chunks option, maybe we should allow
the user to specify if the output goes to a file or stdout? Or possibly just
output to a file no matter what, like split currently does? Either way I've
left the call to cwrite in for now.
>From 57783af98e417cc019d6f1229aac3ba2a878dbe8 Mon Sep 17 00:00:00 2001
From: Chen Guo <address@hidden>
Date: Thu, 26 Nov 2009 07:28:15 +0100
Subject: [PATCH] Split: add --chunk option, fix careless errors
---
src/split.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/split.c b/src/split.c
index e8446ad..7d75a89 100644
--- a/src/split.c
+++ b/src/split.c
@@ -420,6 +420,7 @@ chunk_split (uintmax_t n, uintmax_t total, char* buf, int
fildes, off_t file_siz
bufsize *= 2;
buf = x2nrealloc (buf, &bufsize, sizeof *buf);
bp = buf + offset;
+ continue;
}
else
break;
@@ -427,7 +428,7 @@ chunk_split (uintmax_t n, uintmax_t total, char* buf, int
fildes, off_t file_siz
else
{
bp_out++;
- skip == false;
+ skip = false;
}
}
@@ -442,8 +443,7 @@ chunk_split (uintmax_t n, uintmax_t total, char* buf, int
fildes, off_t file_siz
if (line)
{
eob = line + 1;
- *eob = '\0';
- end_of_chunk == true;
+ end_of_chunk = true;
}
"../splitpatch2" 43L, 1335C