mirror of
https://codeberg.org/cage/tinmop/
synced 2024-12-23 23:51:50 +01:00
avoid strtonum (a GNU AWK extension)
this drops the requirements on strtonum, making the script (AFAIK) POSIX compliant. This (ab)uses the fact that `+' will cast its operator to numbers. Tested with GNU AWK and "The One True AWK" on OpenBSD.
This commit is contained in:
parent
8230056152
commit
0571c43c1c
@ -24,7 +24,7 @@ BEGIN {
|
|||||||
function split_version_number (version, parsed) {
|
function split_version_number (version, parsed) {
|
||||||
split(version, parsed, VERSION_SEP);
|
split(version, parsed, VERSION_SEP);
|
||||||
for (i in parsed) {
|
for (i in parsed) {
|
||||||
parsed[i] = strtonum(parsed[i]);
|
parsed[i] = parsed[i] + 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user