require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_TC_STICREG_H_)) {
    eval 'sub _TC_STICREG_H_ () {1;}' unless defined(&_TC_STICREG_H_);
    eval 'sub STAMP_CMD_POINTS () {(0x);}' unless defined(&STAMP_CMD_POINTS);
    eval 'sub STAMP_CMD_LINES () {(0x1);}' unless defined(&STAMP_CMD_LINES);
    eval 'sub STAMP_CMD_TRIANGLES () {(0x2);}' unless defined(&STAMP_CMD_TRIANGLES);
    eval 'sub STAMP_CMD_COPYSPANS () {(0x5);}' unless defined(&STAMP_CMD_COPYSPANS);
    eval 'sub STAMP_CMD_READSPANS () {(0x6);}' unless defined(&STAMP_CMD_READSPANS);
    eval 'sub STAMP_CMD_WRITESPANS () {(0x7);}' unless defined(&STAMP_CMD_WRITESPANS);
    eval 'sub STAMP_CMD_VIDEO () {(0x8);}' unless defined(&STAMP_CMD_VIDEO);
    eval 'sub STAMP_RGB_NONE () {(0x);}' unless defined(&STAMP_RGB_NONE);
    eval 'sub STAMP_RGB_CONST () {(0x10);}' unless defined(&STAMP_RGB_CONST);
    eval 'sub STAMP_RGB_FLAT () {(0x20);}' unless defined(&STAMP_RGB_FLAT);
    eval 'sub STAMP_RGB_SMOOTH () {(0x30);}' unless defined(&STAMP_RGB_SMOOTH);
    eval 'sub STAMP_Z_NONE () {(0x);}' unless defined(&STAMP_Z_NONE);
    eval 'sub STAMP_Z_CONST () {(0x40);}' unless defined(&STAMP_Z_CONST);
    eval 'sub STAMP_Z_FLAT () {(0x80);}' unless defined(&STAMP_Z_FLAT);
    eval 'sub STAMP_Z_SMOOTH () {(0xc0);}' unless defined(&STAMP_Z_SMOOTH);
    eval 'sub STAMP_XY_NONE () {(0x);}' unless defined(&STAMP_XY_NONE);
    eval 'sub STAMP_XY_PERPACKET () {(0x100);}' unless defined(&STAMP_XY_PERPACKET);
    eval 'sub STAMP_XY_PERPRIMATIVE () {(0x200);}' unless defined(&STAMP_XY_PERPRIMATIVE);
    eval 'sub STAMP_LW_NONE () {(0x);}' unless defined(&STAMP_LW_NONE);
    eval 'sub STAMP_LW_PERPACKET () {(0x400);}' unless defined(&STAMP_LW_PERPACKET);
    eval 'sub STAMP_LW_PERPRIMATIVE () {(0x800);}' unless defined(&STAMP_LW_PERPRIMATIVE);
    eval 'sub STAMP_CLIPRECT () {(0x80000);}' unless defined(&STAMP_CLIPRECT);
    eval 'sub STAMP_MESH () {(0x200000);}' unless defined(&STAMP_MESH);
    eval 'sub STAMP_AALINE () {(0x800000);}' unless defined(&STAMP_AALINE);
    eval 'sub STAMP_HS_EQUALS () {(0x80000000);}' unless defined(&STAMP_HS_EQUALS);
    eval 'sub STAMP_PLANE_8X3 () {(0<< 5);}' unless defined(&STAMP_PLANE_8X3);
    eval 'sub STAMP_PLANE_24 () {(1<< 5);}' unless defined(&STAMP_PLANE_24);
    eval 'sub STAMP_WE_SIGN () {(0x4 << 8);}' unless defined(&STAMP_WE_SIGN);
    eval 'sub STAMP_WE_XYMASK () {(0x2 << 8);}' unless defined(&STAMP_WE_XYMASK);
    eval 'sub STAMP_WE_CLIPRECT () {(0x1 << 8);}' unless defined(&STAMP_WE_CLIPRECT);
    eval 'sub STAMP_WE_NONE () {(0x << 8);}' unless defined(&STAMP_WE_NONE);
    eval 'sub STAMP_METHOD_CLEAR () {(0x60 << 12);}' unless defined(&STAMP_METHOD_CLEAR);
    eval 'sub STAMP_METHOD_AND () {(0x14 << 12);}' unless defined(&STAMP_METHOD_AND);
    eval 'sub STAMP_METHOD_ANDREV () {(0x15 << 12);}' unless defined(&STAMP_METHOD_ANDREV);
    eval 'sub STAMP_METHOD_COPY () {(0x20 << 12);}' unless defined(&STAMP_METHOD_COPY);
    eval 'sub STAMP_METHOD_ANDINV () {(0x16 << 12);}' unless defined(&STAMP_METHOD_ANDINV);
    eval 'sub STAMP_METHOD_NOOP () {(0x40 << 12);}' unless defined(&STAMP_METHOD_NOOP);
    eval 'sub STAMP_METHOD_XOR () {(0x11 << 12);}' unless defined(&STAMP_METHOD_XOR);
    eval 'sub STAMP_METHOD_OR () {(0xf << 12);}' unless defined(&STAMP_METHOD_OR);
    eval 'sub STAMP_METHOD_NOR () {(0x17 << 12);}' unless defined(&STAMP_METHOD_NOR);
    eval 'sub STAMP_METHOD_EQUIV () {(0x10 << 12);}' unless defined(&STAMP_METHOD_EQUIV);
    eval 'sub STAMP_METHOD_INV () {(0x4e << 12);}' unless defined(&STAMP_METHOD_INV);
    eval 'sub STAMP_METHOD_ORREV () {(0xe << 12);}' unless defined(&STAMP_METHOD_ORREV);
    eval 'sub STAMP_METHOD_COPYINV () {(0x2d << 12);}' unless defined(&STAMP_METHOD_COPYINV);
    eval 'sub STAMP_METHOD_ORINV () {(0xd << 12);}' unless defined(&STAMP_METHOD_ORINV);
    eval 'sub STAMP_METHOD_NAND () {(0xc << 12);}' unless defined(&STAMP_METHOD_NAND);
    eval 'sub STAMP_METHOD_SET () {(0x6c << 12);}' unless defined(&STAMP_METHOD_SET);
    eval 'sub STAMP_METHOD_SUM () {(0x << 12);}' unless defined(&STAMP_METHOD_SUM);
    eval 'sub STAMP_METHOD_DIFF () {(0x2 << 12);}' unless defined(&STAMP_METHOD_DIFF);
    eval 'sub STAMP_METHOD_REVDIFF () {(0x1 << 12);}' unless defined(&STAMP_METHOD_REVDIFF);
    eval 'sub STAMP_DB_NONE () {(0x << 28);}' unless defined(&STAMP_DB_NONE);
    eval 'sub STAMP_DB_01 () {(0x1 << 28);}' unless defined(&STAMP_DB_01);
    eval 'sub STAMP_DB_12 () {(0x2 << 28);}' unless defined(&STAMP_DB_12);
    eval 'sub STAMP_DB_02 () {(0x4 << 28);}' unless defined(&STAMP_DB_02);
    eval 'sub STAMP_UPDATE_ENABLE () {(1<< 0);}' unless defined(&STAMP_UPDATE_ENABLE);
    eval 'sub STAMP_SAVE_SIGN () {(1<< 6);}' unless defined(&STAMP_SAVE_SIGN);
    eval 'sub STAMP_SAVE_ALPHA () {(1<< 7);}' unless defined(&STAMP_SAVE_ALPHA);
    eval 'sub STAMP_SUPERSAMPLE () {(1<< 11);}' unless defined(&STAMP_SUPERSAMPLE);
    eval 'sub STAMP_SPAN () {(1<< 19);}' unless defined(&STAMP_SPAN);
    eval 'sub STAMP_COPYSPAN_ALIGNED () {(1<< 20);}' unless defined(&STAMP_COPYSPAN_ALIGNED);
    eval 'sub STAMP_MINMAX () {(1<< 21);}' unless defined(&STAMP_MINMAX);
    eval 'sub STAMP_MULT () {(1<< 22);}' unless defined(&STAMP_MULT);
    eval 'sub STAMP_MULTACC () {(1<< 23);}' unless defined(&STAMP_MULTACC);
    eval 'sub STAMP_HALF_BUFF () {(1<< 27);}' unless defined(&STAMP_HALF_BUFF);
    eval 'sub STAMP_INITIALIZE () {(1<< 31);}' unless defined(&STAMP_INITIALIZE);
    eval 'sub XMASKADDR {
        my($sw, $sx, $a) = @_;
	    eval q(((($a)-(($sx) % ($sw))) & 15));
    }' unless defined(&XMASKADDR);
    eval 'sub YMASKADDR {
        my($shm, $sy, $b) = @_;
	    eval q(((($b)-(($sy) & ($shm))) & 15));
    }' unless defined(&YMASKADDR);
    eval 'sub XYMASKADDR {
        my($sw,$shm,$x,$y,$a,$b) = @_;
	    eval q(( &XMASKADDR($sw,$x,$a) << 16|  &YMASKADDR($shm,$y,$b)));
    }' unless defined(&XYMASKADDR);
    eval 'sub STIC_MAGIC_X () {370;}' unless defined(&STIC_MAGIC_X);
    eval 'sub STIC_MAGIC_Y () {37;}' unless defined(&STIC_MAGIC_Y);
    eval 'sub STAMP_OK () {(0);}' unless defined(&STAMP_OK);
    eval 'sub STAMP_BUSY () {(1);}' unless defined(&STAMP_BUSY);
    eval 'sub STAMP_RETRIES () {(100000);}' unless defined(&STAMP_RETRIES);
    eval 'sub STAMP_DELAY () {(10);}' unless defined(&STAMP_DELAY);
    eval 'sub STIC_CSR_TSTFNC () {0x3;}' unless defined(&STIC_CSR_TSTFNC);
    eval 'sub STIC_CSR_TSTFNC_NORMAL () {0;}' unless defined(&STIC_CSR_TSTFNC_NORMAL);
    eval 'sub STIC_CSR_TSTFNC_PARITY () {1;}' unless defined(&STIC_CSR_TSTFNC_PARITY);
    eval 'sub STIC_CSR_TSTFNC_CNTPIX () {2;}' unless defined(&STIC_CSR_TSTFNC_CNTPIX);
    eval 'sub STIC_CSR_TSTFNC_TSTDAC () {3;}' unless defined(&STIC_CSR_TSTFNC_TSTDAC);
    eval 'sub STIC_CSR_CHECKPAR () {0x4;}' unless defined(&STIC_CSR_CHECKPAR);
    eval 'sub STIC_CSR_STARTVT () {0x10;}' unless defined(&STIC_CSR_STARTVT);
    eval 'sub STIC_CSR_START () {0x20;}' unless defined(&STIC_CSR_START);
    eval 'sub STIC_CSR_RESET () {0x40;}' unless defined(&STIC_CSR_RESET);
    eval 'sub STIC_CSR_STARTST () {0x80;}' unless defined(&STIC_CSR_STARTST);
    eval 'sub STIC_INT_E_EN () {0x1;}' unless defined(&STIC_INT_E_EN);
    eval 'sub STIC_INT_E () {0x2;}' unless defined(&STIC_INT_E);
    eval 'sub STIC_INT_E_WE () {0x4;}' unless defined(&STIC_INT_E_WE);
    eval 'sub STIC_INT_V_EN () {0x100;}' unless defined(&STIC_INT_V_EN);
    eval 'sub STIC_INT_V () {0x200;}' unless defined(&STIC_INT_V);
    eval 'sub STIC_INT_V_WE () {0x400;}' unless defined(&STIC_INT_V_WE);
    eval 'sub STIC_INT_P_EN () {0x10000;}' unless defined(&STIC_INT_P_EN);
    eval 'sub STIC_INT_P () {0x20000;}' unless defined(&STIC_INT_P);
    eval 'sub STIC_INT_P_WE () {0x40000;}' unless defined(&STIC_INT_P_WE);
    eval 'sub STIC_INT_E_MASK () {( &STIC_INT_E_EN |  &STIC_INT_E |  &STIC_INT_E_WE);}' unless defined(&STIC_INT_E_MASK);
    eval 'sub STIC_INT_V_MASK () {( &STIC_INT_V_EN |  &STIC_INT_V |  &STIC_INT_V_WE);}' unless defined(&STIC_INT_V_MASK);
    eval 'sub STIC_INT_P_MASK () {( &STIC_INT_P_EN |  &STIC_INT_P |  &STIC_INT_P_WE);}' unless defined(&STIC_INT_P_MASK);
    eval 'sub STIC_INT_MASK () {( &STIC_INT_E_MASK |  &STIC_INT_P_MASK |  &STIC_INT_V_MASK);}' unless defined(&STIC_INT_MASK);
    eval 'sub STIC_INT_WE () {( &STIC_INT_E_WE |  &STIC_INT_V_WE |  &STIC_INT_P_WE);}' unless defined(&STIC_INT_WE);
    eval 'sub STIC_INT_CLR () {( &STIC_INT_E_EN |  &STIC_INT_V_EN |  &STIC_INT_P_EN);}' unless defined(&STIC_INT_CLR);
}
1;
