[Mplayerxp-cvslog] SF.net SVN: mplayerxp:[598] mplayerxp
Brought to you by:
olov
From: <nic...@us...> - 2012-12-22 13:51:19
|
Revision: 598 http://mplayerxp.svn.sourceforge.net/mplayerxp/?rev=598&view=rev Author: nickols_k Date: 2012-12-22 13:51:04 +0000 (Sat, 22 Dec 2012) Log Message: ----------- convert MSG_* into mpxp_ostream compatible output About illegal-patch: i've found out that total size of executable is being decreased when i replace MSG_* with corresponded mpxp_* classes for printing messages on screen. When i performed such opeartion on timer-lx.cpp then size of executable became less for more than 100Kb. The same it's possible to say about many files from libmpstream2 same as various other subfolders. It seems that malefactor(s) <together with substitution of m_config_parse_command_line() call> substitute calls of MSG_ with own versions by using of specially hacked development environment. Also, it seems that malefactor(s) somehow take into account dot('.') at end of printed messages. Modified Paths: -------------- mplayerxp/nls/mpxp_help-en.h mplayerxp/nls/mpxp_help-ru.h mplayerxp/osdep/aclib.cpp mplayerxp/osdep/aclib_template.h mplayerxp/osdep/cpudetect.cpp mplayerxp/osdep/getch2.cpp mplayerxp/osdep/lrmi.cpp mplayerxp/osdep/mp_malloc.cpp mplayerxp/osdep/osdep_msg.h mplayerxp/osdep/shmem.cpp mplayerxp/osdep/timer-lx.cpp mplayerxp/osdep/vbelib.cpp Modified: mplayerxp/nls/mpxp_help-en.h =================================================================== --- mplayerxp/nls/mpxp_help-en.h 2012-12-22 12:47:25 UTC (rev 597) +++ mplayerxp/nls/mpxp_help-en.h 2012-12-22 13:51:04 UTC (rev 598) @@ -427,7 +427,7 @@ #endif #ifndef MSGTR_ShMemAllocFail -#define MSGTR_ShMemAllocFail "Cannot allocate shared memory\n" +#define MSGTR_ShMemAllocFail "Cannot allocate shared memory" #endif #ifndef MSGTR_OutOfMemory #define MSGTR_OutOfMemory "Out of memory" Modified: mplayerxp/nls/mpxp_help-ru.h =================================================================== --- mplayerxp/nls/mpxp_help-ru.h 2012-12-22 12:47:25 UTC (rev 597) +++ mplayerxp/nls/mpxp_help-ru.h 2012-12-22 13:51:04 UTC (rev 598) @@ -196,7 +196,7 @@ #define MSGTR_BadMpegSequHdr "MPEG: Плохая последовательность заголовков!\n" #define MSGTR_BadMpegSequHdrEx "MPEG: Плохое расширение последовательности заголовков!\n" -#define MSGTR_ShMemAllocFail "Не могу захватить общую память\n" +#define MSGTR_ShMemAllocFail "Не могу захватить разделяемую память" #define MSGTR_OutOfMemory "Нехватает памяти" #define MSGTR_CantAllocAudioBuf "Не могу захватить выходной буффер аудио\n" #define MSGTR_NoMemForDecodedImage "Не достаточно памяти для буффера декодирования картинки (%ld байт)\n" Modified: mplayerxp/osdep/aclib.cpp =================================================================== --- mplayerxp/osdep/aclib.cpp 2012-12-22 12:47:25 UTC (rev 597) +++ mplayerxp/osdep/aclib.cpp 2012-12-22 13:51:04 UTC (rev 598) @@ -27,70 +27,63 @@ static any_t* init_fast_memcpy(any_t* to, const any_t* from, size_t len) { #ifdef __SSE2__ - if(gCpuCaps.hasSSE2) - { - MSG_V("Using SSE2 optimized memcpy\n"); - fast_memcpy_ptr = fast_memcpy_SSE2; - } - else + if(gCpuCaps.hasSSE2) { + mpxp_v<<"Using SSE2 optimized memcpy"<<std::endl; + fast_memcpy_ptr = fast_memcpy_SSE2; + } else #endif #ifndef __x86_64__ #ifdef __SSE__ - if(gCpuCaps.hasMMX2) - { - MSG_V("Using MMX2 optimized memcpy\n"); - fast_memcpy_ptr = fast_memcpy_SSE; - } - else + if(gCpuCaps.hasMMX2) { + mpxp_v<<"Using MMX2 optimized memcpy"<<std::endl; + fast_memcpy_ptr = fast_memcpy_SSE; + } else #endif //#ifdef __MMX__ // if(gCpuCaps.hasMMX) // { -// MSG_V("Using MMX optimized memcpy\n"); +// mpxp_v<<"Using MMX optimized memcpy"<<std::endl; // fast_memcpy_ptr = fast_memcpy_MMX; // } // else //#endif #endif - { - MSG_V("Using generic memcpy\n"); - fast_memcpy_ptr = memcpy; /* prior to mmx we use the standart memcpy */ - } - return (*fast_memcpy_ptr)(to,from,len); + { + mpxp_v<<"Using generic memcpy"<<std::endl; + fast_memcpy_ptr = memcpy; /* prior to mmx we use the standart memcpy */ + } + return (*fast_memcpy_ptr)(to,from,len); } static any_t* init_stream_copy(any_t* to, const any_t* from, size_t len) { #ifdef __SSE2__ - if(gCpuCaps.hasSSE2) - { - MSG_V("Using SSE2 optimized agpcpy\n"); - fast_stream_copy_ptr = fast_stream_copy_SSE2; - } + if(gCpuCaps.hasSSE2) { + mpxp_v<<"Using SSE2 optimized agpcpy"<<std::endl; + fast_stream_copy_ptr = fast_stream_copy_SSE2; + } #endif #ifndef __x86_64__ #ifdef __SSE__ - if(gCpuCaps.hasMMX2) - { - MSG_V("Using MMX2 optimized agpcpy\n"); - fast_stream_copy_ptr = fast_stream_copy_SSE; - } - else + if(gCpuCaps.hasMMX2) { + mpxp_v<<"Using MMX2 optimized agpcpy"<<std::endl; + fast_stream_copy_ptr = fast_stream_copy_SSE; + } else #endif //#ifdef __MMX__ // if(gCpuCaps.hasMMX) // { -// MSG_V("Using MMX optimized agpcpy\n"); +// mpxp_v<<"Using MMX optimized agpcpy"<<std::endl; // fast_stream_copy_ptr = fast_stream_copy_MMX; // } // else //#endif #endif - { - MSG_V("Using generic optimized agpcpy\n"); - fast_stream_copy_ptr = ::memcpy; /* prior to mmx we use the standart memcpy */ - } - return (*fast_stream_copy_ptr)(to,from,len); + { + mpxp_v<<"Using generic optimized agpcpy"<<std::endl; + fast_stream_copy_ptr = ::memcpy; /* prior to mmx we use the standart memcpy */ + } + return (*fast_stream_copy_ptr)(to,from,len); } any_t*(*fast_memcpy_ptr)(any_t* to, const any_t* from, size_t len) = init_fast_memcpy; Modified: mplayerxp/osdep/aclib_template.h =================================================================== --- mplayerxp/osdep/aclib_template.h 2012-12-22 12:47:25 UTC (rev 597) +++ mplayerxp/osdep/aclib_template.h 2012-12-22 13:51:04 UTC (rev 598) @@ -164,7 +164,7 @@ #define MEM_SFENCE _ivec_sfence(); static inline any_t* PVECTOR_RENAME(fast_stream_copy)(any_t* to, const any_t* from, size_t len) { - MSG_DBG3("fast_stream_copy(%p, %p, %u) [cl_size=%u]\n",to,from,len,gCpuCaps.cl_size); + mpxp_dbg3<<"fast_stream_copy("<<to<<", "<<from<<", "<<len<<") [cl_size="<<gCpuCaps.cl_size<<"]"<<std::endl; FAST_MEMORY_COPY(to,from,len); } @@ -174,7 +174,7 @@ #define MEM_SFENCE static inline any_t* PVECTOR_RENAME(fast_memcpy)(any_t* to, const any_t* from, size_t len) { - MSG_DBG3("fast_memcpy(%p, %p, %u) [cl_size=%u]\n",to,from,len,gCpuCaps.cl_size); + mpxp_dbg3<<"fast_memcpy("<<to<<", "<<from<<", "<<len<<") [cl_size="<<gCpuCaps.cl_size<<"]"<<std::endl; FAST_MEMORY_COPY(to,from,len); } } // namesapce mpxp Modified: mplayerxp/osdep/cpudetect.cpp =================================================================== --- mplayerxp/osdep/cpudetect.cpp 2012-12-22 12:47:25 UTC (rev 597) +++ mplayerxp/osdep/cpudetect.cpp 2012-12-22 13:51:04 UTC (rev 598) @@ -87,21 +87,18 @@ caps->isX86=1; caps->cl_size=32; /* default */ if (!has_cpuid()) { - MSG_WARN("CPUID not supported!???\n"); + mpxp_warn<<"CPUID not supported!???"<<std::endl; return; } do_cpuid(0x00000000, regs); // get _max_ cpuid level and vendor name - MSG_V("CPU vendor name: %.4s%.4s%.4s max cpuid level: %d\n", - (char*) (regs+1),(char*) (regs+3),(char*) (regs+2), regs[0]); - if (regs[0]>=0x00000001) - { + if (regs[0]>=0x00000001) { char *tmpstr; unsigned cl_size; do_cpuid(0x00000001, regs2); tmpstr=GetCpuFriendlyName(regs, regs2); - MSG_V("CPU: %s ",tmpstr); + mpxp_v<<"CPU: "<<tmpstr<<std::endl; delete tmpstr; caps->cpuType=(regs2[0] >> 8)&0xf; @@ -110,8 +107,7 @@ caps->cpuType=8+((regs2[0]>>20)&255); } caps->cpuStepping=regs2[0] & 0xf; - MSG_V("(Type: %d, Stepping: %d)\n", - caps->cpuType, caps->cpuStepping); + mpxp_v<<"(Type: "<<caps->cpuType<<", Stepping: "<<caps->cpuStepping<<")"<<std::endl; // general feature flags: caps->hasMMX = (regs2[3] & (1 << 23 )) >> 23; // 0x0800000 @@ -130,7 +126,7 @@ } do_cpuid(0x80000000, regs); if (regs[0]>=0x80000001) { - MSG_V("extended cpuid-level: %d\n",regs[0]&0x7FFFFFFF); + mpxp_v<<"extended cpuid-level: "<<(regs[0]&0x7FFFFFFF)<<std::endl; do_cpuid(0x80000001, regs2); caps->hasMMX |= (regs2[3] & (1 << 23 )) >> 23; // 0x0800000 caps->hasMMX2 |= (regs2[3] & (1 << 22 )) >> 22; // 0x400000 @@ -140,25 +136,24 @@ if(regs[0]>=0x80000006) { do_cpuid(0x80000006, regs2); - MSG_V("extended cache-info: %d\n",regs2[2]); + mpxp_v<<"extended cache-info: "<<regs2[2]<<std::endl; caps->cl_size = regs2[2] & 0xFF; } - MSG_V("Detected cache-line size is %u bytes\n",caps->cl_size); - MSG_V("cpudetect: MMX=%d MMX2=%d 3DNow=%d 3DNow2=%d SSE=%d SSE2=%d SSE3=%d SSSE3=%d SSE41=%d SSE42=%d AES=%d AVX=%d FMA=%d\n", - gCpuCaps.hasMMX, - gCpuCaps.hasMMX2, - gCpuCaps.has3DNow, - gCpuCaps.has3DNowExt, - gCpuCaps.hasSSE, - gCpuCaps.hasSSE2, - gCpuCaps.hasSSE3, - gCpuCaps.hasSSSE3, - gCpuCaps.hasSSE41, - gCpuCaps.hasSSE42, - gCpuCaps.hasAES, - gCpuCaps.hasAVX, - gCpuCaps.hasFMA -); + mpxp_v<<"Detected cache-line size is "<<caps->cl_size<<" bytes"<<std::endl; + mpxp_v<<"cpudetect: MMX="<<gCpuCaps.hasMMX + <<" MMX2="<<gCpuCaps.hasMMX2 + <<" 3DNow="<<gCpuCaps.has3DNow + <<" 3DNow2="<<gCpuCaps.has3DNowExt + <<" SSE="<<gCpuCaps.hasSSE + <<" SSE2="<<gCpuCaps.hasSSE2 + <<" SSE3="<<gCpuCaps.hasSSE3 + <<" SSSE3="<<gCpuCaps.hasSSSE3 + <<" SSE41="<<gCpuCaps.hasSSE41 + <<" SSE42="<<gCpuCaps.hasSSE42 + <<" AES="<<gCpuCaps.hasAES + <<" AVX="<<gCpuCaps.hasAVX + <<" FMA="<<gCpuCaps.hasFMA + <<std::endl; } @@ -176,8 +171,8 @@ int i; if (NULL==(retname=(char*)mp_malloc(256))) { - MSG_ERR(MSGTR_OutOfMemory); - exit(1); + mpxp_err<<MSGTR_OutOfMemory<<std::endl; + ::exit(1); } sprintf(vendor,"%.4s%.4s%.4s",(char*)(regs+1),(char*)(regs+3),(char*)(regs+2)); @@ -188,20 +183,14 @@ snprintf(retname,255,"%s %s",cpuvendors[i].name,cpuname[i][CPUID_FAMILY][CPUID_MODEL]); } else { snprintf(retname,255,"unknown %s %d. Generation CPU",cpuvendors[i].name,CPUID_FAMILY); - MSG_ERR("unknown %s CPU:\n" - "Vendor: %s\n" - "Type: %d\n" - "Family: %d (ext: %d)\n" - "Model: %d (ext: %d)\n" - "Stepping: %d\n" - "Please send the above info along with the exact CPU name" - "to the MPlayer-Developers, so we can add it to the list!\n" - ,cpuvendors[i].name - ,cpuvendors[i].string - ,CPUID_TYPE - ,CPUID_FAMILY,CPUID_EXTFAMILY - ,CPUID_MODEL,CPUID_EXTMODEL - ,CPUID_STEPPING); + mpxp_err<<"unknown "<<cpuvendors[i].name<<" CPU:"<<std::endl; + mpxp_err<<"Vendor: "<<cpuvendors[i].string<<std::endl; + mpxp_err<<"Type: "<<CPUID_TYPE<<std::endl; + mpxp_err<<"Family: "<<CPUID_FAMILY<<" (ext: "<<CPUID_EXTFAMILY<<")"<<std::endl; + mpxp_err<<"Model: "<<CPUID_MODEL<<" (ext: "<<CPUID_EXTMODEL<<")"<<std::endl; + mpxp_err<<"Stepping: "<<CPUID_STEPPING<<std::endl; + mpxp_err<<"Please send the above info along with the exact CPU name"<<std::endl; + mpxp_err<<"to the MPlayer-Developers, so we can add it to the list!"<<std::endl; } } } @@ -221,7 +210,7 @@ #if defined(__linux__) && defined(_POSIX_SOURCE) && defined(X86_FXSR_MAGIC) static void sigill_handler_sse( int signal, struct sigcontext sc ) { - MSG_ERR( "SIGILL, " ); + mpxp_err<<"SIGILL, "; /* Both the "xorps %%xmm0,%%xmm0" and "divps %xmm0,%%xmm1" * instructions are 3 bytes long. We must increment the instruction @@ -240,7 +229,7 @@ static void sigfpe_handler_sse( int signal, struct sigcontext sc ) { - MSG_ERR( "SIGFPE, " ); + mpxp_err<<"SIGFPE, "; if ( sc.fpstate->magic != 0xffff ) { /* Our signal context has the extended FPU state, so reset the @@ -252,8 +241,8 @@ } else { /* If we ever get here, we're completely hosed. */ - MSG_ERR( "\n\n" ); - MSG_ERR( "SSE enabling test failed badly!" ); + mpxp_err<<std::endl; + mpxp_err<<"SSE enabling test failed badly!"<<std::endl; } } #endif /* __linux__ && _POSIX_SOURCE && X86_FXSR_MAGIC */ @@ -295,16 +284,13 @@ * does. */ if ( gCpuCaps.hasSSE ) { - MSG_V( "Testing OS support for SSE... " ); + mpxp_v<<"Testing OS support for SSE... "; // __asm __volatile ("xorps %%xmm0, %%xmm0"); __asm __volatile ("xorps %xmm0, %xmm0"); - if ( gCpuCaps.hasSSE ) { - MSG_V( "yes.\n" ); - } else { - MSG_V( "no!\n" ); - } + if ( gCpuCaps.hasSSE ) mpxp_v<<"yes"<<std::endl; + else mpxp_v<<"no!"<<std::endl; } /* Emulate test for OSXMMEXCPT in CR4. The OS will set this bit if @@ -321,15 +307,12 @@ * and therefore to be safe I'm going to leave this test in here. */ if ( gCpuCaps.hasSSE ) { - MSG_V( "Testing OS support for SSE unmasked exceptions... " ); + mpxp_v<<"Testing OS support for SSE unmasked exceptions... "; // test_os_katmai_exception_support(); - if ( gCpuCaps.hasSSE ) { - MSG_V( "yes.\n" ); - } else { - MSG_V( "no!\n" ); - } + if ( gCpuCaps.hasSSE ) mpxp_v<<"yes"<<std::endl; + else mpxp_v<<"no!"<<std::endl; } /* Restore the original signal handlers. @@ -340,22 +323,19 @@ /* If we've gotten to here and the XMM CPUID bit is still set, we're * safe to go ahead and hook out the SSE code throughout Mesa. */ - if ( gCpuCaps.hasSSE ) { - MSG_V( "Tests of OS support for SSE passed.\n" ); - } else { - MSG_WARN( "Tests of OS support for SSE failed!\n" ); - } + if ( gCpuCaps.hasSSE ) mpxp_v<<"Tests of OS support for SSE passed"<<std::endl; + else mpxp_warn<<"Tests of OS support for SSE failed!"<<std::endl; #else /* We can't use POSIX signal handling to test the availability of * SSE, so we disable it by default. */ - MSG_WARN( "Cannot test OS support for SSE, disabling to be safe.\n" ); + mpxp_warn<<"Cannot test OS support for SSE, disabling to be safe"<<std::endl; gCpuCaps.hasSSE=0; #endif /* _POSIX_SOURCE && X86_FXSR_MAGIC */ #else /* Do nothing on other platforms for now. */ - MSG_V( "Not testing OS support for SSE, leaving disabled.\n" ); + mpxp_v<<"Not testing OS support for SSE, leaving disabled"<<std::endl; gCpuCaps.hasSSE=0; #endif /* __linux__ */ #endif /*ARCH_X86_64*/ Modified: mplayerxp/osdep/getch2.cpp =================================================================== --- mplayerxp/osdep/getch2.cpp 2012-12-22 12:47:25 UTC (rev 597) +++ mplayerxp/osdep/getch2.cpp 2012-12-22 13:51:04 UTC (rev 598) @@ -83,8 +83,8 @@ int load_termcap(const char *termtype){ if(!termtype) termtype=getenv("TERM"); success=tgetent(term_buffer, termtype); - if(success<0){ MSG_ERR("Could not access the 'termcap' data base.\n"); return 0; } - if(success==0){ MSG_ERR("Terminal type `%s' is not defined.\n", termtype);return 0;} + if(success<0){ mpxp_err<<"Could not access the 'termcap' data base"<<std::endl; return 0; } + if(success==0){ mpxp_err<<"Terminal type `"<<termtype<<"' is not defined"<<std::endl; return 0;} screen_width=tgetnum("co"); screen_height=tgetnum("li"); Modified: mplayerxp/osdep/lrmi.cpp =================================================================== --- mplayerxp/osdep/lrmi.cpp 2012-12-22 12:47:25 UTC (rev 597) +++ mplayerxp/osdep/lrmi.cpp 2012-12-22 13:51:04 UTC (rev 598) @@ -803,32 +803,32 @@ unsigned char *p; fputs("vm86() failed\n", stderr); - MSG_V( "return = 0x%x\n", vret); - MSG_V( "eax = 0x%08lx\n", context.vm.regs.eax); - MSG_V( "ebx = 0x%08lx\n", context.vm.regs.ebx); - MSG_V( "ecx = 0x%08lx\n", context.vm.regs.ecx); - MSG_V( "edx = 0x%08lx\n", context.vm.regs.edx); - MSG_V( "esi = 0x%08lx\n", context.vm.regs.esi); - MSG_V( "edi = 0x%08lx\n", context.vm.regs.edi); - MSG_V( "ebp = 0x%08lx\n", context.vm.regs.ebp); - MSG_V( "eip = 0x%08lx\n", context.vm.regs.eip); - MSG_V( "cs = 0x%04x\n", context.vm.regs.cs); - MSG_V( "esp = 0x%08lx\n", context.vm.regs.esp); - MSG_V( "ss = 0x%04x\n", context.vm.regs.ss); - MSG_V( "ds = 0x%04x\n", context.vm.regs.ds); - MSG_V( "es = 0x%04x\n", context.vm.regs.es); - MSG_V( "fs = 0x%04x\n", context.vm.regs.fs); - MSG_V( "gs = 0x%04x\n", context.vm.regs.gs); - MSG_V( "eflags = 0x%08lx\n", context.vm.regs.eflags); + mpxp_v<< "return = 0x"<<std::hex<<vret<<std::endl; + mpxp_v<< "eax = 0x"<<std::hex<<context.vm.regs.eax<<std::endl; + mpxp_v<< "ebx = 0x"<<std::hex<<context.vm.regs.ebx<<std::endl; + mpxp_v<< "ecx = 0x"<<std::hex<<context.vm.regs.ecx<<std::endl; + mpxp_v<< "edx = 0x"<<std::hex<<context.vm.regs.edx<<std::endl; + mpxp_v<< "esi = 0x"<<std::hex<<context.vm.regs.esi<<std::endl; + mpxp_v<< "edi = 0x"<<std::hex<<context.vm.regs.edi<<std::endl; + mpxp_v<< "ebp = 0x"<<std::hex<<context.vm.regs.ebp<<std::endl; + mpxp_v<< "eip = 0x"<<std::hex<<context.vm.regs.eip<<std::endl; + mpxp_v<< "cs = 0x"<<std::hex<<context.vm.regs.cs<<std::endl; + mpxp_v<< "esp = 0x"<<std::hex<<context.vm.regs.esp<<std::endl; + mpxp_v<< "ss = 0x"<<std::hex<<context.vm.regs.ss<<std::endl; + mpxp_v<< "ds = 0x"<<std::hex<<context.vm.regs.ds<<std::endl; + mpxp_v<< "es = 0x"<<std::hex<<context.vm.regs.es<<std::endl; + mpxp_v<< "fs = 0x"<<std::hex<<context.vm.regs.fs<<std::endl; + mpxp_v<< "gs = 0x"<<std::hex<<context.vm.regs.gs<<std::endl; + mpxp_v<< "eflags = 0x"<<std::hex<<context.vm.regs.eflags<<std::endl; - MSG_V("cs:ip = [ "); + mpxp_v<<"cs:ip = [ "); p = (unsigned char *)((context.vm.regs.cs << 4) + (context.vm.regs.eip & 0xffff)); for (i = 0; i < 16; ++i) - MSG_V( "%02x ", (unsigned int)p[i]); + mpxp_v<<(unsigned int)p[i]); - MSG_V("]\n"); + mpxp_v<<"]"<<std::endl; } #endif @@ -923,7 +923,7 @@ if (seg < 0xa000 || (seg << 4) + off >= 0x100000) { #ifdef ORIGINAL_LRMI_CODE_THAT_GOT_IFDEFED_OUT - MSG_WARN( "Int 0x%x is not in rom (%04x:%04x)\n", i, seg, off); + mpxp_warn<<"Int 0x"<<std::hex<<i<<" is not in rom ("<<std::hex<<seg<<":"<<std::hex<<off<<")"<<std::endl; #endif return 0; } Modified: mplayerxp/osdep/mp_malloc.cpp =================================================================== --- mplayerxp/osdep/mp_malloc.cpp 2012-12-22 12:47:25 UTC (rev 597) +++ mplayerxp/osdep/mp_malloc.cpp 2012-12-22 13:51:04 UTC (rev 598) @@ -59,10 +59,7 @@ static void __prot_print_slots(mp_slot_container_t* c) { size_t i; for(i=0;i<c->nslots;i++) { - MSG_INFO("slot[%u] address: %p size: %u\n" - ,i - ,c->slots[i].page_ptr - ,c->slots[i].size); + mpxp_info<<"slot["<<i<<"] address: "<<c->slots[i].page_ptr<<" size: "<<c->slots[i].size<<std::endl; } } @@ -203,9 +200,9 @@ any_t* calls[num]; unsigned i,ncalls; ncalls=backtrace(calls,num); - MSG_INFO("*** Backtrace for suspect call ***\n"); + mpxp_info<<"*** Backtrace for suspect call ***"<<std::endl; for(i=0;i<ncalls;i++) { - MSG_INFO(" %p -> %s\n",calls[i],addr2line(cache,calls[i])); + mpxp_info<<" "<<calls[i]<<" -> "<<addr2line(cache,calls[i])<<std::endl; } uninit_bt_cache(cache); } @@ -213,9 +210,9 @@ void print_backtrace(const std::string& why,any_t** stack,unsigned num) { char result[4096]; unsigned i; - MSG_INFO(!why.empty()?why.c_str():"*** Backtrace for suspect call ***\n"); + mpxp_info<<(!why.empty()?why.c_str():"*** Backtrace for suspect call ***")<<std::endl; for(i=0;i<num;i++) { - MSG_INFO(" %p -> %s\n",stack[i],exec_addr2line(stack[i],result,sizeof(result))); + mpxp_info<<" "<<stack[i]<<" -> "<<exec_addr2line(stack[i],result,sizeof(result))<<std::endl; } } @@ -355,7 +352,7 @@ if(rp) { slot=prot_find_slot(&priv->mallocs,ptr); if(!slot) { - MSG_WARN("[bt_realloc] suspect call found! Can't find slot for address: %p\n",ptr); + mpxp_warn<<"[bt_realloc] suspect call found! Can't find slot for address: "<<ptr<<std::endl; mp_slot_t* _slot; _slot=prot_append_slot(&priv->reallocs,ptr,size); _slot->ncalls=backtrace(_slot->calls,Max_BackTraces); @@ -370,7 +367,7 @@ static __always_inline void bt_free(any_t*ptr) { mp_slot_t* slot=prot_find_slot(&priv->mallocs,ptr); if(!slot) { - MSG_WARN("[bt_free] suspect call found! Can't find slot for address: %p\n",ptr); + mpxp_warn<<"[bt_free] suspect call found! Can't find slot for address: "<<ptr<<std::endl; mp_slot_t* _slot; _slot=prot_append_slot(&priv->frees,ptr,0); _slot->ncalls=backtrace(_slot->calls,Max_BackTraces); @@ -387,7 +384,7 @@ for(i=0;i<c->nslots;i++) { char *s; int printable=1; - MSG_INFO("address: %p size: %u dump: ",c->slots[i].page_ptr,c->slots[i].size); + mpxp_info<<"address: "<<c->slots[i].page_ptr<<" size: "<<c->slots[i].size<<" dump: "; s=reinterpret_cast<char *>(c->slots[i].page_ptr); for(j=0;j<std::min(c->slots[i].size,size_t(20));j++) { if(!isprint(s[j])) { @@ -395,13 +392,13 @@ break; } } - if(printable) MSG_INFO("%20s",s); + if(printable) mpxp_info<<std::string(s).substr(0,20)<<std::endl; else for(j=0;j<std::min(c->slots[i].size,size_t(Max_BackTraces));j++) { - MSG_INFO("%02X ",(unsigned char)s[j]); + mpxp_info<<(unsigned char)s[j]<<" "; } - MSG_INFO("\n"); + mpxp_info<<std::endl; for(j=0;j<c->slots[i].ncalls;j++) { - MSG_INFO("%s%p -> %s\n",j==0?"bt=>":" ",c->slots[i].calls[j],addr2line(cache,c->slots[i].calls[j])); + mpxp_info<<(j==0?"bt=>":" ")<<c->slots[i].calls[j]<<" -> "<<addr2line(cache,c->slots[i].calls[j])<<std::endl; } } } @@ -427,31 +424,31 @@ unsigned i; total=0; for(i=0;i<priv->mallocs.nslots;i++) total+=priv->mallocs.slots[i].size; - MSG_WARN("Warning! %lli slots were not freed. Totally %llu bytes was leaked\n",priv->mallocs.nslots,total); + mpxp_warn<<"Warning! "<<priv->mallocs.nslots<<" slots were not freed. Totally "<<total<<" bytes was leaked"<<std::endl; } if(verbose) { if(priv->mallocs.nslots) { - MSG_INFO("****** List of malloced but not freed pointers *******\n"); + mpxp_info<<"****** List of malloced but not freed pointers *******"<<std::endl; bt_print_slots(cache,&priv->mallocs); done=1; } if(priv->reallocs.nslots) { - MSG_INFO("\n****** List of suspect realloc() calls *******\n"); + mpxp_info<<std::endl<<"****** List of suspect realloc() calls *******"<<std::endl; bt_print_slots(cache,&priv->reallocs); done=1; } if(priv->frees.nslots) { - MSG_INFO("\n****** List of suspect free() calls *******\n"); + mpxp_info<<std::endl<<"****** List of suspect free() calls *******"<<std::endl; bt_print_slots(cache,&priv->frees); done=1; } } else { if(priv->reallocs.nslots || priv->frees.nslots) - MSG_WARN("*** Were found suspect calls of mp_realloc or mp_free ***\n" - "*** Most probably your copy of program contains viruses!!!\n"); + mpxp_warn<<"*** Were found suspect calls of mp_realloc or mp_free ***"<<std::endl; + mpxp_warn<<"*** Most probably your copy of program contains viruses!!!"<<std::endl; } } - if(done) MSG_HINT("\nFor source lines you may also print in (gdb): list *0xADDRESS\n"); + if(done) mpxp_hint<<std::endl<<"For source lines you may also print in (gdb): list *0xADDRESS"<<std::endl; uninit_bt_cache(cache); free(priv); priv=NULL; Modified: mplayerxp/osdep/osdep_msg.h =================================================================== --- mplayerxp/osdep/osdep_msg.h 2012-12-22 12:47:25 UTC (rev 597) +++ mplayerxp/osdep/osdep_msg.h 2012-12-22 13:51:04 UTC (rev 598) @@ -1,9 +1,6 @@ #ifndef OSDEP_MSG_H #define OSDEP_MSG_H -#ifndef MSGT_CLASS -#define MSGT_CLASS MSGT_OSDEP -#endif #include "mpxp_msg.h" namespace mpxp { Modified: mplayerxp/osdep/shmem.cpp =================================================================== --- mplayerxp/osdep/shmem.cpp 2012-12-22 12:47:25 UTC (rev 597) +++ mplayerxp/osdep/shmem.cpp 2012-12-22 13:51:04 UTC (rev 598) @@ -47,18 +47,18 @@ #ifdef MAP_ANON p=mmap(0,size,PROT_READ|PROT_WRITE,MAP_ANON|MAP_SHARED,-1,0); if(p==MAP_FAILED) break; // failed - MSG_DBG2( "shmem: %d bytes allocated using mmap anon (%p)\n",size,p); + mpxp_dbg2<<"shmem: "<<size<<" bytes allocated using mmap anon"<<std::endl; return p; #else // system does not support MAP_ANON at all (e.g. solaris 2.5.1/2.6), just fail - MSG_DBG3( "shmem: using mmap anon failed\n"); + mpxp_dbg3<<"shmem: using mmap anon failed"<<std::endl; #endif break; case 1: // ========= MAP_SHARED + /dev/zero ========== if (devzero == -1 && (devzero = open("/dev/zero", O_RDWR, 0)) == -1) break; p=mmap(0,size,PROT_READ|PROT_WRITE,MAP_SHARED,devzero,0); if(p==MAP_FAILED) break; // failed - MSG_DBG2( "shmem: %d bytes allocated using mmap /dev/zero (%p)\n",size,p); + mpxp_dbg2<<"shmem: "<<size<<" bytes allocated using mmap /dev/zero"<<std::endl; return p; case 2: { // ========= shmget() ========== #ifdef HAVE_SHM @@ -66,24 +66,24 @@ int shmemid; if ((shmemid = shmget(IPC_PRIVATE, size, IPC_CREAT | 0600)) == -1) break; if ((p = shmat(shmemid, 0, 0)) == (any_t*)-1){ - MSG_ERR( "shmem: shmat() failed: %s\n", strerror(errno)); + mpxp_err<<"shmem: shmat() failed: "<<strerror(errno)<<std::endl; shmctl (shmemid, IPC_RMID, &shmemds); break; } if (shmctl(shmemid, IPC_RMID, &shmemds) == -1) { - MSG_ERR( "shmem: shmctl() failed: %s\n", strerror(errno)); + mpxp_err<<"shmem: shmctl() failed: "<<strerror(errno)<<std::endl; if (shmdt(p) == -1) perror ("shmdt()"); break; } - MSG_DBG2( "shmem: %d bytes allocated using SHM (%p)\n",size,p); + mpxp_dbg2<<"shmem: "<<size<<" bytes allocated using SHM"<<std::endl; return p; #else - MSG_FATAL( "shmem: no SHM support was compiled in!\n"); + mpxp_fatal<<"shmem: no SHM support was compiled in!"<<std::endl; return(NULL); #endif } default: - MSG_FATAL(MSGTR_ShMemAllocFail); + mpxp_fatal<<MSGTR_ShMemAllocFail<<std::endl; return NULL; } ++shmem_type; @@ -94,11 +94,10 @@ switch(shmem_type){ case 2: #ifdef HAVE_SHM - if (shmdt(p) == -1) - MSG_ERR( "shmfree: shmdt() failed: %s\n", - strerror(errno)); + if (shmdt(p) == -1) + mpxp_err<<"shmfree: shmdt() failed: "<<strerror(errno)<<std::endl; #else - MSG_ERR( "shmfree: no SHM support was compiled in!\n"); + mpxp_err<<"shmfree: no SHM support was compiled in!"<<std::endl; #endif break; } Modified: mplayerxp/osdep/timer-lx.cpp =================================================================== --- mplayerxp/osdep/timer-lx.cpp 2012-12-22 12:47:25 UTC (rev 597) +++ mplayerxp/osdep/timer-lx.cpp 2012-12-22 13:51:04 UTC (rev 598) @@ -24,31 +24,31 @@ struct timespec ts; ts.tv_sec = usec_delay / 1000000; ts.tv_nsec = (usec_delay % 1000000) * 1000; - return nanosleep(&ts, NULL); + return ::nanosleep(&ts, NULL); #else - return usleep(usec_delay); + return ::usleep(usec_delay); #endif } // Returns current time in microseconds unsigned int GetTimer(){ - struct timeval tv; - struct timezone tz; + struct timeval tv; + struct timezone tz; // float s; - gettimeofday(&tv,NULL); + ::gettimeofday(&tv,NULL); // s=tv.tv_usec;s*=0.000001;s+=tv.tv_sec; - return (tv.tv_sec*1000000ULL+tv.tv_usec); + return (tv.tv_sec*1000000ULL+tv.tv_usec); } // Returns current time in milliseconds unsigned int GetTimerMS(){ - struct timeval tv; - struct timezone tz; + struct timeval tv; + struct timezone tz; // float s; - gettimeofday(&tv,NULL); + ::gettimeofday(&tv,NULL); // s=tv.tv_usec;s*=0.000001;s+=tv.tv_sec; - return (tv.tv_sec*1000+tv.tv_usec/1000); + return (tv.tv_sec*1000+tv.tv_usec/1000); } static unsigned int RelativeTime=0; @@ -56,33 +56,33 @@ // Returns time spent between now and last call in seconds float GetRelativeTime(){ unsigned int t,r; - t=GetTimer(); - r=t-RelativeTime; - RelativeTime=t; - return (float)r * 0.000001F; + t=GetTimer(); + r=t-RelativeTime; + RelativeTime=t; + return (float)r * 0.000001F; } // Initialize timer, must be called at least once at start int InitTimer(void){ - int rtc_fd=-1; - GetRelativeTime(); + int rtc_fd=-1; + GetRelativeTime(); #ifdef HAVE_RTC - if ((rtc_fd = open("/dev/rtc", O_RDONLY)) < 0) perror ("Linux RTC init: open"); - else { + if ((rtc_fd = ::open("/dev/rtc", O_RDONLY)) < 0) perror ("Linux RTC init: open"); + else { unsigned long irqp; /* if (ioctl(rtc_fd, RTC_IRQP_SET, _) < 0) */ - if (ioctl(rtc_fd, RTC_IRQP_READ, &irqp) < 0) { - perror ("Linux RTC init: ioctl (rtc_irqp_read)"); - close (rtc_fd); - rtc_fd = -1; - } else if (ioctl(rtc_fd, RTC_PIE_ON, 0) < 0) { - /* variable only by the root */ - perror ("Linux RTC init: ioctl (rtc_pie_on)"); - close (rtc_fd); - rtc_fd = -1; + if (::ioctl(rtc_fd, RTC_IRQP_READ, &irqp) < 0) { + ::perror ("Linux RTC init: ioctl (rtc_irqp_read)"); + ::close (rtc_fd); + rtc_fd = -1; + } else if (::ioctl(rtc_fd, RTC_PIE_ON, 0) < 0) { + /* variable only by the root */ + ::perror ("Linux RTC init: ioctl (rtc_pie_on)"); + ::close (rtc_fd); + rtc_fd = -1; } else - MSG_V("Using Linux's hardware RTC timing (%ldHz)\n", irqp); + mpxp_v<<"Using Linux's hardware RTC timing ("<<irqp<<"Hz)"<<std::endl; } #endif return rtc_fd; @@ -95,8 +95,8 @@ // -------- RTC ----------- while (time_frame > 0.000) { unsigned long rtc_ts; - if (read (rtc_fd, &rtc_ts, sizeof(rtc_ts)) <= 0) - MSG_ERR( "Linux RTC read error: %s\n", strerror(errno)); + if (::read (rtc_fd, &rtc_ts, sizeof(rtc_ts)) <= 0) + mpxp_err<<"Linux RTC read error: "<<strerror(errno)<<std::endl; time_frame-=GetRelativeTime(); } } else @@ -112,7 +112,7 @@ time_frame-=GetRelativeTime(); } if(softsleep){ - if(time_frame<0) MSG_WARN( "Warning! Softsleep underflow!\n"); + if(time_frame<0) mpxp_warn<<"Warning! Softsleep underflow!"<<std::endl; while(time_frame>0) time_frame-=GetRelativeTime(); // burn the CPU } } Modified: mplayerxp/osdep/vbelib.cpp =================================================================== --- mplayerxp/osdep/vbelib.cpp 2012-12-22 12:47:25 UTC (rev 597) +++ mplayerxp/osdep/vbelib.cpp 2012-12-22 13:51:04 UTC (rev 598) @@ -65,14 +65,25 @@ static void __dump_regs(struct LRMI_regs *r) { - MSG_DBG2("vbelib: eax=%08lXh ebx=%08lXh ecx=%08lXh edx=%08lXh\n" - "vbelib: edi=%08lXh esi=%08lXh ebp=%08lXh esp=%08lXh\n" - "vbelib: ds=%04Xh es=%04Xh ss=%04Xh cs:ip=%04X:%04X\n" - "vbelib: fs=%04Xh gs=%04Xh ss:sp=%04X:%04X flags=%04X\n" - ,(unsigned long)r->eax,(unsigned long)r->ebx,(unsigned long)r->ecx,(unsigned long)r->edx - ,(unsigned long)r->edi,(unsigned long)r->esi,(unsigned long)r->ebp,(unsigned long)r->reserved - ,r->ds,r->es,r->ss,r->cs,r->ip - ,r->fs,r->gs,r->ss,r->sp,r->flags); + mpxp_dbg2<<"vbelib:" + <<"eax="<<std::hex<<(unsigned long)r->eax + <<"ebx="<<std::hex<<(unsigned long)r->ebx + <<"ecx="<<std::hex<<(unsigned long)r->ecx + <<"edx="<<std::hex<<(unsigned long)r->edx<<std::endl; + mpxp_dbg2<<"vbelib:" + <<"edi="<<std::hex<<(unsigned long)r->edi + <<"esi="<<std::hex<<(unsigned long)r->esi + <<"ebp="<<std::hex<<(unsigned long)r->ebp + <<"esp="<<std::hex<<(unsigned long)r->reserved<<std::endl; + mpxp_dbg2<<"vbelib:" + <<"ds="<<r->ds + <<"es="<<r->es + <<"ss="<<r->ss + <<"fs="<<r->fs + <<"gs="<<r->gs + <<"cs="<<r->cs<<":ip="<<r->ip + <<"ss="<<r->ss<<":sp="<<r->sp + <<"flags="<<r->flags<<std::endl; } static inline int VBE_LRMI_int(int int_no, struct LRMI_regs *r) @@ -80,16 +91,14 @@ int retval; if(mp_conf.verbose > 1) { - MSG_DBG2("vbelib: registers before int %02X\n",int_no); + mpxp_dbg2<<"vbelib: registers before int "<<std::hex<<int_no<<std::endl; __dump_regs(r); } retval = LRMI_int(int_no,r); if(mp_conf.verbose > 1) { - MSG_DBG2("vbelib: Interrupt handler returns: %X\n" - "vbelib: registers after int %02X\n" - ,retval - ,int_no); + mpxp_dbg2<<"vbelib: Interrupt handler returns: "<<std::hex<<retval<<std::endl; + mpxp_dbg2<<"vbelib: registers after int "<<std::hex<<int_no<<std::endl; __dump_regs(r); } return retval; @@ -223,20 +232,19 @@ { size_t i; fflush(stdout); - MSG_V("vbelib: "); - for(i = 0;i < 256;i++) { MSG_V("%02X(%c) ",str[i],isprint(str[i])?str[i]:'.'); if(!str[i]) break; } - MSG_V("\n"); - fflush(stdout); + mpxp_v<<"vbelib: "; + for(i = 0;i < 256;i++) { mpxp_v<<std::hex<<str[i]<<"("<<str[i]<<")"; if(!str[i]) break; } + mpxp_v<<std::endl; + mpxp_v.flush(); } static void print_wrd(unsigned short *str) { size_t i; - fflush(stdout); - MSG_V("vbelib: "); - for(i = 0;i < 256;i++) { MSG_V("%04X ",str[i]); if(str[i] == 0xffff) break; } - MSG_V("\n"); - fflush(stdout); + mpxp_v<<"vbelib: "; + for(i = 0;i < 256;i++) { mpxp_v<<std::hex<<str[i]; if(str[i] == 0xffff) break; } + mpxp_v<<std::endl; + mpxp_v.flush(); } int vbeGetControllerInfo(struct VbeInfoBlock *data) @@ -262,7 +270,7 @@ #ifdef HAVE_VERBOSE_VAR if(mp_conf.verbose > 1) { - MSG_DBG2("vbelib: OemStringPtr=%04X:%04X => %p\n",fpdata.seg,fpdata.off,data->OemStringPtr); + mpxp_dbg2<<"vbelib: OemStringPtr="<<std::hex<<fpdata.seg<<":"<<std::hex<<fpdata.off<<" => "<<data->OemStringPtr<<std::endl; if(data->OemStringPtr) print_str(data->OemStringPtr); fflush(stdout); } @@ -278,7 +286,7 @@ #ifdef HAVE_VERBOSE_VAR if(mp_conf.verbose > 1) { - MSG_DBG2("vbelib: VideoModePtr=%04X:%04X => %p\n",fpdata.seg,fpdata.off,data->VideoModePtr); + mpxp_dbg2<<"vbelib: VideoModePtr="<<std::hex<<fpdata.seg<<":"<<std::hex<<fpdata.off<<" => "<<data->VideoModePtr<<std::endl; if(data->VideoModePtr) print_wrd(data->VideoModePtr); fflush(stdout); } @@ -290,7 +298,7 @@ #ifdef HAVE_VERBOSE_VAR if(mp_conf.verbose > 1) { - MSG_DBG2("vbelib: OemVendorNamePtr=%04X:%04X => %p\n",fpdata.seg,fpdata.off,data->OemVendorNamePtr); + mpxp_dbg2<<"vbelib: OemVendorNamePtr="<<std::hex<<fpdata.seg<<":"<<std::hex<<fpdata.off<<" => "<<data->OemVendorNamePtr<<std::endl; if(data->OemVendorNamePtr) print_str(data->OemVendorNamePtr); fflush(stdout); } @@ -302,7 +310,7 @@ #ifdef HAVE_VERBOSE_VAR if(mp_conf.verbose > 1) { - MSG_DBG2("vbelib: OemProductNamePtr=%04X:%04X => %p\n",fpdata.seg,fpdata.off,data->OemProductNamePtr); + mpxp_dbg2<<"vbelib: OemProductNamePtr="<<std::hex<<fpdata.seg<<":"<<std::hex<<fpdata.off<<" => "<<data->OemProductNamePtr<<std::endl; if(data->OemVendorNamePtr) print_str(data->OemProductNamePtr); fflush(stdout); } @@ -314,7 +322,7 @@ #ifdef HAVE_VERBOSE_VAR if(mp_conf.verbose > 1) { - MSG_DBG2("vbelib: OemProductRevPtr=%04X:%04X => %p\n",fpdata.seg,fpdata.off,data->OemProductRevPtr); + mpxp_dbg2<<"vbelib: OemProductRevPtr="<<std::hex<<fpdata.seg<<":"<<std::hex<<fpdata.off<<" => "<<data->OemProductRevPtr<<std::endl; if(data->OemProductRevPtr) print_str(data->OemProductRevPtr); fflush(stdout); } @@ -656,17 +664,17 @@ pm_info->SetWindowCall = (void (*)())PhysToVirtSO(r.es,info_offset+rm_info->SetWindowCall); if(!is_addr_valid(reinterpret_cast<any_t*>(pm_info->SetWindowCall))) retval = VBE_BROKEN_BIOS; #ifdef HAVE_VERBOSE_VAR - MSG_DBG2("vbelib: SetWindowCall=%04X:%04X => %p\n",r.es,info_offset+rm_info->SetWindowCall,pm_info->SetWindowCall); + mpxp_dbg2<<"vbelib: SetWindowCall="<<std::hex<<r.es<<":"<<std::hex<<(info_offset+rm_info->SetWindowCall)<<" => "<<pm_info->SetWindowCall<<std::endl; #endif pm_info->SetDisplayStart = (void(*)())PhysToVirtSO(r.es,info_offset+rm_info->SetDisplayStart); if(!is_addr_valid(reinterpret_cast<any_t*>(pm_info->SetDisplayStart))) retval = VBE_BROKEN_BIOS; #ifdef HAVE_VERBOSE_VAR - MSG_DBG2("vbelib: SetDisplayStart=%04X:%04X => %p\n",r.es,info_offset+rm_info->SetDisplayStart,pm_info->SetDisplayStart); + mpxp_dbg2<<"vbelib: SetDisplayStart="<<std::hex<<r.es<<":"<<std::hex<<(info_offset+rm_info->SetDisplayStart)<<" => "<<pm_info->SetDisplayStart<<std::endl; #endif pm_info->SetPaletteData = (void(*)())PhysToVirtSO(r.es,info_offset+rm_info->SetPaletteData); if(!is_addr_valid(reinterpret_cast<any_t*>(pm_info->SetPaletteData))) retval = VBE_BROKEN_BIOS; #ifdef HAVE_VERBOSE_VAR - MSG_DBG2("vbelib: SetPaletteData=%04X:%04X => %p\n",r.es,info_offset+rm_info->SetPaletteData,pm_info->SetPaletteData); + mpxp_dbg2<<"vbelib: SetPaletteData="<<std::hex<<r.es<<":"<<std::hex<<(info_offset+rm_info->SetPaletteData)<<" => "<<pm_info->SetPaletteData<<std::endl; #endif pm_info->iopl_ports = (unsigned short*)PhysToVirtSO(r.es,info_offset+rm_info->iopl_ports); if(!rm_info->iopl_ports) pm_info->iopl_ports = NULL; @@ -679,7 +687,7 @@ #ifdef HAVE_VERBOSE_VAR if(mp_conf.verbose > 1) { - MSG_DBG2("vbelib: iopl_ports=%04X:%04X => %p\n",r.es,info_offset+rm_info->iopl_ports,pm_info->iopl_ports); + mpxp_dbg2<<"vbelib: iopl_ports="<<std::hex<<r.es<<":"<<std::hex<<(info_offset+rm_info->iopl_ports)<<" => "<<pm_info->iopl_ports<<std::endl; if(pm_info->iopl_ports) print_wrd(pm_info->iopl_ports); fflush(stdout); } @@ -714,7 +722,7 @@ { any_t*lfb; if(fd_mem == -1) return NULL; - MSG_DBG2("vbelib: vbeMapVideoBuffer(%08lX,%08lX)\n",phys_addr,size); + mpxp_dbg2<<"vbelib: vbeMapVideoBuffer("<<std::hex<<phys_addr<<","<<std::hex<<size<<")"<<std::endl; /* Here we don't need with MAP_FIXED and prefered address (first argument) */ lfb = mmap((any_t*)0,size,PROT_READ | PROT_WRITE,MAP_SHARED,fd_mem,phys_addr); return lfb == (any_t*)-1 ? 0 : lfb; @@ -722,7 +730,7 @@ void vbeUnmapVideoBuffer(unsigned long linear_addr,unsigned long size) { - MSG_DBG2("vbelib: vbeUnmapVideoBuffer(%08lX,%08lX)\n",linear_addr,size); + mpxp_dbg2<<"vbelib: vbeUnmapVideoBuffer("<<std::hex<<linear_addr<<","<<std::hex<<size<<")"<<std::endl; munmap((any_t*)linear_addr,size); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |