<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src/csplit.c, branch v5.2.0</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v5.2.0</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v5.2.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2004-01-21T22:49:36Z</updated>
<entry>
<title>(usage): Use EXIT_SUCCESS, not 0, for clarity.</title>
<updated>2004-01-21T22:49:36Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2004-01-21T22:49:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a8fd56864ef1c93ca87094a3eecebc06566d6ca0'/>
<id>urn:sha1:a8fd56864ef1c93ca87094a3eecebc06566d6ca0</id>
<content type='text'>
(usage): Don't bother normalizing exit status
since the arg is already the correct exit status now.
</content>
</entry>
<entry>
<title>(new_control_record): Use x2nrealloc rather than xrealloc.</title>
<updated>2004-01-04T21:08:47Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2004-01-04T21:08:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=986b0ecbdfdbdd76cd39a92e7b4dd837654b3fc7'/>
<id>urn:sha1:986b0ecbdfdbdd76cd39a92e7b4dd837654b3fc7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix read-from-free'd-buffer error detected by valgrind.</title>
<updated>2003-11-16T12:25:35Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2003-11-16T12:25:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=51ab3265f8444eeb09faf47c9d5d4a1a8b036025'/>
<id>urn:sha1:51ab3265f8444eeb09faf47c9d5d4a1a8b036025</id>
<content type='text'>
(remove_line): Don't return a pointer to data in
a freed buffer.  Instead, arrange to free the buffer on the
subsequent call.
</content>
</entry>
<entry>
<title>Most .c files (AUTHORS): Revert the WRITTEN_BY/AUTHORS change</title>
<updated>2003-10-18T10:05:47Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2003-10-18T10:05:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=cf4fdf373fa202877d8141fcf7c1ef655a8e06d9'/>
<id>urn:sha1:cf4fdf373fa202877d8141fcf7c1ef655a8e06d9</id>
<content type='text'>
of 2003-09-19.  Now, AUTHORS is a comma-separated list of strings.
Update the call to parse_long_options so that `AUTHORS, NULL' are the
last parameters.

* src/true.c (main): Append NULL to version_etc argument list.
* src/sys2.h (case_GETOPT_VERSION_CHAR): Likewise.
</content>
</entry>
<entry>
<title>(main): Remove obsolete FIXME.</title>
<updated>2003-10-08T18:24:04Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2003-10-08T18:24:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=20fd309527e1dcf59904947d72507802cfb3a3ab'/>
<id>urn:sha1:20fd309527e1dcf59904947d72507802cfb3a3ab</id>
<content type='text'>
</content>
</entry>
<entry>
<title>csplit cleanup.</title>
<updated>2003-10-08T17:54:19Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2003-10-08T17:54:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=0b693b7d02857dc53611bc771436ba82fee7dd30'/>
<id>urn:sha1:0b693b7d02857dc53611bc771436ba82fee7dd30</id>
<content type='text'>
Be more careful about int widths.  For example, remove some
arbitrary limits by replacing 'unsigned' with 'size_t',
'uintmax_t', etc.  Use standard bool rather than a homegrown type.

(FALSE, TRUE, boolean): Remove.  All uses changed
to &lt;stdbool.h&gt; usage.
(struct control): offset is now intmax_t, not int.
repeat_forever is now bool, not int.
(struct cstring): len is now size_t, not unsigned int.
(struct buffer_record): bytes_alloc, bytes_used, num_lines are now
size_t, not unsigned.  start_line, first_available are now
uintmax_t, not unsigned.
(hold_count, control_used): Now size_t, not unsigned.
(last_line_number, current_line, bytes_written):
Now uintmax_t, not unsigned.
(save_to_hold_area, red_input, keep_new_line, record_line_starts,
create_new_buffer, get_new_buffer, load_buffer, find_line,
process_regexp, split_file, new_control_record, extract_regexp,
get_format_width, get_format_prec, max_out):
size args, locals, and returned values are now size_t, not unsigned
or int.
(get_first_line_in_buffer, find_line, write_to_file,
handle_line_error, process_line_count, regexp_error, process_regexp,
split_file):
File line, byte, and repetition counts are now uintmax_t, not unsigned.
(check_for_offset): Don't require a sign before the offset.
Use xstrtoimax to do the real work.
(extract_regexp): Remove harmful cast of size to unsigned.
256 -&gt; 1&lt;&lt;CHAR_BIT, for clarity.
(get_format_flags): Return at most 3, to avoid worries about overflow.

(bytes_to_octal_digits): Remove.

(cleanup): Don't check whether output_stream is NULL, since
close_output_file does that for us.

(new_line_control, create_new_buffer): Use "foo *p = xmalloc
(sizeof *p);" instead of the more long-winded alternatives.

(get_new_buffer): Use O(1) algorithm for resizing a buffer
to a much larger size, instead of an O(N) algorithm.

(process_regexp): Use plain NULL rather than casted 0.

(make_filename): Use %u, not %d, to format unsigned file number.

(new_control_record): Use xrealloc exclusively, since it handles
NULL reliably,

(extract_regexp): Change misspelled word in diagnostic.

(get_format_width): Even if a minimum field width is specified,
allow room for enough octal digits to represent the value of
the maximum representible integer.  This fixes a potential
buffer overrun.  Calculate this room at compile-time, not
at run-time; this removes the need for bytes_to_octal_digits.
Check for overflow; this removes a FIXME.

(get_format_prec): Don't allow precision to be signed; it's
not ANSI.  Check for overflow.  Remove hardcoded "11" as
default precision; this fixes a potential buffer overrun
on hosts with wider size_t.

(get_format_conv_type): Change local variable to be of type
unsigned char, not int; this removes a potential subscript
violation on hosts where char is signed.

(max_out): Replace "for (;*p;)" with more-standard "while (*p)".
Allow "%%" in format.  Don't overflow when
counting lots of percents.

(usage): Default sprintf format is %02u, not %d.
</content>
</entry>
<entry>
<title>Don't exhaust virtual memory when processing large inputs.</title>
<updated>2003-09-27T06:57:07Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2003-09-27T06:57:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=6ab7d9e425c4082f1eb47f6db8f56bbe981cff4d'/>
<id>urn:sha1:6ab7d9e425c4082f1eb47f6db8f56bbe981cff4d</id>
<content type='text'>
Fix this by removing csplit's internal free-list management;
instead rely on malloc for that.

(free_list): Remove global.
(clear_all_line_control): Remove function.
(get_new_buffer): Always use create_new_buffer to obtain a
new buffer, rather than searching free_list.
(free_buffer): Just call free.
</content>
</entry>
<entry>
<title>(close_output_file): Don't report bogus errno value</title>
<updated>2003-09-23T21:57:13Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2003-09-23T21:57:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=93bf700a948f87b7c243b5ac1ffb06f30fb377be'/>
<id>urn:sha1:93bf700a948f87b7c243b5ac1ffb06f30fb377be</id>
<content type='text'>
after ferror discovers an output error.  We don't know the proper
errno value, since it might have been caused by any of a whole
bunch of calls, and it might have been trashed in the meantime.
Fixing this problem will require much more extensive changes;
in the meantime just say "write error".
</content>
</entry>
<entry>
<title>(WRITTEN_BY): Rename from AUTHORS.</title>
<updated>2003-09-18T22:19:03Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2003-09-18T22:19:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=bafd927f03084ba6b12f7ff1b95352eb0e3a0a84'/>
<id>urn:sha1:bafd927f03084ba6b12f7ff1b95352eb0e3a0a84</id>
<content type='text'>
Begin each WRITTEN_BY string with `Written by ' and end it with `.'.
Mark each WRITTEN_BY string as translatable.
</content>
</entry>
<entry>
<title>revert previous change</title>
<updated>2003-09-18T19:39:12Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2003-09-18T19:39:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=c6ec14449470fce01a93bd0724ea3146c3ba3e7e'/>
<id>urn:sha1:c6ec14449470fce01a93bd0724ea3146c3ba3e7e</id>
<content type='text'>
</content>
</entry>
</feed>
