summaryrefslogtreecommitdiffstats
path: root/contrib/one-true-awk/run.c
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2010-01-10 08:02:07 +0000
committerru <ru@FreeBSD.org>2010-01-10 08:02:07 +0000
commit270ba02de1ffa85c9293d73669cae997f42c62b1 (patch)
treef4923317980c5c94957c3b5a4b1c4906654e92d1 /contrib/one-true-awk/run.c
parentdd1716139623593608ab5a62cd153c48b97bd043 (diff)
downloadFreeBSD-src-270ba02de1ffa85c9293d73669cae997f42c62b1.zip
FreeBSD-src-270ba02de1ffa85c9293d73669cae997f42c62b1.tar.gz
Apply patches directly to sources. Their effect is as follows:
- Make one-true-awk respect locale's collating order in [a-z] bracket expressions, until a more complete fix (like handing BREs) is ready. - Don't require a space between -[fv] and its argument.
Diffstat (limited to 'contrib/one-true-awk/run.c')
-rw-r--r--contrib/one-true-awk/run.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/one-true-awk/run.c b/contrib/one-true-awk/run.c
index 72fc4d0..20c08b1 100644
--- a/contrib/one-true-awk/run.c
+++ b/contrib/one-true-awk/run.c
@@ -22,6 +22,9 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
****************************************************************/
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
#define DEBUG
#include <stdio.h>
#include <ctype.h>
@@ -653,7 +656,7 @@ Cell *relop(Node **a, int n) /* a[0 < a[1], etc. */
j = x->fval - y->fval;
i = j<0? -1: (j>0? 1: 0);
} else {
- i = strcmp(getsval(x), getsval(y));
+ i = strcoll(getsval(x), getsval(y));
}
tempfree(x);
tempfree(y);
OpenPOWER on IntegriCloud