ftp.nice.ch/pub/next/developer/languages/translator/schemetoc.s.tar.gz#/schemetoc/xlib/xtimecoord.c

This is xtimecoord.c in view mode; [Download] [Up]

/* SCHEME->C */

#include <objects.h>

DEFSTRING( t1666, 
           "Argument not an unsigned 8-bit INTEGER: ~s", 42 );
DEFSTATICTSCP2( c1627, t1666 );
DEFSTRING( t1667, "INTEGER->CHAR", 13 );
DEFSTATICTSCP( c1626 );
DEFSTRING( t1668, "XTIMECOORDP", 11 );
DEFSTATICTSCP( c1598 );

static void  init_constants()
{
        c1626 = STRINGTOSYMBOL( U_TX( ADR( t1667 ) ) );
        CONSTANTEXP( ADR( c1626 ) );
        c1598 = STRINGTOSYMBOL( U_TX( ADR( t1668 ) ) );
        CONSTANTEXP( ADR( c1598 ) );
}

DEFTSCP( xtimecoord_make_2dxtimecoord_v );
DEFSTRING( t1669, "MAKE-XTIMECOORD", 15 );
EXTERNTSCPP( sc_cons );
EXTERNTSCP( sc_cons_v );
EXTERNTSCPP( sc_make_2dstring );
EXTERNTSCP( sc_make_2dstring_v );
EXTERNTSCPP( scrt2__3c_2dtwo );
EXTERNTSCP( scrt2__3c_2dtwo_v );
EXTERNTSCPP( scrt2__3e_2dtwo );
EXTERNTSCP( scrt2__3e_2dtwo_v );
EXTERNTSCPP( scrt6_error );
EXTERNTSCP( scrt6_error_v );

TSCP  xtimecoord_make_2dxtimecoord(  )
{
        TSCP  X4, X3, X2, X1;

        X3 = BOOLEAN( NEQ( TSCPTAG( _TSCP( 0 ) ), FIXNUMTAG ) );
        if  ( TRUE( X3 ) )  goto  L1676;
        if  ( BITAND( BITOR( INT( _TSCP( 0 ) ), 
                             INT( _TSCP( 0 ) ) ), 
                      3 ) )  goto  L1677;
        X4 = BOOLEAN( LT( INT( _TSCP( 0 ) ), 
                          INT( _TSCP( 0 ) ) ) );
        goto L1678;
L1677:
        X4 = scrt2__3c_2dtwo( _TSCP( 0 ), _TSCP( 0 ) );
L1678:
        if  ( TRUE( X4 ) )  goto  L1676;
        if  ( BITAND( BITOR( INT( _TSCP( 0 ) ), 
                             INT( _TSCP( 1020 ) ) ), 
                      3 ) )  goto  L1685;
        if  ( GT( INT( _TSCP( 0 ) ), INT( _TSCP( 1020 ) ) ) )  goto  L1676;
        goto L1692;
L1685:
        if  ( FALSE( scrt2__3e_2dtwo( _TSCP( 0 ), _TSCP( 1020 ) ) )
            )  goto  L1692;
L1676:
        scrt6_error( c1626, 
                     c1627, CONS( _TSCP( 0 ), EMPTYLIST ) );
L1692:
        X1 = sc_make_2dstring( _TSCP( 32 ), 
                               CONS( FIX_CHAR( _TSCP( 0 ) ), 
                                     EMPTYLIST ) );
        return( sc_cons( c1598, X1 ) );
}

DEFTSCP( xtimecoord_xtimecoord_2dtime_v );
DEFSTRING( t1693, "XTIMECOORD-TIME", 15 );
EXTERNTSCPP( scrt4_c_2dunsigned_2dref );
EXTERNTSCP( scrt4_c_2dunsigned_2dref_v );
EXTERNTSCPP( xlibtypes_chk_2dxtimecoordp );
EXTERNTSCP( xlibtypes_chk_2dxtimecoordp_v );

TSCP  xtimecoord_xtimecoord_2dtime( x1630 )
        TSCP  x1630;
{
        TSCP  X1;

        X1 = xlibtypes_chk_2dxtimecoordp( x1630 );
        return( scrt4_c_2dunsigned_2dref( X1, _TSCP( 0 ) ) );
}

DEFTSCP( timecoord__2dtime_21_e925dc1e_v );
DEFSTRING( t1695, "XTIMECOORD-TIME!", 16 );
EXTERNTSCPP( scrt4_c_2dunsigned_2dset_21 );
EXTERNTSCP( scrt4_c_2dunsigned_2dset_21_v );

TSCP  timecoord__2dtime_21_e925dc1e( x1633, y1634 )
        TSCP  x1633, y1634;
{
        TSCP  X1;

        X1 = xlibtypes_chk_2dxtimecoordp( x1633 );
        return( scrt4_c_2dunsigned_2dset_21( X1, _TSCP( 0 ), y1634 ) );
}

DEFTSCP( xtimecoord_xtimecoord_2dx_v );
DEFSTRING( t1697, "XTIMECOORD-X", 12 );
EXTERNTSCPP( scrt4_c_2dshortint_2dref );
EXTERNTSCP( scrt4_c_2dshortint_2dref_v );

TSCP  xtimecoord_xtimecoord_2dx( x1637 )
        TSCP  x1637;
{
        TSCP  X1;

        X1 = xlibtypes_chk_2dxtimecoordp( x1637 );
        return( scrt4_c_2dshortint_2dref( X1, _TSCP( 16 ) ) );
}

DEFTSCP( xtimecoord_xtimecoord_2dx_21_v );
DEFSTRING( t1699, "XTIMECOORD-X!", 13 );
EXTERNTSCPP( scrt4_c_2dshortint_2dset_21 );
EXTERNTSCP( scrt4_c_2dshortint_2dset_21_v );

TSCP  xtimecoord_xtimecoord_2dx_21( x1641, y1642 )
        TSCP  x1641, y1642;
{
        TSCP  X1;

        X1 = xlibtypes_chk_2dxtimecoordp( x1641 );
        return( scrt4_c_2dshortint_2dset_21( X1, 
                                             _TSCP( 16 ), y1642 ) );
}

DEFTSCP( xtimecoord_xtimecoord_2dy_v );
DEFSTRING( t1701, "XTIMECOORD-Y", 12 );

TSCP  xtimecoord_xtimecoord_2dy( x1645 )
        TSCP  x1645;
{
        TSCP  X1;

        X1 = xlibtypes_chk_2dxtimecoordp( x1645 );
        return( scrt4_c_2dshortint_2dref( X1, _TSCP( 24 ) ) );
}

DEFTSCP( xtimecoord_xtimecoord_2dy_21_v );
DEFSTRING( t1703, "XTIMECOORD-Y!", 13 );

TSCP  xtimecoord_xtimecoord_2dy_21( x1649, y1650 )
        TSCP  x1649, y1650;
{
        TSCP  X1;

        X1 = xlibtypes_chk_2dxtimecoordp( x1649 );
        return( scrt4_c_2dshortint_2dset_21( X1, 
                                             _TSCP( 24 ), y1650 ) );
}

static void  init_modules( compiler_version )
        char *compiler_version;
{
        xlibtypes__init();
        scrt4__init();
        scrt6__init();
        scrt2__init();
        MAXDISPLAY( 0 );
}

void  xtimecoord__init()
{
        static int  init = 0;
        if  (init)  return;
        init = 1;
        INITHEAP( 0, 0, 0, 0 );
        init_constants();
        init_modules( "(xtimecoord SCHEME->C COMPILER 28sep90jfb)" );
        INITIALIZEVAR( U_TX( ADR( t1669 ) ), 
                       ADR( xtimecoord_make_2dxtimecoord_v ), 
                       MAKEPROCEDURE( 0, 
                                      0, 
                                      xtimecoord_make_2dxtimecoord, 
                                      EMPTYLIST ) );
        INITIALIZEVAR( U_TX( ADR( t1693 ) ), 
                       ADR( xtimecoord_xtimecoord_2dtime_v ), 
                       MAKEPROCEDURE( 1, 
                                      0, 
                                      xtimecoord_xtimecoord_2dtime, 
                                      EMPTYLIST ) );
        INITIALIZEVAR( U_TX( ADR( t1695 ) ), 
                       ADR( timecoord__2dtime_21_e925dc1e_v ), 
                       MAKEPROCEDURE( 2, 
                                      0, 
                                      timecoord__2dtime_21_e925dc1e, 
                                      EMPTYLIST ) );
        INITIALIZEVAR( U_TX( ADR( t1697 ) ), 
                       ADR( xtimecoord_xtimecoord_2dx_v ), 
                       MAKEPROCEDURE( 1, 
                                      0, 
                                      xtimecoord_xtimecoord_2dx, 
                                      EMPTYLIST ) );
        INITIALIZEVAR( U_TX( ADR( t1699 ) ), 
                       ADR( xtimecoord_xtimecoord_2dx_21_v ), 
                       MAKEPROCEDURE( 2, 
                                      0, 
                                      xtimecoord_xtimecoord_2dx_21, 
                                      EMPTYLIST ) );
        INITIALIZEVAR( U_TX( ADR( t1701 ) ), 
                       ADR( xtimecoord_xtimecoord_2dy_v ), 
                       MAKEPROCEDURE( 1, 
                                      0, 
                                      xtimecoord_xtimecoord_2dy, 
                                      EMPTYLIST ) );
        INITIALIZEVAR( U_TX( ADR( t1703 ) ), 
                       ADR( xtimecoord_xtimecoord_2dy_21_v ), 
                       MAKEPROCEDURE( 2, 
                                      0, 
                                      xtimecoord_xtimecoord_2dy_21, 
                                      EMPTYLIST ) );
        return;
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.