fpc/compiler/ccharset.pas
pierre 1f20cfe991 Merge of several commits related to enhancements in PPU writing
and more precisely to cross reading/writing fixes.

------------------------------------------------------------------------
r41896 | pierre | 2019-04-18 14:08:03 +0000 (Thu, 18 Apr 2019) | 15 lines

  Integrate patch from bug report 35409.
  Add possibiliy to throw InternalError
  for unhandled case values inside tentryfile,
  But avoid adding dependency on verbose unit
  as this would break ppudump handling of ppu files.

  Add RaiseAssertion virtual method to tentryfile class.
  Call RaiseAssertion in tentryfile methods
  where an internal error is wanted.
  Override RaiseAssertion method in symtype.pas unit
  to call InternalError.
  Add new class tppudumpfile to override RaiseAssertion
  in utils/ppuutils/ppudump.pp unit.


------------------------------------------------------------------------
--- Merging r41896 into '.':
U    compiler/entfile.pas
U    compiler/pcp.pas
U    compiler/symtype.pas
U    compiler/utils/ppuutils/ppudump.pp
--- Recording mergeinfo for merge of r41896 into '.':
 U   .
------------------------------------------------------------------------
r42111 | pierre | 2019-05-20 22:06:57 +0000 (Mon, 20 May 2019) | 1 line

 List TSettings partially and improve generic output
------------------------------------------------------------------------
--- Merging r42111 into '.':
G    compiler/utils/ppuutils/ppudump.pp
--- Recording mergeinfo for merge of r42111 into '.':
 G   .
------------------------------------------------------------------------
r42322 | pierre | 2019-07-03 13:35:05 +0000 (Wed, 03 Jul 2019) | 1 line

 Systematically include fpcdefs.inc at sart of all units used by compiler
------------------------------------------------------------------------
--- Merging r42322 into '.':
U    compiler/aarch64/cpuinfo.pas
U    compiler/arm/cpuinfo.pas
U    compiler/avr/cpuinfo.pas
U    compiler/ccharset.pas
U    compiler/generic/cpuinfo.pas
U    compiler/jvm/cpuinfo.pas
U    compiler/m68k/cpuinfo.pas
U    compiler/macho.pas
U    compiler/machoutils.pas
U    compiler/mips/cpuinfo.pas
G    compiler/pcp.pas
U    compiler/powerpc/cpuinfo.pas
U    compiler/powerpc64/cpuinfo.pas
U    compiler/systems/i_wii.pas
--- Recording mergeinfo for merge of r42322 into '.':
 G   .

------------------------------------------------------------------------
r42323 | pierre | 2019-07-04 15:24:49 +0000 (Thu, 04 Jul 2019) | 7 lines

  * Set ControllerSupport to false for sparc/sparc64 and x86_64 CPUs.
    This boolean must only be set to true if TControllerType is not simply (ct_none)
  * ppu.pas: Increment CurrentPPULongVersion constant as the above modification
    changes the number of fields of the TSettings record that is saved to
    PPU in ST_LOADSETTINGS field. { not mereged }


------------------------------------------------------------------------
--- Merging r42323 into '.':
C    compiler/ppu.pas { not mereged }
U    compiler/sparc/cpuinfo.pas
U    compiler/sparc64/cpuinfo.pas
U    compiler/x86_64/cpuinfo.pas
--- Recording mergeinfo for merge of r42323 into '.':
 G   .

------------------------------------------------------------------------
r42324 | pierre | 2019-07-04 15:25:40 +0000 (Thu, 04 Jul 2019) | 1 line

 Correctly read saved tsettings
------------------------------------------------------------------------
--- Merging r42324 into '.':
C    compiler/utils/ppuutils/ppudump.pp
--- Recording mergeinfo for merge of r42324 into '.':
 G   .
Summary of conflicts:
  Text conflicts: 1
------------------------------------------------------------------------
r42325 | marcus | 2019-07-04 16:49:26 +0000 (Thu, 04 Jul 2019) | 1 line

Fixed ppudump compilation on big endian platforms after r42324
------------------------------------------------------------------------
--- Merging r42325 into '.':
G    compiler/utils/ppuutils/ppudump.pp
--- Recording mergeinfo for merge of r42325 into '.':
 G   .
------------------------------------------------------------------------
r42353 | svenbarth | 2019-07-12 16:25:33 +0000 (Fri, 12 Jul 2019) | 1 line

* write an entry name for the property options
------------------------------------------------------------------------
--- Merging r42353 into '.':
G    compiler/utils/ppuutils/ppudump.pp
--- Recording mergeinfo for merge of r42353 into '.':
 G   .
------------------------------------------------------------------------
r42354 | svenbarth | 2019-07-12 16:25:36 +0000 (Fri, 12 Jul 2019) | 1 line

* write a name for the none property access entry (looks nicer than a "(Nil)" at the start of the line)
------------------------------------------------------------------------
--- Merging r42354 into '.':
G    compiler/utils/ppuutils/ppudump.pp
--- Recording mergeinfo for merge of r42354 into '.':
 G   .
------------------------------------------------------------------------
r42527 | pierre | 2019-07-29 05:33:00 +0000 (Mon, 29 Jul 2019) | 22 lines

  Fix recordtoken writing into ppu files to allow correct
  handling in cross-configuration with different endianess.

  The code has been modified to use the same scheme as the writing of
  the other parts of the ppu, i.e. change_endian filed has been
  added also to tscannerfile class of scanner unit.
  This field is then used to swap values that required endianess
  conversion.

  * scanner.pas: change_endian filed added to tscannerfile class.
    The value of this field is set as the same field in tentryfile class of entfile unit.
    Token read and write methods converted to use change_endian field.

  * ppu.pas: Increase CurrentPPILongVersion

  * utils/ppuutils/ppudump.pp: Remove unneeded FPC_BIG_ENDIAN code
    which was needed because tokens were previously written using a
    different rule.




------------------------------------------------------------------------
--- Merging r42527 into '.':
C    compiler/ppu.pas
U    compiler/scanner.pas
G    compiler/utils/ppuutils/ppudump.pp
--- Recording mergeinfo for merge of r42527 into '.':
 G   .
Summary of conflicts:
  Text conflicts: 1
------------------------------------------------------------------------
r42528 | pierre | 2019-07-29 11:54:27 +0000 (Mon, 29 Jul 2019) | 1 line
Changed paths:
   M /trunk/compiler/scanner.pas

Try to fix bug introduced in previous commit #42527, hopefully fixing bug report 35902
------------------------------------------------------------------------

--- Merging r42528 into '.':
G    compiler/scanner.pas
--- Recording mergeinfo for merge of r42528 into '.':
 G   .------------------------------------------------------------------------
r42530 | pierre | 2019-07-29 16:40:58 +0000 (Mon, 29 Jul 2019) | 8 lines

   Try to fix ppudump for generic/inline.

   * entfile.pas: Differenciate ibsymtableoptions and ibrecsymtableoptions.
   * ppu.pas: Increase ppu unit CurrentPPULongVersion value.
   * utils/ppuutils/ppudump.pp: Add current_symtable_options variable.
     Change readsymtableoptions from procedure to function returning
     the new tsymtableoptions.

------------------------------------------------------------------------
--- Merging r42530 into '.':
G    compiler/entfile.pas
G    compiler/ppu.pas
G    compiler/utils/ppuutils/ppudump.pp
--- Recording mergeinfo for merge of r42530 into '.':
 G   .
------------------------------------------------------------------------
r42583 | pierre | 2019-08-05 09:15:12 +0000 (Mon, 05 Aug 2019) | 1 line

 Reorganize token buffer output to be able to use it for generics and inlined functions
------------------------------------------------------------------------
--- Merging r42583 into '.':
G    compiler/utils/ppuutils/ppudump.pp
--- Recording mergeinfo for merge of r42583 into '.':
 G   .
------------------------------------------------------------------------
r42591 | pierre | 2019-08-06 06:32:52 +0000 (Tue, 06 Aug 2019) | 1 line

 Add mode and optimizer switches names, and check that no unknown switch is set
------------------------------------------------------------------------
--- Merging r42591 into '.':
G    compiler/utils/ppuutils/ppudump.pp
--- Recording mergeinfo for merge of r42591 into '.':
 G   .
------------------------------------------------------------------------
r42596 | pierre | 2019-08-06 21:32:51 +0000 (Tue, 06 Aug 2019) | 1 line

 Fix gettokenbufshortint, as shortint is one byte long, not two
------------------------------------------------------------------------
--- Merging r42596 into '.':
G    compiler/utils/ppuutils/ppudump.pp
--- Recording mergeinfo for merge of r42596 into '.':
 G   .
------------------------------------------------------------------------
r42609 | pierre | 2019-08-09 09:29:50 +0000 (Fri, 09 Aug 2019) | 1 line

 Correct size of asizeint, which is still 4-byte long even when CpuAddrBitSize is 16 as for avr and i8086
------------------------------------------------------------------------
--- Merging r42609 into '.':
G    compiler/utils/ppuutils/ppudump.pp
--- Recording mergeinfo for merge of r42609 into '.':
 G   .
------------------------------------------------------------------------
r42670 | pierre | 2019-08-13 06:20:23 +0000 (Tue, 13 Aug 2019) | 1 line

 Reduce cpu-os dependency on real constant printout by using system.str
------------------------------------------------------------------------
--- Merging r42670 into '.':
G    compiler/utils/ppuutils/ppudump.pp
--- Recording mergeinfo for merge of r42670 into '.':
 G   .
------------------------------------------------------------------------
r42906 | pierre | 2019-09-02 16:00:15 +0000 (Mon, 02 Sep 2019) | 1 line

 Fix problems with big endian systems without 80-bit floating point support
------------------------------------------------------------------------
--- Merging r42906 into '.':
G    compiler/utils/ppuutils/ppudump.pp
--- Recording mergeinfo for merge of r42906 into '.':
 G   .

git-svn-id: branches/fixes_3_2@43387 -
2019-11-04 08:50:42 +00:00

567 lines
22 KiB
ObjectPascal

{
This file is part of the Free Pascal run time library.
Copyright (c) 2000 by Florian Klaempfl
member of the Free Pascal development team.
This unit implements several classes for charset conversions
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.
**********************************************************************}
{$mode objfpc}
unit ccharset;
{$i fpcdefs.inc}
interface
type
tunicodechar = word;
tunicodestring = ^tunicodechar;
tcsconvert = class
// !!!!!!1constructor create;
end;
tunicodecharmappingflag = (umf_noinfo,umf_leadbyte,umf_undefined,
umf_unused);
punicodecharmapping = ^tunicodecharmapping;
tunicodecharmapping = record
unicode : tunicodechar;
flag : tunicodecharmappingflag;
reserved : byte;
end;
punicodemap = ^tunicodemap;
tunicodemap = record
cpname : string[20];
cp : word;
map : punicodecharmapping;
lastchar : longint;
next : punicodemap;
internalmap : boolean;
end;
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;
implementation
var
mappings : punicodemap;
function loadunicodemapping(const cpname,f : string; cp :word) : punicodemap;
var
data : punicodecharmapping;
datasize : longint;
t : text;
s,hs : string;
scanpos,charpos,unicodevalue : longint;
code : word;
flag : tunicodecharmappingflag;
p : punicodemap;
lastchar : longint;
begin
lastchar:=-1;
loadunicodemapping:=nil;
datasize:=256;
getmem(data,sizeof(tunicodecharmapping)*datasize);
assign(t,f);
{$I-}
reset(t);
{$I+}
if ioresult<>0 then
begin
freemem(data,sizeof(tunicodecharmapping)*datasize);
exit;
end;
while not(eof(t)) do
begin
readln(t,s);
if (s[1]='0') and (s[2]='x') then
begin
flag:=umf_unused;
scanpos:=3;
hs:='$';
while s[scanpos] in ['0'..'9','A'..'F','a'..'f'] do
begin
hs:=hs+s[scanpos];
inc(scanpos);
end;
val(hs,charpos,code);
if code<>0 then
begin
freemem(data,sizeof(tunicodecharmapping)*datasize);
close(t);
exit;
end;
while not(s[scanpos] in ['0','#']) do
inc(scanpos);
if s[scanpos]='#' then
begin
{ special char }
unicodevalue:=$ffff;
hs:=copy(s,scanpos,length(s)-scanpos+1);
if hs='#DBCS LEAD BYTE' then
flag:=umf_leadbyte;
end
else
begin
{ C hex prefix }
inc(scanpos,2);
hs:='$';
while s[scanpos] in ['0'..'9','A'..'F','a'..'f'] do
begin
hs:=hs+s[scanpos];
inc(scanpos);
end;
val(hs,unicodevalue,code);
if code<>0 then
begin
freemem(data,sizeof(tunicodecharmapping)*datasize);
close(t);
exit;
end;
if charpos>datasize then
begin
{ allocate 1024 bytes more because }
{ if we need more than 256 entries it's }
{ probably a mbcs with a lot of }
{ entries }
datasize:=charpos+1024;
reallocmem(data,sizeof(tunicodecharmapping)*datasize);
end;
flag:=umf_noinfo;
end;
data[charpos].flag:=flag;
data[charpos].unicode:=unicodevalue;
if charpos>lastchar then
lastchar:=charpos;
end;
end;
close(t);
new(p);
p^.lastchar:=lastchar;
p^.cpname:=cpname;
p^.cp:=cp;
p^.internalmap:=false;
p^.next:=nil;
p^.map:=data;
loadunicodemapping:=p;
end;
procedure registermapping(p : punicodemap);
begin
p^.next:=mappings;
mappings:=p;
end;
function getmap(const s : string) : punicodemap;
var
hp : punicodemap;
const
mapcache : string = '';
mapcachep : punicodemap = nil;
begin
if (mapcache=s) and assigned(mapcachep) and (mapcachep^.cpname=s) then
begin
getmap:=mapcachep;
exit;
end;
hp:=mappings;
while assigned(hp) do
begin
if hp^.cpname=s then
begin
getmap:=hp;
mapcache:=s;
mapcachep:=hp;
exit;
end;
hp:=hp^.next;
end;
getmap:=nil;
end;////////
function getmap(cp : word) : punicodemap;
var
hp : punicodemap;
const
mapcache : word = 0;
mapcachep : punicodemap = nil;
begin
if (mapcache=cp) and assigned(mapcachep) and (mapcachep^.cp=cp) then
begin
getmap:=mapcachep;
exit;
end;
hp:=mappings;
while assigned(hp) do
begin
if hp^.cp=cp then
begin
getmap:=hp;
mapcache:=cp;
mapcachep:=hp;
exit;
end;
hp:=hp^.next;
end;
getmap:=nil;
end;
function mappingavailable(const s : string) : boolean;
begin
mappingavailable:=getmap(s)<>nil;
end;
function mappingavailable(cp : word) : boolean;
begin
mappingavailable:=getmap(cp)<>nil;
end;
function getunicode(c : char;p : punicodemap) : tunicodechar;
begin
if ord(c)<=p^.lastchar then
getunicode:=p^.map[ord(c)].unicode
else
getunicode:=0;
end;
function getascii(c : tunicodechar;p : punicodemap) : string;
var
i : longint;
begin
{ at least map to '?' }
getascii:=#63;
for i:=0 to p^.lastchar do
if p^.map[i].unicode=c then
begin
if i<256 then
getascii:=chr(i)
else
getascii:=chr(i div 256)+chr(i mod 256);
exit;
end;
end;
const
map : array[0..255] of tunicodecharmapping = (
(unicode : 0; flag : umf_noinfo; reserved: 0),
(unicode : 1; flag : umf_noinfo; reserved: 0),
(unicode : 2; flag : umf_noinfo; reserved: 0),
(unicode : 3; flag : umf_noinfo; reserved: 0),
(unicode : 4; flag : umf_noinfo; reserved: 0),
(unicode : 5; flag : umf_noinfo; reserved: 0),
(unicode : 6; flag : umf_noinfo; reserved: 0),
(unicode : 7; flag : umf_noinfo; reserved: 0),
(unicode : 8; flag : umf_noinfo; reserved: 0),
(unicode : 9; flag : umf_noinfo; reserved: 0),
(unicode : 10; flag : umf_noinfo; reserved: 0),
(unicode : 11; flag : umf_noinfo; reserved: 0),
(unicode : 12; flag : umf_noinfo; reserved: 0),
(unicode : 13; flag : umf_noinfo; reserved: 0),
(unicode : 14; flag : umf_noinfo; reserved: 0),
(unicode : 15; flag : umf_noinfo; reserved: 0),
(unicode : 16; flag : umf_noinfo; reserved: 0),
(unicode : 17; flag : umf_noinfo; reserved: 0),
(unicode : 18; flag : umf_noinfo; reserved: 0),
(unicode : 19; flag : umf_noinfo; reserved: 0),
(unicode : 20; flag : umf_noinfo; reserved: 0),
(unicode : 21; flag : umf_noinfo; reserved: 0),
(unicode : 22; flag : umf_noinfo; reserved: 0),
(unicode : 23; flag : umf_noinfo; reserved: 0),
(unicode : 24; flag : umf_noinfo; reserved: 0),
(unicode : 25; flag : umf_noinfo; reserved: 0),
(unicode : 26; flag : umf_noinfo; reserved: 0),
(unicode : 27; flag : umf_noinfo; reserved: 0),
(unicode : 28; flag : umf_noinfo; reserved: 0),
(unicode : 29; flag : umf_noinfo; reserved: 0),
(unicode : 30; flag : umf_noinfo; reserved: 0),
(unicode : 31; flag : umf_noinfo; reserved: 0),
(unicode : 32; flag : umf_noinfo; reserved: 0),
(unicode : 33; flag : umf_noinfo; reserved: 0),
(unicode : 34; flag : umf_noinfo; reserved: 0),
(unicode : 35; flag : umf_noinfo; reserved: 0),
(unicode : 36; flag : umf_noinfo; reserved: 0),
(unicode : 37; flag : umf_noinfo; reserved: 0),
(unicode : 38; flag : umf_noinfo; reserved: 0),
(unicode : 39; flag : umf_noinfo; reserved: 0),
(unicode : 40; flag : umf_noinfo; reserved: 0),
(unicode : 41; flag : umf_noinfo; reserved: 0),
(unicode : 42; flag : umf_noinfo; reserved: 0),
(unicode : 43; flag : umf_noinfo; reserved: 0),
(unicode : 44; flag : umf_noinfo; reserved: 0),
(unicode : 45; flag : umf_noinfo; reserved: 0),
(unicode : 46; flag : umf_noinfo; reserved: 0),
(unicode : 47; flag : umf_noinfo; reserved: 0),
(unicode : 48; flag : umf_noinfo; reserved: 0),
(unicode : 49; flag : umf_noinfo; reserved: 0),
(unicode : 50; flag : umf_noinfo; reserved: 0),
(unicode : 51; flag : umf_noinfo; reserved: 0),
(unicode : 52; flag : umf_noinfo; reserved: 0),
(unicode : 53; flag : umf_noinfo; reserved: 0),
(unicode : 54; flag : umf_noinfo; reserved: 0),
(unicode : 55; flag : umf_noinfo; reserved: 0),
(unicode : 56; flag : umf_noinfo; reserved: 0),
(unicode : 57; flag : umf_noinfo; reserved: 0),
(unicode : 58; flag : umf_noinfo; reserved: 0),
(unicode : 59; flag : umf_noinfo; reserved: 0),
(unicode : 60; flag : umf_noinfo; reserved: 0),
(unicode : 61; flag : umf_noinfo; reserved: 0),
(unicode : 62; flag : umf_noinfo; reserved: 0),
(unicode : 63; flag : umf_noinfo; reserved: 0),
(unicode : 64; flag : umf_noinfo; reserved: 0),
(unicode : 65; flag : umf_noinfo; reserved: 0),
(unicode : 66; flag : umf_noinfo; reserved: 0),
(unicode : 67; flag : umf_noinfo; reserved: 0),
(unicode : 68; flag : umf_noinfo; reserved: 0),
(unicode : 69; flag : umf_noinfo; reserved: 0),
(unicode : 70; flag : umf_noinfo; reserved: 0),
(unicode : 71; flag : umf_noinfo; reserved: 0),
(unicode : 72; flag : umf_noinfo; reserved: 0),
(unicode : 73; flag : umf_noinfo; reserved: 0),
(unicode : 74; flag : umf_noinfo; reserved: 0),
(unicode : 75; flag : umf_noinfo; reserved: 0),
(unicode : 76; flag : umf_noinfo; reserved: 0),
(unicode : 77; flag : umf_noinfo; reserved: 0),
(unicode : 78; flag : umf_noinfo; reserved: 0),
(unicode : 79; flag : umf_noinfo; reserved: 0),
(unicode : 80; flag : umf_noinfo; reserved: 0),
(unicode : 81; flag : umf_noinfo; reserved: 0),
(unicode : 82; flag : umf_noinfo; reserved: 0),
(unicode : 83; flag : umf_noinfo; reserved: 0),
(unicode : 84; flag : umf_noinfo; reserved: 0),
(unicode : 85; flag : umf_noinfo; reserved: 0),
(unicode : 86; flag : umf_noinfo; reserved: 0),
(unicode : 87; flag : umf_noinfo; reserved: 0),
(unicode : 88; flag : umf_noinfo; reserved: 0),
(unicode : 89; flag : umf_noinfo; reserved: 0),
(unicode : 90; flag : umf_noinfo; reserved: 0),
(unicode : 91; flag : umf_noinfo; reserved: 0),
(unicode : 92; flag : umf_noinfo; reserved: 0),
(unicode : 93; flag : umf_noinfo; reserved: 0),
(unicode : 94; flag : umf_noinfo; reserved: 0),
(unicode : 95; flag : umf_noinfo; reserved: 0),
(unicode : 96; flag : umf_noinfo; reserved: 0),
(unicode : 97; flag : umf_noinfo; reserved: 0),
(unicode : 98; flag : umf_noinfo; reserved: 0),
(unicode : 99; flag : umf_noinfo; reserved: 0),
(unicode : 100; flag : umf_noinfo; reserved: 0),
(unicode : 101; flag : umf_noinfo; reserved: 0),
(unicode : 102; flag : umf_noinfo; reserved: 0),
(unicode : 103; flag : umf_noinfo; reserved: 0),
(unicode : 104; flag : umf_noinfo; reserved: 0),
(unicode : 105; flag : umf_noinfo; reserved: 0),
(unicode : 106; flag : umf_noinfo; reserved: 0),
(unicode : 107; flag : umf_noinfo; reserved: 0),
(unicode : 108; flag : umf_noinfo; reserved: 0),
(unicode : 109; flag : umf_noinfo; reserved: 0),
(unicode : 110; flag : umf_noinfo; reserved: 0),
(unicode : 111; flag : umf_noinfo; reserved: 0),
(unicode : 112; flag : umf_noinfo; reserved: 0),
(unicode : 113; flag : umf_noinfo; reserved: 0),
(unicode : 114; flag : umf_noinfo; reserved: 0),
(unicode : 115; flag : umf_noinfo; reserved: 0),
(unicode : 116; flag : umf_noinfo; reserved: 0),
(unicode : 117; flag : umf_noinfo; reserved: 0),
(unicode : 118; flag : umf_noinfo; reserved: 0),
(unicode : 119; flag : umf_noinfo; reserved: 0),
(unicode : 120; flag : umf_noinfo; reserved: 0),
(unicode : 121; flag : umf_noinfo; reserved: 0),
(unicode : 122; flag : umf_noinfo; reserved: 0),
(unicode : 123; flag : umf_noinfo; reserved: 0),
(unicode : 124; flag : umf_noinfo; reserved: 0),
(unicode : 125; flag : umf_noinfo; reserved: 0),
(unicode : 126; flag : umf_noinfo; reserved: 0),
(unicode : 127; flag : umf_noinfo; reserved: 0),
(unicode : 128; flag : umf_noinfo; reserved: 0),
(unicode : 129; flag : umf_noinfo; reserved: 0),
(unicode : 130; flag : umf_noinfo; reserved: 0),
(unicode : 131; flag : umf_noinfo; reserved: 0),
(unicode : 132; flag : umf_noinfo; reserved: 0),
(unicode : 133; flag : umf_noinfo; reserved: 0),
(unicode : 134; flag : umf_noinfo; reserved: 0),
(unicode : 135; flag : umf_noinfo; reserved: 0),
(unicode : 136; flag : umf_noinfo; reserved: 0),
(unicode : 137; flag : umf_noinfo; reserved: 0),
(unicode : 138; flag : umf_noinfo; reserved: 0),
(unicode : 139; flag : umf_noinfo; reserved: 0),
(unicode : 140; flag : umf_noinfo; reserved: 0),
(unicode : 141; flag : umf_noinfo; reserved: 0),
(unicode : 142; flag : umf_noinfo; reserved: 0),
(unicode : 143; flag : umf_noinfo; reserved: 0),
(unicode : 144; flag : umf_noinfo; reserved: 0),
(unicode : 145; flag : umf_noinfo; reserved: 0),
(unicode : 146; flag : umf_noinfo; reserved: 0),
(unicode : 147; flag : umf_noinfo; reserved: 0),
(unicode : 148; flag : umf_noinfo; reserved: 0),
(unicode : 149; flag : umf_noinfo; reserved: 0),
(unicode : 150; flag : umf_noinfo; reserved: 0),
(unicode : 151; flag : umf_noinfo; reserved: 0),
(unicode : 152; flag : umf_noinfo; reserved: 0),
(unicode : 153; flag : umf_noinfo; reserved: 0),
(unicode : 154; flag : umf_noinfo; reserved: 0),
(unicode : 155; flag : umf_noinfo; reserved: 0),
(unicode : 156; flag : umf_noinfo; reserved: 0),
(unicode : 157; flag : umf_noinfo; reserved: 0),
(unicode : 158; flag : umf_noinfo; reserved: 0),
(unicode : 159; flag : umf_noinfo; reserved: 0),
(unicode : 160; flag : umf_noinfo; reserved: 0),
(unicode : 161; flag : umf_noinfo; reserved: 0),
(unicode : 162; flag : umf_noinfo; reserved: 0),
(unicode : 163; flag : umf_noinfo; reserved: 0),
(unicode : 164; flag : umf_noinfo; reserved: 0),
(unicode : 165; flag : umf_noinfo; reserved: 0),
(unicode : 166; flag : umf_noinfo; reserved: 0),
(unicode : 167; flag : umf_noinfo; reserved: 0),
(unicode : 168; flag : umf_noinfo; reserved: 0),
(unicode : 169; flag : umf_noinfo; reserved: 0),
(unicode : 170; flag : umf_noinfo; reserved: 0),
(unicode : 171; flag : umf_noinfo; reserved: 0),
(unicode : 172; flag : umf_noinfo; reserved: 0),
(unicode : 173; flag : umf_noinfo; reserved: 0),
(unicode : 174; flag : umf_noinfo; reserved: 0),
(unicode : 175; flag : umf_noinfo; reserved: 0),
(unicode : 176; flag : umf_noinfo; reserved: 0),
(unicode : 177; flag : umf_noinfo; reserved: 0),
(unicode : 178; flag : umf_noinfo; reserved: 0),
(unicode : 179; flag : umf_noinfo; reserved: 0),
(unicode : 180; flag : umf_noinfo; reserved: 0),
(unicode : 181; flag : umf_noinfo; reserved: 0),
(unicode : 182; flag : umf_noinfo; reserved: 0),
(unicode : 183; flag : umf_noinfo; reserved: 0),
(unicode : 184; flag : umf_noinfo; reserved: 0),
(unicode : 185; flag : umf_noinfo; reserved: 0),
(unicode : 186; flag : umf_noinfo; reserved: 0),
(unicode : 187; flag : umf_noinfo; reserved: 0),
(unicode : 188; flag : umf_noinfo; reserved: 0),
(unicode : 189; flag : umf_noinfo; reserved: 0),
(unicode : 190; flag : umf_noinfo; reserved: 0),
(unicode : 191; flag : umf_noinfo; reserved: 0),
(unicode : 192; flag : umf_noinfo; reserved: 0),
(unicode : 193; flag : umf_noinfo; reserved: 0),
(unicode : 194; flag : umf_noinfo; reserved: 0),
(unicode : 195; flag : umf_noinfo; reserved: 0),
(unicode : 196; flag : umf_noinfo; reserved: 0),
(unicode : 197; flag : umf_noinfo; reserved: 0),
(unicode : 198; flag : umf_noinfo; reserved: 0),
(unicode : 199; flag : umf_noinfo; reserved: 0),
(unicode : 200; flag : umf_noinfo; reserved: 0),
(unicode : 201; flag : umf_noinfo; reserved: 0),
(unicode : 202; flag : umf_noinfo; reserved: 0),
(unicode : 203; flag : umf_noinfo; reserved: 0),
(unicode : 204; flag : umf_noinfo; reserved: 0),
(unicode : 205; flag : umf_noinfo; reserved: 0),
(unicode : 206; flag : umf_noinfo; reserved: 0),
(unicode : 207; flag : umf_noinfo; reserved: 0),
(unicode : 208; flag : umf_noinfo; reserved: 0),
(unicode : 209; flag : umf_noinfo; reserved: 0),
(unicode : 210; flag : umf_noinfo; reserved: 0),
(unicode : 211; flag : umf_noinfo; reserved: 0),
(unicode : 212; flag : umf_noinfo; reserved: 0),
(unicode : 213; flag : umf_noinfo; reserved: 0),
(unicode : 214; flag : umf_noinfo; reserved: 0),
(unicode : 215; flag : umf_noinfo; reserved: 0),
(unicode : 216; flag : umf_noinfo; reserved: 0),
(unicode : 217; flag : umf_noinfo; reserved: 0),
(unicode : 218; flag : umf_noinfo; reserved: 0),
(unicode : 219; flag : umf_noinfo; reserved: 0),
(unicode : 220; flag : umf_noinfo; reserved: 0),
(unicode : 221; flag : umf_noinfo; reserved: 0),
(unicode : 222; flag : umf_noinfo; reserved: 0),
(unicode : 223; flag : umf_noinfo; reserved: 0),
(unicode : 224; flag : umf_noinfo; reserved: 0),
(unicode : 225; flag : umf_noinfo; reserved: 0),
(unicode : 226; flag : umf_noinfo; reserved: 0),
(unicode : 227; flag : umf_noinfo; reserved: 0),
(unicode : 228; flag : umf_noinfo; reserved: 0),
(unicode : 229; flag : umf_noinfo; reserved: 0),
(unicode : 230; flag : umf_noinfo; reserved: 0),
(unicode : 231; flag : umf_noinfo; reserved: 0),
(unicode : 232; flag : umf_noinfo; reserved: 0),
(unicode : 233; flag : umf_noinfo; reserved: 0),
(unicode : 234; flag : umf_noinfo; reserved: 0),
(unicode : 235; flag : umf_noinfo; reserved: 0),
(unicode : 236; flag : umf_noinfo; reserved: 0),
(unicode : 237; flag : umf_noinfo; reserved: 0),
(unicode : 238; flag : umf_noinfo; reserved: 0),
(unicode : 239; flag : umf_noinfo; reserved: 0),
(unicode : 240; flag : umf_noinfo; reserved: 0),
(unicode : 241; flag : umf_noinfo; reserved: 0),
(unicode : 242; flag : umf_noinfo; reserved: 0),
(unicode : 243; flag : umf_noinfo; reserved: 0),
(unicode : 244; flag : umf_noinfo; reserved: 0),
(unicode : 245; flag : umf_noinfo; reserved: 0),
(unicode : 246; flag : umf_noinfo; reserved: 0),
(unicode : 247; flag : umf_noinfo; reserved: 0),
(unicode : 248; flag : umf_noinfo; reserved: 0),
(unicode : 249; flag : umf_noinfo; reserved: 0),
(unicode : 250; flag : umf_noinfo; reserved: 0),
(unicode : 251; flag : umf_noinfo; reserved: 0),
(unicode : 252; flag : umf_noinfo; reserved: 0),
(unicode : 253; flag : umf_noinfo; reserved: 0),
(unicode : 254; flag : umf_noinfo; reserved: 0),
(unicode : 255; flag : umf_noinfo; reserved: 0)
);
unicodemap : tunicodemap = (
cpname : '8859-1';
cp : 28591;
map : @map;
lastchar : 255;
next : nil;
internalmap : true
);
var
hp : punicodemap;
initialization
mappings:=nil;
registermapping(@unicodemap)
finalization
while assigned(mappings) do
begin
hp:=mappings^.next;
if not(mappings^.internalmap) then
begin
freemem(mappings^.map);
dispose(mappings);
end;
mappings:=hp;
end;
end.