summaryrefslogtreecommitdiffstats
path: root/contrib/one-true-awk/main.c
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-12-13 04:59:48 +0000
committerobrien <obrien@FreeBSD.org>2002-12-13 04:59:48 +0000
commit279a30e7a9812f477c5991f0df7082a9736bdc00 (patch)
tree59f89c7c67df8769e65e35d1054fb5407fb18d12 /contrib/one-true-awk/main.c
parent4911d68e89b7b39eeb1d42f4e510a4c6c5d26bd3 (diff)
downloadFreeBSD-src-279a30e7a9812f477c5991f0df7082a9736bdc00.zip
FreeBSD-src-279a30e7a9812f477c5991f0df7082a9736bdc00.tar.gz
Vendor import of bwk's 29-Nov-2002 release.
Most significant update is the inclusion of our port's locale patches.
Diffstat (limited to 'contrib/one-true-awk/main.c')
-rw-r--r--contrib/one-true-awk/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/one-true-awk/main.c b/contrib/one-true-awk/main.c
index 5d2be4b..491f1dc 100644
--- a/contrib/one-true-awk/main.c
+++ b/contrib/one-true-awk/main.c
@@ -22,11 +22,12 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
****************************************************************/
-char *version = "version 20020210";
+const char *version = "version 20021129";
#define DEBUG
#include <stdio.h>
#include <ctype.h>
+#include <locale.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
@@ -52,8 +53,9 @@ int safe = 0; /* 1 => "safe" mode */
int main(int argc, char *argv[])
{
- char *fs = NULL;
+ const char *fs = NULL;
+ setlocale(LC_ALL, "");
cmdname = argv[0];
if (argc == 1) {
fprintf(stderr, "Usage: %s [-f programfile | 'program'] [-Ffieldsep] [-v var=value] [files]\n", cmdname);
OpenPOWER on IntegriCloud