remove win32isms

Originally committed to SVN as r179.
This commit is contained in:
David Lamparter 2006-02-26 02:53:45 +00:00
parent 6f56124b28
commit b34c69891c
6 changed files with 13 additions and 4 deletions

View File

@ -96,7 +96,6 @@ static char *mystrdup(struct InputStream *is,const char *src) {
return dst; return dst;
} }
#ifdef _WIN32
static void strlcpy(char *dst,const char *src,unsigned size) { static void strlcpy(char *dst,const char *src,unsigned size) {
unsigned i; unsigned i;
@ -105,7 +104,6 @@ static void strlcpy(char *dst,const char *src,unsigned size) {
if (i<size) if (i<size)
dst[i] = 0; dst[i] = 0;
} }
#endif
struct Cue { struct Cue {
ulonglong Time; ulonglong Time;

View File

@ -71,6 +71,9 @@ PortAudioPlayer::~PortAudioPlayer() {
if (!--pa_refcount) Pa_Terminate(); if (!--pa_refcount) Pa_Terminate();
} }
#ifdef __WIN32__
typedef unsigned __int64 uint64_t;
#endif
////////////////////// //////////////////////
// PortAudio callback // PortAudio callback
@ -82,7 +85,7 @@ int PortAudioPlayer::paCallback(void *inputBuffer, void *outputBuffer, unsigned
// Calculate how much left // Calculate how much left
__int64 lenAvailable = player->endPos - player->playPos; __int64 lenAvailable = player->endPos - player->playPos;
unsigned __int64 avail = 0; uint64_t avail = 0;
if (lenAvailable > 0) { if (lenAvailable > 0) {
avail = lenAvailable; avail = lenAvailable;
if (avail > framesPerBuffer) { if (avail > framesPerBuffer) {
@ -101,7 +104,7 @@ int PortAudioPlayer::paCallback(void *inputBuffer, void *outputBuffer, unsigned
} }
// Pad end with blank // Pad end with blank
if (avail < (unsigned __int64) framesPerBuffer) { if (avail < (uint64_t) framesPerBuffer) {
//provider->softStop = true; //provider->softStop = true;
} }

View File

@ -44,12 +44,14 @@
#endif #endif
#ifdef __WIN32__
////////////////////////// //////////////////////////
// Absolute of 64 bit int // Absolute of 64 bit int
__int64 abs64(__int64 input) { __int64 abs64(__int64 input) {
if (input < 0) return -input; if (input < 0) return -input;
return input; return input;
} }
#endif
/////////////////////////////////////// ///////////////////////////////////////

View File

@ -36,7 +36,9 @@
/////////////////////// ///////////////////////
// Function prototypes // Function prototypes
#ifdef __WIN32__
__int64 abs64(__int64 input); __int64 abs64(__int64 input);
#endif
int CountMatches(wxString parent,wxString child); int CountMatches(wxString parent,wxString child);
bool Copy(wxString src,wxString dst); bool Copy(wxString src,wxString dst);
bool Backup(wxString src,wxString dst); bool Backup(wxString src,wxString dst);

View File

@ -180,7 +180,9 @@ void VideoDisplay::SetVideo(const wxString &filename) {
// Close mkv // Close mkv
MatroskaWrapper::wrapper.Close(); MatroskaWrapper::wrapper.Close();
} }
#ifdef __WIN32__
else if (ext == _T(".avi")) KeyFrames = VFWWrapper::GetKeyFrames(filename); else if (ext == _T(".avi")) KeyFrames = VFWWrapper::GetKeyFrames(filename);
#endif
// Update size // Update size
UpdateSize(); UpdateSize();

View File

@ -41,7 +41,9 @@
/////////// ///////////
// Headers // Headers
#include <wx/wxprec.h> #include <wx/wxprec.h>
#ifdef __WIN32__
#include <windows.h> #include <windows.h>
#endif
#include <time.h> #include <time.h>