summaryrefslogtreecommitdiff
path: root/bin/expr/expr.y
diff options
context:
space:
mode:
authorjtc <jtc@NetBSD.org>1993-08-16 23:20:22 +0000
committerjtc <jtc@NetBSD.org>1993-08-16 23:20:22 +0000
commite9c8ee33b02c219abc130033ae43c165b5808dbd (patch)
tree4629787fe08b14fbbd7e4519e01ac22b10f20cdf /bin/expr/expr.y
parent7bab32a7460411ddd4005ddad28c3c06e9479969 (diff)
expr is supposed to do string comparisons using the locale specific
collation sequence, so use strcoll instead of strcmp.
Diffstat (limited to 'bin/expr/expr.y')
-rw-r--r--bin/expr/expr.y14
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/expr/expr.y b/bin/expr/expr.y
index 2fb89d063b3..640c193346c 100644
--- a/bin/expr/expr.y
+++ b/bin/expr/expr.y
@@ -2,7 +2,7 @@
/* Written by Pace Willisson (pace@blitz.com)
* and placed in the public domain
*
- * $Header: /cvsroot/src/bin/expr/expr.y,v 1.9 1993/07/20 01:10:55 jtc Exp $
+ * $Header: /cvsroot/src/bin/expr/expr.y,v 1.10 1993/08/16 23:20:22 jtc Exp $
*/
#include <stdio.h>
#include <stdlib.h>
@@ -292,7 +292,7 @@ struct val *a, *b;
if (isstring (a) || isstring (b)) {
to_string (a);
to_string (b);
- r = make_integer (strcmp (a->u.s, b->u.s) == 0);
+ r = make_integer (strcoll (a->u.s, b->u.s) == 0);
} else {
r = make_integer (a->u.i == b->u.i);
}
@@ -311,7 +311,7 @@ struct val *a, *b;
if (isstring (a) || isstring (b)) {
to_string (a);
to_string (b);
- r = make_integer (strcmp (a->u.s, b->u.s) > 0);
+ r = make_integer (strcoll (a->u.s, b->u.s) > 0);
} else {
r= make_integer (a->u.i > b->u.i);
}
@@ -330,7 +330,7 @@ struct val *a, *b;
if (isstring (a) || isstring (b)) {
to_string (a);
to_string (b);
- r = make_integer (strcmp (a->u.s, b->u.s) < 0);
+ r = make_integer (strcoll (a->u.s, b->u.s) < 0);
} else {
r = make_integer (a->u.i < b->u.i);
}
@@ -349,7 +349,7 @@ struct val *a, *b;
if (isstring (a) || isstring (b)) {
to_string (a);
to_string (b);
- r = make_integer (strcmp (a->u.s, b->u.s) >= 0);
+ r = make_integer (strcoll (a->u.s, b->u.s) >= 0);
} else {
r = make_integer (a->u.i >= b->u.i);
}
@@ -368,7 +368,7 @@ struct val *a, *b;
if (isstring (a) || isstring (b)) {
to_string (a);
to_string (b);
- r = make_integer (strcmp (a->u.s, b->u.s) <= 0);
+ r = make_integer (strcoll (a->u.s, b->u.s) <= 0);
} else {
r = make_integer (a->u.i <= b->u.i);
}
@@ -387,7 +387,7 @@ struct val *a, *b;
if (isstring (a) || isstring (b)) {
to_string (a);
to_string (b);
- r = make_integer (strcmp (a->u.s, b->u.s) != 0);
+ r = make_integer (strcoll (a->u.s, b->u.s) != 0);
} else {
r = make_integer (a->u.i != b->u.i);
}