--- ibx/trunk/runtime/IB.pas 2000/07/31 16:43:00 4 +++ ibx/trunk/runtime/IB.pas 2011/02/18 16:26:16 5 @@ -28,10 +28,17 @@ unit IB; +{$Mode Delphi} + interface uses - Windows, SysUtils, Classes, IBHeader, IBExternals, IBUtils, DB, IBXConst; +{$IFDEF LINUX } + unix, +{$ELSE} + Windows, +{$ENDIF} + SysUtils, Classes, IBExternals, IBUtils, DB, IBXConst; type TTraceFlag = (tfQPrepare, tfQExecute, tfQFetch, tfError, tfStmt, tfConnect, @@ -154,7 +161,25 @@ type ibxeStartParamsError, ibxeOutputParsingError, ibxeUseSpecificProcedures, - ibxeSQLMonitorAlreadyPresent + ibxeSQLMonitorAlreadyPresent, + ibxeCantPrintValue, + ibxeEOFReached, + ibxeEOFInComment, + ibxeEOFInString, + ibxeParamNameExpected, + ibxeSuccess, + ibxeDelphiException, + ibxeNoOptionsSet, + ibxeNoDestinationDirectory, + ibxeNosourceDirectory, + ibxeNoUninstallFile, + ibxeOptionNeedsClient, + ibxeOptionNeedsServer, + ibxeInvalidOption, + ibxeInvalidOnErrorResult, + ibxeInvalidOnStatusResult, + ibxeDPBConstantUnknownEx, + ibxeTPBConstantUnknownEx ); TStatusVector = array[0..19] of ISC_STATUS; @@ -162,8 +187,8 @@ type const - IBPalette1 = 'InterBase'; {do not localize} - IBPalette2 = 'InterBase Admin'; {do not localize} + IBPalette1 = 'Firebird'; {do not localize} + IBPalette2 = 'Firebird Admin'; {do not localize} IBLocalBufferLength = 512; IBBigLocalBufferLength = IBLocalBufferLength * 2; @@ -267,7 +292,25 @@ const SStartParamsError, SOutputParsingError, SUseSpecificProcedures, - SSQLMonitorAlreadyPresent + SSQLMonitorAlreadyPresent, + SCantPrintValue, + SEOFReached, + SEOFInComment, + SEOFInString, + SParamNameExpected, + SSuccess, + SDelphiException, + SNoOptionsSet, + SNoDestinationDirectory, + SNosourceDirectory, + SNoUninstallFile, + SOptionNeedsClient, + SOptionNeedsServer, + SInvalidOption, + SInvalidOnErrorResult, + SInvalidOnStatusResult, + SDPBConstantUnknownEx, + STPBConstantUnknownEx ); var @@ -337,7 +380,7 @@ begin isc_sql_interprete(sqlcode, local_buffer, IBLocalBufferLength); if (ShowSQLCode in IBDataBaseErrorMessages) then usr_msg := usr_msg + CRLF; - usr_msg := usr_msg + string(local_buffer); + usr_msg := usr_msg + strpas(local_buffer); end; if (ShowIBMessage in IBDataBaseErrorMessages) then @@ -349,7 +392,7 @@ begin begin if (usr_msg <> '') and (usr_msg[Length(usr_msg)] <> LF) then usr_msg := usr_msg + CRLF; - usr_msg := usr_msg + string(local_buffer); + usr_msg := usr_msg + strpas(local_buffer); end; end; if (usr_msg <> '') and (usr_msg[Length(usr_msg)] = '.') then @@ -458,10 +501,10 @@ end; initialization IsMultiThread := True; - InitializeCriticalSection(IBCS); + InitCriticalSection(IBCS); IBDataBaseErrorMessages := [ShowSQLMessage, ShowIBMessage]; finalization - DeleteCriticalSection(IBCS); + DoneCriticalSection(IBCS); end.