ソースを参照

* Dotted filenames for package aspell

Michaël Van Canneyt 2 年 前
コミット
83e5ae792e

+ 3 - 0
packages/aspell/namespaced/Api.Aspell.pp

@@ -0,0 +1,3 @@
+unit Api.Aspell;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i aspell.pp}

+ 3 - 0
packages/aspell/namespaced/Api.Aspelldyn.pp

@@ -0,0 +1,3 @@
+unit Api.Aspelldyn;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i aspelldyn.pp}

+ 3 - 0
packages/aspell/namespaced/Api.Spellcheck.pp

@@ -0,0 +1,3 @@
+unit Api.Spellcheck;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i spellcheck.pp}

+ 5 - 0
packages/aspell/namespaces.lst

@@ -0,0 +1,5 @@
+src/aspell.pp=namespaced/Api.Aspell.pp
+{s*:src/}=namespaced/
+{i+:src/}
+src/aspelldyn.pp=namespaced/Api.Aspelldyn.pp
+src/spellcheck.pp=namespaced/Api.Spellcheck.pp

+ 7 - 0
packages/aspell/src/aspell.pp

@@ -1,4 +1,6 @@
+{$IFNDEF FPC_DOTTEDUNITS}
 unit aspell;
+{$ENDIF FPC_DOTTEDUNITS}
 
 { * This file is header translation of The New Aspell
   * Copyright (C) 2001-2002 by Kevin Atkinson under the GNU LGPL
@@ -12,8 +14,13 @@ unit aspell;
 
 interface
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.CTypes;
+{$ELSE FPC_DOTTEDUNITS}
 uses
   cTypes;
+{$ENDIF FPC_DOTTEDUNITS}
 
 {$IFDEF UNIX}
   const libaspell = 'aspell';

+ 16 - 1
packages/aspell/src/aspelldyn.pp

@@ -1,4 +1,6 @@
-unit aspelldyn;
+{$IFNDEF FPC_DOTTEDUNITS}
+unit aspelldyn;
+{$ENDIF FPC_DOTTEDUNITS}
 
 { * This file is header translation of The New Aspell
   * Copyright (C) 2001-2002 by Kevin Atkinson under the GNU LGPL
@@ -12,8 +14,13 @@
 
 interface
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.CTypes;
+{$ELSE FPC_DOTTEDUNITS}
 uses
   cTypes;
+{$ENDIF FPC_DOTTEDUNITS}
 
 {$IFDEF UNIX}
   // TODO: check if it works pathless in beosOB
@@ -443,11 +450,19 @@ var
 
 implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  {$IFDEF WINDOWS}
+  Windows, SysUtils, Classes,
+  {$ENDIF}
+  System.DynLibs;
+{$ELSE FPC_DOTTEDUNITS}
 uses
   {$IFDEF WINDOWS}
   Windows, SysUtils, Classes,
   {$ENDIF}
   dynlibs;
+{$ENDIF FPC_DOTTEDUNITS}
 
 var
   LibHandle: TLibHandle = 0;

+ 7 - 0
packages/aspell/src/spellcheck.pp

@@ -1,4 +1,6 @@
+{$IFNDEF FPC_DOTTEDUNITS}
 unit SpellCheck;
+{$ENDIF FPC_DOTTEDUNITS}
 
 { Simple unit to simplify/OOP-ize pascal-style the aspell interface. Currently
   very limited, will be expanded eventually. Use like you wish. }
@@ -7,8 +9,13 @@ unit SpellCheck;
 
 interface
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.SysUtils, System.Classes, Api.Aspell;
+{$ELSE FPC_DOTTEDUNITS}
 uses
   SysUtils, Classes, Aspell;
+{$ENDIF FPC_DOTTEDUNITS}
 
 type
   TSuggestionArray = array of AnsiString;