compile fix

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-10-15 16:14:01 +00:00
parent 2b835535a9
commit 5b7f1aab47
3 changed files with 204 additions and 205 deletions

View File

@@ -25,19 +25,22 @@
#endif #endif
#ifdef __WXGTK__ #ifdef __UNIX__
extern "C" { extern "C"
{
#include "../../src/iodbc/isql.h" #include "../../src/iodbc/isql.h"
#include "../../src/iodbc/isqlext.h" #include "../../src/iodbc/isqlext.h"
#include "../../src/iodbc/odbc_funcs.h" #include "../../src/iodbc/odbc_funcs.h"
#include "../../src/iodbc/odbc_types.h" #include "../../src/iodbc/odbc_types.h"
typedef float SFLOAT; typedef float SFLOAT;
typedef double SDOUBLE; typedef double SDOUBLE;
#define ULONG UDWORD #define ULONG UDWORD
} }
#else #else // !Unix
#include <sqlext.h> #include <sqlext.h>
#endif #endif // Unix/!Unix
#include "wx/defs.h" #include "wx/defs.h"
#include "wx/list.h" #include "wx/list.h"
@@ -60,9 +63,7 @@ class WXDLLEXPORT wxRecordSet;
class WXDLLEXPORT wxDatabase: public wxObject class WXDLLEXPORT wxDatabase: public wxObject
{ {
// JACS
DECLARE_DYNAMIC_CLASS(wxDatabase) DECLARE_DYNAMIC_CLASS(wxDatabase)
private:
protected: protected:
static HENV hEnv; static HENV hEnv;
static int refCount; static int refCount;
@@ -85,11 +86,11 @@ class WXDLLEXPORT wxDatabase: public wxObject
wxList recordSets; // Record sets: Added by JACS wxList recordSets; // Record sets: Added by JACS
public: public:
wxDatabase(void); wxDatabase();
~wxDatabase(void); ~wxDatabase();
bool Open(char *, bool exclusive =FALSE, bool readOnly =TRUE, char *username ="ODBC", char *password =""); bool Open(char *, bool exclusive =FALSE, bool readOnly =TRUE, char *username ="ODBC", char *password ="");
bool Close(void); bool Close();
// Cleanup operations, added by JACS // Cleanup operations, added by JACS
void DeleteRecordSets(void); // Called when the database is deleted void DeleteRecordSets(void); // Called when the database is deleted
@@ -109,25 +110,25 @@ class WXDLLEXPORT wxDatabase: public wxObject
void SetDataSource(char *s); void SetDataSource(char *s);
// Database attributes // Database attributes
char *GetDatabaseName(void); char *GetDatabaseName();
bool CanUpdate(void); bool CanUpdate();
bool CanTransact(void); bool CanTransact();
bool InWaitForDataSource(void); bool InWaitForDataSource();
void SetLoginTimeout(long seconds); void SetLoginTimeout(long seconds);
void SetQueryTimeout(long seconds); void SetQueryTimeout(long seconds);
void SetSynchronousMode(bool synchronous); void SetSynchronousMode(bool synchronous);
// Database operations // Database operations
bool BeginTrans(void); bool BeginTrans();
bool CommitTrans(void); bool CommitTrans();
bool RollbackTrans(void); bool RollbackTrans();
void Cancel(void); void Cancel();
// Error handling // Error handling
bool ErrorOccured(void); bool ErrorOccured();
char* GetErrorMessage(void); char* GetErrorMessage();
long GetErrorNumber(void); long GetErrorNumber();
char* GetErrorClass(void); char* GetErrorClass();
inline void ErrorSnapshot(HSTMT =SQL_NULL_HSTMT); inline void ErrorSnapshot(HSTMT =SQL_NULL_HSTMT);
// Overridables // Overridables
@@ -154,23 +155,23 @@ class WXDLLEXPORT wxQueryField: public wxObject
long size; long size;
bool dirty; bool dirty;
bool AllocData(void); bool AllocData();
public: public:
wxQueryField(void); wxQueryField();
~wxQueryField(void); ~wxQueryField();
bool SetData(void*, long); bool SetData(void*, long);
void SetDirty(bool =TRUE); void SetDirty(bool =TRUE);
void ClearData(void); void ClearData();
void SetType(short); void SetType(short);
void SetSize(long); void SetSize(long);
void* GetData(void); void* GetData();
short GetType(void); short GetType();
long GetSize(void); long GetSize();
bool IsDirty(void); bool IsDirty();
}; };
// Represents a column description // Represents a column description
@@ -188,8 +189,8 @@ class WXDLLEXPORT wxQueryCol: public wxObject
public: public:
wxList fields; wxList fields;
wxQueryCol(void); wxQueryCol();
~wxQueryCol(void); ~wxQueryCol();
void* BindVar(void*, long); void* BindVar(void*, long);
void FillVar(int); void FillVar(int);
@@ -200,9 +201,9 @@ class WXDLLEXPORT wxQueryCol: public wxObject
void SetFieldDirty(int, bool =TRUE); void SetFieldDirty(int, bool =TRUE);
void SetType(short); void SetType(short);
char* GetName(void); char* GetName();
short GetType(void); short GetType();
bool IsNullable(void); bool IsNullable();
void* GetData(int); void* GetData(int);
long GetSize(int); long GetSize(int);
@@ -237,43 +238,45 @@ class WXDLLEXPORT wxRecordSet: public wxObject
public: public:
// JACS gave parent a default value for benefit of IMPLEMENT_DYNAMIC_CLASS // JACS gave parent a default value for benefit of IMPLEMENT_DYNAMIC_CLASS
wxRecordSet(wxDatabase *parent = NULL, int =wxOPEN_TYPE_DYNASET, int =wxOPTION_DEFAULT); wxRecordSet(wxDatabase *parent = NULL,
~wxRecordSet(void); int = wxOPEN_TYPE_DYNASET,
int = wxOPTION_DEFAULT);
~wxRecordSet();
// My own, lower-level functions. // My own, lower-level functions.
bool BeginQuery(int openType, char *sql = NULL, int options = wxOPTION_DEFAULT); bool BeginQuery(int openType, char *sql = NULL, int options = wxOPTION_DEFAULT);
bool EndQuery(void); bool EndQuery();
bool Query(char* columns, char* table =NULL, char *filter =NULL); bool Query(char* columns, char* table =NULL, char *filter =NULL);
// Attributes // Attributes
inline int GetNumberFields(void) { return nFields; } inline int GetNumberFields(void) { return nFields; }
inline int GetNumberParams(void) { return nParams; } inline int GetNumberParams(void) { return nParams; }
long GetNumberRecords(void); long GetNumberRecords();
long GetNumberCols(void); long GetNumberCols();
inline char *GetFilter(void) { return recordFilter; } inline char *GetFilter(void) { return recordFilter; }
inline char *GetSortString(void) { return sortString; } inline char *GetSortString(void) { return sortString; }
inline wxDatabase *GetDatabase(void) { return parentdb; } inline wxDatabase *GetDatabase(void) { return parentdb; }
inline wxRETCODE GetErrorCode(void) { return retcode; } inline wxRETCODE GetErrorCode(void) { return retcode; }
bool CanAppend(void); bool CanAppend();
bool CanRestart(void); bool CanRestart();
bool CanScroll(void); bool CanScroll();
bool CanTransact(void); bool CanTransact();
bool CanUpdate(void); bool CanUpdate();
long GetCurrentRecord(void); long GetCurrentRecord();
bool RecordCountFinal(void); bool RecordCountFinal();
bool GetResultSet(void); bool GetResultSet();
bool ExecuteSQL(char*); bool ExecuteSQL(char*);
bool GetTables(void); bool GetTables();
bool GetColumns(char* =NULL); bool GetColumns(char* =NULL);
bool GetPrimaryKeys(char* =NULL); bool GetPrimaryKeys(char* =NULL);
bool GetForeignKeys(char* , char * ); bool GetForeignKeys(char* , char * );
char *GetTableName(void); char *GetTableName();
void SetTableName(char*); void SetTableName(char*);
char *GetSQL(void); char *GetSQL();
bool IsOpen(void); bool IsOpen();
bool IsBOF(void); bool IsBOF();
bool IsEOF(void); bool IsEOF();
bool IsDeleted(void); bool IsDeleted();
bool GetFieldData(int colPos, int dataType, void *dataPtr); bool GetFieldData(int colPos, int dataType, void *dataPtr);
bool GetFieldData(const char*, int dataType, void *dataPtr); bool GetFieldData(const char*, int dataType, void *dataPtr);
@@ -286,50 +289,50 @@ class WXDLLEXPORT wxRecordSet: public wxObject
void* BindVar(const char*, void*, long); void* BindVar(const char*, void*, long);
void SetType(int); void SetType(int);
int GetType(void); int GetType();
void SetOptions(int); void SetOptions(int);
int GetOptions(void); int GetOptions();
// Update operations // Update operations
void AddNew(void); void AddNew();
bool Delete(void); bool Delete();
void Edit(void); void Edit();
bool Update(void); bool Update();
// Record navigation // Record navigation
virtual bool Move(long rows); virtual bool Move(long rows);
virtual bool MoveFirst(void); virtual bool MoveFirst();
virtual bool MoveLast(void); virtual bool MoveLast();
virtual bool MoveNext(void); virtual bool MoveNext();
virtual bool MovePrev(void); virtual bool MovePrev();
virtual bool GoTo(long); virtual bool GoTo(long);
// Others // Others
bool GetDataSources(void); bool GetDataSources();
// Associate a column name/position with a data location // Associate a column name/position with a data location
// bool BindColumn(int colPos, int dataType, void *dataPtr); // bool BindColumn(int colPos, int dataType, void *dataPtr);
void Cancel(void); void Cancel();
bool IsFieldDirty(int); bool IsFieldDirty(int);
bool IsFieldDirty(const char*); bool IsFieldDirty(const char*);
bool IsFieldNull(int); bool IsFieldNull(int);
bool IsFieldNull(const char*); bool IsFieldNull(const char*);
bool IsColNullable(int); bool IsColNullable(int);
bool IsColNullable(const char*); bool IsColNullable(const char*);
virtual bool Requery(void); virtual bool Requery();
virtual void SetFieldDirty(int, bool dirty = TRUE); virtual void SetFieldDirty(int, bool dirty = TRUE);
virtual void SetFieldDirty(const char*, bool dirty = TRUE); virtual void SetFieldDirty(const char*, bool dirty = TRUE);
void SetFieldNull(void *p, bool isNull = TRUE); void SetFieldNull(void *p, bool isNull = TRUE);
// Overridables // Overridables
virtual char *GetDefaultConnect(void); virtual char *GetDefaultConnect();
virtual char *GetDefaultSQL(void); virtual char *GetDefaultSQL();
// Internal // Internal
// Build SQL query from column specification // Build SQL query from column specification
bool ConstructDefaultSQL(void); bool ConstructDefaultSQL();
void SetDefaultSQL(char *s); void SetDefaultSQL(char *s);
bool ReleaseHandle(void); // Added JACS bool ReleaseHandle(void); // Added JACS
}; };

View File

@@ -71,10 +71,7 @@
Minimal_Quit = 1, Minimal_Quit = 1,
Minimal_About, Minimal_About,
Minimal_Back, Minimal_Back,
Minimal_Forward, Minimal_Forward
// controls start here (the numbers are, of course, arbitrary)
Minimal_Text = 1000,
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -1,7 +1,5 @@
#if !defined(__VISAGECPP__)
# pragma warning(disable:4001) /* non standard extension used: single line comment */
#endif
#include "wx/setup.h" #include "wx/setup.h"
#include <math.h> #include <math.h>
#if wxUSE_APPLE_IEEE #if wxUSE_APPLE_IEEE
@@ -85,7 +83,8 @@ void ConvertToIeeeExtended(double num, unsigned char *bytes)
} }
} }
/* disable the warning about 'possible loss of data' & 'conversion between diff types' */ /* disable the warning about 'possible loss of data' & 'conversion between
* diff types' */
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning(disable: 4244) #pragma warning(disable: 4244)
#pragma warning(disable: 4135) #pragma warning(disable: 4135)