From: Włodzimierz Skiba Date: Thu, 16 Sep 2004 18:13:32 +0000 (+0000) Subject: Source cleaning: whitespaces, tabs, -1/wxDefaultCoord/wxNOT_FOUND, TRUE/true, FALSE... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/7beb59f36c016d27cf8949eb8c0d38fc63ad536a Source cleaning: whitespaces, tabs, -1/wxDefaultCoord/wxNOT_FOUND, TRUE/true, FALSE/false, !!/!IsEmpty(). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29155 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/iconbndl.h b/include/wx/iconbndl.h index 001530f008..46bb7171f5 100644 --- a/include/wx/iconbndl.h +++ b/include/wx/iconbndl.h @@ -60,7 +60,7 @@ public: // returns the first icon in the bundle const wxIcon& GetIcon( const wxSize& size ) const; // equivalent to GetIcon( wxSize( size, size ) ) - const wxIcon& GetIcon( wxCoord size = -1 ) const + const wxIcon& GetIcon( wxCoord size = wxDefaultCoord ) const { return GetIcon( wxSize( size, size ) ); } private: // delete all icons diff --git a/include/wx/imagbmp.h b/include/wx/imagbmp.h index 8865193d9d..4c635d3fd8 100644 --- a/include/wx/imagbmp.h +++ b/include/wx/imagbmp.h @@ -63,8 +63,8 @@ public: }; #if wxUSE_STREAMS - virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE ); - virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=-1 ); + virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); + virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); virtual bool DoCanRead( wxInputStream& stream ); protected: @@ -97,8 +97,8 @@ public: }; #if wxUSE_STREAMS - virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE ); - virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=-1 ); + virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); + virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); virtual bool DoLoadFile( wxImage *image, wxInputStream& stream, bool verbose, int index ); virtual bool DoCanRead( wxInputStream& stream ); virtual int GetImageCount( wxInputStream& stream ); @@ -152,8 +152,8 @@ public: #if wxUSE_STREAMS - virtual bool SaveFile( wxImage *WXUNUSED(image), wxOutputStream& WXUNUSED(stream), bool WXUNUSED(verbose=TRUE) ){return FALSE ;}; - virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=-1 ); + virtual bool SaveFile( wxImage *WXUNUSED(image), wxOutputStream& WXUNUSED(stream), bool WXUNUSED(verbose=true) ){return false ;}; + virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); virtual bool DoCanRead( wxInputStream& stream ); virtual int GetImageCount( wxInputStream& stream ); #endif // wxUSE_STREAMS diff --git a/include/wx/image.h b/include/wx/image.h index 153065c764..3bbc77a9d1 100644 --- a/include/wx/image.h +++ b/include/wx/image.h @@ -52,8 +52,8 @@ public: { } #if wxUSE_STREAMS - virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=-1 ); - virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE ); + virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); + virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); virtual int GetImageCount( wxInputStream& stream ); @@ -138,7 +138,7 @@ class WXDLLEXPORT wxImage: public wxObject public: wxImage(); wxImage( int width, int height, bool clear = true ); - wxImage( int width, int height, unsigned char* data, bool static_data = FALSE ); + wxImage( int width, int height, unsigned char* data, bool static_data = false ); wxImage( const wxString& name, long type = wxBITMAP_TYPE_ANY, int index = -1 ); wxImage( const wxString& name, const wxString& mimetype, int index = -1 ); @@ -151,7 +151,7 @@ public: wxImage( const wxImage* image ); bool Create( int width, int height, bool clear = true ); - bool Create( int width, int height, unsigned char* data, bool static_data = FALSE ); + bool Create( int width, int height, unsigned char* data, bool static_data = false ); void Destroy(); // creates an identical copy of the image (the = operator @@ -176,10 +176,10 @@ public: // Rotates the image about the given point, 'angle' radians. // Returns the rotated image, leaving this image intact. wxImage Rotate(double angle, const wxPoint & centre_of_rotation, - bool interpolating = TRUE, wxPoint * offset_after_rotation = (wxPoint*) NULL) const; + bool interpolating = true, wxPoint * offset_after_rotation = (wxPoint*) NULL) const; - wxImage Rotate90( bool clockwise = TRUE ) const; - wxImage Mirror( bool horizontally = TRUE ) const; + wxImage Rotate90( bool clockwise = true ) const; + wxImage Mirror( bool horizontally = true ) const; // replace one colour with another void Replace( unsigned char r1, unsigned char g1, unsigned char b1, @@ -251,7 +251,7 @@ public: unsigned char GetMaskRed() const; unsigned char GetMaskGreen() const; unsigned char GetMaskBlue() const; - void SetMask( bool mask = TRUE ); + void SetMask( bool mask = true ); bool HasMask() const; #if wxUSE_PALETTE diff --git a/include/wx/imaggif.h b/include/wx/imaggif.h index 2a6affdda7..a674ee143d 100644 --- a/include/wx/imaggif.h +++ b/include/wx/imaggif.h @@ -35,8 +35,8 @@ public: } #if wxUSE_STREAMS - virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=-1 ); - virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE ); + virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); + virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); virtual bool DoCanRead( wxInputStream& stream ); #endif diff --git a/include/wx/imagiff.h b/include/wx/imagiff.h index 93c3822466..61a54fbc4d 100644 --- a/include/wx/imagiff.h +++ b/include/wx/imagiff.h @@ -34,8 +34,8 @@ public: } #if wxUSE_STREAMS - virtual bool LoadFile(wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=-1); - virtual bool SaveFile(wxImage *image, wxOutputStream& stream, bool verbose=TRUE); + virtual bool LoadFile(wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1); + virtual bool SaveFile(wxImage *image, wxOutputStream& stream, bool verbose=true); virtual bool DoCanRead(wxInputStream& stream); #endif diff --git a/include/wx/imagjpeg.h b/include/wx/imagjpeg.h index 07a1095c1b..bf7594fae1 100644 --- a/include/wx/imagjpeg.h +++ b/include/wx/imagjpeg.h @@ -43,8 +43,8 @@ public: } #if wxUSE_STREAMS - virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=-1 ); - virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE ); + virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); + virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); virtual bool DoCanRead( wxInputStream& stream ); #endif diff --git a/include/wx/imagpcx.h b/include/wx/imagpcx.h index 76807996b2..ff8813f870 100644 --- a/include/wx/imagpcx.h +++ b/include/wx/imagpcx.h @@ -34,8 +34,8 @@ public: } #if wxUSE_STREAMS - virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=-1 ); - virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE ); + virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); + virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); virtual bool DoCanRead( wxInputStream& stream ); #endif // wxUSE_STREAMS diff --git a/include/wx/imagpng.h b/include/wx/imagpng.h index 2e0d07be7c..1bd7247687 100644 --- a/include/wx/imagpng.h +++ b/include/wx/imagpng.h @@ -33,8 +33,8 @@ public: } #if wxUSE_STREAMS - virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=-1 ); - virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE ); + virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); + virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); virtual bool DoCanRead( wxInputStream& stream ); #endif diff --git a/include/wx/imagpnm.h b/include/wx/imagpnm.h index 2d1222ed3b..3fbb32a14e 100644 --- a/include/wx/imagpnm.h +++ b/include/wx/imagpnm.h @@ -33,8 +33,8 @@ public: } #if wxUSE_STREAMS - virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=-1 ); - virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE ); + virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); + virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); virtual bool DoCanRead( wxInputStream& stream ); #endif diff --git a/include/wx/imagtiff.h b/include/wx/imagtiff.h index e027ff0b64..4607162bf0 100644 --- a/include/wx/imagtiff.h +++ b/include/wx/imagtiff.h @@ -28,8 +28,8 @@ public: wxTIFFHandler(); #if wxUSE_STREAMS - virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=-1 ); - virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE ); + virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); + virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); virtual bool DoCanRead( wxInputStream& stream ); virtual int GetImageCount( wxInputStream& stream ); #endif diff --git a/include/wx/imagxpm.h b/include/wx/imagxpm.h index c4ae5e262b..10a12c62ac 100644 --- a/include/wx/imagxpm.h +++ b/include/wx/imagxpm.h @@ -33,8 +33,8 @@ public: } #if wxUSE_STREAMS - virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=-1 ); - virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE ); + virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); + virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); virtual bool DoCanRead( wxInputStream& stream ); #endif diff --git a/include/wx/intl.h b/include/wx/intl.h index 294d25f5d9..87c60ae32f 100644 --- a/include/wx/intl.h +++ b/include/wx/intl.h @@ -32,7 +32,7 @@ // macros // ---------------------------------------------------------------------------- -// gettext() style macros (notice that xgettext should be invoked with +// gettext() style macros (notice that xgettext should be invoked with // --keyword="_" --keyword="wxGetTranslation:1,2" options // to extract the strings from the sources) #ifndef WXINTL_NO_GETTEXT_MACRO diff --git a/include/wx/ipcbase.h b/include/wx/ipcbase.h index 61969b4de3..11a7fae78d 100644 --- a/include/wx/ipcbase.h +++ b/include/wx/ipcbase.h @@ -77,7 +77,7 @@ public: wxChar *WXUNUSED(data), int WXUNUSED(size), wxIPCFormat WXUNUSED(format) ) - { return FALSE; }; + { return false; }; virtual wxChar *OnRequest ( const wxString& WXUNUSED(topic), const wxString& WXUNUSED(item), @@ -90,15 +90,15 @@ public: wxChar *WXUNUSED(data), int WXUNUSED(size), wxIPCFormat WXUNUSED(format) ) - { return FALSE; }; + { return false; }; virtual bool OnStartAdvise ( const wxString& WXUNUSED(topic), const wxString& WXUNUSED(item) ) - { return FALSE; }; + { return false; }; virtual bool OnStopAdvise ( const wxString& WXUNUSED(topic), const wxString& WXUNUSED(item) ) - { return FALSE; }; + { return false; }; // Callbacks to CLIENT - override at will virtual bool OnAdvise ( const wxString& WXUNUSED(topic), @@ -106,10 +106,10 @@ public: wxChar *WXUNUSED(data), int WXUNUSED(size), wxIPCFormat WXUNUSED(format) ) - { return FALSE; }; + { return false; }; // Callbacks to BOTH - override at will - // Default behaviour is to delete connection and return TRUE + // Default behaviour is to delete connection and return true virtual bool OnDisconnect(void) = 0; // return a buffer at least this size, reallocating buffer if needed @@ -137,7 +137,7 @@ public: inline wxServerBase(void) {} inline ~wxServerBase(void) {}; - // Returns FALSE on error (e.g. port number is already in use) + // Returns false on error (e.g. port number is already in use) virtual bool Create(const wxString& serverName) = 0; // Callbacks to SERVER - override at will diff --git a/include/wx/isql.h b/include/wx/isql.h index fd2f4c1ad8..8a5cad8f5d 100644 --- a/include/wx/isql.h +++ b/include/wx/isql.h @@ -27,14 +27,14 @@ #define _ISQL_H #if defined(WIN32) -#define SQL_API __stdcall +#define SQL_API __stdcall #ifndef FAR #define FAR #endif #elif defined(__OS2__) -#define SQL_API _Optlink +#define SQL_API _Optlink #ifndef FAR #define FAR @@ -46,7 +46,7 @@ #define FAR #define EXPORT #define CALLBACK -#define SQL_API EXPORT CALLBACK +#define SQL_API EXPORT CALLBACK #ifndef __EMX__ typedef void *HWND; @@ -67,126 +67,126 @@ typedef void FAR *HDBC; typedef void FAR *HSTMT; typedef signed short RETCODE; -#define SQLRETURN RETCODE +#define SQLRETURN RETCODE -#define ODBCVER 0x0250 +#define ODBCVER 0x0250 -#define SQL_MAX_MESSAGE_LENGTH 512 -#define SQL_MAX_DSN_LENGTH 32 +#define SQL_MAX_MESSAGE_LENGTH 512 +#define SQL_MAX_DSN_LENGTH 32 /* * Function return codes */ -#define SQL_INVALID_HANDLE (-2) -#define SQL_ERROR (-1) -#define SQL_SUCCESS 0 -#define SQL_SUCCESS_WITH_INFO 1 -#define SQL_NO_DATA_FOUND 100 +#define SQL_INVALID_HANDLE (-2) +#define SQL_ERROR (-1) +#define SQL_SUCCESS 0 +#define SQL_SUCCESS_WITH_INFO 1 +#define SQL_NO_DATA_FOUND 100 /* * Standard SQL datatypes, using ANSI type numbering */ -#define SQL_CHAR 1 -#define SQL_NUMERIC 2 -#define SQL_DECIMAL 3 -#define SQL_INTEGER 4 -#define SQL_SMALLINT 5 -#define SQL_FLOAT 6 -#define SQL_REAL 7 -#define SQL_DOUBLE 8 -#define SQL_VARCHAR 12 - -#define SQL_TYPE_MIN SQL_CHAR -#define SQL_TYPE_NULL 0 -#define SQL_TYPE_MAX SQL_VARCHAR +#define SQL_CHAR 1 +#define SQL_NUMERIC 2 +#define SQL_DECIMAL 3 +#define SQL_INTEGER 4 +#define SQL_SMALLINT 5 +#define SQL_FLOAT 6 +#define SQL_REAL 7 +#define SQL_DOUBLE 8 +#define SQL_VARCHAR 12 + +#define SQL_TYPE_MIN SQL_CHAR +#define SQL_TYPE_NULL 0 +#define SQL_TYPE_MAX SQL_VARCHAR /* * C datatype to SQL datatype mapping */ -#define SQL_C_CHAR SQL_CHAR -#define SQL_C_LONG SQL_INTEGER -#define SQL_C_SHORT SQL_SMALLINT -#define SQL_C_FLOAT SQL_REAL -#define SQL_C_DOUBLE SQL_DOUBLE -#define SQL_C_DEFAULT 99 +#define SQL_C_CHAR SQL_CHAR +#define SQL_C_LONG SQL_INTEGER +#define SQL_C_SHORT SQL_SMALLINT +#define SQL_C_FLOAT SQL_REAL +#define SQL_C_DOUBLE SQL_DOUBLE +#define SQL_C_DEFAULT 99 /* * NULL status constants. */ -#define SQL_NO_NULLS 0 -#define SQL_NULLABLE 1 -#define SQL_NULLABLE_UNKNOWN 2 +#define SQL_NO_NULLS 0 +#define SQL_NULLABLE 1 +#define SQL_NULLABLE_UNKNOWN 2 /* * Special length values */ -#define SQL_NULL_DATA (-1) -#define SQL_DATA_AT_EXEC (-2) -#define SQL_NTS (-3) +#define SQL_NULL_DATA (-1) +#define SQL_DATA_AT_EXEC (-2) +#define SQL_NTS (-3) /* * SQLFreeStmt */ -#define SQL_CLOSE 0 -#define SQL_DROP 1 -#define SQL_UNBIND 2 -#define SQL_RESET_PARAMS 3 +#define SQL_CLOSE 0 +#define SQL_DROP 1 +#define SQL_UNBIND 2 +#define SQL_RESET_PARAMS 3 /* * SQLTransact */ -#define SQL_COMMIT 0 -#define SQL_ROLLBACK 1 +#define SQL_COMMIT 0 +#define SQL_ROLLBACK 1 /* * SQLColAttributes */ -#define SQL_COLUMN_COUNT 0 -#define SQL_COLUMN_NAME 1 -#define SQL_COLUMN_TYPE 2 -#define SQL_COLUMN_LENGTH 3 -#define SQL_COLUMN_PRECISION 4 -#define SQL_COLUMN_SCALE 5 -#define SQL_COLUMN_DISPLAY_SIZE 6 -#define SQL_COLUMN_NULLABLE 7 -#define SQL_COLUMN_UNSIGNED 8 -#define SQL_COLUMN_MONEY 9 -#define SQL_COLUMN_UPDATABLE 10 -#define SQL_COLUMN_AUTO_INCREMENT 11 -#define SQL_COLUMN_CASE_SENSITIVE 12 -#define SQL_COLUMN_SEARCHABLE 13 -#define SQL_COLUMN_TYPE_NAME 14 -#define SQL_COLUMN_TABLE_NAME 15 -#define SQL_COLUMN_OWNER_NAME 16 -#define SQL_COLUMN_QUALIFIER_NAME 17 -#define SQL_COLUMN_LABEL 18 - -#define SQL_COLATT_OPT_MAX SQL_COLUMN_LABEL -#define SQL_COLATT_OPT_MIN SQL_COLUMN_COUNT -#define SQL_COLUMN_DRIVER_START 1000 +#define SQL_COLUMN_COUNT 0 +#define SQL_COLUMN_NAME 1 +#define SQL_COLUMN_TYPE 2 +#define SQL_COLUMN_LENGTH 3 +#define SQL_COLUMN_PRECISION 4 +#define SQL_COLUMN_SCALE 5 +#define SQL_COLUMN_DISPLAY_SIZE 6 +#define SQL_COLUMN_NULLABLE 7 +#define SQL_COLUMN_UNSIGNED 8 +#define SQL_COLUMN_MONEY 9 +#define SQL_COLUMN_UPDATABLE 10 +#define SQL_COLUMN_AUTO_INCREMENT 11 +#define SQL_COLUMN_CASE_SENSITIVE 12 +#define SQL_COLUMN_SEARCHABLE 13 +#define SQL_COLUMN_TYPE_NAME 14 +#define SQL_COLUMN_TABLE_NAME 15 +#define SQL_COLUMN_OWNER_NAME 16 +#define SQL_COLUMN_QUALIFIER_NAME 17 +#define SQL_COLUMN_LABEL 18 + +#define SQL_COLATT_OPT_MAX SQL_COLUMN_LABEL +#define SQL_COLATT_OPT_MIN SQL_COLUMN_COUNT +#define SQL_COLUMN_DRIVER_START 1000 /* * SQLColAttributes : SQL_COLUMN_UPDATABLE */ -#define SQL_ATTR_READONLY 0 -#define SQL_ATTR_WRITE 1 -#define SQL_ATTR_READWRITE_UNKNOWN 2 +#define SQL_ATTR_READONLY 0 +#define SQL_ATTR_WRITE 1 +#define SQL_ATTR_READWRITE_UNKNOWN 2 /* * SQLColAttributes : SQL_COLUMN_SEARCHABLE */ -#define SQL_UNSEARCHABLE 0 -#define SQL_LIKE_ONLY 1 -#define SQL_ALL_EXCEPT_LIKE 2 -#define SQL_SEARCHABLE 3 +#define SQL_UNSEARCHABLE 0 +#define SQL_LIKE_ONLY 1 +#define SQL_ALL_EXCEPT_LIKE 2 +#define SQL_SEARCHABLE 3 /* * NULL Handles */ -#define SQL_NULL_HENV 0 -#define SQL_NULL_HDBC 0 -#define SQL_NULL_HSTMT 0 +#define SQL_NULL_HENV 0 +#define SQL_NULL_HDBC 0 +#define SQL_NULL_HSTMT 0 /* diff --git a/include/wx/isqlext.h b/include/wx/isqlext.h index dcb8157066..87930354ee 100644 --- a/include/wx/isqlext.h +++ b/include/wx/isqlext.h @@ -24,80 +24,80 @@ * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef _ISQLEXT_H -# define _ISQLEXT_H +#ifndef _ISQLEXT_H +#define _ISQLEXT_H #include "wx/isql.h" /* * Generic constants */ -#define SQL_MAX_OPTION_STRING_LENGTH 256 +#define SQL_MAX_OPTION_STRING_LENGTH 256 /* * Additional return codes */ -#define SQL_STILL_EXECUTING 2 -#define SQL_NEED_DATA 99 +#define SQL_STILL_EXECUTING 2 +#define SQL_NEED_DATA 99 /* * SQL extended datatypes */ -#define SQL_DATE 9 -#define SQL_TIME 10 -#define SQL_TIMESTAMP 11 -#define SQL_LONGVARCHAR (-1) -#define SQL_BINARY (-2) -#define SQL_VARBINARY (-3) -#define SQL_LONGVARBINARY (-4) -#define SQL_BIGINT (-5) -#define SQL_TINYINT (-6) -#define SQL_BIT (-7) - -#define SQL_INTERVAL_YEAR (-80) -#define SQL_INTERVAL_MONTH (-81) -#define SQL_INTERVAL_YEAR_TO_MONTH (-82) -#define SQL_INTERVAL_DAY (-83) -#define SQL_INTERVAL_HOUR (-84) -#define SQL_INTERVAL_MINUTE (-85) -#define SQL_INTERVAL_SECOND (-86) -#define SQL_INTERVAL_DAY_TO_HOUR (-87) -#define SQL_INTERVAL_DAY_TO_MINUTE (-88) -#define SQL_INTERVAL_DAY_TO_SECOND (-89) -#define SQL_INTERVAL_HOUR_TO_MINUTE (-90) -#define SQL_INTERVAL_HOUR_TO_SECOND (-91) -#define SQL_INTERVAL_MINUTE_TO_SECOND (-92) -#define SQL_UNICODE (-95) - -#define SQL_TYPE_DRIVER_START SQL_INTERVAL_YEAR -#define SQL_TYPE_DRIVER_END SQL_UNICODE - -#define SQL_SIGNED_OFFSET (-20) -#define SQL_UNSIGNED_OFFSET (-22) +#define SQL_DATE 9 +#define SQL_TIME 10 +#define SQL_TIMESTAMP 11 +#define SQL_LONGVARCHAR (-1) +#define SQL_BINARY (-2) +#define SQL_VARBINARY (-3) +#define SQL_LONGVARBINARY (-4) +#define SQL_BIGINT (-5) +#define SQL_TINYINT (-6) +#define SQL_BIT (-7) + +#define SQL_INTERVAL_YEAR (-80) +#define SQL_INTERVAL_MONTH (-81) +#define SQL_INTERVAL_YEAR_TO_MONTH (-82) +#define SQL_INTERVAL_DAY (-83) +#define SQL_INTERVAL_HOUR (-84) +#define SQL_INTERVAL_MINUTE (-85) +#define SQL_INTERVAL_SECOND (-86) +#define SQL_INTERVAL_DAY_TO_HOUR (-87) +#define SQL_INTERVAL_DAY_TO_MINUTE (-88) +#define SQL_INTERVAL_DAY_TO_SECOND (-89) +#define SQL_INTERVAL_HOUR_TO_MINUTE (-90) +#define SQL_INTERVAL_HOUR_TO_SECOND (-91) +#define SQL_INTERVAL_MINUTE_TO_SECOND (-92) +#define SQL_UNICODE (-95) + +#define SQL_TYPE_DRIVER_START SQL_INTERVAL_YEAR +#define SQL_TYPE_DRIVER_END SQL_UNICODE + +#define SQL_SIGNED_OFFSET (-20) +#define SQL_UNSIGNED_OFFSET (-22) /* * C datatype to SQL datatype mapping */ -#define SQL_C_DATE SQL_DATE -#define SQL_C_TIME SQL_TIME -#define SQL_C_TIMESTAMP SQL_TIMESTAMP -#define SQL_C_BINARY SQL_BINARY -#define SQL_C_BIT SQL_BIT -#define SQL_C_TINYINT SQL_TINYINT -#define SQL_C_SLONG SQL_C_LONG+SQL_SIGNED_OFFSET -#define SQL_C_SSHORT SQL_C_SHORT+SQL_SIGNED_OFFSET -#define SQL_C_STINYINT SQL_TINYINT+SQL_SIGNED_OFFSET -#define SQL_C_ULONG SQL_C_LONG+SQL_UNSIGNED_OFFSET -#define SQL_C_USHORT SQL_C_SHORT+SQL_UNSIGNED_OFFSET -#define SQL_C_UTINYINT SQL_TINYINT+SQL_UNSIGNED_OFFSET -#define SQL_C_BOOKMARK SQL_C_ULONG +#define SQL_C_DATE SQL_DATE +#define SQL_C_TIME SQL_TIME +#define SQL_C_TIMESTAMP SQL_TIMESTAMP +#define SQL_C_BINARY SQL_BINARY +#define SQL_C_BIT SQL_BIT +#define SQL_C_TINYINT SQL_TINYINT +#define SQL_C_SLONG SQL_C_LONG+SQL_SIGNED_OFFSET +#define SQL_C_SSHORT SQL_C_SHORT+SQL_SIGNED_OFFSET +#define SQL_C_STINYINT SQL_TINYINT+SQL_SIGNED_OFFSET +#define SQL_C_ULONG SQL_C_LONG+SQL_UNSIGNED_OFFSET +#define SQL_C_USHORT SQL_C_SHORT+SQL_UNSIGNED_OFFSET +#define SQL_C_UTINYINT SQL_TINYINT+SQL_UNSIGNED_OFFSET +#define SQL_C_BOOKMARK SQL_C_ULONG /* * Extended data types override sql.h defined */ -#undef SQL_TYPE_MIN -#define SQL_TYPE_MIN SQL_BIT -#define SQL_ALL_TYPES 0 +#undef SQL_TYPE_MIN +#define SQL_TYPE_MIN SQL_BIT +#define SQL_ALL_TYPES 0 /* * SQL portable types for C - DATE, TIME, TIMESTAMP @@ -130,7 +130,7 @@ typedef struct _TIMESTAMP_STRUCT } TIMESTAMP_STRUCT; -typedef unsigned long int BOOKMARK; +typedef unsigned long int BOOKMARK; /* * ---------------------------------------------------------------------- @@ -141,781 +141,781 @@ typedef unsigned long int BOOKMARK; /* * SQLDriverConnect */ -#define SQL_DRIVER_NOPROMPT 0 -#define SQL_DRIVER_COMPLETE 1 -#define SQL_DRIVER_PROMPT 2 -#define SQL_DRIVER_COMPLETE_REQUIRED 3 +#define SQL_DRIVER_NOPROMPT 0 +#define SQL_DRIVER_COMPLETE 1 +#define SQL_DRIVER_PROMPT 2 +#define SQL_DRIVER_COMPLETE_REQUIRED 3 /* * SQLGetData */ -#define SQL_NO_TOTAL (-4) +#define SQL_NO_TOTAL (-4) /* * SQLBindParameter */ -#define SQL_DEFAULT_PARAM (-5) -#define SQL_IGNORE (-6) -#define SQL_LEN_DATA_AT_EXEC_OFFSET (-100) -#define SQL_LEN_DATA_AT_EXEC(length) (-length+SQL_LEN_DATA_AT_EXEC_OFFSET) +#define SQL_DEFAULT_PARAM (-5) +#define SQL_IGNORE (-6) +#define SQL_LEN_DATA_AT_EXEC_OFFSET (-100) +#define SQL_LEN_DATA_AT_EXEC(length) (-length+SQL_LEN_DATA_AT_EXEC_OFFSET) /* * SQLGetFunctions */ -#define SQL_API_SQLALLOCCONNECT 1 /* Core Functions */ -#define SQL_API_SQLALLOCENV 2 -#define SQL_API_SQLALLOCSTMT 3 -#define SQL_API_SQLBINDCOL 4 -#define SQL_API_SQLCANCEL 5 -#define SQL_API_SQLCOLATTRIBUTES 6 -#define SQL_API_SQLCONNECT 7 -#define SQL_API_SQLDESCRIBECOL 8 -#define SQL_API_SQLDISCONNECT 9 -#define SQL_API_SQLERROR 10 -#define SQL_API_SQLEXECDIRECT 11 -#define SQL_API_SQLEXECUTE 12 -#define SQL_API_SQLFETCH 13 -#define SQL_API_SQLFREECONNECT 14 -#define SQL_API_SQLFREEENV 15 -#define SQL_API_SQLFREESTMT 16 -#define SQL_API_SQLGETCURSORNAME 17 -#define SQL_API_SQLNUMRESULTCOLS 18 -#define SQL_API_SQLPREPARE 19 -#define SQL_API_SQLROWCOUNT 20 -#define SQL_API_SQLSETCURSORNAME 21 -#define SQL_API_SQLSETPARAM 22 -#define SQL_API_SQLTRANSACT 23 - -#define SQL_NUM_FUNCTIONS 23 - -#define SQL_EXT_API_START 40 - -#define SQL_API_SQLCOLUMNS 40 /* Level 1 Functions */ -#define SQL_API_SQLDRIVERCONNECT 41 -#define SQL_API_SQLGETCONNECTOPTION 42 -#define SQL_API_SQLGETDATA 43 -#define SQL_API_SQLGETFUNCTIONS 44 -#define SQL_API_SQLGETINFO 45 -#define SQL_API_SQLGETSTMTOPTION 46 -#define SQL_API_SQLGETTYPEINFO 47 -#define SQL_API_SQLPARAMDATA 48 -#define SQL_API_SQLPUTDATA 49 -#define SQL_API_SQLSETCONNECTOPTION 50 -#define SQL_API_SQLSETSTMTOPTION 51 -#define SQL_API_SQLSPECIALCOLUMNS 52 -#define SQL_API_SQLSTATISTICS 53 -#define SQL_API_SQLTABLES 54 - -#define SQL_API_SQLBROWSECONNECT 55 /* Level 2 Functions */ -#define SQL_API_SQLCOLUMNPRIVILEGES 56 -#define SQL_API_SQLDATASOURCES 57 -#define SQL_API_SQLDESCRIBEPARAM 58 -#define SQL_API_SQLEXTENDEDFETCH 59 -#define SQL_API_SQLFOREIGNKEYS 60 -#define SQL_API_SQLMORERESULTS 61 -#define SQL_API_SQLNATIVESQL 62 -#define SQL_API_SQLNUMPARAMS 63 -#define SQL_API_SQLPARAMOPTIONS 64 -#define SQL_API_SQLPRIMARYKEYS 65 -#define SQL_API_SQLPROCEDURECOLUMNS 66 -#define SQL_API_SQLPROCEDURES 67 -#define SQL_API_SQLSETPOS 68 -#define SQL_API_SQLSETSCROLLOPTIONS 69 -#define SQL_API_SQLTABLEPRIVILEGES 70 - -#define SQL_API_SQLDRIVERS 71 -#define SQL_API_SQLBINDPARAMETER 72 -#define SQL_EXT_API_LAST SQL_API_SQLBINDPARAMETER - -#define SQL_API_ALL_FUNCTIONS 0 +#define SQL_API_SQLALLOCCONNECT 1 /* Core Functions */ +#define SQL_API_SQLALLOCENV 2 +#define SQL_API_SQLALLOCSTMT 3 +#define SQL_API_SQLBINDCOL 4 +#define SQL_API_SQLCANCEL 5 +#define SQL_API_SQLCOLATTRIBUTES 6 +#define SQL_API_SQLCONNECT 7 +#define SQL_API_SQLDESCRIBECOL 8 +#define SQL_API_SQLDISCONNECT 9 +#define SQL_API_SQLERROR 10 +#define SQL_API_SQLEXECDIRECT 11 +#define SQL_API_SQLEXECUTE 12 +#define SQL_API_SQLFETCH 13 +#define SQL_API_SQLFREECONNECT 14 +#define SQL_API_SQLFREEENV 15 +#define SQL_API_SQLFREESTMT 16 +#define SQL_API_SQLGETCURSORNAME 17 +#define SQL_API_SQLNUMRESULTCOLS 18 +#define SQL_API_SQLPREPARE 19 +#define SQL_API_SQLROWCOUNT 20 +#define SQL_API_SQLSETCURSORNAME 21 +#define SQL_API_SQLSETPARAM 22 +#define SQL_API_SQLTRANSACT 23 + +#define SQL_NUM_FUNCTIONS 23 + +#define SQL_EXT_API_START 40 + +#define SQL_API_SQLCOLUMNS 40 /* Level 1 Functions */ +#define SQL_API_SQLDRIVERCONNECT 41 +#define SQL_API_SQLGETCONNECTOPTION 42 +#define SQL_API_SQLGETDATA 43 +#define SQL_API_SQLGETFUNCTIONS 44 +#define SQL_API_SQLGETINFO 45 +#define SQL_API_SQLGETSTMTOPTION 46 +#define SQL_API_SQLGETTYPEINFO 47 +#define SQL_API_SQLPARAMDATA 48 +#define SQL_API_SQLPUTDATA 49 +#define SQL_API_SQLSETCONNECTOPTION 50 +#define SQL_API_SQLSETSTMTOPTION 51 +#define SQL_API_SQLSPECIALCOLUMNS 52 +#define SQL_API_SQLSTATISTICS 53 +#define SQL_API_SQLTABLES 54 + +#define SQL_API_SQLBROWSECONNECT 55 /* Level 2 Functions */ +#define SQL_API_SQLCOLUMNPRIVILEGES 56 +#define SQL_API_SQLDATASOURCES 57 +#define SQL_API_SQLDESCRIBEPARAM 58 +#define SQL_API_SQLEXTENDEDFETCH 59 +#define SQL_API_SQLFOREIGNKEYS 60 +#define SQL_API_SQLMORERESULTS 61 +#define SQL_API_SQLNATIVESQL 62 +#define SQL_API_SQLNUMPARAMS 63 +#define SQL_API_SQLPARAMOPTIONS 64 +#define SQL_API_SQLPRIMARYKEYS 65 +#define SQL_API_SQLPROCEDURECOLUMNS 66 +#define SQL_API_SQLPROCEDURES 67 +#define SQL_API_SQLSETPOS 68 +#define SQL_API_SQLSETSCROLLOPTIONS 69 +#define SQL_API_SQLTABLEPRIVILEGES 70 + +#define SQL_API_SQLDRIVERS 71 +#define SQL_API_SQLBINDPARAMETER 72 +#define SQL_EXT_API_LAST SQL_API_SQLBINDPARAMETER + +#define SQL_API_ALL_FUNCTIONS 0 #define SQL_NUM_EXTENSIONS (SQL_EXT_API_LAST-SQL_EXT_API_START+1) /* * SQLGetInfo */ -#define SQL_INFO_FIRST 0 -#define SQL_ACTIVE_CONNECTIONS 0 -#define SQL_ACTIVE_STATEMENTS 1 -#define SQL_DATA_SOURCE_NAME 2 -#define SQL_DRIVER_HDBC 3 -#define SQL_DRIVER_HENV 4 -#define SQL_DRIVER_HSTMT 5 -#define SQL_DRIVER_NAME 6 -#define SQL_DRIVER_VER 7 -#define SQL_FETCH_DIRECTION 8 -#define SQL_ODBC_API_CONFORMANCE 9 -#define SQL_ODBC_VER 10 -#define SQL_ROW_UPDATES 11 -#define SQL_ODBC_SAG_CLI_CONFORMANCE 12 -#define SQL_SERVER_NAME 13 -#define SQL_SEARCH_PATTERN_ESCAPE 14 -#define SQL_ODBC_SQL_CONFORMANCE 15 -#define SQL_DBMS_NAME 17 -#define SQL_DBMS_VER 18 -#define SQL_ACCESSIBLE_TABLES 19 -#define SQL_ACCESSIBLE_PROCEDURES 20 -#define SQL_PROCEDURES 21 -#define SQL_CONCAT_NULL_BEHAVIOR 22 -#define SQL_CURSOR_COMMIT_BEHAVIOR 23 -#define SQL_CURSOR_ROLLBACK_BEHAVIOR 24 -#define SQL_DATA_SOURCE_READ_ONLY 25 -#define SQL_DEFAULT_TXN_ISOLATION 26 -#define SQL_EXPRESSIONS_IN_ORDERBY 27 -#define SQL_IDENTIFIER_CASE 28 -#define SQL_IDENTIFIER_QUOTE_CHAR 29 -#define SQL_MAX_COLUMN_NAME_LEN 30 -#define SQL_MAX_CURSOR_NAME_LEN 31 -#define SQL_MAX_OWNER_NAME_LEN 32 -#define SQL_MAX_PROCEDURE_NAME_LEN 33 -#define SQL_MAX_QUALIFIER_NAME_LEN 34 -#define SQL_MAX_TABLE_NAME_LEN 35 -#define SQL_MULT_RESULT_SETS 36 -#define SQL_MULTIPLE_ACTIVE_TXN 37 -#define SQL_OUTER_JOINS 38 -#define SQL_OWNER_TERM 39 -#define SQL_PROCEDURE_TERM 40 -#define SQL_QUALIFIER_NAME_SEPARATOR 41 -#define SQL_QUALIFIER_TERM 42 -#define SQL_SCROLL_CONCURRENCY 43 -#define SQL_SCROLL_OPTIONS 44 -#define SQL_TABLE_TERM 45 -#define SQL_TXN_CAPABLE 46 -#define SQL_USER_NAME 47 -#define SQL_CONVERT_FUNCTIONS 48 -#define SQL_NUMERIC_FUNCTIONS 49 -#define SQL_STRING_FUNCTIONS 50 -#define SQL_SYSTEM_FUNCTIONS 51 -#define SQL_TIMEDATE_FUNCTIONS 52 -#define SQL_CONVERT_BIGINT 53 -#define SQL_CONVERT_BINARY 54 -#define SQL_CONVERT_BIT 55 -#define SQL_CONVERT_CHAR 56 -#define SQL_CONVERT_DATE 57 -#define SQL_CONVERT_DECIMAL 58 -#define SQL_CONVERT_DOUBLE 59 -#define SQL_CONVERT_FLOAT 60 -#define SQL_CONVERT_INTEGER 61 -#define SQL_CONVERT_LONGVARCHAR 62 -#define SQL_CONVERT_NUMERIC 63 -#define SQL_CONVERT_REAL 64 -#define SQL_CONVERT_SMALLINT 65 -#define SQL_CONVERT_TIME 66 -#define SQL_CONVERT_TIMESTAMP 67 -#define SQL_CONVERT_TINYINT 68 -#define SQL_CONVERT_VARBINARY 69 -#define SQL_CONVERT_VARCHAR 70 -#define SQL_CONVERT_LONGVARBINARY 71 -#define SQL_TXN_ISOLATION_OPTION 72 -#define SQL_ODBC_SQL_OPT_IEF 73 +#define SQL_INFO_FIRST 0 +#define SQL_ACTIVE_CONNECTIONS 0 +#define SQL_ACTIVE_STATEMENTS 1 +#define SQL_DATA_SOURCE_NAME 2 +#define SQL_DRIVER_HDBC 3 +#define SQL_DRIVER_HENV 4 +#define SQL_DRIVER_HSTMT 5 +#define SQL_DRIVER_NAME 6 +#define SQL_DRIVER_VER 7 +#define SQL_FETCH_DIRECTION 8 +#define SQL_ODBC_API_CONFORMANCE 9 +#define SQL_ODBC_VER 10 +#define SQL_ROW_UPDATES 11 +#define SQL_ODBC_SAG_CLI_CONFORMANCE 12 +#define SQL_SERVER_NAME 13 +#define SQL_SEARCH_PATTERN_ESCAPE 14 +#define SQL_ODBC_SQL_CONFORMANCE 15 +#define SQL_DBMS_NAME 17 +#define SQL_DBMS_VER 18 +#define SQL_ACCESSIBLE_TABLES 19 +#define SQL_ACCESSIBLE_PROCEDURES 20 +#define SQL_PROCEDURES 21 +#define SQL_CONCAT_NULL_BEHAVIOR 22 +#define SQL_CURSOR_COMMIT_BEHAVIOR 23 +#define SQL_CURSOR_ROLLBACK_BEHAVIOR 24 +#define SQL_DATA_SOURCE_READ_ONLY 25 +#define SQL_DEFAULT_TXN_ISOLATION 26 +#define SQL_EXPRESSIONS_IN_ORDERBY 27 +#define SQL_IDENTIFIER_CASE 28 +#define SQL_IDENTIFIER_QUOTE_CHAR 29 +#define SQL_MAX_COLUMN_NAME_LEN 30 +#define SQL_MAX_CURSOR_NAME_LEN 31 +#define SQL_MAX_OWNER_NAME_LEN 32 +#define SQL_MAX_PROCEDURE_NAME_LEN 33 +#define SQL_MAX_QUALIFIER_NAME_LEN 34 +#define SQL_MAX_TABLE_NAME_LEN 35 +#define SQL_MULT_RESULT_SETS 36 +#define SQL_MULTIPLE_ACTIVE_TXN 37 +#define SQL_OUTER_JOINS 38 +#define SQL_OWNER_TERM 39 +#define SQL_PROCEDURE_TERM 40 +#define SQL_QUALIFIER_NAME_SEPARATOR 41 +#define SQL_QUALIFIER_TERM 42 +#define SQL_SCROLL_CONCURRENCY 43 +#define SQL_SCROLL_OPTIONS 44 +#define SQL_TABLE_TERM 45 +#define SQL_TXN_CAPABLE 46 +#define SQL_USER_NAME 47 +#define SQL_CONVERT_FUNCTIONS 48 +#define SQL_NUMERIC_FUNCTIONS 49 +#define SQL_STRING_FUNCTIONS 50 +#define SQL_SYSTEM_FUNCTIONS 51 +#define SQL_TIMEDATE_FUNCTIONS 52 +#define SQL_CONVERT_BIGINT 53 +#define SQL_CONVERT_BINARY 54 +#define SQL_CONVERT_BIT 55 +#define SQL_CONVERT_CHAR 56 +#define SQL_CONVERT_DATE 57 +#define SQL_CONVERT_DECIMAL 58 +#define SQL_CONVERT_DOUBLE 59 +#define SQL_CONVERT_FLOAT 60 +#define SQL_CONVERT_INTEGER 61 +#define SQL_CONVERT_LONGVARCHAR 62 +#define SQL_CONVERT_NUMERIC 63 +#define SQL_CONVERT_REAL 64 +#define SQL_CONVERT_SMALLINT 65 +#define SQL_CONVERT_TIME 66 +#define SQL_CONVERT_TIMESTAMP 67 +#define SQL_CONVERT_TINYINT 68 +#define SQL_CONVERT_VARBINARY 69 +#define SQL_CONVERT_VARCHAR 70 +#define SQL_CONVERT_LONGVARBINARY 71 +#define SQL_TXN_ISOLATION_OPTION 72 +#define SQL_ODBC_SQL_OPT_IEF 73 /* * ODBC SDK 1.0 Additions */ -#define SQL_CORRELATION_NAME 74 -#define SQL_NON_NULLABLE_COLUMNS 75 +#define SQL_CORRELATION_NAME 74 +#define SQL_NON_NULLABLE_COLUMNS 75 /* * ODBC SDK 2.0 Additions */ -#define SQL_DRIVER_HLIB 76 -#define SQL_DRIVER_ODBC_VER 77 -#define SQL_LOCK_TYPES 78 -#define SQL_POS_OPERATIONS 79 -#define SQL_POSITIONED_STATEMENTS 80 -#define SQL_GETDATA_EXTENSIONS 81 -#define SQL_BOOKMARK_PERSISTENCE 82 -#define SQL_STATIC_SENSITIVITY 83 -#define SQL_FILE_USAGE 84 -#define SQL_NULL_COLLATION 85 -#define SQL_ALTER_TABLE 86 -#define SQL_COLUMN_ALIAS 87 -#define SQL_GROUP_BY 88 -#define SQL_KEYWORDS 89 -#define SQL_ORDER_BY_COLUMNS_IN_SELECT 90 -#define SQL_OWNER_USAGE 91 -#define SQL_QUALIFIER_USAGE 92 -#define SQL_QUOTED_IDENTIFIER_CASE 93 -#define SQL_SPECIAL_CHARACTERS 94 -#define SQL_SUBQUERIES 95 -#define SQL_UNION 96 -#define SQL_MAX_COLUMNS_IN_GROUP_BY 97 -#define SQL_MAX_COLUMNS_IN_INDEX 98 -#define SQL_MAX_COLUMNS_IN_ORDER_BY 99 -#define SQL_MAX_COLUMNS_IN_SELECT 100 -#define SQL_MAX_COLUMNS_IN_TABLE 101 -#define SQL_MAX_INDEX_SIZE 102 -#define SQL_MAX_ROW_SIZE_INCLUDES_LONG 103 -#define SQL_MAX_ROW_SIZE 104 -#define SQL_MAX_STATEMENT_LEN 105 -#define SQL_MAX_TABLES_IN_SELECT 106 -#define SQL_MAX_USER_NAME_LEN 107 -#define SQL_MAX_CHAR_LITERAL_LEN 108 -#define SQL_TIMEDATE_ADD_INTERVALS 109 -#define SQL_TIMEDATE_DIFF_INTERVALS 110 -#define SQL_NEED_LONG_DATA_LEN 111 -#define SQL_MAX_BINARY_LITERAL_LEN 112 -#define SQL_LIKE_ESCAPE_CLAUSE 113 -#define SQL_QUALIFIER_LOCATION 114 +#define SQL_DRIVER_HLIB 76 +#define SQL_DRIVER_ODBC_VER 77 +#define SQL_LOCK_TYPES 78 +#define SQL_POS_OPERATIONS 79 +#define SQL_POSITIONED_STATEMENTS 80 +#define SQL_GETDATA_EXTENSIONS 81 +#define SQL_BOOKMARK_PERSISTENCE 82 +#define SQL_STATIC_SENSITIVITY 83 +#define SQL_FILE_USAGE 84 +#define SQL_NULL_COLLATION 85 +#define SQL_ALTER_TABLE 86 +#define SQL_COLUMN_ALIAS 87 +#define SQL_GROUP_BY 88 +#define SQL_KEYWORDS 89 +#define SQL_ORDER_BY_COLUMNS_IN_SELECT 90 +#define SQL_OWNER_USAGE 91 +#define SQL_QUALIFIER_USAGE 92 +#define SQL_QUOTED_IDENTIFIER_CASE 93 +#define SQL_SPECIAL_CHARACTERS 94 +#define SQL_SUBQUERIES 95 +#define SQL_UNION 96 +#define SQL_MAX_COLUMNS_IN_GROUP_BY 97 +#define SQL_MAX_COLUMNS_IN_INDEX 98 +#define SQL_MAX_COLUMNS_IN_ORDER_BY 99 +#define SQL_MAX_COLUMNS_IN_SELECT 100 +#define SQL_MAX_COLUMNS_IN_TABLE 101 +#define SQL_MAX_INDEX_SIZE 102 +#define SQL_MAX_ROW_SIZE_INCLUDES_LONG 103 +#define SQL_MAX_ROW_SIZE 104 +#define SQL_MAX_STATEMENT_LEN 105 +#define SQL_MAX_TABLES_IN_SELECT 106 +#define SQL_MAX_USER_NAME_LEN 107 +#define SQL_MAX_CHAR_LITERAL_LEN 108 +#define SQL_TIMEDATE_ADD_INTERVALS 109 +#define SQL_TIMEDATE_DIFF_INTERVALS 110 +#define SQL_NEED_LONG_DATA_LEN 111 +#define SQL_MAX_BINARY_LITERAL_LEN 112 +#define SQL_LIKE_ESCAPE_CLAUSE 113 +#define SQL_QUALIFIER_LOCATION 114 /* * ODBC SDK 2.01 Additions */ -#define SQL_OJ_CAPABILITIES 65003 /* Temp value until ODBC 3.0 */ +#define SQL_OJ_CAPABILITIES 65003 /* Temp value until ODBC 3.0 */ -#define SQL_INFO_LAST SQL_QUALIFIER_LOCATION -#define SQL_INFO_DRIVER_START 1000 +#define SQL_INFO_LAST SQL_QUALIFIER_LOCATION +#define SQL_INFO_DRIVER_START 1000 /* * SQL_CONVERT_* bitmask values */ -#define SQL_CVT_CHAR 0x00000001L -#define SQL_CVT_NUMERIC 0x00000002L -#define SQL_CVT_DECIMAL 0x00000004L -#define SQL_CVT_INTEGER 0x00000008L -#define SQL_CVT_SMALLINT 0x00000010L -#define SQL_CVT_FLOAT 0x00000020L -#define SQL_CVT_REAL 0x00000040L -#define SQL_CVT_DOUBLE 0x00000080L -#define SQL_CVT_VARCHAR 0x00000100L -#define SQL_CVT_LONGVARCHAR 0x00000200L -#define SQL_CVT_BINARY 0x00000400L -#define SQL_CVT_VARBINARY 0x00000800L -#define SQL_CVT_BIT 0x00001000L -#define SQL_CVT_TINYINT 0x00002000L -#define SQL_CVT_BIGINT 0x00004000L -#define SQL_CVT_DATE 0x00008000L -#define SQL_CVT_TIME 0x00010000L -#define SQL_CVT_TIMESTAMP 0x00020000L -#define SQL_CVT_LONGVARBINARY 0x00040000L +#define SQL_CVT_CHAR 0x00000001L +#define SQL_CVT_NUMERIC 0x00000002L +#define SQL_CVT_DECIMAL 0x00000004L +#define SQL_CVT_INTEGER 0x00000008L +#define SQL_CVT_SMALLINT 0x00000010L +#define SQL_CVT_FLOAT 0x00000020L +#define SQL_CVT_REAL 0x00000040L +#define SQL_CVT_DOUBLE 0x00000080L +#define SQL_CVT_VARCHAR 0x00000100L +#define SQL_CVT_LONGVARCHAR 0x00000200L +#define SQL_CVT_BINARY 0x00000400L +#define SQL_CVT_VARBINARY 0x00000800L +#define SQL_CVT_BIT 0x00001000L +#define SQL_CVT_TINYINT 0x00002000L +#define SQL_CVT_BIGINT 0x00004000L +#define SQL_CVT_DATE 0x00008000L +#define SQL_CVT_TIME 0x00010000L +#define SQL_CVT_TIMESTAMP 0x00020000L +#define SQL_CVT_LONGVARBINARY 0x00040000L /* * SQL_CONVERT_FUNCTIONS */ -#define SQL_FN_CVT_CONVERT 0x00000001L +#define SQL_FN_CVT_CONVERT 0x00000001L /* * SQL_STRING_FUNCTIONS */ -#define SQL_FN_STR_CONCAT 0x00000001L -#define SQL_FN_STR_INSERT 0x00000002L -#define SQL_FN_STR_LEFT 0x00000004L -#define SQL_FN_STR_LTRIM 0x00000008L -#define SQL_FN_STR_LENGTH 0x00000010L -#define SQL_FN_STR_LOCATE 0x00000020L -#define SQL_FN_STR_LCASE 0x00000040L -#define SQL_FN_STR_REPEAT 0x00000080L -#define SQL_FN_STR_REPLACE 0x00000100L -#define SQL_FN_STR_RIGHT 0x00000200L -#define SQL_FN_STR_RTRIM 0x00000400L -#define SQL_FN_STR_SUBSTRING 0x00000800L -#define SQL_FN_STR_UCASE 0x00001000L -#define SQL_FN_STR_ASCII 0x00002000L -#define SQL_FN_STR_CHAR 0x00004000L -#define SQL_FN_STR_DIFFERENCE 0x00008000L -#define SQL_FN_STR_LOCATE_2 0x00010000L -#define SQL_FN_STR_SOUNDEX 0x00020000L -#define SQL_FN_STR_SPACE 0x00040000L +#define SQL_FN_STR_CONCAT 0x00000001L +#define SQL_FN_STR_INSERT 0x00000002L +#define SQL_FN_STR_LEFT 0x00000004L +#define SQL_FN_STR_LTRIM 0x00000008L +#define SQL_FN_STR_LENGTH 0x00000010L +#define SQL_FN_STR_LOCATE 0x00000020L +#define SQL_FN_STR_LCASE 0x00000040L +#define SQL_FN_STR_REPEAT 0x00000080L +#define SQL_FN_STR_REPLACE 0x00000100L +#define SQL_FN_STR_RIGHT 0x00000200L +#define SQL_FN_STR_RTRIM 0x00000400L +#define SQL_FN_STR_SUBSTRING 0x00000800L +#define SQL_FN_STR_UCASE 0x00001000L +#define SQL_FN_STR_ASCII 0x00002000L +#define SQL_FN_STR_CHAR 0x00004000L +#define SQL_FN_STR_DIFFERENCE 0x00008000L +#define SQL_FN_STR_LOCATE_2 0x00010000L +#define SQL_FN_STR_SOUNDEX 0x00020000L +#define SQL_FN_STR_SPACE 0x00040000L /* * SQL_NUMERIC_FUNCTIONS */ -#define SQL_FN_NUM_ABS 0x00000001L -#define SQL_FN_NUM_ACOS 0x00000002L -#define SQL_FN_NUM_ASIN 0x00000004L -#define SQL_FN_NUM_ATAN 0x00000008L -#define SQL_FN_NUM_ATAN2 0x00000010L -#define SQL_FN_NUM_CEILING 0x00000020L -#define SQL_FN_NUM_COS 0x00000040L -#define SQL_FN_NUM_COT 0x00000080L -#define SQL_FN_NUM_EXP 0x00000100L -#define SQL_FN_NUM_FLOOR 0x00000200L -#define SQL_FN_NUM_LOG 0x00000400L -#define SQL_FN_NUM_MOD 0x00000800L -#define SQL_FN_NUM_SIGN 0x00001000L -#define SQL_FN_NUM_SIN 0x00002000L -#define SQL_FN_NUM_SQRT 0x00004000L -#define SQL_FN_NUM_TAN 0x00008000L -#define SQL_FN_NUM_PI 0x00010000L -#define SQL_FN_NUM_RAND 0x00020000L -#define SQL_FN_NUM_DEGREES 0x00040000L -#define SQL_FN_NUM_LOG10 0x00080000L -#define SQL_FN_NUM_POWER 0x00100000L -#define SQL_FN_NUM_RADIANS 0x00200000L -#define SQL_FN_NUM_ROUND 0x00400000L -#define SQL_FN_NUM_TRUNCATE 0x00800000L +#define SQL_FN_NUM_ABS 0x00000001L +#define SQL_FN_NUM_ACOS 0x00000002L +#define SQL_FN_NUM_ASIN 0x00000004L +#define SQL_FN_NUM_ATAN 0x00000008L +#define SQL_FN_NUM_ATAN2 0x00000010L +#define SQL_FN_NUM_CEILING 0x00000020L +#define SQL_FN_NUM_COS 0x00000040L +#define SQL_FN_NUM_COT 0x00000080L +#define SQL_FN_NUM_EXP 0x00000100L +#define SQL_FN_NUM_FLOOR 0x00000200L +#define SQL_FN_NUM_LOG 0x00000400L +#define SQL_FN_NUM_MOD 0x00000800L +#define SQL_FN_NUM_SIGN 0x00001000L +#define SQL_FN_NUM_SIN 0x00002000L +#define SQL_FN_NUM_SQRT 0x00004000L +#define SQL_FN_NUM_TAN 0x00008000L +#define SQL_FN_NUM_PI 0x00010000L +#define SQL_FN_NUM_RAND 0x00020000L +#define SQL_FN_NUM_DEGREES 0x00040000L +#define SQL_FN_NUM_LOG10 0x00080000L +#define SQL_FN_NUM_POWER 0x00100000L +#define SQL_FN_NUM_RADIANS 0x00200000L +#define SQL_FN_NUM_ROUND 0x00400000L +#define SQL_FN_NUM_TRUNCATE 0x00800000L /* * SQL_TIMEDATE_FUNCTIONS */ -#define SQL_FN_TD_NOW 0x00000001L -#define SQL_FN_TD_CURDATE 0x00000002L -#define SQL_FN_TD_DAYOFMONTH 0x00000004L -#define SQL_FN_TD_DAYOFWEEK 0x00000008L -#define SQL_FN_TD_DAYOFYEAR 0x00000010L -#define SQL_FN_TD_MONTH 0x00000020L -#define SQL_FN_TD_QUARTER 0x00000040L -#define SQL_FN_TD_WEEK 0x00000080L -#define SQL_FN_TD_YEAR 0x00000100L -#define SQL_FN_TD_CURTIME 0x00000200L -#define SQL_FN_TD_HOUR 0x00000400L -#define SQL_FN_TD_MINUTE 0x00000800L -#define SQL_FN_TD_SECOND 0x00001000L -#define SQL_FN_TD_TIMESTAMPADD 0x00002000L -#define SQL_FN_TD_TIMESTAMPDIFF 0x00004000L -#define SQL_FN_TD_DAYNAME 0x00008000L -#define SQL_FN_TD_MONTHNAME 0x00010000L +#define SQL_FN_TD_NOW 0x00000001L +#define SQL_FN_TD_CURDATE 0x00000002L +#define SQL_FN_TD_DAYOFMONTH 0x00000004L +#define SQL_FN_TD_DAYOFWEEK 0x00000008L +#define SQL_FN_TD_DAYOFYEAR 0x00000010L +#define SQL_FN_TD_MONTH 0x00000020L +#define SQL_FN_TD_QUARTER 0x00000040L +#define SQL_FN_TD_WEEK 0x00000080L +#define SQL_FN_TD_YEAR 0x00000100L +#define SQL_FN_TD_CURTIME 0x00000200L +#define SQL_FN_TD_HOUR 0x00000400L +#define SQL_FN_TD_MINUTE 0x00000800L +#define SQL_FN_TD_SECOND 0x00001000L +#define SQL_FN_TD_TIMESTAMPADD 0x00002000L +#define SQL_FN_TD_TIMESTAMPDIFF 0x00004000L +#define SQL_FN_TD_DAYNAME 0x00008000L +#define SQL_FN_TD_MONTHNAME 0x00010000L /* * SQL_SYSTEM_FUNCTIONS */ -#define SQL_FN_SYS_USERNAME 0x00000001L -#define SQL_FN_SYS_DBNAME 0x00000002L -#define SQL_FN_SYS_IFNULL 0x00000004L +#define SQL_FN_SYS_USERNAME 0x00000001L +#define SQL_FN_SYS_DBNAME 0x00000002L +#define SQL_FN_SYS_IFNULL 0x00000004L /* * SQL_TIMEDATE_ADD_INTERVALS * SQL_TIMEDATE_DIFF_INTERVALS */ -#define SQL_FN_TSI_FRAC_SECOND 0x00000001L -#define SQL_FN_TSI_SECOND 0x00000002L -#define SQL_FN_TSI_MINUTE 0x00000004L -#define SQL_FN_TSI_HOUR 0x00000008L -#define SQL_FN_TSI_DAY 0x00000010L -#define SQL_FN_TSI_WEEK 0x00000020L -#define SQL_FN_TSI_MONTH 0x00000040L -#define SQL_FN_TSI_QUARTER 0x00000080L -#define SQL_FN_TSI_YEAR 0x00000100L +#define SQL_FN_TSI_FRAC_SECOND 0x00000001L +#define SQL_FN_TSI_SECOND 0x00000002L +#define SQL_FN_TSI_MINUTE 0x00000004L +#define SQL_FN_TSI_HOUR 0x00000008L +#define SQL_FN_TSI_DAY 0x00000010L +#define SQL_FN_TSI_WEEK 0x00000020L +#define SQL_FN_TSI_MONTH 0x00000040L +#define SQL_FN_TSI_QUARTER 0x00000080L +#define SQL_FN_TSI_YEAR 0x00000100L /* * SQL_ODBC_API_CONFORMANCE */ -#define SQL_OAC_NONE 0x0000 -#define SQL_OAC_LEVEL1 0x0001 -#define SQL_OAC_LEVEL2 0x0002 +#define SQL_OAC_NONE 0x0000 +#define SQL_OAC_LEVEL1 0x0001 +#define SQL_OAC_LEVEL2 0x0002 /* * SQL_ODBC_SAG_CLI_CONFORMANCE */ -#define SQL_OSCC_NOT_COMPLIANT 0x0000 -#define SQL_OSCC_COMPLIANT 0x0001 +#define SQL_OSCC_NOT_COMPLIANT 0x0000 +#define SQL_OSCC_COMPLIANT 0x0001 /* * SQL_ODBC_SQL_CONFORMANCE */ -#define SQL_OSC_MINIMUM 0x0000 -#define SQL_OSC_CORE 0x0001 -#define SQL_OSC_EXTENDED 0x0002 +#define SQL_OSC_MINIMUM 0x0000 +#define SQL_OSC_CORE 0x0001 +#define SQL_OSC_EXTENDED 0x0002 /* * SQL_CONCAT_NULL_BEHAVIOR */ -#define SQL_CB_NULL 0x0000 -#define SQL_CB_NON_NULL 0x0001 +#define SQL_CB_NULL 0x0000 +#define SQL_CB_NON_NULL 0x0001 /* * SQL_CURSOR_COMMIT_BEHAVIOR * SQL_CURSOR_ROLLBACK_BEHAVIOR */ -#define SQL_CB_DELETE 0x0000 -#define SQL_CB_CLOSE 0x0001 -#define SQL_CB_PRESERVE 0x0002 +#define SQL_CB_DELETE 0x0000 +#define SQL_CB_CLOSE 0x0001 +#define SQL_CB_PRESERVE 0x0002 /* * SQL_IDENTIFIER_CASE */ -#define SQL_IC_UPPER 0x0001 -#define SQL_IC_LOWER 0x0002 -#define SQL_IC_SENSITIVE 0x0003 -#define SQL_IC_MIXED 0x0004 +#define SQL_IC_UPPER 0x0001 +#define SQL_IC_LOWER 0x0002 +#define SQL_IC_SENSITIVE 0x0003 +#define SQL_IC_MIXED 0x0004 /* * SQL_TXN_CAPABLE */ -#define SQL_TC_NONE 0x0000 -#define SQL_TC_DML 0x0001 -#define SQL_TC_ALL 0x0002 -#define SQL_TC_DDL_COMMIT 0x0003 -#define SQL_TC_DDL_IGNORE 0x0004 +#define SQL_TC_NONE 0x0000 +#define SQL_TC_DML 0x0001 +#define SQL_TC_ALL 0x0002 +#define SQL_TC_DDL_COMMIT 0x0003 +#define SQL_TC_DDL_IGNORE 0x0004 /* * SQL_SCROLL_OPTIONS */ -#define SQL_SO_FORWARD_ONLY 0x00000001L -#define SQL_SO_KEYSET_DRIVEN 0x00000002L -#define SQL_SO_DYNAMIC 0x00000004L -#define SQL_SO_MIXED 0x00000008L -#define SQL_SO_STATIC 0x00000010L +#define SQL_SO_FORWARD_ONLY 0x00000001L +#define SQL_SO_KEYSET_DRIVEN 0x00000002L +#define SQL_SO_DYNAMIC 0x00000004L +#define SQL_SO_MIXED 0x00000008L +#define SQL_SO_STATIC 0x00000010L /* * SQL_SCROLL_CONCURRENCY */ -#define SQL_SCCO_READ_ONLY 0x00000001L -#define SQL_SCCO_LOCK 0x00000002L -#define SQL_SCCO_OPT_ROWVER 0x00000004L -#define SQL_SCCO_OPT_VALUES 0x00000008L +#define SQL_SCCO_READ_ONLY 0x00000001L +#define SQL_SCCO_LOCK 0x00000002L +#define SQL_SCCO_OPT_ROWVER 0x00000004L +#define SQL_SCCO_OPT_VALUES 0x00000008L /* * SQL_FETCH_DIRECTION */ -#define SQL_FD_FETCH_NEXT 0x00000001L -#define SQL_FD_FETCH_FIRST 0x00000002L -#define SQL_FD_FETCH_LAST 0x00000004L -#define SQL_FD_FETCH_PRIOR 0x00000008L -#define SQL_FD_FETCH_ABSOLUTE 0x00000010L -#define SQL_FD_FETCH_RELATIVE 0x00000020L -#define SQL_FD_FETCH_RESUME 0x00000040L -#define SQL_FD_FETCH_BOOKMARK 0x00000080L +#define SQL_FD_FETCH_NEXT 0x00000001L +#define SQL_FD_FETCH_FIRST 0x00000002L +#define SQL_FD_FETCH_LAST 0x00000004L +#define SQL_FD_FETCH_PRIOR 0x00000008L +#define SQL_FD_FETCH_ABSOLUTE 0x00000010L +#define SQL_FD_FETCH_RELATIVE 0x00000020L +#define SQL_FD_FETCH_RESUME 0x00000040L +#define SQL_FD_FETCH_BOOKMARK 0x00000080L /* * SQL_TXN_ISOLATION_OPTION */ -#define SQL_TXN_READ_UNCOMMITTED 0x00000001L -#define SQL_TXN_READ_COMMITTED 0x00000002L -#define SQL_TXN_REPEATABLE_READ 0x00000004L -#define SQL_TXN_SERIALIZABLE 0x00000008L -#define SQL_TXN_VERSIONING 0x00000010L +#define SQL_TXN_READ_UNCOMMITTED 0x00000001L +#define SQL_TXN_READ_COMMITTED 0x00000002L +#define SQL_TXN_REPEATABLE_READ 0x00000004L +#define SQL_TXN_SERIALIZABLE 0x00000008L +#define SQL_TXN_VERSIONING 0x00000010L /* * SQL_CORRELATION_NAME */ -#define SQL_CN_NONE 0x0000 -#define SQL_CN_DIFFERENT 0x0001 -#define SQL_CN_ANY 0x0002 +#define SQL_CN_NONE 0x0000 +#define SQL_CN_DIFFERENT 0x0001 +#define SQL_CN_ANY 0x0002 /* * SQL_NON_NULLABLE_COLUMNS */ -#define SQL_NNC_NULL 0x0000 -#define SQL_NNC_NON_NULL 0x0001 +#define SQL_NNC_NULL 0x0000 +#define SQL_NNC_NON_NULL 0x0001 /* * SQL_NULL_COLLATION */ -#define SQL_NC_HIGH 0x0000 -#define SQL_NC_LOW 0x0001 -#define SQL_NC_START 0x0002 -#define SQL_NC_END 0x0004 +#define SQL_NC_HIGH 0x0000 +#define SQL_NC_LOW 0x0001 +#define SQL_NC_START 0x0002 +#define SQL_NC_END 0x0004 /* * SQL_FILE_USAGE */ -#define SQL_FILE_NOT_SUPPORTED 0x0000 -#define SQL_FILE_TABLE 0x0001 -#define SQL_FILE_QUALIFIER 0x0002 +#define SQL_FILE_NOT_SUPPORTED 0x0000 +#define SQL_FILE_TABLE 0x0001 +#define SQL_FILE_QUALIFIER 0x0002 /* * SQL_GETDATA_EXTENSIONS */ -#define SQL_GD_ANY_COLUMN 0x00000001L -#define SQL_GD_ANY_ORDER 0x00000002L -#define SQL_GD_BLOCK 0x00000004L -#define SQL_GD_BOUND 0x00000008L +#define SQL_GD_ANY_COLUMN 0x00000001L +#define SQL_GD_ANY_ORDER 0x00000002L +#define SQL_GD_BLOCK 0x00000004L +#define SQL_GD_BOUND 0x00000008L /* * SQL_ALTER_TABLE */ -#define SQL_AT_ADD_COLUMN 0x00000001L -#define SQL_AT_DROP_COLUMN 0x00000002L +#define SQL_AT_ADD_COLUMN 0x00000001L +#define SQL_AT_DROP_COLUMN 0x00000002L /* * SQL_POSITIONED_STATEMENTS */ -#define SQL_PS_POSITIONED_DELETE 0x00000001L -#define SQL_PS_POSITIONED_UPDATE 0x00000002L -#define SQL_PS_SELECT_FOR_UPDATE 0x00000004L +#define SQL_PS_POSITIONED_DELETE 0x00000001L +#define SQL_PS_POSITIONED_UPDATE 0x00000002L +#define SQL_PS_SELECT_FOR_UPDATE 0x00000004L /* * SQL_GROUP_BY */ -#define SQL_GB_NOT_SUPPORTED 0x0000 -#define SQL_GB_GROUP_BY_EQUALS_SELECT 0x0001 -#define SQL_GB_GROUP_BY_CONTAINS_SELECT 0x0002 -#define SQL_GB_NO_RELATION 0x0003 +#define SQL_GB_NOT_SUPPORTED 0x0000 +#define SQL_GB_GROUP_BY_EQUALS_SELECT 0x0001 +#define SQL_GB_GROUP_BY_CONTAINS_SELECT 0x0002 +#define SQL_GB_NO_RELATION 0x0003 /* * SQL_OWNER_USAGE */ -#define SQL_OU_DML_STATEMENTS 0x00000001L -#define SQL_OU_PROCEDURE_INVOCATION 0x00000002L -#define SQL_OU_TABLE_DEFINITION 0x00000004L -#define SQL_OU_INDEX_DEFINITION 0x00000008L -#define SQL_OU_PRIVILEGE_DEFINITION 0x00000010L +#define SQL_OU_DML_STATEMENTS 0x00000001L +#define SQL_OU_PROCEDURE_INVOCATION 0x00000002L +#define SQL_OU_TABLE_DEFINITION 0x00000004L +#define SQL_OU_INDEX_DEFINITION 0x00000008L +#define SQL_OU_PRIVILEGE_DEFINITION 0x00000010L /* * SQL_QUALIFIER_USAGE */ -#define SQL_QU_DML_STATEMENTS 0x00000001L -#define SQL_QU_PROCEDURE_INVOCATION 0x00000002L -#define SQL_QU_TABLE_DEFINITION 0x00000004L -#define SQL_QU_INDEX_DEFINITION 0x00000008L -#define SQL_QU_PRIVILEGE_DEFINITION 0x00000010L +#define SQL_QU_DML_STATEMENTS 0x00000001L +#define SQL_QU_PROCEDURE_INVOCATION 0x00000002L +#define SQL_QU_TABLE_DEFINITION 0x00000004L +#define SQL_QU_INDEX_DEFINITION 0x00000008L +#define SQL_QU_PRIVILEGE_DEFINITION 0x00000010L /* * SQL_SUBQUERIES */ -#define SQL_SQ_COMPARISON 0x00000001L -#define SQL_SQ_EXISTS 0x00000002L -#define SQL_SQ_IN 0x00000004L -#define SQL_SQ_QUANTIFIED 0x00000008L -#define SQL_SQ_CORRELATED_SUBQUERIES 0x00000010L +#define SQL_SQ_COMPARISON 0x00000001L +#define SQL_SQ_EXISTS 0x00000002L +#define SQL_SQ_IN 0x00000004L +#define SQL_SQ_QUANTIFIED 0x00000008L +#define SQL_SQ_CORRELATED_SUBQUERIES 0x00000010L /* * SQL_UNION */ -#define SQL_U_UNION 0x00000001L -#define SQL_U_UNION_ALL 0x00000002L +#define SQL_U_UNION 0x00000001L +#define SQL_U_UNION_ALL 0x00000002L /* * SQL_BOOKMARK_PERSISTENCE */ -#define SQL_BP_CLOSE 0x00000001L -#define SQL_BP_DELETE 0x00000002L -#define SQL_BP_DROP 0x00000004L -#define SQL_BP_TRANSACTION 0x00000008L -#define SQL_BP_UPDATE 0x00000010L -#define SQL_BP_OTHER_HSTMT 0x00000020L -#define SQL_BP_SCROLL 0x00000040L +#define SQL_BP_CLOSE 0x00000001L +#define SQL_BP_DELETE 0x00000002L +#define SQL_BP_DROP 0x00000004L +#define SQL_BP_TRANSACTION 0x00000008L +#define SQL_BP_UPDATE 0x00000010L +#define SQL_BP_OTHER_HSTMT 0x00000020L +#define SQL_BP_SCROLL 0x00000040L /* * SQL_STATIC_SENSITIVITY */ -#define SQL_SS_ADDITIONS 0x00000001L -#define SQL_SS_DELETIONS 0x00000002L -#define SQL_SS_UPDATES 0x00000004L +#define SQL_SS_ADDITIONS 0x00000001L +#define SQL_SS_DELETIONS 0x00000002L +#define SQL_SS_UPDATES 0x00000004L /* * SQL_LOCK_TYPES */ -#define SQL_LCK_NO_CHANGE 0x00000001L -#define SQL_LCK_EXCLUSIVE 0x00000002L -#define SQL_LCK_UNLOCK 0x00000004L +#define SQL_LCK_NO_CHANGE 0x00000001L +#define SQL_LCK_EXCLUSIVE 0x00000002L +#define SQL_LCK_UNLOCK 0x00000004L /* * SQL_POS_OPERATIONS */ -#define SQL_POS_POSITION 0x00000001L -#define SQL_POS_REFRESH 0x00000002L -#define SQL_POS_UPDATE 0x00000004L -#define SQL_POS_DELETE 0x00000008L -#define SQL_POS_ADD 0x00000010L +#define SQL_POS_POSITION 0x00000001L +#define SQL_POS_REFRESH 0x00000002L +#define SQL_POS_UPDATE 0x00000004L +#define SQL_POS_DELETE 0x00000008L +#define SQL_POS_ADD 0x00000010L /* * SQL_QUALIFIER_LOCATION */ -#define SQL_QL_START 0x0001L -#define SQL_QL_END 0x0002L +#define SQL_QL_START 0x0001L +#define SQL_QL_END 0x0002L /* * SQL_OJ_CAPABILITIES */ -#define SQL_OJ_LEFT 0x00000001L -#define SQL_OJ_RIGHT 0x00000002L -#define SQL_OJ_FULL 0x00000004L -#define SQL_OJ_NESTED 0x00000008L -#define SQL_OJ_NOT_ORDERED 0x00000010L -#define SQL_OJ_INNER 0x00000020L -#define SQL_OJ_ALL_COMPARISON_OPS 0x00000040L +#define SQL_OJ_LEFT 0x00000001L +#define SQL_OJ_RIGHT 0x00000002L +#define SQL_OJ_FULL 0x00000004L +#define SQL_OJ_NESTED 0x00000008L +#define SQL_OJ_NOT_ORDERED 0x00000010L +#define SQL_OJ_INNER 0x00000020L +#define SQL_OJ_ALL_COMPARISON_OPS 0x00000040L /* * SQLGetStmtOption/SQLSetStmtOption */ -#define SQL_QUERY_TIMEOUT 0 -#define SQL_MAX_ROWS 1 -#define SQL_NOSCAN 2 -#define SQL_MAX_LENGTH 3 -#define SQL_ASYNC_ENABLE 4 -#define SQL_BIND_TYPE 5 -#define SQL_CURSOR_TYPE 6 -#define SQL_CONCURRENCY 7 -#define SQL_KEYSET_SIZE 8 -#define SQL_ROWSET_SIZE 9 -#define SQL_SIMULATE_CURSOR 10 -#define SQL_RETRIEVE_DATA 11 -#define SQL_USE_BOOKMARKS 12 -#define SQL_GET_BOOKMARK 13 -#define SQL_ROW_NUMBER 14 +#define SQL_QUERY_TIMEOUT 0 +#define SQL_MAX_ROWS 1 +#define SQL_NOSCAN 2 +#define SQL_MAX_LENGTH 3 +#define SQL_ASYNC_ENABLE 4 +#define SQL_BIND_TYPE 5 +#define SQL_CURSOR_TYPE 6 +#define SQL_CONCURRENCY 7 +#define SQL_KEYSET_SIZE 8 +#define SQL_ROWSET_SIZE 9 +#define SQL_SIMULATE_CURSOR 10 +#define SQL_RETRIEVE_DATA 11 +#define SQL_USE_BOOKMARKS 12 +#define SQL_GET_BOOKMARK 13 +#define SQL_ROW_NUMBER 14 -#define SQL_STMT_OPT_MIN SQL_QUERY_TIMEOUT -#define SQL_STMT_OPT_MAX SQL_ROW_NUMBER +#define SQL_STMT_OPT_MIN SQL_QUERY_TIMEOUT +#define SQL_STMT_OPT_MAX SQL_ROW_NUMBER /* * SQL_QUERY_TIMEOUT */ -#define SQL_QUERY_TIMEOUT_DEFAULT 0UL +#define SQL_QUERY_TIMEOUT_DEFAULT 0UL /* * SQL_MAX_ROWS */ -#define SQL_MAX_ROWS_DEFAULT 0UL +#define SQL_MAX_ROWS_DEFAULT 0UL /* * SQL_NOSCAN */ -#define SQL_NOSCAN_OFF 0UL /* 1.0 FALSE */ -#define SQL_NOSCAN_ON 1UL /* 1.0 TRUE */ -#define SQL_NOSCAN_DEFAULT SQL_NOSCAN_OFF +#define SQL_NOSCAN_OFF 0UL /* 1.0 FALSE */ +#define SQL_NOSCAN_ON 1UL /* 1.0 TRUE */ +#define SQL_NOSCAN_DEFAULT SQL_NOSCAN_OFF /* * SQL_MAX_LENGTH */ -#define SQL_MAX_LENGTH_DEFAULT 0UL +#define SQL_MAX_LENGTH_DEFAULT 0UL /* * SQL_ASYNC_ENABLE */ -#define SQL_ASYNC_ENABLE_OFF 0UL -#define SQL_ASYNC_ENABLE_ON 1UL -#define SQL_ASYNC_ENABLE_DEFAULT SQL_ASYNC_ENABLE_OFF +#define SQL_ASYNC_ENABLE_OFF 0UL +#define SQL_ASYNC_ENABLE_ON 1UL +#define SQL_ASYNC_ENABLE_DEFAULT SQL_ASYNC_ENABLE_OFF /* * SQL_BIND_TYPE */ -#define SQL_BIND_BY_COLUMN 0UL -#define SQL_BIND_TYPE_DEFAULT SQL_BIND_BY_COLUMN +#define SQL_BIND_BY_COLUMN 0UL +#define SQL_BIND_TYPE_DEFAULT SQL_BIND_BY_COLUMN /* * SQL_CONCURRENCY */ -#define SQL_CONCUR_READ_ONLY 1 -#define SQL_CONCUR_LOCK 2 -#define SQL_CONCUR_ROWVER 3 -#define SQL_CONCUR_VALUES 4 -#define SQL_CONCUR_DEFAULT SQL_CONCUR_READ_ONLY +#define SQL_CONCUR_READ_ONLY 1 +#define SQL_CONCUR_LOCK 2 +#define SQL_CONCUR_ROWVER 3 +#define SQL_CONCUR_VALUES 4 +#define SQL_CONCUR_DEFAULT SQL_CONCUR_READ_ONLY /* * SQL_CURSOR_TYPE */ -#define SQL_CURSOR_FORWARD_ONLY 0UL -#define SQL_CURSOR_KEYSET_DRIVEN 1UL -#define SQL_CURSOR_DYNAMIC 2UL -#define SQL_CURSOR_STATIC 3UL -#define SQL_CURSOR_TYPE_DEFAULT SQL_CURSOR_FORWARD_ONLY +#define SQL_CURSOR_FORWARD_ONLY 0UL +#define SQL_CURSOR_KEYSET_DRIVEN 1UL +#define SQL_CURSOR_DYNAMIC 2UL +#define SQL_CURSOR_STATIC 3UL +#define SQL_CURSOR_TYPE_DEFAULT SQL_CURSOR_FORWARD_ONLY /* * SQL_ROWSET_SIZE */ -#define SQL_ROWSET_SIZE_DEFAULT 1UL +#define SQL_ROWSET_SIZE_DEFAULT 1UL /* * SQL_KEYSET_SIZE */ -#define SQL_KEYSET_SIZE_DEFAULT 0UL +#define SQL_KEYSET_SIZE_DEFAULT 0UL /* * SQL_SIMULATE_CURSOR */ -#define SQL_SC_NON_UNIQUE 0UL -#define SQL_SC_TRY_UNIQUE 1UL -#define SQL_SC_UNIQUE 2UL +#define SQL_SC_NON_UNIQUE 0UL +#define SQL_SC_TRY_UNIQUE 1UL +#define SQL_SC_UNIQUE 2UL /* * SQL_RETRIEVE_DATA */ -#define SQL_RD_OFF 0UL -#define SQL_RD_ON 1UL -#define SQL_RD_DEFAULT SQL_RD_ON +#define SQL_RD_OFF 0UL +#define SQL_RD_ON 1UL +#define SQL_RD_DEFAULT SQL_RD_ON /* * SQL_USE_BOOKMARKS */ -#define SQL_UB_OFF 0UL -#define SQL_UB_ON 1UL -#define SQL_UB_DEFAULT SQL_UB_OFF +#define SQL_UB_OFF 0UL +#define SQL_UB_ON 1UL +#define SQL_UB_DEFAULT SQL_UB_OFF /* * SQLSetConnectOption/SQLGetConnectOption */ -#define SQL_ACCESS_MODE 101 -#define SQL_AUTOCOMMIT 102 -#define SQL_LOGIN_TIMEOUT 103 -#define SQL_OPT_TRACE 104 -#define SQL_OPT_TRACEFILE 105 -#define SQL_TRANSLATE_DLL 106 -#define SQL_TRANSLATE_OPTION 107 -#define SQL_TXN_ISOLATION 108 -#define SQL_CURRENT_QUALIFIER 109 -#define SQL_ODBC_CURSORS 110 -#define SQL_QUIET_MODE 111 -#define SQL_PACKET_SIZE 112 +#define SQL_ACCESS_MODE 101 +#define SQL_AUTOCOMMIT 102 +#define SQL_LOGIN_TIMEOUT 103 +#define SQL_OPT_TRACE 104 +#define SQL_OPT_TRACEFILE 105 +#define SQL_TRANSLATE_DLL 106 +#define SQL_TRANSLATE_OPTION 107 +#define SQL_TXN_ISOLATION 108 +#define SQL_CURRENT_QUALIFIER 109 +#define SQL_ODBC_CURSORS 110 +#define SQL_QUIET_MODE 111 +#define SQL_PACKET_SIZE 112 -#define SQL_CONN_OPT_MIN SQL_ACCESS_MODE -#define SQL_CONN_OPT_MAX SQL_PACKET_SIZE -#define SQL_CONNECT_OPT_DRVR_START 1000 +#define SQL_CONN_OPT_MIN SQL_ACCESS_MODE +#define SQL_CONN_OPT_MAX SQL_PACKET_SIZE +#define SQL_CONNECT_OPT_DRVR_START 1000 /* * SQL_ACCESS_MODE */ -#define SQL_MODE_READ_WRITE 0UL -#define SQL_MODE_READ_ONLY 1UL -#define SQL_MODE_DEFAULT SQL_MODE_READ_WRITE +#define SQL_MODE_READ_WRITE 0UL +#define SQL_MODE_READ_ONLY 1UL +#define SQL_MODE_DEFAULT SQL_MODE_READ_WRITE /* * SQL_AUTOCOMMIT */ -#define SQL_AUTOCOMMIT_OFF 0UL -#define SQL_AUTOCOMMIT_ON 1UL -#define SQL_AUTOCOMMIT_DEFAULT SQL_AUTOCOMMIT_ON +#define SQL_AUTOCOMMIT_OFF 0UL +#define SQL_AUTOCOMMIT_ON 1UL +#define SQL_AUTOCOMMIT_DEFAULT SQL_AUTOCOMMIT_ON /* * SQL_LOGIN_TIMEOUT */ -#define SQL_LOGIN_TIMEOUT_DEFAULT 15UL +#define SQL_LOGIN_TIMEOUT_DEFAULT 15UL /* * SQL_OPT_TRACE */ -#define SQL_OPT_TRACE_OFF 0UL -#define SQL_OPT_TRACE_ON 1UL -#define SQL_OPT_TRACE_DEFAULT SQL_OPT_TRACE_OFF -#define SQL_OPT_TRACE_FILE_DEFAULT "odbc.log" +#define SQL_OPT_TRACE_OFF 0UL +#define SQL_OPT_TRACE_ON 1UL +#define SQL_OPT_TRACE_DEFAULT SQL_OPT_TRACE_OFF +#define SQL_OPT_TRACE_FILE_DEFAULT "odbc.log" /* * SQL_ODBC_CURSORS */ -#define SQL_CUR_USE_IF_NEEDED 0UL -#define SQL_CUR_USE_ODBC 1UL -#define SQL_CUR_USE_DRIVER 2UL -#define SQL_CUR_DEFAULT SQL_CUR_USE_DRIVER +#define SQL_CUR_USE_IF_NEEDED 0UL +#define SQL_CUR_USE_ODBC 1UL +#define SQL_CUR_USE_DRIVER 2UL +#define SQL_CUR_DEFAULT SQL_CUR_USE_DRIVER /* * SQLSpecialColumns - Column types and scopes */ -#define SQL_BEST_ROWID 1 -#define SQL_ROWVER 2 +#define SQL_BEST_ROWID 1 +#define SQL_ROWVER 2 -#define SQL_SCOPE_CURROW 0 -#define SQL_SCOPE_TRANSACTION 1 -#define SQL_SCOPE_SESSION 2 +#define SQL_SCOPE_CURROW 0 +#define SQL_SCOPE_TRANSACTION 1 +#define SQL_SCOPE_SESSION 2 /* * SQLSetPos */ -#define SQL_ENTIRE_ROWSET 0 +#define SQL_ENTIRE_ROWSET 0 /* * SQLSetPos */ -#define SQL_POSITION 0 -#define SQL_REFRESH 1 -#define SQL_UPDATE 2 -#define SQL_DELETE 3 -#define SQL_ADD 4 +#define SQL_POSITION 0 +#define SQL_REFRESH 1 +#define SQL_UPDATE 2 +#define SQL_DELETE 3 +#define SQL_ADD 4 /* * SQLSetPos */ -#define SQL_LOCK_NO_CHANGE 0 -#define SQL_LOCK_EXCLUSIVE 1 -#define SQL_LOCK_UNLOCK 2 +#define SQL_LOCK_NO_CHANGE 0 +#define SQL_LOCK_EXCLUSIVE 1 +#define SQL_LOCK_UNLOCK 2 /* * SQLSetPos */ -#define SQL_POSITION_TO(hstmt,irow) \ +#define SQL_POSITION_TO(hstmt,irow) \ SQLSetPos(hstmt,irow,SQL_POSITION,SQL_LOCK_NO_CHANGE) #define SQL_LOCK_RECORD(hstmt,irow,fLock) \ SQLSetPos(hstmt,irow,SQL_POSITION,fLock) @@ -972,102 +972,102 @@ typedef unsigned long int BOOKMARK; /* * SQLExtendedFetch - fFetchType */ -#define SQL_FETCH_NEXT 1 -#define SQL_FETCH_FIRST 2 -#define SQL_FETCH_LAST 3 -#define SQL_FETCH_PRIOR 4 -#define SQL_FETCH_ABSOLUTE 5 -#define SQL_FETCH_RELATIVE 6 -#define SQL_FETCH_BOOKMARK 8 +#define SQL_FETCH_NEXT 1 +#define SQL_FETCH_FIRST 2 +#define SQL_FETCH_LAST 3 +#define SQL_FETCH_PRIOR 4 +#define SQL_FETCH_ABSOLUTE 5 +#define SQL_FETCH_RELATIVE 6 +#define SQL_FETCH_BOOKMARK 8 /* * SQLExtendedFetch - rgfRowStatus */ -#define SQL_ROW_SUCCESS 0 -#define SQL_ROW_DELETED 1 -#define SQL_ROW_UPDATED 2 -#define SQL_ROW_NOROW 3 -#define SQL_ROW_ADDED 4 -#define SQL_ROW_ERROR 5 +#define SQL_ROW_SUCCESS 0 +#define SQL_ROW_DELETED 1 +#define SQL_ROW_UPDATED 2 +#define SQL_ROW_NOROW 3 +#define SQL_ROW_ADDED 4 +#define SQL_ROW_ERROR 5 /* * SQLForeignKeys - UPDATE_RULE/DELETE_RULE */ -#define SQL_CASCADE 0 -#define SQL_RESTRICT 1 -#define SQL_SET_NULL 2 +#define SQL_CASCADE 0 +#define SQL_RESTRICT 1 +#define SQL_SET_NULL 2 /* * SQLBindParameter - fParamType * SQLProcedureColumns - COLUMN_TYPE */ -#define SQL_PARAM_TYPE_UNKNOWN 0 -#define SQL_PARAM_INPUT 1 -#define SQL_PARAM_INPUT_OUTPUT 2 -#define SQL_RESULT_COL 3 -#define SQL_PARAM_OUTPUT 4 -#define SQL_RETURN_VALUE 5 +#define SQL_PARAM_TYPE_UNKNOWN 0 +#define SQL_PARAM_INPUT 1 +#define SQL_PARAM_INPUT_OUTPUT 2 +#define SQL_RESULT_COL 3 +#define SQL_PARAM_OUTPUT 4 +#define SQL_RETURN_VALUE 5 /* * SQLSetParam to SQLBindParameter conversion */ -#define SQL_PARAM_TYPE_DEFAULT SQL_PARAM_INPUT_OUTPUT -#define SQL_SETPARAM_VALUE_MAX (-1L) +#define SQL_PARAM_TYPE_DEFAULT SQL_PARAM_INPUT_OUTPUT +#define SQL_SETPARAM_VALUE_MAX (-1L) /* * SQLStatistics - fUnique */ -#define SQL_INDEX_UNIQUE 0 -#define SQL_INDEX_ALL 1 +#define SQL_INDEX_UNIQUE 0 +#define SQL_INDEX_ALL 1 /* * SQLStatistics - fAccuracy */ -#define SQL_QUICK 0 -#define SQL_ENSURE 1 +#define SQL_QUICK 0 +#define SQL_ENSURE 1 /* * SQLStatistics - TYPE */ -#define SQL_TABLE_STAT 0 -#define SQL_INDEX_CLUSTERED 1 -#define SQL_INDEX_HASHED 2 -#define SQL_INDEX_OTHER 3 +#define SQL_TABLE_STAT 0 +#define SQL_INDEX_CLUSTERED 1 +#define SQL_INDEX_HASHED 2 +#define SQL_INDEX_OTHER 3 /* * SQLProcedures - PROCEDURE_TYPE */ -#define SQL_PT_UNKNOWN 0 -#define SQL_PT_PROCEDURE 1 -#define SQL_PT_FUNCTION 2 +#define SQL_PT_UNKNOWN 0 +#define SQL_PT_PROCEDURE 1 +#define SQL_PT_FUNCTION 2 /* * SQLSpecialColumns - PSEUDO_COLUMN */ -#define SQL_PC_UNKNOWN 0 -#define SQL_PC_NOT_PSEUDO 1 -#define SQL_PC_PSEUDO 2 +#define SQL_PC_UNKNOWN 0 +#define SQL_PC_NOT_PSEUDO 1 +#define SQL_PC_PSEUDO 2 /* * Deprecated defines from prior versions of ODBC */ -#define SQL_DATABASE_NAME 16 -#define SQL_FD_FETCH_PREV SQL_FD_FETCH_PRIOR -#define SQL_FETCH_PREV SQL_FETCH_PRIOR -#define SQL_CONCUR_TIMESTAMP SQL_CONCUR_ROWVER -#define SQL_SCCO_OPT_TIMESTAMP SQL_SCCO_OPT_ROWVER -#define SQL_CC_DELETE SQL_CB_DELETE -#define SQL_CR_DELETE SQL_CB_DELETE -#define SQL_CC_CLOSE SQL_CB_CLOSE -#define SQL_CR_CLOSE SQL_CB_CLOSE -#define SQL_CC_PRESERVE SQL_CB_PRESERVE -#define SQL_CR_PRESERVE SQL_CB_PRESERVE -#define SQL_FETCH_RESUME 7 -#define SQL_SCROLL_FORWARD_ONLY 0L -#define SQL_SCROLL_KEYSET_DRIVEN (-1L) -#define SQL_SCROLL_DYNAMIC (-2L) -#define SQL_SCROLL_STATIC (-3L) -#define SQL_PC_NON_PSEUDO SQL_PC_NOT_PSEUDO +#define SQL_DATABASE_NAME 16 +#define SQL_FD_FETCH_PREV SQL_FD_FETCH_PRIOR +#define SQL_FETCH_PREV SQL_FETCH_PRIOR +#define SQL_CONCUR_TIMESTAMP SQL_CONCUR_ROWVER +#define SQL_SCCO_OPT_TIMESTAMP SQL_SCCO_OPT_ROWVER +#define SQL_CC_DELETE SQL_CB_DELETE +#define SQL_CR_DELETE SQL_CB_DELETE +#define SQL_CC_CLOSE SQL_CB_CLOSE +#define SQL_CR_CLOSE SQL_CB_CLOSE +#define SQL_CC_PRESERVE SQL_CB_PRESERVE +#define SQL_CR_PRESERVE SQL_CB_PRESERVE +#define SQL_FETCH_RESUME 7 +#define SQL_SCROLL_FORWARD_ONLY 0L +#define SQL_SCROLL_KEYSET_DRIVEN (-1L) +#define SQL_SCROLL_DYNAMIC (-2L) +#define SQL_SCROLL_STATIC (-3L) +#define SQL_PC_NON_PSEUDO SQL_PC_NOT_PSEUDO #ifdef __cplusplus extern "C" { diff --git a/src/common/imagbmp.cpp b/src/common/imagbmp.cpp index d9448c9035..e3e9cb67ad 100644 --- a/src/common/imagbmp.cpp +++ b/src/common/imagbmp.cpp @@ -76,7 +76,7 @@ bool wxBMPHandler::SaveFile(wxImage *image, wxOutputStream& stream, bool verbose) { - return SaveDib(image, stream, verbose, TRUE/*IsBmp*/, FALSE/*IsMask*/); + return SaveDib(image, stream, verbose, true/*IsBmp*/, false/*IsMask*/); } bool wxBMPHandler::SaveDib(wxImage *image, @@ -86,13 +86,13 @@ bool wxBMPHandler::SaveDib(wxImage *image, bool IsMask) { - wxCHECK_MSG( image, FALSE, _T("invalid pointer in wxBMPHandler::SaveFile") ); + wxCHECK_MSG( image, false, _T("invalid pointer in wxBMPHandler::SaveFile") ); if ( !image->Ok() ) { if ( verbose ) wxLogError(_("BMP: Couldn't save invalid image.")); - return FALSE; + return false; } // get the format of the BMP file to save, else use 24bpp @@ -126,7 +126,7 @@ bool wxBMPHandler::SaveDib(wxImage *image, { if ( verbose ) wxLogError(_("BMP: wxImage doesn't have own wxPalette.")); - return FALSE; + return false; } bpp = 8; palette_size = 256; @@ -201,7 +201,7 @@ bool wxBMPHandler::SaveDib(wxImage *image, { if (verbose) wxLogError(_("BMP: Couldn't write the file (Bitmap) header.")); - return FALSE; + return false; } } if ( !IsMask ) @@ -222,7 +222,7 @@ bool wxBMPHandler::SaveDib(wxImage *image, { if (verbose) wxLogError(_("BMP: Couldn't write the file (BitmapInfo) header.")); - return FALSE; + return false; } } @@ -301,7 +301,7 @@ bool wxBMPHandler::SaveDib(wxImage *image, delete palette; #endif // wxUSE_PALETTE delete q_image; - return FALSE; + return false; } } delete []rgbquad; @@ -433,7 +433,7 @@ bool wxBMPHandler::SaveDib(wxImage *image, delete palette; #endif // wxUSE_PALETTE delete q_image; - return FALSE; + return false; } } delete[] buffer; @@ -442,7 +442,7 @@ bool wxBMPHandler::SaveDib(wxImage *image, #endif // wxUSE_PALETTE delete q_image; - return TRUE; + return true; } @@ -474,7 +474,7 @@ bool wxBMPHandler::DoLoadDib(wxImage * image, int width, int height, { if (verbose) wxLogError(_("BMP: Couldn't allocate memory.")); - return FALSE; + return false; } } else @@ -492,7 +492,7 @@ bool wxBMPHandler::DoLoadDib(wxImage * image, int width, int height, wxLogError( _("BMP: Couldn't allocate memory.") ); if ( cmap ) delete[] cmap; - return FALSE; + return false; } // Reading the palette, if it exists: @@ -831,7 +831,7 @@ bool wxBMPHandler::DoLoadDib(wxImage * image, int width, int height, delete[] cmap; - image->SetMask(FALSE); + image->SetMask(false); const wxStreamError err = stream.GetLastError(); return err == wxSTREAM_NO_ERROR || err == wxSTREAM_EOF; @@ -874,13 +874,13 @@ bool wxBMPHandler::LoadDib(wxImage *image, wxInputStream& stream, { if (verbose) wxLogError( _("DIB Header: Image width > 32767 pixels for file.") ); - return FALSE; + return false; } if ( height > 32767 ) { if (verbose) wxLogError( _("DIB Header: Image height > 32767 pixels for file.") ); - return FALSE; + return false; } stream.Read(&aWord, 2); @@ -894,7 +894,7 @@ bool wxBMPHandler::LoadDib(wxImage *image, wxInputStream& stream, { if (verbose) wxLogError( _("DIB Header: Unknown bitdepth in file.") ); - return FALSE; + return false; } stream.Read(dbuf, 4 * 4); @@ -904,7 +904,7 @@ bool wxBMPHandler::LoadDib(wxImage *image, wxInputStream& stream, { if (verbose) wxLogError( _("DIB Header: Unknown encoding in file.") ); - return FALSE; + return false; } stream.Read(dbuf, 4 * 2); @@ -918,16 +918,16 @@ bool wxBMPHandler::LoadDib(wxImage *image, wxInputStream& stream, { if (verbose) wxLogError( _("DIB Header: Encoding doesn't match bitdepth.") ); - return FALSE; + return false; } //read DIB; this is the BMP image or the XOR part of an icon image if ( !DoLoadDib(image, width, height, bpp, ncolors, comp, offset, stream, - verbose, IsBmp, TRUE) ) + verbose, IsBmp, true) ) { if (verbose) wxLogError( _("Error in reading image DIB .") ); - return FALSE; + return false; } if ( !IsBmp ) @@ -936,24 +936,24 @@ bool wxBMPHandler::LoadDib(wxImage *image, wxInputStream& stream, //there is no palette, so we will create one wxImage mask; if ( !DoLoadDib(&mask, width, height, 1, 2, BI_RGB, offset, stream, - verbose, IsBmp, FALSE) ) + verbose, IsBmp, false) ) { if (verbose) wxLogError( _("ICO: Error in reading mask DIB.") ); - return FALSE; + return false; } image->SetMaskFromImage(mask, 255, 255, 255); } - return TRUE; + return true; } bool wxBMPHandler::LoadFile(wxImage *image, wxInputStream& stream, bool verbose, int WXUNUSED(index)) { // Read a single DIB fom the file: - return LoadDib(image, stream, verbose, TRUE/*isBmp*/); + return LoadDib(image, stream, verbose, true/*isBmp*/); } bool wxBMPHandler::DoCanRead(wxInputStream& stream) @@ -961,7 +961,7 @@ bool wxBMPHandler::DoCanRead(wxInputStream& stream) unsigned char hdr[2]; if ( !stream.Read(hdr, WXSIZEOF(hdr)) ) - return FALSE; + return false; // do we have the BMP file signature? return hdr[0] == 'B' && hdr[1] == 'M'; @@ -1013,13 +1013,13 @@ bool wxICOHandler::SaveFile(wxImage *image, { if ( verbose ) wxLogError(_("ICO: Image too tall for an icon.")); - return FALSE; + return false; } if ( image->GetWidth () > 255 ) { if ( verbose ) wxLogError(_("ICO: Image too wide for an icon.")); - return FALSE; + return false; } int images = 1; // only generate one image @@ -1045,7 +1045,7 @@ bool wxICOHandler::SaveFile(wxImage *image, { if ( verbose ) wxLogError(_("ICO: Error writing the image file!")); - return FALSE; + return false; } // for each iamage write a description ICONDIRENTRY: @@ -1094,8 +1094,8 @@ bool wxICOHandler::SaveFile(wxImage *image, // monochome bitmap: mask.SetOption(wxIMAGE_OPTION_BMP_FORMAT, wxBMP_1BPP_BW); - bool IsBmp = FALSE; - bool IsMask = FALSE; + bool IsBmp = false; + bool IsMask = false; //calculate size and offset of image and mask wxCountingOutputStream cStream; @@ -1104,27 +1104,27 @@ bool wxICOHandler::SaveFile(wxImage *image, { if ( verbose ) wxLogError(_("ICO: Error writing the image file!")); - return FALSE; + return false; } - IsMask = TRUE; + IsMask = true; bResult = SaveDib(&mask, cStream, verbose, IsBmp, IsMask); if ( !bResult ) { if ( verbose ) wxLogError(_("ICO: Error writing the image file!")); - return FALSE; + return false; } wxUint32 Size = cStream.GetSize(); - // wxCountingOutputStream::Ok() always returns TRUE for now and this + // wxCountingOutputStream::Ok() always returns true for now and this // "if" provokes VC++ warnings in optimized build #if 0 if ( !cStream.Ok() ) { if ( verbose ) wxLogError(_("ICO: Error writing the image file!")); - return FALSE; + return false; } #endif // 0 @@ -1168,31 +1168,31 @@ bool wxICOHandler::SaveFile(wxImage *image, { if ( verbose ) wxLogError(_("ICO: Error writing the image file!")); - return FALSE; + return false; } // actually save it: - IsMask = FALSE; + IsMask = false; bResult = SaveDib(image, stream, verbose, IsBmp, IsMask); if ( !bResult ) { if ( verbose ) wxLogError(_("ICO: Error writing the image file!")); - return FALSE; + return false; } - IsMask = TRUE; + IsMask = true; bResult = SaveDib(&mask, stream, verbose, IsBmp, IsMask); if ( !bResult ) { if ( verbose ) wxLogError(_("ICO: Error writing the image file!")); - return FALSE; + return false; } } // end of for loop - return TRUE; + return true; } bool wxICOHandler::LoadFile(wxImage *image, wxInputStream& stream, @@ -1259,7 +1259,7 @@ bool wxICOHandler::DoLoadFile(wxImage *image, wxInputStream& stream, // seek to selected icon: pCurrentEntry = pIconDirEntry + iSel; stream.SeekI(iPos + wxUINT32_SWAP_ON_BE(pCurrentEntry->dwImageOffset), wxFromStart); - bResult = LoadDib(image, stream, TRUE, IsBmp); + bResult = LoadDib(image, stream, true, IsBmp); bool bIsCursorType = (this->GetType() == wxBITMAP_TYPE_CUR) || (this->GetType() == wxBITMAP_TYPE_ANI); if ( bResult && bIsCursorType && nType == 2 ) { @@ -1288,7 +1288,7 @@ bool wxICOHandler::DoCanRead(wxInputStream& stream) stream.SeekI(0); unsigned char hdr[4]; if ( !stream.Read(hdr, WXSIZEOF(hdr)) ) - return FALSE; + return false; // hdr[2] is one for an icon and two for a cursor return hdr[0] == '\0' && hdr[1] == '\0' && hdr[2] == '\1' && hdr[3] == '\0'; @@ -1310,7 +1310,7 @@ bool wxCURHandler::DoCanRead(wxInputStream& stream) stream.SeekI(0); unsigned char hdr[4]; if ( !stream.Read(hdr, WXSIZEOF(hdr)) ) - return FALSE; + return false; // hdr[2] is one for an icon and two for a cursor return hdr[0] == '\0' && hdr[1] == '\0' && hdr[2] == '\2' && hdr[3] == '\0'; @@ -1343,7 +1343,7 @@ bool wxANIHandler::LoadFile(wxImage *image, wxInputStream& stream, stream.SeekI(0); stream.Read(&FCC1, 4); if ( FCC1 != riff32 ) - return FALSE; + return false; // we have a riff file: while (stream.IsOk()) @@ -1375,35 +1375,35 @@ bool wxANIHandler::LoadFile(wxImage *image, wxInputStream& stream, // try to read next data chunk: stream.Read(&FCC1, 4); } - return FALSE; + return false; } bool wxANIHandler::DoCanRead(wxInputStream& stream) { wxInt32 FCC1, FCC2; wxUint32 datalen ; - + wxInt32 riff32; memcpy( &riff32, "RIFF", 4 ); wxInt32 list32; memcpy( &list32, "LIST", 4 ); wxInt32 ico32; - memcpy( &ico32, "icon", 4 ); + memcpy( &ico32, "icon", 4 ); wxInt32 anih32; memcpy( &anih32, "anih", 4 ); - + stream.SeekI(0); if ( !stream.Read(&FCC1, 4) ) - return FALSE; + return false; if ( FCC1 != riff32 ) - return FALSE; + return false; // we have a riff file: while ( stream.IsOk() ) { if ( FCC1 == anih32 ) - return TRUE; + return true; // we always have a data size: stream.Read(&datalen, 4); datalen = wxINT32_SWAP_ON_BE(datalen) ; @@ -1423,11 +1423,11 @@ bool wxANIHandler::DoCanRead(wxInputStream& stream) if ( !stream.Read(&FCC1, 4) ) { // reading failed -- either EOF or IO error, bail out anyhow - return FALSE; + return false; } } - return FALSE; + return false; } int wxANIHandler::GetImageCount(wxInputStream& stream) @@ -1443,7 +1443,7 @@ int wxANIHandler::GetImageCount(wxInputStream& stream) memcpy( &ico32, "icon", 4 ); wxInt32 anih32; memcpy( &anih32, "anih", 4 ); - + stream.SeekI(0); stream.Read(&FCC1, 4); if ( FCC1 != riff32 ) diff --git a/src/common/image.cpp b/src/common/image.cpp index 469260fb47..d5ea5590e7 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -231,7 +231,7 @@ wxImage wxImage::ShrinkBy( int xFactor , int yFactor ) const { if( xFactor == 1 && yFactor == 1 ) return Copy() ; - + wxImage image; wxCHECK_MSG( Ok(), image, wxT("invalid image") ); @@ -242,7 +242,7 @@ wxImage wxImage::ShrinkBy( int xFactor , int yFactor ) const long old_height = M_IMGDATA->m_height, old_width = M_IMGDATA->m_width; - + wxCHECK_MSG( (old_height > 0) && (old_width > 0), image, wxT("invalid old image size") ); @@ -265,14 +265,14 @@ wxImage wxImage::ShrinkBy( int xFactor , int yFactor ) const maskRed = M_IMGDATA->m_maskRed; maskGreen = M_IMGDATA->m_maskGreen; maskBlue =M_IMGDATA->m_maskBlue ; - + image.SetMaskColour( M_IMGDATA->m_maskRed, M_IMGDATA->m_maskGreen, M_IMGDATA->m_maskBlue ); } char unsigned *source_data = M_IMGDATA->m_data; char unsigned *target_data = data; - + for (long y = 0; y < height; y++) { for (long x = 0; x < width; x++) @@ -935,7 +935,7 @@ bool wxImage::SetMaskFromImage(const wxImage& mask, return true; } - + bool wxImage::ConvertAlphaToMask(unsigned char threshold) { if (!HasAlpha()) diff --git a/src/common/imagfill.cpp b/src/common/imagfill.cpp index 4ef7d0083d..129c63c168 100644 --- a/src/common/imagfill.cpp +++ b/src/common/imagfill.cpp @@ -35,7 +35,7 @@ static bool LINKAGEMODE MatchPixel(wxImage *img, int x, int y, int w, int h, const wxColour& c) { - if ((x<0)||(x>=w)||(y<0)||(y>=h)) return FALSE; + if ((x<0)||(x>=w)||(y<0)||(y>=h)) return false; unsigned char r = img->GetRed(x,y); unsigned char g = img->GetGreen(x,y); @@ -45,16 +45,16 @@ static bool LINKAGEMODE MatchPixel(wxImage *img, int x, int y, int w, int h, con static bool LINKAGEMODE MatchBoundaryPixel(wxImage *img, int x, int y, int w, int h, const wxColour & fill, const wxColour& bound) { - if ((x<0)||(x>=w)||(y<0)||(y>=h)) return TRUE; + if ((x<0)||(x>=w)||(y<0)||(y>=h)) return true; unsigned char r = img->GetRed(x,y); unsigned char g = img->GetGreen(x,y); unsigned char b = img->GetBlue(x,y); if ( fill.Red() == r && fill.Green() == g && fill.Blue() == b ) - return TRUE; + return true; if ( bound.Red() == r && bound.Green() == g && bound.Blue() == b ) - return TRUE; - return FALSE; + return true; + return false; } @@ -277,14 +277,14 @@ bool wxDoFloodFill(wxDC *dc, wxCoord x, wxCoord y, const wxColour& col, int style) { if (dc->GetBrush().GetStyle() == wxTRANSPARENT) - return TRUE; + return true; int height = 0; int width = 0; dc->GetSize(&width, &height); //it would be nice to fail if we don't get a sensible size... - wxCHECK_MSG(width >= 1 && height >= 1, FALSE, + wxCHECK_MSG(width >= 1 && height >= 1, false, wxT("In FloodFill, dc.GetSize routine failed, method not supported by this DC")); //this is much faster than doing the individual pixels @@ -302,7 +302,7 @@ bool wxDoFloodFill(wxDC *dc, wxCoord x, wxCoord y, dc->Blit(0, 0, width, height, &memdc, 0, 0); memdc.SelectObject(wxNullBitmap); - return TRUE; + return true; } #endif // wxUSE_IMAGE diff --git a/src/common/imaggif.cpp b/src/common/imaggif.cpp index 3a64963f92..9d20c1847a 100644 --- a/src/common/imaggif.cpp +++ b/src/common/imaggif.cpp @@ -43,10 +43,10 @@ bool wxGIFHandler::LoadFile(wxImage *image, wxInputStream& stream, { wxGIFDecoder *decod; int error; - bool ok = TRUE; + bool ok = true; // image->Destroy(); - decod = new wxGIFDecoder(&stream, TRUE); + decod = new wxGIFDecoder(&stream, true); error = decod->ReadGIF(); if ((error != wxGIF_OK) && (error != wxGIF_TRUNCATED)) @@ -67,7 +67,7 @@ bool wxGIFHandler::LoadFile(wxImage *image, wxInputStream& stream, } } delete decod; - return FALSE; + return false; } if ((error == wxGIF_TRUNCATED) && verbose) @@ -83,7 +83,7 @@ bool wxGIFHandler::LoadFile(wxImage *image, wxInputStream& stream, // accept an index of 0. (Instead GoFirstFrame() should be used) // Also if the gif image has only one frame, calling GoFrame(0) // fails because GoFrame() only works with gif animations. - // (It fails if IsAnimation() returns FALSE) + // (It fails if IsAnimation() returns false) // All valid reasons to NOT call GoFrame when index equals 0. if (index != 0) { @@ -111,7 +111,7 @@ bool wxGIFHandler::SaveFile( wxImage * WXUNUSED(image), if (verbose) wxLogDebug(wxT("GIF: the handler is read-only!!")); - return FALSE; + return false; } bool wxGIFHandler::DoCanRead( wxInputStream& stream ) diff --git a/src/common/imagiff.cpp b/src/common/imagiff.cpp index 6ceafceab0..5a6dc5cced 100644 --- a/src/common/imagiff.cpp +++ b/src/common/imagiff.cpp @@ -72,7 +72,7 @@ public: unsigned int w; /* width */ unsigned int h; /* height */ int transparent; /* transparent color (-1 = none) */ - int colors; /* number of colors */ + int colors; /* number of colors */ unsigned char *p; /* bitmap */ unsigned char *pal; /* palette */ @@ -83,8 +83,8 @@ public: class WXDLLEXPORT wxIFFDecoder { private: - IFFImage *m_image; // image data - wxInputStream *m_f; // input stream + IFFImage *m_image; // image data + wxInputStream *m_f; // input stream unsigned char *databuf; unsigned char *picptr; unsigned char *decomp_mem; @@ -146,7 +146,7 @@ bool wxIFFDecoder::ConvertToImage(wxImage *image) const image->Create(GetWidth(), GetHeight()); if (!image->Ok()) - return FALSE; + return false; unsigned char *pal = GetPalette(); unsigned char *src = GetData(); @@ -175,7 +175,7 @@ bool wxIFFDecoder::ConvertToImage(wxImage *image) const image->SetMaskColour(255, 0, 255); } else - image->SetMask(FALSE); + image->SetMask(false); #if wxUSE_PALETTE if (pal && colors > 0) @@ -207,7 +207,7 @@ bool wxIFFDecoder::ConvertToImage(wxImage *image) const dst[2] = src[2]; } - return TRUE; + return true; } @@ -230,14 +230,14 @@ int wxIFFDecoder::GetTransparentColour() const { return m_image->transparent; } // // CanRead: -// Returns TRUE if the file looks like a valid IFF, FALSE otherwise. +// Returns true if the file looks like a valid IFF, false otherwise. // bool wxIFFDecoder::CanRead() { unsigned char buf[12]; if ( !m_f->Read(buf, WXSIZEOF(buf)) ) - return FALSE; + return false; m_f->SeekI(-(off_t)WXSIZEOF(buf), wxFromCurrent); @@ -384,7 +384,7 @@ int wxIFFDecoder::ReadIFF() // main decoding loop. searches IFF chunks and handles them. // terminates when BODY chunk was found or dataptr ran over end of file // - bool BMHDok = FALSE, CMAPok = FALSE, CAMGok = FALSE; + bool BMHDok = false, CMAPok = false, CAMGok = false; int bmhd_width = 0, bmhd_height = 0, bmhd_bitplanes = 0, bmhd_transcol = -1; byte bmhd_masking = 0, bmhd_compression = 0; long camg_viewmode = 0; @@ -400,7 +400,7 @@ int wxIFFDecoder::ReadIFF() #else if (chunkLen < 0) { // format error? #endif - break; + break; } bool truncated = (dataptr + 8 + chunkLen > dataend); @@ -414,7 +414,7 @@ int wxIFFDecoder::ReadIFF() bmhd_masking = *(dataptr + 8 + 9); bmhd_compression = *(dataptr + 8 + 10); // get compression bmhd_transcol = iff_getword(dataptr + 8 + 12); - BMHDok = TRUE; // got BMHD + BMHDok = true; // got BMHD dataptr += 8 + chunkLen; // to next chunk } else if (strncmp((char *)dataptr, "CMAP", 4) == 0) { // CMAP ? @@ -445,14 +445,14 @@ int wxIFFDecoder::ReadIFF() wxLogTrace(_T("iff"), _T("Read %d colors from IFF file."), colors); - CMAPok = TRUE; // got CMAP + CMAPok = true; // got CMAP dataptr += 8 + chunkLen; // to next chunk } else if (strncmp((char *)dataptr, "CAMG", 4) == 0) { // CAMG ? if (chunkLen < 4 || truncated) { break; } camg_viewmode = iff_getlong(dataptr + 8); // get viewmodes - CAMGok = TRUE; // got CAMG + CAMGok = true; // got CAMG dataptr += 8 + chunkLen; // to next chunk } else if (strncmp((char *)dataptr, "BODY", 4) == 0) { // BODY ? @@ -763,7 +763,7 @@ bool wxIFFHandler::LoadFile(wxImage *image, wxInputStream& stream, } } delete decod; - return FALSE; + return false; } if ((error == wxIFF_TRUNCATED) && verbose) @@ -784,7 +784,7 @@ bool wxIFFHandler::SaveFile(wxImage * WXUNUSED(image), if (verbose) wxLogDebug(wxT("IFF: the handler is read-only!!")); - return FALSE; + return false; } bool wxIFFHandler::DoCanRead(wxInputStream& stream) diff --git a/src/common/imagjpeg.cpp b/src/common/imagjpeg.cpp index 5ecb9f6168..0f3e5756fa 100644 --- a/src/common/imagjpeg.cpp +++ b/src/common/imagjpeg.cpp @@ -28,7 +28,7 @@ #include "wx/log.h" #include "wx/app.h" -// NB: Some compilers define boolean type in Windows headers +// NB: Some compilers define boolean type in Windows headers // (e.g. Watcom C++, but not Open Watcom). // This causes a conflict with jmorecfg.h header from libjpeg, so we have // to make sure libjpeg won't try to define boolean itself. This is done by @@ -226,7 +226,7 @@ bool wxJPEGHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbos (cinfo.src->term_source)(&cinfo); jpeg_destroy_decompress(&cinfo); if (image->Ok()) image->Destroy(); - return FALSE; + return false; } jpeg_create_decompress( &cinfo ); @@ -239,9 +239,9 @@ bool wxJPEGHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbos if (!image->Ok()) { jpeg_finish_decompress( &cinfo ); jpeg_destroy_decompress( &cinfo ); - return FALSE; + return false; } - image->SetMask( FALSE ); + image->SetMask( false ); ptr = image->GetData(); stride = cinfo.output_width * 3; tempbuf = (*cinfo.mem->alloc_sarray) @@ -254,7 +254,7 @@ bool wxJPEGHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbos } jpeg_finish_decompress( &cinfo ); jpeg_destroy_decompress( &cinfo ); - return TRUE; + return true; } typedef struct { @@ -338,7 +338,7 @@ bool wxJPEGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbo if (verbose) wxLogError(_("JPEG: Couldn't save image.")); jpeg_destroy_compress(&cinfo); - return FALSE; + return false; } jpeg_create_compress(&cinfo); @@ -362,7 +362,7 @@ bool wxJPEGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbo // sets the resolution fields in the output file if (image->HasOption(wxIMAGE_OPTION_RESOLUTION)) { - cinfo.X_density = + cinfo.X_density = cinfo.Y_density = image->GetOptionInt(wxIMAGE_OPTION_RESOLUTION); } @@ -385,7 +385,7 @@ bool wxJPEGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbo jpeg_finish_compress(&cinfo); jpeg_destroy_compress(&cinfo); - return TRUE; + return true; } #ifdef __VISUALC__ @@ -397,7 +397,7 @@ bool wxJPEGHandler::DoCanRead( wxInputStream& stream ) unsigned char hdr[2]; if ( !stream.Read(hdr, WXSIZEOF(hdr)) ) - return FALSE; + return false; return hdr[0] == 0xFF && hdr[1] == 0xD8; } diff --git a/src/common/imagpcx.cpp b/src/common/imagpcx.cpp index cc45398eaf..14a3b0cff6 100644 --- a/src/common/imagpcx.cpp +++ b/src/common/imagpcx.cpp @@ -108,7 +108,7 @@ void RLEdecode(unsigned char *p, unsigned int size, wxInputStream& s) // If ((data & 0xC0) != 0xC0), then the value read is a data // byte. Else, it is a counter (cont = val & 0x3F) and the // next byte is the data byte. - // + if ((data & 0xC0) != 0xC0) { *(p++) = (unsigned char)data; @@ -416,7 +416,7 @@ int SavePCX(wxImage *image, wxOutputStream& stream) memset(pal, 0, sizeof(pal)); unsigned long index; - + for (wxImageHistogram::iterator entry = histogram.begin(); entry != histogram.end(); entry++ ) { @@ -447,7 +447,7 @@ bool wxPCXHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose if (verbose) wxLogError(_("PCX: this is not a PCX file.")); - return FALSE; + return false; } image->Destroy(); @@ -465,10 +465,10 @@ bool wxPCXHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose } } image->Destroy(); - return FALSE; + return false; } - return TRUE; + return true; } bool wxPCXHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbose ) @@ -495,7 +495,7 @@ bool wxPCXHandler::DoCanRead( wxInputStream& stream ) { unsigned char c = stream.GetC(); if ( !stream ) - return FALSE; + return false; // not very safe, but this is all we can get from PCX header :-( return c == 10; diff --git a/src/common/imagpng.cpp b/src/common/imagpng.cpp index 3bf12e257d..f3fe5cbce8 100644 --- a/src/common/imagpng.cpp +++ b/src/common/imagpng.cpp @@ -321,7 +321,7 @@ bool wxPNGHandler::DoCanRead( wxInputStream& stream ) unsigned char hdr[4]; if ( !stream.Read(hdr, WXSIZEOF(hdr)) ) - return FALSE; + return false; return memcmp(hdr, "\211PNG", WXSIZEOF(hdr)) == 0; } @@ -600,7 +600,7 @@ wxPNGHandler::LoadFile(wxImage *image, free( lines[i] ); free( lines ); - return TRUE; + return true; error: if (verbose) @@ -626,7 +626,7 @@ error: else png_destroy_read_struct( &png_ptr, (png_infopp) NULL, (png_infopp) NULL ); } - return FALSE; + return false; } // ---------------------------------------------------------------------------- @@ -645,7 +645,7 @@ bool wxPNGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbos { if (verbose) wxLogError(_("Couldn't save PNG image.")); - return FALSE; + return false; } png_set_error_fn(png_ptr, (png_voidp)NULL, wx_png_error, wx_png_warning); @@ -656,7 +656,7 @@ bool wxPNGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbos png_destroy_write_struct( &png_ptr, (png_infopp)NULL ); if (verbose) wxLogError(_("Couldn't save PNG image.")); - return FALSE; + return false; } if (setjmp(wxinfo.jmpbuf)) @@ -664,7 +664,7 @@ bool wxPNGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbos png_destroy_write_struct( &png_ptr, (png_infopp)NULL ); if (verbose) wxLogError(_("Couldn't save PNG image.")); - return FALSE; + return false; } // NB: please see the comment near wxPNGInfoStruct declaration for @@ -689,7 +689,7 @@ bool wxPNGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbos if (!data) { png_destroy_write_struct( &png_ptr, (png_infopp)NULL ); - return FALSE; + return false; } for (int y = 0; y < image->GetHeight(); y++) @@ -724,7 +724,7 @@ bool wxPNGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbos png_write_end( png_ptr, info_ptr ); png_destroy_write_struct( &png_ptr, (png_infopp)&info_ptr ); - return TRUE; + return true; } #ifdef __VISUALC__ diff --git a/src/common/imagpnm.cpp b/src/common/imagpnm.cpp index cea78ca07e..1fa96b89a0 100644 --- a/src/common/imagpnm.cpp +++ b/src/common/imagpnm.cpp @@ -70,15 +70,15 @@ bool wxPNMHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose { case wxT('2'): if (verbose) wxLogError(_("Loading Grey Ascii PNM image is not yet implemented.")); - return FALSE; + return false; case wxT('5'): if (verbose) wxLogError(_("Loading Grey Raw PNM image is not yet implemented.")); - return FALSE; - case wxT('3'): - case wxT('6'): break; + return false; + case wxT('3'): + case wxT('6'): break; default: if (verbose) wxLogError(_("PNM: File format is not recognized.")); - return FALSE; + return false; } text_stream.ReadLine(); // for the \n @@ -94,7 +94,7 @@ bool wxPNMHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose { if (verbose) wxLogError( _("PNM: Couldn't allocate memory.") ); - return FALSE; + return false; } if (c=='3') // Ascii RBG @@ -110,14 +110,14 @@ bool wxPNMHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose if ( !buf_stream ) { if (verbose) wxLogError(_("PNM: File seems truncated.")); - return FALSE; + return false; } } } if (c=='6') // Raw RGB buf_stream.Read( ptr, 3*width*height ); - image->SetMask( FALSE ); + image->SetMask( false ); const wxStreamError err = buf_stream.GetLastError(); return err == wxSTREAM_NO_ERROR || err == wxSTREAM_EOF; @@ -146,11 +146,11 @@ bool wxPNMHandler::DoCanRead( wxInputStream& stream ) { case '3': case '6': - return TRUE; + return true; } } - return FALSE; + return false; } diff --git a/src/common/imagtiff.cpp b/src/common/imagtiff.cpp index 0ff3f128f5..6a4e3d3bce 100644 --- a/src/common/imagtiff.cpp +++ b/src/common/imagtiff.cpp @@ -143,7 +143,7 @@ TIFFwxWarningHandler(const char* module, const char* fmt, va_list ap) wxLogWarning(_("tiff module: %s"), module); wxLogWarning((wxChar *) fmt, ap); } - + static void TIFFwxErrorHandler(const char* module, const char* fmt, va_list ap) { @@ -202,7 +202,7 @@ bool wxTIFFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbos if (verbose) wxLogError( _("TIFF: Error loading image.") ); - return FALSE; + return false; } if (!TIFFSetDirectory( tif, (tdir_t)index )) @@ -212,7 +212,7 @@ bool wxTIFFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbos TIFFClose( tif ); - return FALSE; + return false; } uint32 w, h; @@ -233,7 +233,7 @@ bool wxTIFFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbos TIFFClose( tif ); - return FALSE; + return false; } image->Create( (int)w, (int)h ); @@ -245,7 +245,7 @@ bool wxTIFFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbos _TIFFfree( raster ); TIFFClose( tif ); - return FALSE; + return false; } if (!TIFFReadRGBAImage( tif, w, h, raster, 0 )) @@ -257,10 +257,10 @@ bool wxTIFFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbos image->Destroy(); TIFFClose( tif ); - return FALSE; + return false; } - bool hasmask = FALSE; + bool hasmask = false; unsigned char *ptr = image->GetData(); ptr += w*3*(h-1); @@ -273,7 +273,7 @@ bool wxTIFFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbos unsigned char alpha = (unsigned char)TIFFGetA(raster[pos]); if (alpha < 127) { - hasmask = TRUE; + hasmask = true; ptr[0] = image->GetMaskRed(); ptr++; ptr[0] = image->GetMaskGreen(); @@ -301,7 +301,7 @@ bool wxTIFFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbos image->SetMask( hasmask ); - return TRUE; + return true; } int wxTIFFHandler::GetImageCount( wxInputStream& stream ) @@ -330,7 +330,7 @@ bool wxTIFFHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbo if (verbose) wxLogError( _("TIFF: Error saving image.") ); - return FALSE; + return false; } TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, (uint32)image->GetWidth()); @@ -355,7 +355,7 @@ bool wxTIFFHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbo TIFFClose( tif ); - return FALSE; + return false; } } else @@ -381,7 +381,7 @@ bool wxTIFFHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbo if (buf) _TIFFfree(buf); - return FALSE; + return false; } ptr += image->GetWidth()*3; } @@ -391,7 +391,7 @@ bool wxTIFFHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbo if (buf) _TIFFfree(buf); - return TRUE; + return true; } bool wxTIFFHandler::DoCanRead( wxInputStream& stream ) @@ -399,7 +399,7 @@ bool wxTIFFHandler::DoCanRead( wxInputStream& stream ) unsigned char hdr[2]; if ( !stream.Read(&hdr, WXSIZEOF(hdr)) ) - return FALSE; + return false; return (hdr[0] == 'I' && hdr[1] == 'I') || (hdr[0] == 'M' && hdr[1] == 'M'); diff --git a/src/common/imagxpm.cpp b/src/common/imagxpm.cpp index e0db84de12..7da5a26011 100644 --- a/src/common/imagxpm.cpp +++ b/src/common/imagxpm.cpp @@ -102,9 +102,9 @@ bool wxXPMHandler::LoadFile(wxImage *image, wxImage img = decoder.ReadFile(stream); if ( !img.Ok() ) - return FALSE; + return false; *image = img; - return TRUE; + return true; } @@ -140,7 +140,7 @@ bool wxXPMHandler::SaveFile(wxImage * image, for ( k = MaxCixels; cols > k; k *= MaxCixels) chars_per_pixel++; - // 2. write the header: + // 2. write the header: wxString sName; if ( image->HasOption(wxIMAGE_OPTION_FILENAME) ) { @@ -148,17 +148,17 @@ bool wxXPMHandler::SaveFile(wxImage * image, NULL, &sName, NULL); sName << wxT("_xpm"); } - + if ( !sName.IsEmpty() ) sName = wxString(wxT("/* XPM */\nstatic char *")) + sName; - else + else sName = wxT("/* XPM */\nstatic char *xpm_data"); stream.Write( (const char*) sName.ToAscii(), sName.Len() ); char tmpbuf[200]; // VS: 200b is safe upper bound for anything produced by sprintf below // (<101 bytes the string, neither %i can expand into more than 10 chars) - sprintf(tmpbuf, + sprintf(tmpbuf, "[] = {\n" "/* columns rows colors chars-per-pixel */\n" "\"%i %i %i %i\",\n", @@ -240,7 +240,7 @@ bool wxXPMHandler::SaveFile(wxImage * image, delete[] symbols; delete[] symbols_data; - return TRUE; + return true; } bool wxXPMHandler::DoCanRead(wxInputStream& stream) diff --git a/src/common/init.cpp b/src/common/init.cpp index 80e2c7bc5e..aaa186cc16 100644 --- a/src/common/init.cpp +++ b/src/common/init.cpp @@ -312,7 +312,7 @@ bool wxEntryStart(int& argc, char **argv) // clean up // ---------------------------------------------------------------------------- -// cleanup done before destroying wxTheApp +// cleanup done before destroying wxTheApp static void DoCommonPreCleanup() { #if wxUSE_LOG diff --git a/src/common/intl.cpp b/src/common/intl.cpp index ac1b779ea4..d3823ead81 100644 --- a/src/common/intl.cpp +++ b/src/common/intl.cpp @@ -1078,7 +1078,7 @@ bool wxMsgCatalogFile::Load(const wxChar *szDirPrefix, const wxChar *szName0, FIXME: UNICODE SUPPORT: must use CHARSET specifier! */ wxString szName = szName0; - if(szName.Find(wxT('.')) != -1) // contains a dot + if(szName.Find(wxT('.')) != wxNOT_FOUND) // contains a dot szName = szName.Left(szName.Find(wxT('.'))); wxString searchPath = GetFullSearchPath(szDirPrefix); @@ -1108,7 +1108,7 @@ bool wxMsgCatalogFile::Load(const wxChar *szDirPrefix, const wxChar *szName0, wxString strFullName; if ( !wxFindFileInPath(&strFullName, searchPath, strFile) ) { wxLogVerbose(_("catalog file for domain '%s' not found."), szName.c_str()); - return FALSE; + return false; } // open file @@ -1117,18 +1117,18 @@ bool wxMsgCatalogFile::Load(const wxChar *szDirPrefix, const wxChar *szName0, wxFile fileMsg(strFullName); if ( !fileMsg.IsOpened() ) - return FALSE; + return false; // get the file size off_t nSize = fileMsg.Length(); if ( nSize == wxInvalidOffset ) - return FALSE; + return false; // read the whole file in memory m_pData = new size_t8[nSize]; if ( fileMsg.Read(m_pData, nSize) != nSize ) { wxDELETEA(m_pData); - return FALSE; + return false; } // examine header @@ -1148,7 +1148,7 @@ bool wxMsgCatalogFile::Load(const wxChar *szDirPrefix, const wxChar *szName0, wxLogWarning(_("'%s' is not a valid message catalog."), strFullName.c_str()); wxDELETEA(m_pData); - return FALSE; + return false; } // initialize @@ -1222,7 +1222,7 @@ void wxMsgCatalogFile::FillHash(wxMessagesHash& hash, { #if wxUSE_WCHAR_T wxCSConv *csConv = NULL; - if ( !!m_charset ) + if ( !m_charset.IsEmpty() ) csConv = new wxCSConv(m_charset); wxMBConv& inputConv = csConv ? *((wxMBConv*)csConv) : *wxConvCurrent; @@ -1234,15 +1234,15 @@ void wxMsgCatalogFile::FillHash(wxMessagesHash& hash, #elif wxUSE_FONTMAP wxASSERT_MSG( msgIdCharset == NULL, _T("non-ASCII msgid languages only supported if wxUSE_WCHAR_T=1") ); - + wxEncodingConverter converter; if ( convertEncoding ) { wxFontEncoding targetEnc = wxFONTENCODING_SYSTEM; - wxFontEncoding enc = wxFontMapper::Get()->CharsetToEncoding(m_charset, FALSE); + wxFontEncoding enc = wxFontMapper::Get()->CharsetToEncoding(m_charset, false); if ( enc == wxFONTENCODING_SYSTEM ) { - convertEncoding = FALSE; // unknown encoding + convertEncoding = false; // unknown encoding } else { @@ -1252,10 +1252,10 @@ void wxMsgCatalogFile::FillHash(wxMessagesHash& hash, wxFontEncodingArray a = wxEncodingConverter::GetPlatformEquivalents(enc); if (a[0] == enc) // no conversion needed, locale uses native encoding - convertEncoding = FALSE; + convertEncoding = false; if (a.GetCount() == 0) // we don't know common equiv. under this platform - convertEncoding = FALSE; + convertEncoding = false; targetEnc = a[0]; } } @@ -1338,10 +1338,10 @@ bool wxMsgCatalog::Load(const wxChar *szDirPrefix, const wxChar *szName, if ( file.Load(szDirPrefix, szName, m_pluralFormsCalculator) ) { file.FillHash(m_messages, msgIdCharset, bConvertEncoding); - return TRUE; + return true; } - return FALSE; + return false; } const wxChar *wxMsgCatalog::GetString(const wxChar *sz, size_t n) const @@ -1425,7 +1425,7 @@ bool wxLocale::Init(const wxChar *szName, // the argument to setlocale() szLocale = szShort; - wxCHECK_MSG( szLocale, FALSE, _T("no locale to set in wxLocale::Init()") ); + wxCHECK_MSG( szLocale, false, _T("no locale to set in wxLocale::Init()") ); } #ifdef __WXWINCE__ @@ -1471,7 +1471,7 @@ bool wxLocale::Init(const wxChar *szName, // load the default catalog with wxWidgets standard messages m_pMsgCat = NULL; - bool bOk = TRUE; + bool bOk = true; if ( bLoadDefault ) bOk = AddCatalog(wxT("wxstd")); @@ -1485,24 +1485,24 @@ static wxWCharBuffer wxSetlocaleTryUTF(int c, const wxChar *lc) wxMB2WXbuf l = wxSetlocale(c, lc); if ( !l && lc && lc[0] != 0 ) { - wxString buf(lc); + wxString buf(lc); wxString buf2; - buf2 = buf + wxT(".UTF-8"); - l = wxSetlocale(c, buf2.c_str()); + buf2 = buf + wxT(".UTF-8"); + l = wxSetlocale(c, buf2.c_str()); if ( !l ) { buf2 = buf + wxT(".utf-8"); - l = wxSetlocale(c, buf2.c_str()); + l = wxSetlocale(c, buf2.c_str()); } if ( !l ) { buf2 = buf + wxT(".UTF8"); - l = wxSetlocale(c, buf2.c_str()); + l = wxSetlocale(c, buf2.c_str()); } if ( !l ) { buf2 = buf + wxT(".utf8"); - l = wxSetlocale(c, buf2.c_str()); + l = wxSetlocale(c, buf2.c_str()); } } return l; @@ -1523,7 +1523,7 @@ bool wxLocale::Init(int language, int flags) // We failed to detect system language, so we will use English: if (lang == wxLANGUAGE_UNKNOWN) { - return FALSE; + return false; } const wxLanguageInfo *info = GetLanguageInfo(lang); @@ -1532,7 +1532,7 @@ bool wxLocale::Init(int language, int flags) if (info == NULL) { wxLogError(wxT("Unknown language %i."), lang); - return FALSE; + return false; } wxString name = info->Description; @@ -1580,7 +1580,7 @@ bool wxLocale::Init(int language, int flags) if ( !retloc ) { wxLogError(wxT("Cannot set locale to '%s'."), locale.c_str()); - return FALSE; + return false; } #elif defined(__WIN32__) @@ -1637,7 +1637,7 @@ bool wxLocale::Init(int language, int flags) { wxLogLastError(wxT("SetThreadLocale")); wxLogError(wxT("Cannot set locale to language %s."), name.c_str()); - return FALSE; + return false; } else { @@ -1679,12 +1679,12 @@ bool wxLocale::Init(int language, int flags) if ( !retloc ) { wxLogError(wxT("Cannot set locale to language %s."), name.c_str()); - return FALSE; + return false; } #elif defined(__WXMAC__) || defined(__WXPM__) wxMB2WXbuf retloc = wxSetlocale(LC_ALL , wxEmptyString); #else - return FALSE; + return false; #define WX_NO_LOCALE_SUPPORT #endif @@ -2285,11 +2285,11 @@ wxFontEncoding wxLocale::GetSystemEncoding() return wxFONTENCODING_CP950; } #elif defined(__WXMAC__) - TextEncoding encoding = 0 ; + TextEncoding encoding = 0 ; #if TARGET_CARBON - encoding = CFStringGetSystemEncoding() ; + encoding = CFStringGetSystemEncoding() ; #else - UpgradeScriptInfoToTextEncoding ( smSystemScript , kTextLanguageDontCare , kTextRegionDontCare , NULL , &encoding ) ; + UpgradeScriptInfoToTextEncoding ( smSystemScript , kTextLanguageDontCare , kTextRegionDontCare , NULL , &encoding ) ; #endif return wxMacGetFontEncFromSystemEnc( encoding ) ; #elif defined(__UNIX_LIKE__) && wxUSE_FONTMAP @@ -2297,7 +2297,7 @@ wxFontEncoding wxLocale::GetSystemEncoding() if ( !encname.empty() ) { wxFontEncoding enc = wxFontMapper::Get()-> - CharsetToEncoding(encname, FALSE /* not interactive */); + CharsetToEncoding(encname, false /* not interactive */); // on some modern Linux systems (RedHat 8) the default system locale // is UTF8 -- but it isn't supported by wxGTK in ANSI build at all so @@ -2538,11 +2538,11 @@ wxString wxLocale::GetHeaderValue( const wxChar* szHeader, wxChar const * pszFound = wxStrstr(pszTrans, szHeader); if ( pszFound == NULL ) return wxEmptyString; - + pszFound += wxStrlen(szHeader) + 2 /* ': ' */; // Every header is separated by \n - + wxChar const * pszEndLine = wxStrchr(pszFound, wxT('\n')); if ( pszEndLine == NULL ) pszEndLine = pszFound + wxStrlen(pszFound); @@ -2736,7 +2736,7 @@ class wxLocaleModule: public wxModule DECLARE_DYNAMIC_CLASS(wxLocaleModule) public: wxLocaleModule() {} - bool OnInit() { return TRUE; } + bool OnInit() { return true; } void OnExit() { wxLocale::DestroyLanguagesDB(); } }; diff --git a/src/common/ipcbase.cpp b/src/common/ipcbase.cpp index af60bef9ac..902e7b8a30 100644 --- a/src/common/ipcbase.cpp +++ b/src/common/ipcbase.cpp @@ -6,7 +6,7 @@ // Created: 04/01/98 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) @@ -31,23 +31,23 @@ IMPLEMENT_CLASS(wxClientBase, wxObject) IMPLEMENT_CLASS(wxConnectionBase, wxObject) wxConnectionBase::wxConnectionBase(wxChar *buffer, int size) - : m_connected(TRUE), + : m_connected(true), m_buffer(buffer), m_buffersize(size), - m_deletebufferwhendone(FALSE) + m_deletebufferwhendone(false) { if ( buffer == (wxChar *)NULL ) { // behave like next constructor m_buffersize = 0; - m_deletebufferwhendone = TRUE; + m_deletebufferwhendone = true; } } wxConnectionBase::wxConnectionBase() - : m_connected(TRUE), + : m_connected(true), m_buffer(NULL), m_buffersize(0), - m_deletebufferwhendone(TRUE) + m_deletebufferwhendone(true) { } @@ -55,7 +55,7 @@ wxConnectionBase::wxConnectionBase(wxConnectionBase& copy) : m_connected(copy.m_connected), m_buffer(copy.m_buffer), m_buffersize(copy.m_buffersize), - m_deletebufferwhendone(FALSE) + m_deletebufferwhendone(false) { // copy constructor would require ref-counted pointer to buffer