aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaibo Huang <hhb@google.com>2020-09-10 22:10:36 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-09-10 22:10:36 +0000
commit58d7d7cc09b861636d54730fd4cac3633ae6b2c6 (patch)
treed1af5ee713dc52e65aff51789f2c82eefbe1c603
parenteb38a56b86150f0d2917c85512b1402ce71c390e (diff)
parent515b62e4ff928dd510365ef0555ccea8afa9c7ef (diff)
downloadone-true-awk-58d7d7cc09b861636d54730fd4cac3633ae6b2c6.tar.gz
Upgrade one-true-awk to 9804285af0866f90731a6e0ce767ab0e7b23b6c6 am: 2eea14555a am: 2d813dd676 am: bc70a1554c am: aa0fd93df2 am: 515b62e4ff
Original change: https://android-review.googlesource.com/c/platform/external/one-true-awk/+/1424150 Change-Id: I5a19698b60f48e530913c102e9f42cae26b9437b
-rw-r--r--FIXES4
-rw-r--r--METADATA6
-rw-r--r--main.c2
-rw-r--r--run.c18
4 files changed, 26 insertions, 4 deletions
diff --git a/FIXES b/FIXES
index 0bfdccd..fcef749 100644
--- a/FIXES
+++ b/FIXES
@@ -25,6 +25,10 @@ THIS SOFTWARE.
This file lists all bug fixes, changes, etc., made since the AWK book
was sent to the printers in August, 1987.
+August 16, 2020:
+ Additional fixes for DJGPP. Thanks to Eli Zaretskii for
+ the testing.
+
August 7, 2020:
Merge PR #93, which adds casts to (void*) for debug prints
using the %p format specifier. Thanks to GitHub user YongHaoWu
diff --git a/METADATA b/METADATA
index d9354a6..1698ade 100644
--- a/METADATA
+++ b/METADATA
@@ -5,11 +5,11 @@ third_party {
type: GIT
value: "https://github.com/onetrueawk/awk.git"
}
- version: "9c63cb6ccd303fb64b703ff0836400f204078621"
+ version: "9804285af0866f90731a6e0ce767ab0e7b23b6c6"
license_type: NOTICE
last_upgrade_date {
year: 2020
- month: 8
- day: 13
+ month: 9
+ day: 9
}
}
diff --git a/main.c b/main.c
index 0f3c4a7..e0219dc 100644
--- a/main.c
+++ b/main.c
@@ -22,7 +22,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
****************************************************************/
-const char *version = "version 20200807";
+const char *version = "version 20200816";
#define DEBUG
#include <stdio.h>
diff --git a/run.c b/run.c
index 01b4597..d5d4fdc 100644
--- a/run.c
+++ b/run.c
@@ -1568,6 +1568,24 @@ static char *nawk_convert(const char *s, int (*fun_c)(int),
}
}
+#ifdef __DJGPP__
+static wint_t towupper(wint_t wc)
+{
+ if (wc >= 0 && wc < 256)
+ return toupper(wc & 0xFF);
+
+ return wc;
+}
+
+static wint_t towlower(wint_t wc)
+{
+ if (wc >= 0 && wc < 256)
+ return tolower(wc & 0xFF);
+
+ return wc;
+}
+#endif
+
static char *nawk_toupper(const char *s)
{
return nawk_convert(s, toupper, towupper);