added qse_awk_rtx_callwithstrs()

This commit is contained in:
2012-10-18 14:11:59 +00:00
parent e2f152c927
commit 3cec861547
9 changed files with 168 additions and 20 deletions

View File

@ -0,0 +1,24 @@
function ip2int(ip) {
ret=0;
n=split(ip,a,".");
for (x=1;x<=n;x++) ret= ((ret << 8) | a[x])
return ret
}
function int2ip(ip, ret,x) {
ret = ip & 255;
ip = ip >> 8;
for(;x<3;x++) {
ret=(ip & 255)"."ret;
ip=ip >> 8;
}
return ret
}
BEGIN {
print int2ip(ip2int("255.255.255.0"));
print int2ip(ip2int("255.0.255.0"));
print int2ip(ip2int("127.0.0.1"));
print int2ip(ip2int("192.168.1.1"));
}

View File

@ -2419,6 +2419,41 @@ that is wonderful
hello world 45
1
--------------------------------------------------------------------------------
[CMD] qseawk --newline=on --extraops=on -d- -f lang-048.awk </dev/stdin 2>&1
--------------------------------------------------------------------------------
function int2ip (__p0, __p1, __p2)
{
__p1 = (__p0 & 255);
__p0 = (__p0 >> 8);
for (; (__p2 < 3); (__p2)++)
{
__p1 = (((__p0 & 255) ".") __p1);
__p0 = (__p0 >> 8);
}
return __p1;
}
function ip2int (__p0)
{
ret = 0;
n = split(__p0,a,".");
for (x = 1; (x <= n); (x)++)
ret = ((ret << 8) | a[x]);
return ret;
}
BEGIN {
print int2ip(ip2int("255.255.255.0"));
print int2ip(ip2int("255.0.255.0"));
print int2ip(ip2int("127.0.0.1"));
print int2ip(ip2int("192.168.1.1"));
}
255.255.255.0
255.0.255.0
127.0.0.1
192.168.1.1
--------------------------------------------------------------------------------
[CMD] qseawk --newline=on -F: -f columnate.awk passwd.dat </dev/stdin 2>&1
--------------------------------------------------------------------------------
root x 0 0 root /root /bin/bash

View File

@ -2419,6 +2419,41 @@ that is wonderful
hello world 45
1
--------------------------------------------------------------------------------
[CMD] qseawk -m 500000 --newline=on --extraops=on -d- -f lang-048.awk </dev/stdin 2>&1
--------------------------------------------------------------------------------
function int2ip (__p0, __p1, __p2)
{
__p1 = (__p0 & 255);
__p0 = (__p0 >> 8);
for (; (__p2 < 3); (__p2)++)
{
__p1 = (((__p0 & 255) ".") __p1);
__p0 = (__p0 >> 8);
}
return __p1;
}
function ip2int (__p0)
{
ret = 0;
n = split(__p0,a,".");
for (x = 1; (x <= n); (x)++)
ret = ((ret << 8) | a[x]);
return ret;
}
BEGIN {
print int2ip(ip2int("255.255.255.0"));
print int2ip(ip2int("255.0.255.0"));
print int2ip(ip2int("127.0.0.1"));
print int2ip(ip2int("192.168.1.1"));
}
255.255.255.0
255.0.255.0
127.0.0.1
192.168.1.1
--------------------------------------------------------------------------------
[CMD] qseawk -m 500000 --newline=on -F: -f columnate.awk passwd.dat </dev/stdin 2>&1
--------------------------------------------------------------------------------
root x 0 0 root /root /bin/bash

View File

@ -174,6 +174,7 @@ PROGS="
lang-045.awk!!!--newline=on -d-
lang-046.awk!lang-046.dat2!!--newline=on -d- -vdatadir=@abs_srcdir@ -vdatafile=lang-046.dat1
lang-047.awk!!!--newline=on --tolerant=on -d-
lang-048.awk!!!--newline=on --extraops=on -d-
columnate.awk!passwd.dat!!--newline=on -F:
levenshtein-utests.awk!!!--newline=on --include=on