mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 14:09:17 +02:00
* make compiler compilable with 2.4.4 rtl
git-svn-id: trunk@19269 -
This commit is contained in:
parent
39d8ee1136
commit
a6d01c09aa
@ -13,9 +13,6 @@
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
**********************************************************************}
|
||||
|
||||
{ this unit is included temporarily for 2.2 bootstrapping and can be
|
||||
removed after the next release after 2.2.2 }
|
||||
{$mode objfpc}
|
||||
unit ccharset;
|
||||
|
||||
@ -52,11 +49,15 @@ unit ccharset;
|
||||
tcp2unicode = class(tcsconvert)
|
||||
end;
|
||||
|
||||
const
|
||||
DefaultSystemCodePage = 437;
|
||||
|
||||
function loadunicodemapping(const cpname,f : string; cp :word) : punicodemap;
|
||||
procedure registermapping(p : punicodemap);
|
||||
function getmap(const s : string) : punicodemap;
|
||||
function getmap(cp : word) : punicodemap;
|
||||
function mappingavailable(const s : string) : boolean;
|
||||
function mappingavailable(cp :word) : boolean;
|
||||
function getunicode(c : char;p : punicodemap) : tunicodechar;
|
||||
function getascii(c : tunicodechar;p : punicodemap) : string;
|
||||
|
||||
@ -84,9 +85,9 @@ unit ccharset;
|
||||
datasize:=256;
|
||||
getmem(data,sizeof(tunicodecharmapping)*datasize);
|
||||
assign(t,f);
|
||||
{$push}{$I-}
|
||||
{$I-}
|
||||
reset(t);
|
||||
{$pop}
|
||||
{$I+}
|
||||
if ioresult<>0 then
|
||||
begin
|
||||
freemem(data,sizeof(tunicodecharmapping)*datasize);
|
||||
@ -202,7 +203,7 @@ unit ccharset;
|
||||
hp:=hp^.next;
|
||||
end;
|
||||
getmap:=nil;
|
||||
end;
|
||||
end;////////
|
||||
|
||||
function getmap(cp : word) : punicodemap;
|
||||
|
||||
@ -240,6 +241,12 @@ unit ccharset;
|
||||
mappingavailable:=getmap(s)<>nil;
|
||||
end;
|
||||
|
||||
function mappingavailable(cp : word) : boolean;
|
||||
|
||||
begin
|
||||
mappingavailable:=getmap(cp)<>nil;
|
||||
end;
|
||||
|
||||
function getunicode(c : char;p : punicodemap) : tunicodechar;
|
||||
|
||||
begin
|
||||
@ -255,8 +262,8 @@ unit ccharset;
|
||||
i : longint;
|
||||
|
||||
begin
|
||||
{ at least map to space }
|
||||
getascii:=#32;
|
||||
{ at least map to '?' }
|
||||
getascii:=#63;
|
||||
for i:=0 to p^.lastchar do
|
||||
if p^.map[i].unicode=c then
|
||||
begin
|
||||
|
@ -6,7 +6,7 @@ unit cp1251;
|
||||
implementation
|
||||
|
||||
uses
|
||||
{$ifdef VER2_2}ccharset{$else VER2_2}charset{$endif VER2_2};
|
||||
{$ifdef VER2_4}ccharset{$else VER2_4}charset{$endif VER2_4};
|
||||
|
||||
const
|
||||
map : array[0..255] of tunicodecharmapping = (
|
||||
|
@ -6,7 +6,7 @@ unit CP1252;
|
||||
implementation
|
||||
|
||||
uses
|
||||
charset;
|
||||
{$ifdef VER2_4}ccharset{$else VER2_4}charset{$endif VER2_4};
|
||||
|
||||
const
|
||||
map : array[0..255] of tunicodecharmapping = (
|
||||
|
@ -6,7 +6,7 @@ unit cp437;
|
||||
implementation
|
||||
|
||||
uses
|
||||
{$ifdef VER2_2}ccharset{$else VER2_2}charset{$endif VER2_2};
|
||||
{$ifdef VER2_4}ccharset{$else VER2_4}charset{$endif VER2_4};
|
||||
|
||||
const
|
||||
map : array[0..255] of tunicodecharmapping = (
|
||||
|
@ -6,7 +6,7 @@ unit cp850;
|
||||
implementation
|
||||
|
||||
uses
|
||||
{$ifdef VER2_2}ccharset{$else VER2_2}charset{$endif VER2_2};
|
||||
{$ifdef VER2_4}ccharset{$else VER2_4}charset{$endif VER2_4};
|
||||
|
||||
const
|
||||
map : array[0..255] of tunicodecharmapping = (
|
||||
|
@ -6,7 +6,7 @@ unit cp866;
|
||||
implementation
|
||||
|
||||
uses
|
||||
{$ifdef VER2_2}ccharset{$else VER2_2}charset{$endif VER2_2};
|
||||
{$ifdef VER2_4}ccharset{$else VER2_4}charset{$endif VER2_4};
|
||||
|
||||
const
|
||||
map : array[0..255] of tunicodecharmapping = (
|
||||
|
@ -6,7 +6,7 @@ unit cp8859_1;
|
||||
implementation
|
||||
|
||||
uses
|
||||
{$ifdef VER2_2}ccharset{$else VER2_2}charset{$endif VER2_2};
|
||||
{$ifdef VER2_4}ccharset{$else VER2_4}charset{$endif VER2_4};
|
||||
|
||||
const
|
||||
map : array[0..255] of tunicodecharmapping = (
|
||||
|
@ -6,7 +6,7 @@ unit cp8859_5;
|
||||
implementation
|
||||
|
||||
uses
|
||||
{$ifdef VER2_2}ccharset{$else VER2_2}charset{$endif VER2_2};
|
||||
{$ifdef VER2_4}ccharset{$else VER2_4}charset{$endif VER2_4};
|
||||
|
||||
const
|
||||
map : array[0..255] of tunicodecharmapping = (
|
||||
|
@ -37,7 +37,11 @@ uses
|
||||
symconst,symtype,symdef,symsym,
|
||||
verbose,fmodule,ppu,
|
||||
aasmbase,aasmtai,aasmdata,
|
||||
aasmcpu,asmutils;
|
||||
aasmcpu,
|
||||
{$if FPC_FULLVERSION<20700}
|
||||
ccharset,
|
||||
{$endif }
|
||||
asmutils;
|
||||
|
||||
Type
|
||||
{ These are used to form a singly-linked list, ordered by hash value }
|
||||
|
@ -78,7 +78,7 @@ implementation
|
||||
|
||||
uses
|
||||
widestr,
|
||||
{$ifdef VER2_2}ccharset{$else VER2_2}charset{$endif VER2_2},
|
||||
{$ifdef VER2_4}ccharset{$else VER2_4}charset{$endif VER2_4},
|
||||
SysUtils,
|
||||
version,
|
||||
cutils,cmsgs,
|
||||
|
@ -268,7 +268,11 @@ implementation
|
||||
symbase,symtable,symtype,symsym,symconst,symdef,defutil,
|
||||
{ This is needed for tcputype }
|
||||
cpuinfo,
|
||||
fmodule;
|
||||
fmodule
|
||||
{$ifdef FPC_FULLVERSION<20700}
|
||||
,ccharset
|
||||
{$endif}
|
||||
;
|
||||
|
||||
var
|
||||
{ dictionaries with the supported directives }
|
||||
|
@ -28,7 +28,7 @@ unit widestr;
|
||||
interface
|
||||
|
||||
uses
|
||||
{$ifdef VER2_2}ccharset{$else VER2_2}charset{$endif VER2_2},globtype;
|
||||
{$ifdef VER2_4}ccharset{$else VER2_4}charset{$endif VER2_4},globtype;
|
||||
|
||||
|
||||
type
|
||||
|
Loading…
Reference in New Issue
Block a user