large init script cleanup and merge of whiterussian changes, new dnsmasq config handling
[openwrt.git] / openwrt / package / busybox / patches / 220-awk_bitops.patch
1 --- busybox-1.00/editors/awk.c.orig 2004-09-24 05:24:27 -04:00
2 +++ busybox-1.00/editors/awk.c 2006-03-08 02:16:52 -05:00
3 @@ -271,7 +271,8 @@
4 /* builtins */
5 enum {
6 B_a2=0, B_ix, B_ma, B_sp, B_ss, B_ti, B_lo, B_up,
7 - B_ge, B_gs, B_su
8 + B_ge, B_gs, B_su,
9 + B_an, B_co, B_ls, B_or, B_rs, B_xo,
10 };
11
12 /* tokens and their corresponding info values */
13 @@ -311,6 +312,8 @@
14 "\5while" NTC
15 "\4else" NTC
16
17 + "\3and" "\5compl" "\6lshift" "\2or"
18 + "\6rshift" "\3xor"
19 "\5close" "\6system" "\6fflush" "\5atan2" /* BUILTIN */
20 "\3cos" "\3exp" "\3int" "\3log"
21 "\4rand" "\3sin" "\4sqrt" "\5srand"
22 @@ -364,6 +367,8 @@
23 ST_WHILE,
24 0,
25
26 + OC_B|B_an|P(0x83), OC_B|B_co|P(0x41), OC_B|B_ls|P(0x83), OC_B|B_or|P(0x83),
27 + OC_B|B_rs|P(0x83), OC_B|B_xo|P(0x83),
28 OC_FBLTIN|Sx|F_cl, OC_FBLTIN|Sx|F_sy, OC_FBLTIN|Sx|F_ff, OC_B|B_a2|P(0x83),
29 OC_FBLTIN|Nx|F_co, OC_FBLTIN|Nx|F_ex, OC_FBLTIN|Nx|F_in, OC_FBLTIN|Nx|F_lg,
30 OC_FBLTIN|F_rn, OC_FBLTIN|Nx|F_si, OC_FBLTIN|Nx|F_sq, OC_FBLTIN|Nx|F_sr,
31 @@ -1942,6 +1947,30 @@
32 strncpy(s, as[0]+i, n);
33 s[n] = '\0';
34 setvar_p(res, s);
35 + break;
36 +
37 + case B_an:
38 + setvar_i(res, (long)getvar_i(av[0]) & (long)getvar_i(av[1]));
39 + break;
40 +
41 + case B_co:
42 + setvar_i(res, ~(long)getvar_i(av[0]));
43 + break;
44 +
45 + case B_ls:
46 + setvar_i(res, (long)getvar_i(av[0]) << (long)getvar_i(av[1]));
47 + break;
48 +
49 + case B_or:
50 + setvar_i(res, (long)getvar_i(av[0]) | (long)getvar_i(av[1]));
51 + break;
52 +
53 + case B_rs:
54 + setvar_i(res, (long)((unsigned long)getvar_i(av[0]) >> (unsigned long)getvar_i(av[1])));
55 + break;
56 +
57 + case B_xo:
58 + setvar_i(res, (long)getvar_i(av[0]) ^ (long)getvar_i(av[1]));
59 break;
60
61 case B_lo:
This page took 0.040986 seconds and 5 git commands to generate.