Cured some small doc typos; some WIN16 fixes; transferred DLL WinMain to

IMPLEMENT_APP() macro so dummy.obj doesn't have to be linked; lexer.l fix
for LEX (I hope)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1672 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1999-02-10 22:44:53 +00:00
parent debdd17e99
commit 750b78ba35
31 changed files with 188 additions and 91 deletions

View File

@@ -191,6 +191,8 @@ static int my_input( void )
void wxExprCleanUp()
{
#ifdef FLEX_SCANNER
if (yy_current_buffer)
yy_delete_buffer(yy_current_buffer);
#endif
}

View File

@@ -26,8 +26,10 @@
#include "wx/wx.h"
#endif
#ifndef __WIN16__
#include "wx/spinbutt.h"
#include "wx/checklst.h"
#endif
#include "wx/valgen.h"
@@ -129,6 +131,7 @@ bool wxGenericValidator::TransferToWindow(void)
return TRUE;
}
}
#ifndef __WIN16__
else if (m_validatorWindow->IsKindOf(CLASSINFO(wxSpinButton)) )
{
wxSpinButton* pControl = (wxSpinButton*) m_validatorWindow;
@@ -138,6 +141,7 @@ bool wxGenericValidator::TransferToWindow(void)
return TRUE;
}
}
#endif
// string controls
else if (m_validatorWindow->IsKindOf(CLASSINFO(wxButton)) )
{
@@ -184,6 +188,7 @@ bool wxGenericValidator::TransferToWindow(void)
return TRUE;
}
}
#ifndef __WIN16__
// array controls
// NOTE: wxCheckListBox isa wxListBox, so wxCheckListBox
// MUST come first:
@@ -205,6 +210,7 @@ bool wxGenericValidator::TransferToWindow(void)
else
return FALSE;
}
#endif
else if (m_validatorWindow->IsKindOf(CLASSINFO(wxListBox)) )
{
wxListBox* pControl = (wxListBox*) m_validatorWindow;
@@ -279,6 +285,7 @@ bool wxGenericValidator::TransferFromWindow(void)
return TRUE;
}
}
#ifndef __WIN16__
else if (m_validatorWindow->IsKindOf(CLASSINFO(wxSpinButton)) )
{
wxSpinButton* pControl = (wxSpinButton*) m_validatorWindow;
@@ -288,6 +295,7 @@ bool wxGenericValidator::TransferFromWindow(void)
return TRUE;
}
}
#endif
// string controls
else if (m_validatorWindow->IsKindOf(CLASSINFO(wxButton)) )
{
@@ -334,6 +342,7 @@ bool wxGenericValidator::TransferFromWindow(void)
return TRUE;
}
}
#ifndef __WIN16__
// array controls
// NOTE: wxCheckListBox isa wxListBox, so wxCheckListBox
// MUST come first:
@@ -354,6 +363,7 @@ bool wxGenericValidator::TransferFromWindow(void)
else
return FALSE;
}
#endif
else if (m_validatorWindow->IsKindOf(CLASSINFO(wxListBox)) )
{
wxListBox* pControl = (wxListBox*) m_validatorWindow;

View File

@@ -30,7 +30,7 @@ RANLIB = ranlib
# Debug/trace mode. 1 or more for debugging.
DEBUG = 0
GUI = -D__MOTIF__ -D__LINUX__ -D__UNIX__
GUI = -D__MOTIF__ -D__SOLARIS__ -D__UNIX__
GUISUFFIX = _motif
########################## Compiler flags #############################

View File

@@ -207,6 +207,10 @@ $(WXLIB) : $(OBJECTS)
sed -e "s/YYLMAX 200/YYLMAX 5000/g" > ../common/lex_yy.c
/bin/rm -f ../common/lex.yy.c
# N.B. if you have lex instead of flex, replace the $(LEX) line above
# with the following:
# $(LEX) ../common/lexer.l
# Replace yacc with bison if you run into compilation
# problems with y_tab.c.
../common/y_tab.c: ../common/parser.y

View File

@@ -34,7 +34,7 @@
#include <netdb.h>
#include <signal.h>
#if defined(__SVR4__) && !defined(__HPUX__)
#if defined(__SOLARIS__) || defined(__SVR4__) && !defined(__HPUX__)
#include <sys/systeminfo.h>
#endif
@@ -61,7 +61,7 @@ extern wxList wxTopLevelWindows;
// Get full hostname (eg. DoDo.BSn-Germany.crg.de)
bool wxGetHostName(char *buf, int maxSize)
{
#if defined(__SVR4__) && !defined(__HPUX__)
#if defined(__SOLARIS__) || defined(__SVR4__) && !defined(__HPUX__)
return (sysinfo (SI_HOSTNAME, buf, maxSize) != -1);
#else /* BSD Sockets */
char name[255];
@@ -491,7 +491,7 @@ void wxXMergeDatabases (wxApp * theApp, Display * display)
size_t len;
environment = GetIniFile (filename, NULL);
len = strlen (environment);
#if defined(__SVR4__) && !defined(__HPUX__)
#if defined(__SOLARIS__) || defined(__SVR4__) && !defined(__HPUX__)
(void) sysinfo (SI_HOSTNAME, environment + len, 1024 - len);
#else
(void) gethostname (environment + len, 1024 - len);

View File

@@ -248,7 +248,7 @@ bool wxApp::RegisterWindowClasses()
// Register the frame window class.
WNDCLASS wndclass; // Structure used to register Windows class.
wndclass.style = CS_HREDRAW | CS_VREDRAW;
wndclass.style = CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS ;
wndclass.lpfnWndProc = (WNDPROC)wxWndProc;
wndclass.cbClsExtra = 0;
wndclass.cbWndExtra = sizeof( DWORD ); // was 4
@@ -272,7 +272,7 @@ bool wxApp::RegisterWindowClasses()
// Register the MDI frame window class.
WNDCLASS wndclass1; // Structure used to register Windows class.
wndclass1.style = CS_HREDRAW | CS_VREDRAW;
wndclass1.style = CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS ;
wndclass1.lpfnWndProc = (WNDPROC)wxWndProc;
wndclass1.cbClsExtra = 0;
wndclass1.cbWndExtra = sizeof( DWORD ); // was 4
@@ -294,7 +294,7 @@ bool wxApp::RegisterWindowClasses()
// Register the MDI child frame window class.
WNDCLASS wndclass4; // Structure used to register Windows class.
wndclass4.style = CS_HREDRAW | CS_VREDRAW;
wndclass4.style = CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS ;
wndclass4.lpfnWndProc = (WNDPROC)wxWndProc;
wndclass4.cbClsExtra = 0;
wndclass4.cbWndExtra = sizeof( DWORD ); // was 4
@@ -321,7 +321,7 @@ bool wxApp::RegisterWindowClasses()
memset(&wndclass2, 0, sizeof(WNDCLASS)); // start with NULL defaults
// Use CS_OWNDC to avoid messing about restoring the context
// for every graphic operation.
wndclass2.style = CS_HREDRAW | CS_VREDRAW;
wndclass2.style = CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS ;
wndclass2.lpfnWndProc = (WNDPROC)wxWndProc;
wndclass2.cbClsExtra = 0;
wndclass2.cbWndExtra = sizeof( DWORD ); // was 4

View File

@@ -45,7 +45,10 @@
#endif
// if wxWindows is in the DLL link our entry point with the application
#if defined(WXUSINGDLL)
// N.B. see include/wx/app.h, we're now putting this in IMPLEMENT_APP so we
// don't have to link our apps with dummy.obj.
#if 0 // defined(WXUSINGDLL)
// NT defines APIENTRY, 3.x not
#if !defined(APIENTRY)

View File

@@ -19,7 +19,7 @@
// Foils optimizations in Visual C++ (see also app.cpp). Without it,
// dummy.obj isn't linked and we get a linker error.
#if defined(__VISUALC__) && defined(__WIN16__)
#if defined(__VISUALC__)
char wxDummyChar=0;
#endif

View File

@@ -281,7 +281,7 @@ $(COMMDIR)/y_tab.$(OBJSUFF): $(COMMDIR)/y_tab.c $(COMMDIR)/lex_yy.c
$(COMMDIR)/lex_yy.c: $(COMMDIR)/lexer.l
$(LEX) $(COMMDIR)/lexer.l > $(COMMDIR)/lex_yy.c
# The following may be required for some versions of LEX/FLEX
# The following may be required for FLEX
# $(LEX) -o$(COMMDIR)/lex_yy.c $(COMMDIR)/lexer.l
# sed -e "s/BUFSIZ/5000/g" < lex.yy.c | \

View File

@@ -295,14 +295,19 @@ $(WXDIR)\lib\wx200.dll: $(DUMMYOBJ) $(OBJECTS) $(WXDIR)\lib\wx200.lib
########################################################
# Windows-specific objects
dummy.obj: dummy.$(SRCSUFF) $(WXDIR)\include\wx\wx.h
dummy.obj: dummy.$(SRCSUFF) $(WXDIR)\include\wx\wx.h $(WXDIR)\include\wx\msw\setup.h
cl $(CPPFLAGS) $(MAKEPRECOMP) /c /Tp $*.$(SRCSUFF)
dummydll.obj: dummydll.$(SRCSUFF) $(WXDIR)\include\wx\wx.h
dummydll.obj: dummydll.$(SRCSUFF) $(WXDIR)\include\wx\wx.h $(WXDIR)\include\wx\msw\setup.h
cl @<<
$(CPPFLAGS) $(MAKEPRECOMP) /c /Tp $*.$(SRCSUFF)
<<
# If taking wxWindows from CVS, setup.h doesn't exist yet.
$(WXDIR)\include\wx\msw\setup.h: $(WXDIR)\include\wx\msw\setup0.h
-copy "$(WXDIR)"\include\wx\msw\setup.h "$(WXDIR)"\include\wx\msw\setup.bak
copy "$(WXDIR)"\include\wx\msw\setup0.h "$(WXDIR)"\include\wx\msw\setup.h
$(MSWDIR)/accel.obj: $*.$(SRCSUFF)
cl @<<
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@

View File

@@ -341,6 +341,7 @@ void wxMenu::SetTitle(const wxString& label)
}
}
#ifndef __WIN16__
// put the title string in bold face
if ( !m_title.IsEmpty() )
{
@@ -354,6 +355,7 @@ void wxMenu::SetTitle(const wxString& label)
wxLogLastError("SetMenuItemInfo");
}
}
#endif
}
const wxString wxMenu::GetTitle() const

View File

@@ -77,10 +77,12 @@ struct wxExecuteData
public:
~wxExecuteData()
{
#ifndef __WIN16__
if ( !::CloseHandle(hProcess) )
{
wxLogLastError("CloseHandle(hProcess)");
}
#endif
}
HWND hWnd; // window to send wxWM_PROC_TERMINATED to

View File

@@ -49,7 +49,11 @@
#include "wx/menuitem.h"
#include "wx/log.h"
#if wxUSE_TOOLTIPS
#include "wx/tooltip.h"
#endif
#include "wx/intl.h"
#include "wx/log.h"
@@ -2037,7 +2041,7 @@ bool wxWindow::MSWProcessMessage(WXMSG* pMsg)
// it
return FALSE;
}
#ifndef __WIN16__
wxButton *btnDefault = GetDefaultItem();
if ( btnDefault && !bCtrlDown )
{
@@ -2050,6 +2054,7 @@ bool wxWindow::MSWProcessMessage(WXMSG* pMsg)
// else: but if there is not it makes sense to make it
// work like a TAB - and that's what we do.
// Note that Ctrl-Enter always works this way.
#endif
}
break;