<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src/truncate.c, branch v7.2</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v7.2</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v7.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2008-12-21T16:49:58Z</updated>
<entry>
<title>build: add configure-time --enable-gcc-warnings option; avoid warnings</title>
<updated>2008-12-21T16:49:58Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-11-12T10:11:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=22a2a43021e8e82226d4b33189e77673b7326c95'/>
<id>urn:sha1:22a2a43021e8e82226d4b33189e77673b7326c95</id>
<content type='text'>
* bootstrap.conf (gnulib_modules): Add "warnings" module.
* configure.ac: Add --enable-gcc-warnings, derived from code in bison.
* src/Makefile.am (AM_CFLAGS): Set to $(WARN_CFLAGS) # $(WERROR_CFLAGS)
* lib/Makefile.am (AM_CFLAGS): Change spelling to $(WARN_CFLAGS)
Don't use $(WERROR_CFLAGS), yet.
* src/system.h (usage): Declare.
* src/base64.c (usage): Declare to be global, for consistency.
* src/timeout.c (usage): Likewise.
* src/truncate.c (usage): Likewise.
* src/getlimits.c (usage): Likewise.
* src/pinky.c (ttyname): Declare with prototype, rather than an
empty argument list.
* src/who.c (ttyname): Likewise.
* src/su.c (crypt, getusershell, setusershell, endusershell): Likewise.
</content>
</entry>
<entry>
<title>truncate: ignore whitespace in --size parameters</title>
<updated>2008-06-30T08:23:17Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2008-06-29T00:55:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=760bc6f7e73014e934a744a9d46ea8dbf5ba25c8'/>
<id>urn:sha1:760bc6f7e73014e934a744a9d46ea8dbf5ba25c8</id>
<content type='text'>
Without this, `truncate -s '&gt; -1' F` would truncate F to length 0,
and `truncate -s " +1" F` would truncate F to 1 byte.  Now, each
elicits a diagnostic.
* src/truncate.c: Skip leading white space in the --size option
argument and any white space after one of the relative modifiers,
so that the presence of a +/- modifier can be detected reliably.
* tests/misc/truncate-parameters: Add tests for the above.
</content>
</entry>
<entry>
<title>truncate: silence -Wsign-compare warnings</title>
<updated>2008-06-27T14:02:54Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2008-06-27T07:38:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=0a98d79bd268c47588fc356cb7ea73403780aa20'/>
<id>urn:sha1:0a98d79bd268c47588fc356cb7ea73403780aa20</id>
<content type='text'>
* src/truncate.c: Cast signed to unsigned to
confirm intent which will silence -Wsign-compare warnings
</content>
</entry>
<entry>
<title>truncate: Fix integer portability issues</title>
<updated>2008-06-27T06:11:21Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2008-06-26T10:10:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=e2dbcee444e90e4289bd4bdc36783a5ef00af396'/>
<id>urn:sha1:e2dbcee444e90e4289bd4bdc36783a5ef00af396</id>
<content type='text'>
* src/truncate.c: Explicitly convert from off_t to intmax_t
when printing numbers as they may be different types.
Also don't mix size_t and off_t types in operations as
the latter will be promoted to unsigned when these types
are the same size.
</content>
</entry>
<entry>
<title>truncate: handle the case in which off_t != intmax_t</title>
<updated>2008-06-26T05:48:25Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-06-25T21:15:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=3d309aa725e529a5e90aacc5594565e21f966537'/>
<id>urn:sha1:3d309aa725e529a5e90aacc5594565e21f966537</id>
<content type='text'>
* src/truncate.c (parse_len): Use a temporary of type intmax_t,
rather than off_t; detect out of range [OFF_T_MIN..OFF_T_MAX].
(main) [IF_LINT]: Initialize, to avoid an unwarranted
"may be used uninitialized" warning.
Reported by Michael Geng.

Signed-off-by: Pádraig Brady &lt;P@draigBrady.com&gt;
</content>
</entry>
<entry>
<title>remove redundant const directives</title>
<updated>2008-06-16T14:40:59Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-06-16T12:55:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=45e67188d6615820f5bb39cb6890c5b4dfca83c4'/>
<id>urn:sha1:45e67188d6615820f5bb39cb6890c5b4dfca83c4</id>
<content type='text'>
In 1463824d8e7f72c31f1d803d7cfe2b608ccafc5c, I added some
missing "const" directives, as well as some new, redundant ones.
This removes the redundant ones.  Pointed out by Eric Blake.
* base64.c, cat.c, chcon.c, chgrp.c, chmod.c, chown.c, comm.c:
* cp.c, csplit.c, cut.c, date.c, dd.c, df.c, dircolors.c, du.c:
* env.c, expand.c, fmt.c, fold.c, groups.c, head.c, id.c:
* install.c, join.c, kill.c, ln.c, ls.c, md5sum.c, mkdir.c:
* mkfifo.c, mknod.c, mktemp.c, mv.c, nice.c, nl.c, od.c:
* paste.c, pathchk.c, pinky.c, pr.c, ptx.c, readlink.c, rm.c:
* rmdir.c, runcon.c, seq.c, shred.c, shuf.c, sort.c, split.c:
* stat.c, stty.c, su.c, sum.c, tac.c, tail.c, tee.c, timeout.c:
* touch.c, tr.c, truncate.c, tty.c, uname.c, unexpand.c, uniq.c:
* wc.c, who.c: Remove redundant const directives.
* maint.mk (sc_const_long_option): Don't require redundant "const".
</content>
</entry>
<entry>
<title>add "const" attribute, where possible</title>
<updated>2008-06-14T20:24:28Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-06-12T20:06:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=1463824d8e7f72c31f1d803d7cfe2b608ccafc5c'/>
<id>urn:sha1:1463824d8e7f72c31f1d803d7cfe2b608ccafc5c</id>
<content type='text'>
* maint.mk (sc_const_long_option): New rule.  Enforce global change.
* src/base64.c (long_options): Use "const" where possible.
* src/cat.c (main): Likewise.
* src/chcon.c (long_options): Likewise.
* src/chgrp.c (long_options): Likewise.
* src/chmod.c (long_options): Likewise.
* src/chown.c (long_options): Likewise.
* src/comm.c (long_options, OUTPUT_DELIMITER_OPTION): Likewise.
* src/cp.c (long_opts): Likewise.
* src/csplit.c (longopts): Likewise.
* src/cut.c (longopts): Likewise.
* src/date.c (long_options): Likewise.
* src/dd.c (conversions, flags, statuses): Likewise.
* src/df.c (long_options): Likewise.
* src/dircolors.c (long_options): Likewise.
* src/du.c (long_options): Likewise.
* src/env.c (longopts): Likewise.
* src/expand.c (longopts): Likewise.
* src/fmt.c (long_options): Likewise.
* src/fold.c (longopts): Likewise.
* src/groups.c (longopts): Likewise.
* src/head.c (long_options): Likewise.
* src/id.c (longopts): Likewise.
* src/install.c (long_options): Likewise.
* src/join.c (longopts): Likewise.
* src/kill.c (long_options): Likewise.
* src/ln.c (long_options): Likewise.
* src/ls.c (long_time_format, long_options, sort_functions): Likewise.
* src/md5sum.c (long_options): Likewise.
* src/mkdir.c (longopts): Likewise.
* src/mkfifo.c (longopts): Likewise.
* src/mknod.c (longopts): Likewise.
* src/mktemp.c (longopts): Likewise.
* src/mv.c (long_options): Likewise.
* src/nice.c (longopts): Likewise.
* src/nl.c (longopts): Likewise.
* src/od.c (charname, long_options): Likewise.
* src/paste.c (longopts): Likewise.
* src/pathchk.c (longopts): Likewise.
* src/pinky.c (longopts): Likewise.
* src/pr.c (long_options): Likewise.
* src/ptx.c (long_options): Likewise.
* src/readlink.c (longopts): Likewise.
* src/rm.c (long_opts): Likewise.
* src/rmdir.c (longopts): Likewise.
* src/runcon.c (long_options): Likewise.
* src/seq.c (long_options): Likewise.
* src/shred.c (long_opts): Likewise.
* src/shuf.c (long_opts): Likewise.
* src/sort.c (monthtab, long_options): Likewise.
* src/split.c (longopts): Likewise.
* src/stat.c (long_options): Likewise.
* src/stty.c (mode_info, control_info, longopts, set_mode) Likewise.
(set_control_char, speeds): Likewise.
* src/su.c (longopts): Likewise.
* src/sum.c (longopts): Likewise.
* src/tac.c (longopts): Likewise.
* src/tail.c (long_options): Likewise.
* src/tee.c (long_options): Likewise.
* src/timeout.c (long_options): Likewise.
* src/touch.c (longopts): Likewise.
* src/tr.c (long_options): Likewise.
* src/truncate.c (longopts): Likewise.
* src/tty.c (longopts): Likewise.
* src/uname.c (uname_long_options, arch_long_options): Likewise.
* src/unexpand.c (longopts): Likewise.
* src/uniq.c (longopts): Likewise.
* src/wc.c (longopts): Likewise.
* src/who.c (longopts): Likewise.
</content>
</entry>
<entry>
<title>revert previous change, "don't use "const" with scalar types"</title>
<updated>2008-06-14T09:04:41Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-06-14T09:04:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=d42994df5d9deb7a5f6c43b5d171015535df8bcd'/>
<id>urn:sha1:d42994df5d9deb7a5f6c43b5d171015535df8bcd</id>
<content type='text'>
* src/truncate.c: There is nothing wrong with that construct.
This reverts commit d7d80c5b7b122377fe250357a3ab182e8fbde20a.
</content>
</entry>
<entry>
<title>don't use "const" with scalar types</title>
<updated>2008-06-14T07:47:44Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-06-14T07:46:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=d7d80c5b7b122377fe250357a3ab182e8fbde20a'/>
<id>urn:sha1:d7d80c5b7b122377fe250357a3ab182e8fbde20a</id>
<content type='text'>
* src/truncate.c: Several vendor compilers reject that.
See http://article.gmane.org/gmane.comp.lib.gnulib.bugs/13876
</content>
</entry>
<entry>
<title>standardize some error messages</title>
<updated>2008-06-08T10:11:47Z</updated>
<author>
<name>Bo Borgerson</name>
<email>gigabo@gmail.com</email>
</author>
<published>2008-04-04T15:13:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=6eec737ade63bd48e0cccd66c021dd5523100f06'/>
<id>urn:sha1:6eec737ade63bd48e0cccd66c021dd5523100f06</id>
<content type='text'>
* maint.mk: (sc_error_message_warn_fatal, sc_error_message_uppercase):
(sc_error_message_period): Add automatic checks for non-standard error
messages.
* .x-sc_error_message_uppercase: explicit exclusion for this check
* src/cp.c: Standardize some error messages.
* src/date.c: Likewise.
* src/dircolors.c: Likewise.
* src/du.c: Likewise.
* src/expr.c: Likewise.
* src/install.c: Likewise.
* src/join.c: Likewise.
* src/ln.c: Likewise.
* src/mv.c: Likewise.
* src/od.c: Likewise.
* src/pr.c: Likewise.
* src/split.c: Likewise.
* src/truncate.c: Likewise.
* src/wc.c: Likewise.
* tests/du/files0-from: Expect new error message.
* tests/misc/join: Likewise.
* tests/misc/split-a: Likewise.
* tests/misc/wc-files0-from: Likewise.
* tests/misc/xstrtol: Likewise.
* lib/xmemxfrm.c: Likewise.
</content>
</entry>
</feed>
