<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src/expr.c, branch v8.7</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v8.7</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v8.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2010-05-31T09:02:21Z</updated>
<entry>
<title>maint: make spacing around "=" consistent, even in IF_LINT</title>
<updated>2010-05-31T09:02:21Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2010-05-15T17:36:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=c0cfa0defe06fa750530f08d6e0a54521f83292d'/>
<id>urn:sha1:c0cfa0defe06fa750530f08d6e0a54521f83292d</id>
<content type='text'>
E.g.,
  -  size_t desired_width IF_LINT (= 0);
  +  size_t desired_width IF_LINT ( = 0);
Use this command:
  g grep -l IF_LINT | grep '\.[ch]$' \
    | xargs perl -pi -e 's/(IF_LINT \()= /$1 = /'
</content>
</entry>
<entry>
<title>expr: clarify error message</title>
<updated>2010-02-25T15:54:49Z</updated>
<author>
<name>Eric Blake</name>
<email>eblake@redhat.com</email>
</author>
<published>2010-02-25T15:36:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=9a6c97eb2965adf868b26acf0ace0094dfe4cada'/>
<id>urn:sha1:9a6c97eb2965adf868b26acf0ace0094dfe4cada</id>
<content type='text'>
* src/expr.c (eval4, eval3): Clarify that expr expects integers,
and not the broader category of numbers.
* tests/misc/expr: Update test accordingly.
Suggested by Dan Jacobson.
</content>
</entry>
<entry>
<title>maint: update all FSF copyright year lists to include 2010</title>
<updated>2010-01-01T13:06:47Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2010-01-01T09:56:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=1aa17dc89b3f313697661541adca0aa0defbdc09'/>
<id>urn:sha1:1aa17dc89b3f313697661541adca0aa0defbdc09</id>
<content type='text'>
Use this command:
git ls-files | grep -v COPYING \
  | xargs env UPDATE_COPYRIGHT_USE_INTERVALS=1 \
      build-aux/update-copyright
</content>
</entry>
<entry>
<title>maint: Use logical rather than bitwise operators on bools</title>
<updated>2009-09-23T13:33:40Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-09-23T09:10:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a037e838e15c9a698f1634398e0fe2726398d575'/>
<id>urn:sha1:a037e838e15c9a698f1634398e0fe2726398d575</id>
<content type='text'>
This is because bitwise operators are:
- confusing and inconsistent in a boolean context
- non short circuiting
- brittle in C89 where bool can be an int (so &gt; 1)
</content>
</entry>
<entry>
<title>maint: expr: avoid compiler warnings without GMP</title>
<updated>2009-09-23T13:32:07Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-09-23T11:49:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=ade8dd2096e1898edefadf2314d4e1ec654adda5'/>
<id>urn:sha1:ade8dd2096e1898edefadf2314d4e1ec654adda5</id>
<content type='text'>
* src/expr.c (mpz_clear, mpz_get_str, mpz_out_str)
[!HAVE_GMP]: Reference unused arguments.
</content>
</entry>
<entry>
<title>doc: mention the texinfo documentation in --help</title>
<updated>2009-09-21T11:37:57Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-09-18T22:06:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=5d4f09d83a7c69110b4db97443759e9046c149e1'/>
<id>urn:sha1:5d4f09d83a7c69110b4db97443759e9046c149e1</id>
<content type='text'>
* src/system.h: Rename emit_bug_reporting_address() to
emit_ancillary_info() and update it to not print the translation
project address in en_* locales, and _do_ print it in the 'C'
(and other) locales so that it's included in the default man page.
Also mention how to invoke the texinfo documentation for each command.
Also move the "hard-locale.h" include to the 8 files that now use it.
* man/help2man: Strip the newly added texinfo reference from the
--help output as a more verbose version is already added by help2man.
Suggestion from C de-Avillez
</content>
</entry>
<entry>
<title>global: convert indentation-TABs to spaces</title>
<updated>2009-08-25T07:21:00Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-08-22T16:56:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=5e778f7c8d1ecf3d8f11385db013af2ba026e2a5'/>
<id>urn:sha1:5e778f7c8d1ecf3d8f11385db013af2ba026e2a5</id>
<content type='text'>
Transformed via this shell code:
t=$'\t'
git ls-files \
  | grep -vE '(^|/)((GNU)?[Mm]akefile|ChangeLog)|\.(am|mk)$' \
  | grep -vE 'tests/pr/|help2man' \
  | xargs grep -lE "^ *$t" \
  | xargs perl -MText::Tabs -ni -le \
    '$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'
</content>
</entry>
<entry>
<title>maint: update all Copyright year lists to include 2009</title>
<updated>2009-06-23T20:33:15Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-06-23T20:33:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=2232b4d08fdc8ff3ae8e7aa1fa28c8315c41d9ad'/>
<id>urn:sha1:2232b4d08fdc8ff3ae8e7aa1fa28c8315c41d9ad</id>
<content type='text'>
</content>
</entry>
<entry>
<title>expr: Fixup authors</title>
<updated>2008-10-20T14:40:50Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2008-10-16T18:09:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=d60e33e24129296d2feb6240d9b92a5782d00a37'/>
<id>urn:sha1:d60e33e24129296d2feb6240d9b92a5782d00a37</id>
<content type='text'>
* src/expr.c: Standardise the format of AUTHORS to
that used in other utils with multiple authors.
Also add Paul Eggert since he basically rewrote it
with his bignum fixes.
* AUTHORS (expr): Add Paul Eggert.
</content>
</entry>
<entry>
<title>expr: remove --bignum and --no-bignum options</title>
<updated>2008-10-15T14:30:28Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2008-10-15T13:29:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=4fb3704c25726a29b5af658f3137794cdf5cf01c'/>
<id>urn:sha1:4fb3704c25726a29b5af658f3137794cdf5cf01c</id>
<content type='text'>
* doc/coreutils.texi (expr invocation): Remove the --bignum and
--no-bignum options.  They weren't really needed, and they broke
longstanding (albeit nonportable) scripts.
* src/expr.c: Don't include &lt;assert.h&gt;.  Include "inttostr.h",
"long-options.h", "verify.h".  Check at compile-time that
size_t fits in unsigned long int, as the code assumes this in
several places.
(HAVE_GMP): Define to 0 if not defined, for convenience.
(mpz_t, mpz_clear, mpz_init_set_ui, mpz_init_set_str, mpz_add):
(mpz_sub, mpz_mul, mpz_tdiv_q, mpz_tdiv_r, mpz_get_str, mpz_sgn):
(mpz_fits_ulong_p, mpz_get_ui, mpz_out_str):
Supply substitutes when !HAVE_GMP, which work well enough for
expr's purposes.
(mp_integer): Remove.  All integers are gmp, if gmp is available.
(struct valinfo): Remove 'z' member; no longer needed.  The 'i'
member is always of type mpz_t.
(enum arithmetic_mode, MP_NEVER, MP_ALWAYS, MP_AUTO, mode):
Remove; no longer needed.
(usage): Remove documentation of --bignum and --no-bignum.
(integer_overflow): Abort if error misbehaves, to pacify GCC.
Restore old message on arithmetic overflow, to be conservative.
(die): Omit exit_status parameter; not needed (is always EXPR_FAILURE).
(string_too_long, USE_BIGNUM, NO_USE_BIGNUM, long_options):
Remove; no longer needed.
(main): Don't use getopt_long; this breaks old nonportable scripts.
(int_value): Arg is unsigned, in case we have strings whose length
exceeds LONG_MAX (!).
(int_value, freev, printv, null, tostring, toarith):
(eval6, eval4, eval3):
Always use mpz_ functions, to simplify the code.
(substr_value): Remove; no longer needed.
(getsize): Simplify the API: one arg rather than 3.  Don't assume
unsigned long int fits in size_t.
(promote, domult, dodivide, doadd): Remove; no longer needed.
* tests/misc/expr: Don't use --bignum to test for bignum support.
Instead, use big numbers to test this.
</content>
</entry>
</feed>
