2008-08-28 16:40:53 +00:00
|
|
|
--- a/editors/awk.c
|
|
|
|
+++ b/editors/awk.c
|
2009-02-21 15:07:45 +00:00
|
|
|
@@ -2041,27 +2041,27 @@ static var *exec_builtin(node *op, var *
|
2008-08-28 16:40:53 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case B_an:
|
|
|
|
- setvar_i(res, (long)getvar_i(av[0]) & (long)getvar_i(av[1]));
|
|
|
|
+ setvar_i(res, (unsigned long)getvar_i(av[0]) & (unsigned long)getvar_i(av[1]));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case B_co:
|
|
|
|
- setvar_i(res, ~(long)getvar_i(av[0]));
|
|
|
|
+ setvar_i(res, ~(unsigned long)getvar_i(av[0]));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case B_ls:
|
|
|
|
- setvar_i(res, (long)getvar_i(av[0]) << (long)getvar_i(av[1]));
|
|
|
|
+ setvar_i(res, (unsigned long)getvar_i(av[0]) << (unsigned long)getvar_i(av[1]));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case B_or:
|
|
|
|
- setvar_i(res, (long)getvar_i(av[0]) | (long)getvar_i(av[1]));
|
|
|
|
+ setvar_i(res, (unsigned long)getvar_i(av[0]) | (unsigned long)getvar_i(av[1]));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case B_rs:
|
|
|
|
- setvar_i(res, (long)((unsigned long)getvar_i(av[0]) >> (unsigned long)getvar_i(av[1])));
|
|
|
|
+ setvar_i(res, (unsigned long)getvar_i(av[0]) >> (unsigned long)getvar_i(av[1]));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case B_xo:
|
|
|
|
- setvar_i(res, (long)getvar_i(av[0]) ^ (long)getvar_i(av[1]));
|
|
|
|
+ setvar_i(res, (unsigned long)getvar_i(av[0]) ^ (unsigned long)getvar_i(av[1]));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case B_lo:
|