#! /bin/sh /usr/share/dpatch/dpatch-run ## 22_fix_binmode.dpatch by ## ## Original patch by Aharon Robbins ## See http://lists.gnu.org/archive/html/bug-gnu-utils/2005-12/msg00060.html ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Setting BINMODE on command line produces bogus error @DPATCH@ --- ../gawk-3.1.5/eval.c 2005-07-26 21:07:43.000000000 +0300 +++ gawk-3.1.5/eval.c 2005-12-14 18:57:26.786298398 +0200 @@ -2167,7 +2167,7 @@ } } - if (! digits || (BINMODE_node->var_value->flags & MAYBE_NUM) == 0) { + if (! digits && (BINMODE_node->var_value->flags & MAYBE_NUM) == 0) { BINMODE = 0; if (strcmp(p, "r") == 0) BINMODE = 1;