Exemple #1
0
static void doBanner( void )
{
    myPrintf( banner1w( "Win386 Bind Utility",_WBIND_VERSION_ ) "\n" );
    myPrintf( banner2 "\n" );
    myPrintf( banner2a( "1991" ) "\n" );
    myPrintf( banner3 "\n" );
    myPrintf( banner3a "\n" );
    myPrintf("\n");
}
Exemple #2
0
/*
 * The copyright banner
 */
static void wbanner( void )
/*************************/
{
    Wdputs( banner1w( "Executable Image Dump Utility", BAN_VER_STR ) "\n" );
    Wdputs( banner2 "\n" );
    Wdputs( banner2a( "1984" ) "\n" );
    Wdputs( banner3 "\n" );
    Wdputs( banner3a "\n\n" );
}
Exemple #3
0
void Banner( void )
{
    if( qflag ) {
        return;
    }
    printf( "%s\n", banner1w( "Editor Bind Utility",_EDBIND_VERSION_ ) );
    printf( "%s\n", banner2a() );
    printf( "%s\n", banner3 );
    printf( "%s\n", banner3a );
}
Exemple #4
0
static void ShowProductInfo( void )
{
    if( quiet == FALSE ) {
        Output( banner1w( "OMF Dump Utility", BAN_VER_STR ) CRLF );
        Output( banner2 CRLF );
        Output( banner2a( "1984" ) CRLF );
        Output( banner3 CRLF );
        Output( banner3a CRLF );
    }
}
static void Banner( void )
{
    if( qflag ) {
        return;
    }
    printf( banner1w( "Editor Bind Utility", _EDBIND_VERSION_ ) "\n" );
    printf( banner2 "\n" );
    printf( banner2a( "1984" ) "\n" );
    printf( banner3 "\n" );
    printf( banner3a "\n" );
}
Exemple #6
0
static void displayBanner( void )
{
    if( quietFlag ) {
        return;
    }
    printf( banner1w( "CTAGS Utility", "1.0" ) "\n" );
    printf( banner2 "\n" );
    printf( banner2a( "1984" ) "\n" );
    printf( banner3 "\n" );
    printf( banner3a "\n" );

} /* displayBanner */
Exemple #7
0
STATIC void header( void ) {

    if( headerDone ) return;
    headerDone = 1;
    if( cmdLine.quiet ) return;
    PrtFmt(
        banner1w( "Object Module Processor", _WOMP_VERSION_ ) "\n"
        banner2 "\n"
        banner2a( "1990" ) "\n"
        banner3 "\n"
        banner3a "\n"
    );
}
Exemple #8
0
void OpeningStatement( void )
{
#if defined( VERSION_ON_EXTRA_LINE )
    Output( banner1w1( SERVNAME ) "\r\n" );
    Output( banner1w2( _XXXSERV_VERSION_ ) "\r\n" );
#else
    Output( banner1w( SERVNAME, _XXXSERV_VERSION_ ) "\r\n" );
#endif
    Output( banner2 "\r\n" );
    Output( banner2a( "1988" ) "\r\n" );
    Output( banner3 "\r\n" );
    Output( banner3a "\r\n" );
}
Exemple #9
0
void    PrtBanner( void ) {
//===========================

#if defined( _BETAVER )
    puts( banner1w1( "F77 " _TARGET_ " Compile and Link Utility" ) );
    puts( banner1w2( _WFL_VERSION_ ) );
#else
    puts( banner1w( "F77 " _TARGET_ " Compile and Link Utility", _WFL_VERSION_ ) );
#endif
    puts( banner2 );
    puts( banner2a( 1990 ) );
    puts( banner3 );
    puts( banner3a );
}
Exemple #10
0
void g_banner( void )
{
    if( !(GlobalFlags.bannerprinted | GlobalFlags.quiet) ) {
        out_msg( banner1w( "Script/GML", _WGML_VERSION_ ) CRLF );
        out_msg( banner2a() CRLF );
        out_msg( banner3 CRLF );
        out_msg( banner3a CRLF );
        out_msg( "Compiled with WATCOMC "xmystr(__WATCOMC__)
                 " "__DATE__" "__TIME__ CRLF);
#ifdef  TRMEM
        out_msg( "Compiled with TRMEM memory tracker (trmem)" CRLF );
#endif
        GlobalFlags.bannerprinted = 1;
    }
}
Exemple #11
0
/*
 * Print the copyright banner.
 */
void BannerMessage( void )
/************************/
{
    static int          alreadyPrinted;
    static char *       helpMsg = {
        banner1w( "C/C++ ASAXP Clone for " CPU_NAME " ", _ASAXP_CLONE_VERSION_ ) "\n"
        banner2 "\n"
        banner2a( "1995" ) "\n"
        banner3 "\n"
        banner3a "\n"
    };

    if( !alreadyPrinted && !quietMode ) {
        printf( helpMsg );
        alreadyPrinted = 1;
    }
}
Exemple #12
0
/*
 * Print the copyright banner.
 */
void BannerMessage( void )
/************************/
{
    static bool         alreadyPrinted = false;
    static char *       helpMsg = {
        banner1w( "C/C++ LIB Clone for " CPU_NAME " ", _LIB_CLONE_VERSION_ ) "\n"
        banner2 "\n"
        banner2a( 1995 ) "\n"
        banner3 "\n"
        banner3a "\n"
    };

    if( !alreadyPrinted && !quietMode ) {
        printf( helpMsg );
        alreadyPrinted = true;
    }
}
Exemple #13
0
void print_banner( void )
{
    static int  done;

    if( done )
        return;
#if defined( _BETAVER )
    puts( banner1w1( "C/C++ " _TARGET_ " Compiler Driver Program" ) );
    puts( banner1w2( _WCL_VERSION_ ) );
#else
    puts( banner1w( "C/C++ " _TARGET_ " Compiler Driver Program", _WCL_VERSION_ ) );
#endif
    puts( banner2 );
    puts( banner2a( "1988" ) );
    puts( banner3 );
    puts( banner3a );
    done = 1;
}
Exemple #14
0
/*
 * Print the copyright banner.
 */
void BannerMessage( void )
/************************/
{
    static bool         alreadyPrinted = false;
    static char *       helpMsg = {
        banner1w( "C/C++ LINK Clone for " CPU_NAME " ", _LINK_CLONE_VERSION_ ) "\n"
        banner2 "\n"
        banner2a( "1995" ) "\n"
        banner3 "\n"
        banner3a "\n"
        "Compatible with LINK Version " _MS_LINK_VERSION_ "\n"
    };

    if( !alreadyPrinted && !quietMode ) {
        printf( helpMsg );
        alreadyPrinted = true;
    }
}
Exemple #15
0
void print_banner( void )
/***********************/
{
    static int done;

    if( done )
        return;
#if defined( _BETAVER )
    puts( banner1w1( "C/C++ " _TARGET_ " Compile and Link Utility" ) );
    puts( banner1w2( _WCL_VERSION_ ) );
#else
    puts( banner1w( "C/C++ " _TARGET_ " Compile and Link Utility", _WCL_VERSION_ ) );
#endif
    puts( banner2 );
    puts( banner2a( "1988" ) );
    puts( banner3 );
    puts( banner3a );
    done = 1;
}
Exemple #16
0
void CBanner( void )
{
    if( CompFlags.banner_printed ) return;
    if( CompFlags.quiet_mode )     return;
#if defined( _BETAVER )
    __puts( banner1w1( "C++ " _TARGET_ " Optimizing Compiler" ) );
    __puts( banner1w2( _WPP_VERSION_ ) );
#else
    __puts( banner1w( "C++ " _TARGET_ " Optimizing Compiler", _WPP_VERSION_ ) );
#endif
    __puts( banner2 );
    __puts( banner2a( "1989" ) );
    __puts( banner3 );
    __puts( banner3a );
    if( Token[0] != '$' ) {             /* if finger print present */
        __puts( Token );                /* - print it */
    }
    CompFlags.banner_printed = 1;                       /* 13-mar-90 */
}
Exemple #17
0
extern void Banner( void ) {
//**************************

    static bool printed = FALSE;

    if( _IsOption( BE_QUIET ) || printed ) return;
#if defined( AS_ALPHA )
    puts( banner1w( "Alpha AXP Assembler", "0.8" ) );
#elif defined( AS_PPC )
    puts( banner1w( "PowerPC Assembler", "0.3" ) );
#elif defined( AS_MIPS )
    puts( banner1w( "MIPS Assembler", "0.1" ) );
#else
    #error unknown AS_CPU
#endif
    puts( banner2a() );
    puts( banner3 );
    puts( banner3a );
    printed = TRUE;
}
Exemple #18
0
/*
 * Print the copyright banner.
 */
void BannerMessage( void )
/************************/
{
    static bool         alreadyPrinted = false;
    static char *       helpMsg = {
#if defined( _BETAVER )
        banner1w1( "C/C++ CL Clone for " CPU_NAME ) "\n"
        banner1w2( _CL_CLONE_VERSION_ ) "\n"
#else
        banner1w( "C/C++ CL Clone for " CPU_NAME " ", _CL_CLONE_VERSION_ ) "\n"
#endif
        banner2 "\n"
        banner2a( "1995" ) "\n"
        banner3 "\n"
        banner3a "\n"
        "Compatible with CL Version " _MS_CL_VERSION_ "\n"
    };

    if( !alreadyPrinted && !quietMode ) {
        printf( helpMsg );
        alreadyPrinted = true;
    }
}
Exemple #19
0
#include "typemap.hpp"
#include "cvpack.hpp"
#include "retrieve.hpp"
#include "makeexe.hpp"
#include "subsect.hpp"
#include "packtype.hpp"
#include "cssymbol.hpp"
#include "symdis.hpp"

#include "banner.h"

static const char* CVpackHeader =
    banner1w( "CV4 Symbolic Debugging Information Compactor", BAN_VER_STR ) "\n" \
    banner2 "\n" \
    banner2a( "1995" ) "\n" \
    banner3 "\n" \
    banner3a "\n";

static const char* CVpackUsage = "usage : cvpack [/nologo] <exefile>\n";

static const int MAX_FILE_NAME = 256;
static char      fName[MAX_FILE_NAME];

// map table for type indices.
TypeIndexMap    TypeMap;

// Table of numeric leaf size except variable length string, because its
// length is not constant.
static const NumLeafSize[] = { 1, 2, 2, 4, 4, 4, 8, 10,
                               16, 8, 8, 6, 8, 16, 20, 32 };
Exemple #20
0
    MIMenuID( MMHelp, HMUsingHelp ),
    MIMenuID( MMHelp, HMAbout ),
};

#define _BrowseHelpFile     "wbrw.hlp"
#define _BrowseHtmlHelpFile "wbrw.chm"

#define NumBrowseMenus ( sizeof( BrowseMenus ) / sizeof( MIMenuID ) )

#pragma warning 438 9
static const char *BrowseTitle = { "About Open Watcom Source Browser" };
static const char *SplashInfo[] = {
    "",
    banner1w( "Source Browser", _WBRW_VERSION_ ),
    banner2,
    banner2a( 1994 ),
    banner3,
    banner3a,
    NULL };
#pragma warning 438 1


static WFlashPage *showFlashPage( int interval ) {
//------------------------------------------------

    return( new WFlashPage( NULL, GlobalHotSpots, SplashPage, BrowseTitle,
                            SplashInfo, interval ) );
}

Browse::Browse()
    : WMdiWindow( "" )
Exemple #21
0
*    available at www.sybase.com/developer/opensource.
*
*    The Original Code and all software distributed under the License are
*    distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
*    EXPRESS OR IMPLIED, AND SYBASE AND ALL CONTRIBUTORS HEREBY DISCLAIM
*    ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF
*    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR
*    NON-INFRINGEMENT. Please see the License for the specific language
*    governing rights and limitations under the License.
*
*  ========================================================================
*
* Description:  WASM ID card.
*
****************************************************************************/


#include "banner.h"

const char *FingerMsg[] = {
    banner1w( "Assembler", _WASM_VERSION_ ),
    banner2,
    banner2a( "1992" ),
    banner3,
    banner3a,
#ifdef D32_NAME
    "DOS4/G Run-Time " D32_VERSION " " D32_COPYRIGHT,
#endif
    0
};
Exemple #22
0
    MIMenuID( MMHelp, HMUsingHelp ),
    MIMenuID( MMHelp, HMAbout ),
};

#define _BrowseHelpFile     "wbrw.hlp"
#define _BrowseHtmlHelpFile "wbrw.chm"

#define NumBrowseMenus ( sizeof( BrowseMenus ) / sizeof( MIMenuID ) )

#pragma warning 438 9
static const char *BrowseTitle = { "About Open Watcom Source Browser" };
static const char *SplashInfo[] = {
    "",
    banner1w( "Source Browser", _WBRW_VERSION_ ),
    banner2,
    banner2a( "1994" ),
    banner3,
    banner3a,
    NULL };
#pragma warning 438 1


static WFlashPage *showFlashPage( int interval ) {
//------------------------------------------------

    return( new WFlashPage( NULL, GlobalHotSpots, SplashPage, BrowseTitle,
                            SplashInfo, interval ) );
}

Browse::Browse()
    : WMdiWindow( "" )
Exemple #23
0
#define NO_RES_MESSAGE  "Error: could not open message resource file.\r\n"
#define NO_RES_SIZE     (sizeof( NO_RES_MESSAGE ) - 1)

static  HANDLE_INFO     hInstance = { 0 };
static  unsigned        MsgShift;

#endif

#ifdef __OSI__
extern char             *_Copyright;
#endif

static const char *FingerMsg[] = {
    banner1w( "Assembler", _WASM_VERSION_ ),
    banner2,
    banner2a( 1992 ),
    banner3,
    banner3a,
#ifdef D32_NAME
    "DOS4/G Run-Time " D32_VERSION " " D32_COPYRIGHT,
#endif
    0
};

static bool Wait_for_return( const char *page_text )
{
    int c;

    puts( page_text );
    fflush( stdout );
    c = getchar();
Exemple #24
0
/*
 * AboutProc - callback routine for settings dialog
 */
WINEXPORT INT_PTR CALLBACK AboutProc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
{
    char        buff[256];
    LPABOUTINFO pai;

    lparam = lparam;

    switch( msg ) {
    case WM_INITDIALOG:
        pai = (LPABOUTINFO)lparam;
        if( pai->title != NULL ) {
            SetWindowText( hwnd, pai->title );
        }
        if( pai->name != NULL ) {
            sprintf( buff, banner1p1( "%s" ), pai->name );
            SetDlgItemText( hwnd, ABOUT_NAME, buff );
        }
        if( pai->version != NULL ) {
            SetDlgItemText( hwnd, ABOUT_VERSION, pai->version );
        }
        if( pai->first_cr_year != NULL ) {
#if defined( __WATCOMC__) && !defined( __ALPHA__ )
            if( _fstrcmp( pai->first_cr_year, CURR_YEAR ) ) {
#else
            if( strcmp( pai->first_cr_year, CURR_YEAR ) ) {
#endif
                sprintf( buff, banner2a( "%s" ), pai->first_cr_year );
            } else {
                strcpy( buff, banner2a( "1984" ) );
            }
            SetDlgItemText( hwnd, ABOUT_COPYRIGHT, buff );
        }
#if defined( __WINDOWS__ ) || defined( __WINDOWS_386__ )
        {
            DWORD       flags;
            DWORD       kfree;
            WORD        pcfree;
            SYSHEAPINFO shi;
            char        work[16];
            char        info[50];

            flags = GetWinFlags();
            if( flags & WF_ENHANCED ) {
                CopyRCString( ABT_386_ENH, info, sizeof( info ) );
            } else {
                CopyRCString( ABT_STD_MODE, info, sizeof( info ) );
            }
            SetDlgItemText( hwnd, ABOUT_INFO1, info );
            kfree = GetFreeSpace( 0 ) / 1024L;
            ltoa( kfree, work, 10 );
            RCsprintf( buff, ABT_MEM_X_KB_FREE, (LPSTR)work );
            SetDlgItemText( hwnd, ABOUT_INFO2, buff );

            shi.dwSize = sizeof( shi );
            if( SystemHeapInfo( &shi ) ) {
                pcfree = shi.wGDIFreePercent;
                if( pcfree > shi.wUserFreePercent )
                    pcfree = shi.wUserFreePercent;
                RCsprintf( buff, ABT_SYS_RESOURCES_FREE, pcfree );
            } else {
                CopyRCString( ABT_SYS_RESOURCES_N_A, buff, sizeof( buff ) );
            }
            SetDlgItemText( hwnd, ABOUT_INFO3, buff );
        }
#else
        {
            SYSTEM_INFO         si;
            MEMORYSTATUS        ms;

            GetSystemInfo( &si );
            switch( si.dwProcessorType ) {
            case PROCESSOR_INTEL_386:
                CopyRCString( ABT_RUNNING_ON_386, buff, sizeof( buff ) );
                break;
            case PROCESSOR_INTEL_486:
                CopyRCString( ABT_RUNNING_ON_486, buff, sizeof( buff ) );
                break;
            case PROCESSOR_INTEL_PENTIUM:
                CopyRCString( ABT_RUNNING_ON_586, buff, sizeof( buff ) );
                break;
            case PROCESSOR_MIPS_R4000:
            case PROCESSOR_ALPHA_21064:
            default:
                buff[0] = '\0';
                break;
            }
            SetDlgItemText( hwnd, ABOUT_INFO1, buff );

            ms.dwLength = sizeof( ms );
            GlobalMemoryStatus( &ms );
            RCsprintf( buff, ABT_VIRT_MEM,
                       (ms.dwAvailPhys + ms.dwAvailPageFile) / 1024L );
            SetDlgItemText( hwnd, ABOUT_INFO2, buff );
            RCsprintf( buff, ABT_MEM_LOAD, ms.dwMemoryLoad );
            SetDlgItemText( hwnd, ABOUT_INFO3, buff );

        }
#endif
        return( TRUE );
#ifndef NOUSE3D
    case WM_SYSCOLORCHANGE:
        CvrCtl3dColorChange();
        break;
#endif
    case WM_CLOSE:
        EndDialog( hwnd, 0 );
        break;
    case WM_COMMAND:
        switch( LOWORD( wparam ) ) {
        case IDOK:
        case IDCANCEL:
            EndDialog( hwnd, 0 );
            break;
        }
    }
    return( FALSE );

} /* AboutProc */

/*
 * DoAbout - show the startup dialog
 */
void DoAbout( LPABOUTINFO ai )
{
    FARPROC     proc;

    proc = MakeDlgProcInstance( AboutProc, ai->inst );
    DialogBoxParam( ai->inst, "About", ai->owner, (DLGPROC)proc, (LPARAM)ai );
    FreeProcInstance( proc );

} /* DoAbout */
Exemple #25
0
        PrefixWrite( Commands[MAP_SLOT], "option map=", 11 );
        MapOption = false;     // make sure it isn't generated a second time.
    }
    PrefixWrite( Commands[LIBRARY_SLOT], "library ", 8 );
    if( MapOption ) {
        CommandOut( "option map" );
    }
    ListWrite( Commands[OPTION_SLOT] );
}

#define NL "\n"
static const char TheHelp[] = {
    banner1w1( "Microsoft to Watcom linker command translation utility" ) NL
    banner1w2( _MS2WLINK_VERSION_ ) NL
    banner2 NL
    banner2a( 1990 ) NL
    banner3 NL
    "usage: pass this program the same arguments that would be passed to the" NL
    "       Microsoft linker, and an equivalent set of wlink commands" NL
    "       will be written to standard output." NL
    NL
    "Usage:" NL
    NL
    "ms2wlink" NL
    "ms2wlink @<response file>" NL
    "ms2wlink <objs>,<exefile>,<mapfile>,<libs>,<deffile>" NL
    NL
    "Recognized options are:" NL
};

extern void WriteHelp( void )
Exemple #26
0
int main( int argc, char **argv )
{
    char                quiet;
    FILE                *fp;
    size_t              wanted;
    unsigned            i, j, k, l;
    int                 length = 0;
    char *              record_type;
    samp_block *        data;
    auto samp_header    head;
    cgraph_sample *     sptr;
    auto struct stat    file_stat;
    time_t              stamp;
    count_info          *count;
    bool                byte_swap = false;


    puts( banner1w( "Sample File Dump Utility", _WSAMP_VERSION_ ) );
    puts( banner2 );
    puts( banner2a( 1989 ) );
    puts( banner3 );
    puts( banner3a );

    if( argc != 2 && argc != 3 ) {
        puts( "usage: smpdump <sample_file> [-q]" );
        exit( 1 );
    }
    data = malloc( 63L * 1024 + 512 );
    quiet = 0;
    if( argc == 3 && strcmp( argv[2], "-q" ) == 0 ) {
        quiet = 1;
    }
    _splitpath( argv[1], drv, dir, name, ext );
    if( ext[0] == '\0' ) {
        strcpy( ext, ".smp" );
    }
    _makepath( path, drv, dir, name, ext );
    fp = fopen( path, "rb" );
    if( fp == NULL )
        return( 1 );
    if( fseek( fp, -(long)SIZE_HEADER, SEEK_END ) ) {
        fclose( fp );
        return( 1 );
    }
    fread( &head, 1, SIZE_HEADER, fp );
    if( head.signature != SAMP_SIGNATURE ) {
        SWAP_16( head.signature );
        if( head.signature == SAMP_SIGNATURE ) {
            byte_swap = true;
            SWAP_32( head.sample_start );
        } else {
            fclose( fp );
            return( 1 );
        }
    }
    printf( "Sample file version: %u.%u\n", head.major_ver, head.minor_ver );
    fseek( fp, head.sample_start, SEEK_SET );
    for( ;; ) {
        /* read the prefix of record */
        wanted = sizeof( data->pref );
        if( fread( &data->pref, 1, wanted, fp ) != wanted )
            break;
        COND_SWAP_32( data->pref.tick );
        COND_SWAP_16( data->pref.length );
        COND_SWAP_16( data->pref.kind );

        /* read the rest of the record */
        wanted = data->pref.length - sizeof( data->pref );
        if( fread( &data->d, 1, wanted, fp ) != wanted )
            break;

        /* dump common record data */
        record_type = "** UNKNOWN **";
        if( data->pref.kind < NUM_BLOCK_KINDS ) {
            record_type = Types[data->pref.kind];
        }
        printf( "%s  tick %lu length %u\n", record_type,
                data->pref.tick, data->pref.length );

        /* dump specific record data */
        switch( data->pref.kind ) {
        case SAMP_INFO:
            COND_SWAP_32( data->d.info.timer_rate );
            printf( "  timer rate %ld ms\n", data->d.info.timer_rate / 1000 );
            l = data->pref.length;
            if( head.major_ver == 2 && head.minor_ver <= 1 ) {
                count = &data->d.old_info.count[0];
                l -= offsetof( samp_block, d.old_info.count );
            } else {
                COND_SWAP_16( data->d.info.config.mad );
                printf( "  cpu=%d, fpu=%d, os_maj=%d, os_min=%d, os=%d, mad=%d\n",
                        data->d.info.config.cpu, data->d.info.config.fpu,
                        data->d.info.config.osmajor, data->d.info.config.osminor,
                        data->d.info.config.os, data->d.info.config.mad );
                count = &data->d.info.count[0];
                l -= offsetof( samp_block, d.info.count );
            }
            l /= sizeof( count_info );
            for( i = 0; i < l; ++i ) {
                COND_SWAP_32( count[i].number );
                COND_SWAP_32( count[i].size );
                printf( "    %s number %lu size %lu\n", Types[i],
                        count[i].number, count[i].size );
            }
            break;
        case SAMP_SAMPLES:
            j = data->pref.length;
            j -= offsetof( samp_block, d.sample.sample );
            j /= sizeof( samp_address );
            COND_SWAP_16( data->d.sample.thread_id );
            printf( "  thread id %u  #samples %u\n",
                    data->d.sample.thread_id, j );
            if( quiet ) {
                printf( "    ....\n    ....\n    ....\n" );
            } else {
                for( i = 0; i < j; ++i ) {
                    COND_SWAP_16( data->d.sample.sample[i].segment );
                    COND_SWAP_32( data->d.sample.sample[i].offset );
                    printf( "  - %.4x:%.8lx\n",
                            data->d.sample.sample[i].segment,
                            data->d.sample.sample[i].offset );
                }
            }
            break;
        case SAMP_MARK:
            COND_SWAP_16( data->d.sample.thread_id );
            COND_SWAP_16( data->d.mark.addr.segment );
            COND_SWAP_32( data->d.mark.addr.offset );
            printf( "  thread %u - %.4x:%.8lx  \"%s\"\n",
                    data->d.mark.thread_id, data->d.mark.addr.segment,
                    data->d.mark.addr.offset, data->d.mark.mark_string );
            break;
        case SAMP_OVL_LOAD:
            if( data->d.ovl.req_section & OVL_RETURN ) {
                printf( "  section %u (RETURN)\n",
                        data->d.ovl.req_section & (~ OVL_RETURN) );
            } else {
                printf( "  section %u\n", data->d.ovl.req_section );
            }
            printf( "    - requesting address = %.4x:%.8lx\n",
                    data->d.ovl.addr.segment, data->d.ovl.addr.offset );
            j = data->pref.length;
            j -= offsetof( samp_block, d.ovl.ovl_map );
            j /= sizeof( uint_8 );
            printf( "    - loaded overlay sections = " );
//            printf( "%.2x", data->d.ovl.ovl_map[0] );
            for( i = 0; i < j; ++i ) {
                printf( "%.2x", data->d.ovl.ovl_map[i] );
            }
            printf( "\n" );
            break;
        case SAMP_CODE_LOAD:
        case SAMP_MAIN_LOAD:
            stamp = data->d.code.time_stamp;
            COND_SWAP_32( stamp );
            COND_SWAP_16( data->d.code.ovl_tab.segment );
            COND_SWAP_32( data->d.code.ovl_tab.offset );
            printf( "  name = \"%s\"\n", data->d.code.name );
            printf( "  overlay table = %.4x:%.8lx\n",
                    data->d.code.ovl_tab.segment, data->d.code.ovl_tab.offset );
            printf( "  time stamp %lx -> %s", stamp,
                    ctime( &stamp ) );
            if( stat( data->d.code.name, &file_stat ) == 0 ) {
                printf( "  actual time stamp %lx -> %s", file_stat.st_mtime,
                        ctime( &(file_stat.st_mtime) ) );
            }
            break;
        case SAMP_ADDR_MAP:
            j = data->pref.length;
            j -= offsetof( samp_block, d.map );
            j /= sizeof( data->d.map );
            for( i = 0; i < j; ++i ) {
                COND_SWAP_16( data->d.map.data[i].map.segment );
                COND_SWAP_32( data->d.map.data[i].map.offset );
                COND_SWAP_16( data->d.map.data[i].actual.segment );
                COND_SWAP_32( data->d.map.data[i].actual.offset );
                printf( "  - %.4x:%.8lx -> %.4x:%.8lx\n",
                        data->d.map.data[i].map.segment,
                        data->d.map.data[i].map.offset,
                        data->d.map.data[i].actual.segment,
                        data->d.map.data[i].actual.offset );
            }
            break;
        case SAMP_LAST:
            break;
        case SAMP_REMAP_SECTION:
            j = data->pref.length;
            j -= offsetof( samp_block, d.remap );
            j /= sizeof( data->d.remap );
            for( i = 0; i < j; ++i ) {
                COND_SWAP_16( data->d.remap.data[i].section );
                COND_SWAP_16( data->d.remap.data[i].segment );
                printf( "  - %.4x -> %.4x\n",
                        data->d.remap.data[i].section,
                        data->d.remap.data[i].segment );
            }
            break;
        case SAMP_CALLGRAPH:
            j = data->d.cgraph.number;
            printf( "  thread id %u  #samples %u\n",
                                 data->d.cgraph.thread_id, j );
            if( quiet ) {
                printf( "    ....\n    ....\n    ....\n" );
            } else {
                sptr = &data->d.cgraph.sample[0];
                for( i = 0; i < j; i++ ) {
                    if( sptr->push_n != (uint_16)-1 || sptr->pop_n != (uint_16)-1 ) {
                        length -= sptr->pop_n;
                        if( length < 0 ) {
                            printf( "\n** Error: stack exhausted!\n\n" );
                        } else {
                            for( k = 0; k < length; k++ ) {
                                printf( " -  " );
                            }
                        }
                        for( k = sptr->push_n; k > 0; k-- ) {
                            printf( "%.4x:%.8lx    ",
                                sptr->addr[k - 1].segment,
                                sptr->addr[k - 1].offset );
                        }
                        length += sptr->push_n;
                        printf( "\n" );
                        sptr = (cgraph_sample *)&(sptr->addr[sptr->push_n]);
                    } else {
                        printf( "** Unknown callgraph info\n" );
                        sptr = (cgraph_sample *)&(sptr->addr[0]);
                    }
                }
            }
            break;
        }
        if( data->pref.kind == SAMP_LAST ) {
            break;
        }
    }
    fclose( fp );
    return( 0 );
}
Exemple #27
0
        if( !ideCb->GetInfo( cbHandle, IDE_GET_ENV_VAR, (IDEGetInfoWParam)name, (IDEGetInfoLParam)&val ) ) {
            return( val );
        }
    }
    return( NULL );
}

static const char * BannerText =
#if defined( _BETAVER )
    banner1w1( "Windows and OS/2 Resource Compiler" )"\n"
    banner1w2( _WRC_VERSION_ )"\n"
#else
    banner1w( "Windows and OS/2 Resource Compiler", _WRC_VERSION_ )"\n"
#endif
    banner2         "\n"
    banner2a("1993") "\n"
    banner3         "\n"
    banner3a        "\n"
;

static void RcIoPrintBanner( void )
/*********************************/
{
    OutPutInfo          errinfo;

    InitOutPutInfo( &errinfo );
    errinfo.severity = SEV_BANNER;
    RcMsgFprintf( stderr, &errinfo, BannerText );
}

static void RcIoPrintHelp( void )