*** empty log message ***

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4074 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Webster
1999-10-20 04:42:32 +00:00
parent ac0ac8241f
commit 78d50441dd
2 changed files with 90 additions and 65 deletions

View File

@@ -770,16 +770,16 @@ $(WXDIR)\lib\wx.lib: \
!else !else
# Update the import library # Update the import library
$(WXDIR)\lib\wx200.lib: $(OBJECTS) $(WXDIR)\lib\wx210.lib: $(OBJECTS)
implib $(WXDIR)\lib\wx200.lib $(WXDIR)\lib\wx200.def implib $(WXDIR)\lib\wx210.lib $(WXDIR)\lib\wx210.def
# Update the dynamic link library # Update the dynamic link library
$(WXDIR)\lib\wx200.dll: $(OBJECTS) $(WXDIR)\lib\wx200.lib $(WXDIR)\lib\wx200.dll: $(OBJECTS) $(WXDIR)\lib\wx210.lib
icc @<< icc @<<
/B" $(LINKFLAGS)" /Fe$@ /B" $(LINKFLAGS)" /Fe$@
$(LIBS) $(LIBS)
$(OBJECTS) $(OBJECTS)
$(WXDIR)\lib\wx200.def $(WXDIR)\lib\wx210.def
<< <<
!endif !endif

View File

@@ -131,10 +131,17 @@ bool wxShell(const wxString& command)
} }
// Get free memory in bytes, or -1 if cannot determine amount (e.g. on UNIX) // Get free memory in bytes, or -1 if cannot determine amount (e.g. on UNIX)
long wxGetFreeMemory() long wxGetFreeMemory(void *memptr)
{ {
// return (long)GetFreeSpace(0); ULONG lSize;
return 0L; ULONG lMemFlags;
APIRET rc;
lMemFlags = PAG_FREE;
rc = ::DosQueryMem(memptr, &lSize, &lMemFlags);
if (rc != 0)
return -1L;
return (long)lSize;
} }
// Sleep for nSecs seconds. Attempt a Windows implementation using timers. // Sleep for nSecs seconds. Attempt a Windows implementation using timers.
@@ -159,19 +166,7 @@ void wxUsleep(unsigned long milliseconds)
void wxSleep(int nSecs) void wxSleep(int nSecs)
{ {
if (inTimer) ::DosSleep( 1000*nSecs );
return;
wxTheSleepTimer = new wxSleepTimer;
inTimer = TRUE;
wxTheSleepTimer->Start(nSecs*1000);
while (inTimer)
{
if (wxTheApp->Pending())
wxTheApp->Dispatch();
}
delete wxTheSleepTimer;
wxTheSleepTimer = NULL;
} }
// Consume all events until no more left // Consume all events until no more left
@@ -256,13 +251,27 @@ int wxGetOsVersion(int *majorVsn, int *minorVsn)
#if wxUSE_RESOURCES #if wxUSE_RESOURCES
bool wxWriteResource(const wxString& section, const wxString& entry, const wxString& value, const wxString& file) bool wxWriteResource(const wxString& section, const wxString& entry, const wxString& value, const wxString& file)
{ {
// TODO: HAB hab;
/* HINI hIni;
if (file != "") if (file != "")
return (WritePrivateProfileString((PCSZ)WXSTRINGCAST section, (PCSZ)WXSTRINGCAST entry, (PCSZ)value, (PCSZ)WXSTRINGCAST file) != 0); {
hIni = ::PrfOpenProfile(hab, (PSZ)WXSTRINGCAST file);
if (hIni != 0L)
{
return (::PrfWriteProfileString( hIni
,(PSZ)WXSTRINGCAST section
,(PSZ)WXSTRINGCAST entry
,(PSZ)WXSTRINGCAST value
));
}
}
else else
return (WriteProfileString((PCSZ)WXSTRINGCAST section, (PCSZ)WXSTRINGCAST entry, (PCSZ)WXSTRINGCAST value) != 0); return (::PrfWriteProfileString( HINI_PROFILE
*/ ,(PSZ)WXSTRINGCAST section
,(PSZ)WXSTRINGCAST entry
,(PSZ)WXSTRINGCAST value
));
return FALSE; return FALSE;
} }
@@ -289,28 +298,44 @@ bool wxWriteResource(const wxString& section, const wxString& entry, int value,
bool wxGetResource(const wxString& section, const wxString& entry, wxChar **value, const wxString& file) bool wxGetResource(const wxString& section, const wxString& entry, wxChar **value, const wxString& file)
{ {
HAB hab;
HINI hIni;
static const wxChar defunkt[] = _T("$$default"); static const wxChar defunkt[] = _T("$$default");
// TODO:
/*
if (file != "") if (file != "")
{ {
int n = GetPrivateProfileString((PCSZ)WXSTRINGCAST section, (PCSZ)WXSTRINGCAST entry, (PCSZ)defunkt, hIni = ::PrfOpenProfile(hab, (PSZ)WXSTRINGCAST file);
(PSZ)wxBuffer, 1000, (PCSZ)WXSTRINGCAST file); if (hIni != 0L)
if (n == 0 || wxStrcmp(wxBuffer, defunkt) == 0) {
ULONG n = ::PrfQueryProfileString( hIni
,(PSZ)WXSTRINGCAST section
,(PSZ)WXSTRINGCAST entry
,(PSZ)defunkt
,(void*)wxBuffer
,1000
);
if (n == 0L || wxStrcmp(wxBuffer, defunkt) == 0)
return FALSE;
}
else
return FALSE; return FALSE;
} }
else else
{ {
int n = GetProfileString((PCSZ)WXSTRINGCAST section, (PCSZ)WXSTRINGCAST entry, (LPCTSTR)defunkt, ULONG n = ::PrfQueryProfileString( HINI_PROFILE
(PSZ)wxBuffer, 1000); ,(PSZ)WXSTRINGCAST section
if (n == 0 || wxStrcmp(wxBuffer, defunkt) == 0) ,(PSZ)WXSTRINGCAST entry
,(PSZ)defunkt
,(void*)wxBuffer
,1000
);
if (n == 0L || wxStrcmp(wxBuffer, defunkt) == 0)
return FALSE; return FALSE;
} }
if (*value) delete[] (*value); if (*value)
delete[] (*value);
*value = copystring(wxBuffer); *value = copystring(wxBuffer);
return TRUE; return TRUE;
*/
return FALSE;
} }
bool wxGetResource(const wxString& section, const wxString& entry, float *value, const wxString& file) bool wxGetResource(const wxString& section, const wxString& entry, float *value, const wxString& file)