diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2010-12-06 22:02:27 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2010-12-06 22:02:27 +0200 |
commit | 86643fa35036db1f40ce61da6358da455abe3c3b (patch) | |
tree | 6e391bacf6411fdb6b38b35b4793842b6c577b09 /awklib/eg | |
parent | 6b9ed56f74baa4af529e100dff19afcd23ed7cd8 (diff) | |
download | egawk-86643fa35036db1f40ce61da6358da455abe3c3b.tar.gz egawk-86643fa35036db1f40ce61da6358da455abe3c3b.tar.bz2 egawk-86643fa35036db1f40ce61da6358da455abe3c3b.zip |
More doc updates. Remove whiny test.
Diffstat (limited to 'awklib/eg')
-rw-r--r-- | awklib/eg/lib/gettime.awk | 2 | ||||
-rw-r--r-- | awklib/eg/lib/strtonum.awk | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/awklib/eg/lib/gettime.awk b/awklib/eg/lib/gettime.awk index d79b8f40..95f9c329 100644 --- a/awklib/eg/lib/gettime.awk +++ b/awklib/eg/lib/gettime.awk @@ -31,7 +31,7 @@ function gettimeofday(time, ret, now, i) now = systime() # return date(1)-style output - ret = strftime("%a %b %d %H:%M:%S %Z %Y", now) + ret = strftime("%a %b %e %H:%M:%S %Z %Y", now) # clear out target array delete time diff --git a/awklib/eg/lib/strtonum.awk b/awklib/eg/lib/strtonum.awk index a71341fb..6b8498a8 100644 --- a/awklib/eg/lib/strtonum.awk +++ b/awklib/eg/lib/strtonum.awk @@ -17,7 +17,7 @@ function mystrtonum(str, ret, chars, n, i, k, c) ret = ret * 8 + k } - } else if (str ~ /^0[xX][0-9a-fA-f]+/) { + } else if (str ~ /^0[xX][[:xdigit:]]+/) { # hexadecimal str = substr(str, 3) # lop off leading 0x n = length(str) @@ -32,7 +32,8 @@ function mystrtonum(str, ret, chars, n, i, k, c) ret = ret * 16 + k } - } else if (str ~ /^[-+]?([0-9]+([.][0-9]*([Ee][0-9]+)?)?|([.][0-9]+([Ee][-+]?[0-9]+)?))$/) { + } else if (str ~ \ + /^[-+]?([0-9]+([.][0-9]*([Ee][0-9]+)?)?|([.][0-9]+([Ee][-+]?[0-9]+)?))$/) { # decimal number, possibly floating point ret = str + 0 } else |