* linux fixes

This commit is contained in:
peter 1999-03-23 16:16:36 +00:00
parent f62a9a4d77
commit ef82a62743
7 changed files with 96 additions and 53 deletions

View File

@ -15,11 +15,17 @@
**********************************************************************}
program FP;
{$ifndef LINUX}
{$ifndef FV20}
{$define VESA}
{$endif}
{$endif}
uses
{$ifdef IDEHeapTrc}
HeapTrc,
{$endif IDEHeapTrc}
Dos,
Dos,Objects,
BrowCol,
WViews,
FPIDE,
@ -39,7 +45,7 @@ procedure ProcessParams(BeforeINI: boolean);
and (Param[1] in ['-','/']); { <- but still accept dos switch char, eg. '/' }
end;
var I: integer;
var I: Sw_integer;
Param: string;
begin
for I:=1 to ParamCount do
@ -80,7 +86,7 @@ BEGIN
ProcessParams(true);
{$ifndef FV20}
{$ifdef VESA}
InitVESAScreenModes;
{$endif}
InitRedir;
@ -139,7 +145,10 @@ BEGIN
END.
{
$Log$
Revision 1.19 1999-03-23 15:11:26 peter
Revision 1.20 1999-03-23 16:16:36 peter
* linux fixes
Revision 1.19 1999/03/23 15:11:26 peter
* desktop saving things
* vesa mode
* preferences dialog

View File

@ -17,6 +17,14 @@ unit FPCompile;
interface
{ don't redir under linux, because all stdout (also from the ide!) will
then be redired (PFV) }
{$ifndef debug}
{$ifndef linux}
{$define redircompiler}
{$endif}
{$endif}
{ $define VERBOSETXT}
uses
@ -94,7 +102,9 @@ uses
App,Commands,
CompHook,
WEditor,
{$ifdef redircompiler}
FPRedir,
{$endif}
FPConst,FPVars,FPUtils,FPIntf,FPSwitch;
const
@ -524,13 +534,10 @@ begin
do_stop:=CompilerStop;
do_comment:=CompilerComment;
{$ifndef debug}
{ this avoids all flickers
and allows to get assembler and linker messages
but also forbids to use GDB inside !! }
{$ifdef redircompiler}
ChangeRedirOut('fp$$$.out',false);
ChangeRedirError('fp$$$.err',false);
{$endif ndef debug}
{$endif}
{$ifdef TEMPHEAP}
split_heap;
switch_to_temp_heap;
@ -539,10 +546,10 @@ begin
{$ifdef TEMPHEAP}
switch_to_base_heap;
{$endif TEMPHEAP}
{$ifdef go32v2}
{$ifdef redircompiler}
RestoreRedirOut;
RestoreRedirError;
{$endif def go32v2}
{$endif}
{ endcompilation returns true if the messagewindow should be removed }
if CompilerMessageWindow^.EndCompilation then
@ -749,13 +756,10 @@ begin
do_stop:=CompilerStop;
do_comment:=CompilerComment;
{$ifndef debug}
{ this avoids all flickers
and allows to get assembler and linker messages
but also forbids to use GDB inside !! }
{$ifdef redircompiler}
ChangeRedirOut('fp$$$.out',false);
ChangeRedirError('fp$$$.err',false);
{$endif ndef debug}
{$endif}
{$ifdef TEMPHEAP}
split_heap;
switch_to_temp_heap;
@ -764,10 +768,10 @@ begin
{$ifdef TEMPHEAP}
switch_to_base_heap;
{$endif TEMPHEAP}
{$ifdef go32v2}
{$ifdef redircompiler}
RestoreRedirOut;
RestoreRedirError;
{$endif def go32v2}
{$endif}
if status.errorCount=0
then CompilationPhase:=cpDone
@ -800,7 +804,10 @@ end;
end.
{
$Log$
Revision 1.19 1999-03-19 16:04:27 peter
Revision 1.20 1999-03-23 16:16:38 peter
* linux fixes
Revision 1.19 1999/03/19 16:04:27 peter
* new compiler dialog
Revision 1.18 1999/03/16 12:38:07 peter

View File

@ -42,30 +42,37 @@ end;
function WriteHistory(F: PResourceFile): boolean;
begin
WriteHistory:=true;
end;
function WriteClipboard(F: PResourceFile): boolean;
begin
WriteClipboard:=true;
end;
function WriteWatches(F: PResourceFile): boolean;
begin
WriteWatches:=true;
end;
function WriteBreakpoints(F: PResourceFile): boolean;
begin
WriteBreakPoints:=true;
end;
function WriteOpenWindows(F: PResourceFile): boolean;
begin
WriteOpenWindows:=true;
end;
function WriteSymbols(F: PResourceFile): boolean;
begin
WriteSymbols:=true;
end;
function LoadDesktop: boolean;
begin
LoadDesktop:=true;
end;
function SaveDesktop: boolean;
@ -93,7 +100,10 @@ end;
END.
{
$Log$
Revision 1.1 1999-03-23 15:11:28 peter
Revision 1.2 1999-03-23 16:16:39 peter
* linux fixes
Revision 1.1 1999/03/23 15:11:28 peter
* desktop saving things
* vesa mode
* preferences dialog

View File

@ -554,12 +554,12 @@ end;*)
type
PVideoModeCollection = ^TVideoModeCollection;
TVideoModeCollection = object(TSortedCollection)
function Compare(Key1, Key2: Pointer): Integer; virtual;
function Compare(Key1, Key2: Pointer): Sw_Integer; virtual;
procedure FreeItem(Item: Pointer); virtual;
end;
function TVideoModeCollection.Compare(Key1, Key2: Pointer): Integer;
var R: integer;
function TVideoModeCollection.Compare(Key1, Key2: Pointer): Sw_Integer;
var R: Sw_integer;
K1: PVideoModeList absolute Key1;
K2: PVideoModeList absolute Key2;
begin
@ -592,13 +592,13 @@ begin
end;
SearchVideoMode:=I;
end;
var R,R2,R3: TRect;
var R,R2: TRect;
D: PCenterDialog;
C: PVideoModeCollection;
VMLB: PVideoModeListBox;
VP: PVideoModeList;
VM: TVideoMode;
RB1,RB2: PPlainRadioButtons;
RB1: PPlainRadioButtons;
CB1,CB2: PPlainCheckBoxes;
CurM: PVideoModeList;
CurIdx: integer;
@ -1065,7 +1065,10 @@ end;
{
$Log$
Revision 1.23 1999-03-23 15:11:33 peter
Revision 1.24 1999-03-23 16:16:40 peter
* linux fixes
Revision 1.23 1999/03/23 15:11:33 peter
* desktop saving things
* vesa mode
* preferences dialog

View File

@ -17,6 +17,12 @@ unit FPViews;
interface
{$ifndef LINUX}
{$ifndef FV20}
{$define VESA}
{$endif}
{$endif}
uses
Dos,Objects,Drivers,Commands,HelpCtx,Views,Menus,Dialogs,App,Gadgets,
ASCIITAB,
@ -307,7 +313,7 @@ function TryToOpenFile(Bounds: PRect; FileName: string; CurX,CurY: sw_integer;tr
function StartEditor(Editor: PCodeEditor; FileName: string): boolean;
{$ifndef FV20}
{$ifdef VESA}
procedure InitVESAScreenModes;
{$endif}
@ -337,7 +343,7 @@ implementation
uses
Video,Strings,Keyboard,Memory,MsgBox,Validate,
Tokens,Version,
{$ifndef FV20}Vesa,{$endif}
{$ifdef VESA}Vesa,{$endif}
FPSwitch,FPSymbol,FPDebug,FPVars,FPUtils,FPCompile,FPHelp;
const
@ -2461,7 +2467,7 @@ begin
GetText:=copy(S,1,MaxLen);
end;
{$ifndef FV20}
{$ifdef VESA}
function VESASetVideoModeProc(const VideoMode: TVideoMode; Params: Longint): Boolean; {$ifndef FPC}far;{$endif}
begin
VESASetMode(Params);
@ -2488,7 +2494,10 @@ end;
END.
{
$Log$
Revision 1.25 1999-03-23 15:11:37 peter
Revision 1.26 1999-03-23 16:16:41 peter
* linux fixes
Revision 1.25 1999/03/23 15:11:37 peter
* desktop saving things
* vesa mode
* preferences dialog

View File

@ -51,8 +51,6 @@ type
TableOfs : longint;
end;
PResourceFile = ^TResourceFile;
PResourceEntry = ^TResourceEntry;
TResourceEntry = object(TObject)
constructor Init(AID, ALangID, AFlags, ADataLen: longint);
@ -93,12 +91,12 @@ type
procedure BuildHeader(var Header : TResourceHeader);
end;
PResourceCollection = ^TResourceCollection;
TResourceCollection = object(TSortedCollection)
function At(Index: Sw_Integer): PResource;
function Compare(Key1, Key2: Pointer): Sw_Integer; virtual;
function SearchResourceByName(const AName: string): PResource;
end;
PResourceCollection = ^TResourceCollection;
TResourceFile = object(TObject)
constructor Init(var RS: TStream; ALoad: boolean);
@ -137,6 +135,7 @@ type
procedure WriteHeader;
procedure WriteResourceTable;
end;
PResourceFile = ^TResourceFile;
PSimpleResourceFile = ^TSimpleResourceFile;
TSimpleResourceFile = object(TResourceFile)
@ -702,7 +701,10 @@ end;
END.
{
$Log$
Revision 1.2 1999-03-23 15:11:40 peter
Revision 1.3 1999-03-23 16:16:43 peter
* linux fixes
Revision 1.2 1999/03/23 15:11:40 peter
* desktop saving things
* vesa mode
* preferences dialog

View File

@ -93,7 +93,7 @@ type
PDlgWindow = ^TDlgWindow;
TDlgWindow = object(TDialog)
constructor Init(var Bounds: TRect; ATitle: TTitleStr; ANumber: Integer);
constructor Init(var Bounds: TRect; ATitle: TTitleStr; ANumber: Sw_Integer);
end;
PAdvancedStatusLine = ^TAdvancedStatusLine;
@ -112,8 +112,8 @@ type
constructor Init(ALink: PDropDownListBox; var Bounds: TRect; ANumCols: Word; AScrollBar: PScrollBar);
procedure HandleEvent(var Event: TEvent); virtual;
procedure SetState(AState: Word; Enable: Boolean); virtual;
procedure SelectItem(Item: Integer); virtual;
function GetText(Item: sw_Integer; MaxLen: Integer): String; virtual;
procedure SelectItem(Item: Sw_Integer); virtual;
function GetText(Item,MaxLen: Sw_Integer): String; virtual;
function GetLocalMenu: PMenu; virtual;
function GetCommandTarget: PView; virtual;
private
@ -126,7 +126,7 @@ type
Text: string;
Focused: sw_integer;
List: PCollection;
constructor Init(var Bounds: TRect; ADropLineCount: integer; AList: PCollection);
constructor Init(var Bounds: TRect; ADropLineCount: Sw_integer; AList: PCollection);
procedure HandleEvent(var Event: TEvent); virtual;
function GetText(Item: pointer; MaxLen: sw_integer): string; virtual;
procedure NewList(AList: PCollection); virtual;
@ -141,7 +141,7 @@ type
function GetPalette: PPalette; virtual;
destructor Done; virtual;
private
DropLineCount: integer;
DropLineCount: Sw_integer;
ListDropped : boolean;
ListBox : PDDHelperLB;
SB : PScrollBar;
@ -179,7 +179,7 @@ procedure SetMenuItemParam(Menu: PMenuItem; Param: string);
function IsSubMenu(P: PMenuItem): boolean;
function IsSeparator(P: PMenuItem): boolean;
function UpdateMenu(M: PMenu): boolean;
function SearchSubMenu(M: PMenu; Index: integer): PMenuItem;
function SearchSubMenu(M: PMenu; Index: Sw_integer): PMenuItem;
procedure AppendMenuItem(M: PMenu; I: PMenuItem);
procedure RemoveMenuItem(Menu: PMenu; I: PMenuItem);
function GetMenuItemBefore(Menu:PMenu; BeforeOf: PMenuItem): PMenuItem;
@ -1071,12 +1071,12 @@ procedure TColorStaticText.Draw;
var
C: word;
Center: Boolean;
I, J, L, P, Y: Integer;
I, J, L, P, Y: Sw_Integer;
B: TDrawBuffer;
S: String;
T: string;
CurS: string;
TildeCount,Po: integer;
TildeCount,Po: Sw_integer;
TempS: string;
begin
if Size.X=0 then Exit;
@ -1156,7 +1156,7 @@ begin
HScrollBar:=AHScrollBar;
end;
constructor TDlgWindow.Init(var Bounds: TRect; ATitle: TTitleStr; ANumber: Integer);
constructor TDlgWindow.Init(var Bounds: TRect; ATitle: TTitleStr; ANumber: Sw_Integer);
begin
inherited Init(Bounds,ATitle);
Number:=ANumber;
@ -1338,9 +1338,9 @@ begin
UpdateMenu:=IsEnabled;
end;
function SearchSubMenu(M: PMenu; Index: integer): PMenuItem;
function SearchSubMenu(M: PMenu; Index: Sw_integer): PMenuItem;
var P,C: PMenuItem;
Count: integer;
Count: Sw_integer;
begin
P:=nil; Count:=-1;
if M<>nil then C:=M^.Items else C:=nil;
@ -1419,8 +1419,8 @@ end;
procedure InsertButtons(ADialog: PDialog);
var R : TRect;
W,H : integer;
X : integer;
W,H : Sw_integer;
X : Sw_integer;
X1,X2: Sw_integer;
begin
with ADialog^ do
@ -1455,7 +1455,7 @@ end;
procedure ShowMessage(Msg: string);
var R: TRect;
Width: integer;
Width: Sw_integer;
begin
Width:=length(Msg)+4*2;
if Width<(Desktop^.Size.X div 2) then Width:=(Desktop^.Size.X div 2);
@ -1499,7 +1499,7 @@ begin
Link^.DropList(false);}
end;
function TDDHelperLB.GetText(Item: sw_Integer; MaxLen: Integer): String;
function TDDHelperLB.GetText(Item,MaxLen: Sw_Integer): String;
var P: pointer;
S: string;
begin
@ -1681,14 +1681,14 @@ begin
end;
end;
procedure TDDHelperLB.SelectItem(Item: Integer);
procedure TDDHelperLB.SelectItem(Item: Sw_Integer);
begin
inherited SelectItem(Item);
Link^.FocusItem(Focused);
Link^.DropList(false);
end;
constructor TDropDownListBox.Init(var Bounds: TRect; ADropLineCount: integer; AList: PCollection);
constructor TDropDownListBox.Init(var Bounds: TRect; ADropLineCount: Sw_integer; AList: PCollection);
begin
inherited Init(Bounds);
Options:=Options or (ofSelectable);
@ -1749,7 +1749,7 @@ begin
inherited HandleEvent(Event);
end;
function TDropDownListBox.GetText(Item: pointer; MaxLen: integer): string;
function TDropDownListBox.GetText(Item: pointer; MaxLen: Sw_integer): string;
var S: string;
begin
S:=GetStr(Item);
@ -1935,7 +1935,10 @@ end;
END.
{
$Log$
Revision 1.4 1999-03-23 15:11:42 peter
Revision 1.5 1999-03-23 16:16:44 peter
* linux fixes
Revision 1.4 1999/03/23 15:11:42 peter
* desktop saving things
* vesa mode
* preferences dialog