mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-02 16:39:36 +01:00
+ Symbian rtl skeleton by Felipe Monteiro de Carvalho
git-svn-id: trunk@6360 -
This commit is contained in:
parent
04819280cc
commit
a2127504a0
6
.gitattributes
vendored
6
.gitattributes
vendored
@ -5208,6 +5208,12 @@ rtl/sparc/strings.inc svneol=native#text/plain
|
||||
rtl/sparc/stringss.inc svneol=native#text/plain
|
||||
rtl/symbian/Makefile svneol=native#text/plain
|
||||
rtl/symbian/Makefile.fpc svneol=native#text/plain
|
||||
rtl/symbian/sysdir.inc svneol=native#text/plain
|
||||
rtl/symbian/sysfile.inc svneol=native#text/plain
|
||||
rtl/symbian/sysheap.inc svneol=native#text/plain
|
||||
rtl/symbian/sysos.inc svneol=native#text/plain
|
||||
rtl/symbian/system.pp svneol=native#text/plain
|
||||
rtl/symbian/systhrd.inc svneol=native#text/plain
|
||||
rtl/ucmaps/8859-1.txt svneol=native#text/plain
|
||||
rtl/ucmaps/8859-10.txt svneol=native#text/plain
|
||||
rtl/ucmaps/8859-13.txt svneol=native#text/plain
|
||||
|
||||
38
rtl/symbian/sysdir.inc
Normal file
38
rtl/symbian/sysdir.inc
Normal file
@ -0,0 +1,38 @@
|
||||
{
|
||||
This file is part of the Free Pascal run time library.
|
||||
Copyright (c) 2007 by contributors of the Free Pascal Compiler
|
||||
|
||||
Directory functions
|
||||
|
||||
See the file COPYING.FPC, included in this distribution,
|
||||
for details about the copyright.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
**********************************************************************}
|
||||
|
||||
{*****************************************************************************
|
||||
Directory Handling
|
||||
*****************************************************************************}
|
||||
|
||||
procedure mkdir(const s:string);[IOCHECK];
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure rmdir(const s:string);[IOCHECK];
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure chdir(const s:string);[IOCHECK];
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure GetDir (DriveNr: byte; var Dir: ShortString);
|
||||
begin
|
||||
|
||||
end;
|
||||
91
rtl/symbian/sysfile.inc
Normal file
91
rtl/symbian/sysfile.inc
Normal file
@ -0,0 +1,91 @@
|
||||
{
|
||||
This file is part of the Free Pascal run time library.
|
||||
Copyright (c) 2007 by contributors of the Free Pascal Compiler
|
||||
|
||||
Low level file functions
|
||||
|
||||
See the file COPYING.FPC, included in this distribution,
|
||||
for details about the copyright.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
**********************************************************************}
|
||||
|
||||
{*****************************************************************************
|
||||
Low Level File Routines
|
||||
*****************************************************************************}
|
||||
|
||||
function do_isdevice(handle:thandle):boolean;
|
||||
begin
|
||||
//do_isdevice:=(handle = StdInputHandle) or (handle = StdOutputHandle) or (handle = StdErrorHandle);
|
||||
end;
|
||||
|
||||
|
||||
procedure do_close(h : thandle);
|
||||
begin
|
||||
if do_isdevice(h) then exit;
|
||||
|
||||
// CloseHandle(h);
|
||||
end;
|
||||
|
||||
|
||||
procedure do_erase(p : pchar);
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
|
||||
procedure do_rename(p1,p2 : pchar);
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
|
||||
function do_write(h:thandle;addr:pointer;len : longint) : longint;
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
|
||||
function do_read(h:thandle;addr:pointer;len : longint) : longint;
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
|
||||
function do_filepos(handle : thandle) : Int64;
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
|
||||
procedure do_seek(handle:thandle;pos : Int64);
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
|
||||
function do_seekend(handle:thandle):Int64;
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
|
||||
function do_filesize(handle : thandle) : Int64;
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
|
||||
procedure do_truncate (handle:thandle;pos:Int64);
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
|
||||
procedure do_open(var f;p:pchar;flags:longint);
|
||||
begin
|
||||
|
||||
end;
|
||||
31
rtl/symbian/sysheap.inc
Normal file
31
rtl/symbian/sysheap.inc
Normal file
@ -0,0 +1,31 @@
|
||||
{
|
||||
This file is part of the Free Pascal run time library.
|
||||
Copyright (c) 2007 by contributors of the Free Pascal Compiler
|
||||
|
||||
Basic heap handling
|
||||
|
||||
See the file COPYING.FPC, included in this distribution,
|
||||
for details about the copyright.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
**********************************************************************}
|
||||
|
||||
{*****************************************************************************
|
||||
OS Memory allocation / deallocation
|
||||
****************************************************************************}
|
||||
|
||||
|
||||
function SysOSAlloc(size: ptrint): pointer;
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
{$define HAS_SYSOSFREE}
|
||||
|
||||
procedure SysOSFree(p: pointer; size: ptrint);
|
||||
begin
|
||||
|
||||
end;
|
||||
16
rtl/symbian/sysos.inc
Normal file
16
rtl/symbian/sysos.inc
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
This file is part of the Free Pascal run time library.
|
||||
Copyright (c) 2007 by contributors of the Free Pascal Compiler
|
||||
|
||||
This file implements all the base types and limits required
|
||||
for a minimal POSIX compliant subset required to port the compiler
|
||||
to a new OS.
|
||||
|
||||
See the file COPYING.FPC, included in this distribution,
|
||||
for details about the copyright.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
**********************************************************************}
|
||||
196
rtl/symbian/system.pp
Normal file
196
rtl/symbian/system.pp
Normal file
@ -0,0 +1,196 @@
|
||||
{
|
||||
This file is part of the Free Pascal run time library.
|
||||
Copyright (c) 2007 by contributors of the Free Pascal Compiler
|
||||
|
||||
Pascal system unit for the Symbian OS
|
||||
|
||||
See the file COPYING.FPC, included in this distribution,
|
||||
for details about the copyright.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
**********************************************************************}
|
||||
unit System;
|
||||
|
||||
interface
|
||||
|
||||
{$ifdef SYSTEMDEBUG}
|
||||
{$define SYSTEMEXCEPTIONDEBUG}
|
||||
{$endif SYSTEMDEBUG}
|
||||
|
||||
{$ifdef cpui386}
|
||||
{$define Set_i386_Exception_handler}
|
||||
{$endif cpui386}
|
||||
|
||||
{$define DISABLE_NO_THREAD_MANAGER}
|
||||
|
||||
{ include system-independent routine headers }
|
||||
{$I systemh.inc}
|
||||
|
||||
const
|
||||
LineEnding = #13#10;
|
||||
LFNSupport = true;
|
||||
DirectorySeparator = '\';
|
||||
DriveSeparator = ':';
|
||||
PathSeparator = ';';
|
||||
{ FileNameCaseSensitive is defined separately below }
|
||||
maxExitCode = 65535;
|
||||
MaxPathLen = 260;
|
||||
|
||||
type
|
||||
PEXCEPTION_FRAME = ^TEXCEPTION_FRAME;
|
||||
TEXCEPTION_FRAME = record
|
||||
next : PEXCEPTION_FRAME;
|
||||
handler : pointer;
|
||||
end;
|
||||
|
||||
const
|
||||
{ Default filehandles }
|
||||
UnusedHandle : THandle = -1;
|
||||
StdInputHandle : THandle = 0;
|
||||
StdOutputHandle : THandle = 0;
|
||||
StdErrorHandle : THandle = 0;
|
||||
|
||||
FileNameCaseSensitive : boolean = true;
|
||||
CtrlZMarksEOF: boolean = true; (* #26 not considered as end of file *)
|
||||
|
||||
sLineBreak = LineEnding;
|
||||
DefaultTextLineBreakStyle : TTextLineBreakStyle = tlbsCRLF;
|
||||
|
||||
{ Thread count for DLL }
|
||||
Thread_count : longint = 0;
|
||||
System_exception_frame : PEXCEPTION_FRAME =nil;
|
||||
|
||||
type
|
||||
TStartupInfo=packed record
|
||||
cb : longint;
|
||||
lpReserved : Pointer;
|
||||
lpDesktop : Pointer;
|
||||
lpTitle : Pointer;
|
||||
dwX : longint;
|
||||
dwY : longint;
|
||||
dwXSize : longint;
|
||||
dwYSize : longint;
|
||||
dwXCountChars : longint;
|
||||
dwYCountChars : longint;
|
||||
dwFillAttribute : longint;
|
||||
dwFlags : longint;
|
||||
wShowWindow : Word;
|
||||
cbReserved2 : Word;
|
||||
lpReserved2 : Pointer;
|
||||
hStdInput : longint;
|
||||
hStdOutput : longint;
|
||||
hStdError : longint;
|
||||
end;
|
||||
|
||||
var
|
||||
{ C compatible arguments }
|
||||
argc : longint;
|
||||
argv : ppchar;
|
||||
{ Win32 Info }
|
||||
startupinfo : tstartupinfo;
|
||||
hprevinst,
|
||||
MainInstance,
|
||||
cmdshow : longint;
|
||||
DLLreason,DLLparam:longint;
|
||||
type
|
||||
TDLL_Process_Entry_Hook = function (dllparam : longint) : longbool;
|
||||
TDLL_Entry_Hook = procedure (dllparam : longint);
|
||||
|
||||
const
|
||||
Dll_Process_Attach_Hook : TDLL_Process_Entry_Hook = nil;
|
||||
Dll_Process_Detach_Hook : TDLL_Entry_Hook = nil;
|
||||
Dll_Thread_Attach_Hook : TDLL_Entry_Hook = nil;
|
||||
Dll_Thread_Detach_Hook : TDLL_Entry_Hook = nil;
|
||||
|
||||
implementation
|
||||
|
||||
var
|
||||
SysInstance: Longint; public name '_FPC_SysInstance';
|
||||
|
||||
{ include system independent routines }
|
||||
{$I system.inc}
|
||||
|
||||
{*****************************************************************************
|
||||
Parameter Handling
|
||||
*****************************************************************************}
|
||||
|
||||
var
|
||||
ModuleName : array[0..255] of char;
|
||||
|
||||
function GetCommandFile:pchar;
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
|
||||
procedure setup_arguments;
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
|
||||
function paramcount : longint;
|
||||
begin
|
||||
paramcount := argc - 1;
|
||||
end;
|
||||
|
||||
function paramstr(l : longint) : string;
|
||||
begin
|
||||
if (l>=0) and (l<argc) then
|
||||
paramstr:=strpas(argv[l])
|
||||
else
|
||||
paramstr:='';
|
||||
end;
|
||||
|
||||
|
||||
procedure randomize;
|
||||
begin
|
||||
// randseed:=GetTickCount;
|
||||
end;
|
||||
|
||||
{*****************************************************************************
|
||||
Exit code and Entry Point
|
||||
*****************************************************************************}
|
||||
|
||||
procedure PascalMain; stdcall; external name 'PASCALMAIN';
|
||||
procedure fpc_do_exit; stdcall; external name 'FPC_DO_EXIT';
|
||||
|
||||
procedure SysInitStdIO;
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure _E32Startup; stdcall; public name '_E32Startup';
|
||||
begin
|
||||
IsLibrary:=false;
|
||||
|
||||
PascalMain;
|
||||
|
||||
{ if we pass here there was no error }
|
||||
fpc_do_exit;
|
||||
end;
|
||||
|
||||
{*****************************************************************************
|
||||
Process routines
|
||||
*****************************************************************************}
|
||||
|
||||
(* ProcessID cached to avoid repeated calls to GetCurrentProcess. *)
|
||||
|
||||
var
|
||||
ProcessID: SizeUInt;
|
||||
|
||||
function GetProcessID: SizeUInt;
|
||||
begin
|
||||
GetProcessID := ProcessID;
|
||||
end;
|
||||
|
||||
function CheckInitialStkLen(stklen : SizeUInt) : SizeUInt;
|
||||
begin
|
||||
result := stklen;
|
||||
end;
|
||||
|
||||
begin
|
||||
end.
|
||||
14
rtl/symbian/systhrd.inc
Normal file
14
rtl/symbian/systhrd.inc
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
This file is part of the Free Pascal run time library.
|
||||
Copyright (c) 2007 by contributors of the Free Pascal Compiler
|
||||
|
||||
Threading support implementation
|
||||
|
||||
See the file COPYING.FPC, included in this distribution,
|
||||
for details about the copyright.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
**********************************************************************}
|
||||
Loading…
Reference in New Issue
Block a user