~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to fpcsrc/rtl/win32/sysinitpas.pp

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{
 
2
    This file is part of the Free Pascal run time library.
 
3
    Copyright (c) 1999-2006 by Florian Klaempfl and Pavel Ozerski
 
4
    member of the Free Pascal development team.
 
5
 
 
6
    Win32 pascal only startup code
 
7
 
 
8
    See the file COPYING.FPC, included in this distribution,
 
9
    for details about the copyright.
 
10
 
 
11
    This program is distributed in the hope that it will be useful,
 
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
14
 
 
15
 **********************************************************************}
 
16
unit sysinitpas;
 
17
 
 
18
  interface
 
19
 
 
20
  implementation
 
21
 
 
22
    var
 
23
      SysInstance : Longint;external name '_FPC_SysInstance';
 
24
 
 
25
    procedure EXE_Entry; external name '_FPC_EXE_Entry';
 
26
    function DLL_entry : longbool; external name '_FPC_DLL_Entry';
 
27
 
 
28
    const
 
29
      STD_INPUT_HANDLE = dword(-10);
 
30
 
 
31
    function GetStdHandle(nStdHandle:DWORD) : THandle; stdcall; external 'kernel32' name 'GetStdHandle';
 
32
    function GetConsoleMode(hConsoleHandle: THandle; var lpMode: DWORD): Boolean; stdcall; external 'kernel32' name 'GetConsoleMode';
 
33
 
 
34
    procedure _FPC_mainCRTStartup;stdcall;public name '_mainCRTStartup';
 
35
    begin
 
36
      IsConsole:=true;
 
37
      { do it like it is necessary for the startup code linking against cygwin }
 
38
      GetConsoleMode(GetStdHandle((Std_Input_Handle)),StartupConsoleMode);
 
39
      Exe_entry;
 
40
    end;
 
41
 
 
42
 
 
43
    procedure _FPC_WinMainCRTStartup;stdcall;public name '_WinMainCRTStartup';
 
44
    begin
 
45
      IsConsole:=false;
 
46
      Exe_entry;
 
47
    end;
 
48
 
 
49
 
 
50
    procedure _FPC_DLLMainCRTStartup(_hinstance,_dllreason,_dllparam:longint);stdcall;public name '_DLLMainCRTStartup';
 
51
    begin
 
52
      IsConsole:=true;
 
53
      sysinstance:=_hinstance;
 
54
      dllreason:=_dllreason;
 
55
      dllparam:=_dllparam;
 
56
      DLL_Entry;
 
57
    end;
 
58
 
 
59
 
 
60
    procedure _FPC_DLLWinMainCRTStartup(_hinstance,_dllreason,_dllparam:longint);stdcall;public name '_DLLWinMainCRTStartup';
 
61
    begin
 
62
      IsConsole:=false;
 
63
      sysinstance:=_hinstance;
 
64
      dllreason:=_dllreason;
 
65
      dllparam:=_dllparam;
 
66
      DLL_Entry;
 
67
    end;
 
68
 
 
69
    procedure asm_exit;stdcall;public name 'asm_exit';
 
70
      begin
 
71
      end;
 
72
 
 
73
end.