summaryrefslogtreecommitdiffstats
path: root/gcc/ada/g-cgideb.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-09-05 08:07:00 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-09-05 08:07:00 +0000
commit1d9b970a8fc86e69c3eeb9314b9a5de609047115 (patch)
tree4719707ee1466c01c795cf2a027236826eba7d41 /gcc/ada/g-cgideb.adb
parent0759bfdcbc2b16b34d811b699902287f5386df46 (diff)
downloadppe42-gcc-1d9b970a8fc86e69c3eeb9314b9a5de609047115.tar.gz
ppe42-gcc-1d9b970a8fc86e69c3eeb9314b9a5de609047115.zip
2005-09-01 Robert Dewar <dewar@adacore.com>
* a-dirval-mingw.adb, a-direct.adb, a-coinve.adb, g-dynhta.adb, g-dynhta.ads, cstand.adb, exp_smem.adb, g-debuti.ads, g-dirope.adb, g-table.adb, lib-sort.adb, sem_maps.adb, exp_fixd.adb, exp_aggr.adb, a-intnam-mingw.ads, a-intnam-vxworks.ads, g-arrspl.adb, g-arrspl.ads, g-awk.adb, g-awk.ads, g-boubuf.ads, g-boubuf.ads, g-boubuf.ads, g-bubsor.ads, g-bubsor.adb, g-busora.adb, g-busora.ads, g-busorg.adb, g-busorg.ads, g-calend.adb, g-calend.ads, g-casuti.adb, g-casuti.ads, g-catiio.adb, g-catiio.ads, g-cgi.adb, g-cgi.ads, g-cgicoo.adb, g-cgicoo.ads, g-cgideb.adb, g-cgideb.ads, g-comlin.adb, g-comver.ads, g-semaph.ads, g-socthi.ads, sem_ch7.adb, a-direio.adb, a-caldel.ads, i-cstrea-vms.adb, a-ztedit.adb, a-ztenau.adb, g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi-vxworks.ads, a-intnam-irix.ads, a-intnam-irix.ads, a-intnam-hpux.ads, a-intnam-os2.ads, a-intnam-os2.ads, a-caldel-vms.adb, a-calend-vms.adb, a-calend-vms.ads, g-heasor.adb, g-heasor.ads, g-hesora.adb, g-hesora.ads, g-hesorg.adb, g-hesorg.ads, g-htable.adb, g-htable.ads, g-io.adb, g-io.ads, g-io_aux.adb, g-io_aux.ads, g-locfil.ads, g-memdum.adb, g-memdum.ads, g-traceb.adb, g-traceb.ads, i-cobol.adb, i-cobol.ads, i-cstrea.ads, i-cstrin.adb, a-wtedit.adb, a-tifiio.adb, a-wtenau.adb, a-wtenau.adb, a-teioed.adb: Minor reformatting git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103894 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/g-cgideb.adb')
-rw-r--r--gcc/ada/g-cgideb.adb80
1 files changed, 27 insertions, 53 deletions
diff --git a/gcc/ada/g-cgideb.adb b/gcc/ada/g-cgideb.adb
index 023f21f09c0..4c353d86569 100644
--- a/gcc/ada/g-cgideb.adb
+++ b/gcc/ada/g-cgideb.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 2000-2001 Ada Core Technologies, Inc. --
+-- Copyright (C) 2000-2005, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -37,13 +37,11 @@ package body GNAT.CGI.Debug is
use Ada.Strings.Unbounded;
- --
- -- Define the abstract type which act as a template for all debug IO mode.
+ -- Define the abstract type which act as a template for all debug IO modes.
-- To create a new IO mode you must:
-- 1. create a new package spec
-- 2. create a new type derived from IO.Format
-- 3. implement all the abstract rountines in IO
- --
package IO is
@@ -54,51 +52,39 @@ package body GNAT.CGI.Debug is
function Variable
(Mode : Format;
Name : String;
- Value : String)
- return String
- is abstract;
- -- Returns variable Name and its associated value.
-
- function New_Line
- (Mode : Format)
- return String
- is abstract;
+ Value : String) return String is abstract;
+ -- Returns variable Name and its associated value
+
+ function New_Line (Mode : Format) return String is abstract;
-- Returns a new line such as this concatenated between two strings
-- will display the strings on two lines.
- function Title
- (Mode : Format;
- Str : String)
- return String
- is abstract;
+ function Title (Mode : Format; Str : String) return String is abstract;
-- Returns Str as a Title. A title must be alone and centered on a
-- line. Next output will be on the following line.
function Header
(Mode : Format;
- Str : String)
- return String
- is abstract;
+ Str : String) return String is abstract;
-- Returns Str as an Header. An header must be alone on its line. Next
-- output will be on the following line.
end IO;
- --
- -- IO for HTML mode
- --
+ ----------------------
+ -- IO for HTML Mode --
+ ----------------------
package HTML_IO is
- -- see IO for comments about these routines.
+ -- See IO for comments about these routines
type Format is new IO.Format with null record;
function Variable
(IO : Format;
Name : String;
- Value : String)
- return String;
+ Value : String) return String;
function New_Line (IO : in Format) return String;
@@ -108,9 +94,9 @@ package body GNAT.CGI.Debug is
end HTML_IO;
- --
- -- IO for plain text mode
- --
+ ----------------------------
+ -- IO for Plain Text Mode --
+ ----------------------------
package Text_IO is
@@ -121,8 +107,7 @@ package body GNAT.CGI.Debug is
function Variable
(IO : Format;
Name : String;
- Value : String)
- return String;
+ Value : String) return String;
function New_Line (IO : in Format) return String;
@@ -188,10 +173,10 @@ package body GNAT.CGI.Debug is
NL : constant String := (1 => ASCII.LF);
function Bold (S : in String) return String;
- -- Returns S as an HTML bold string.
+ -- Returns S as an HTML bold string
function Italic (S : in String) return String;
- -- Returns S as an HTML italic string.
+ -- Returns S as an HTML italic string
----------
-- Bold --
@@ -207,8 +192,7 @@ package body GNAT.CGI.Debug is
------------
function Header (IO : in Format; Str : in String) return String is
- pragma Warnings (Off, IO);
-
+ pragma Unreferenced (IO);
begin
return "<h2>" & Str & "</h2>" & NL;
end Header;
@@ -227,8 +211,7 @@ package body GNAT.CGI.Debug is
--------------
function New_Line (IO : in Format) return String is
- pragma Warnings (Off, IO);
-
+ pragma Unreferenced (IO);
begin
return "<br>" & NL;
end New_Line;
@@ -238,8 +221,7 @@ package body GNAT.CGI.Debug is
-----------
function Title (IO : in Format; Str : in String) return String is
- pragma Warnings (Off, IO);
-
+ pragma Unreferenced (IO);
begin
return "<p align=center><font size=+2>" & Str & "</font></p>" & NL;
end Title;
@@ -251,11 +233,9 @@ package body GNAT.CGI.Debug is
function Variable
(IO : Format;
Name : String;
- Value : String)
- return String
+ Value : String) return String
is
- pragma Warnings (Off, IO);
-
+ pragma Unreferenced (IO);
begin
return Bold (Name) & " = " & Italic (Value);
end Variable;
@@ -282,8 +262,7 @@ package body GNAT.CGI.Debug is
--------------
function New_Line (IO : in Format) return String is
- pragma Warnings (Off, IO);
-
+ pragma Unreferenced (IO);
begin
return String'(1 => ASCII.LF);
end New_Line;
@@ -295,7 +274,6 @@ package body GNAT.CGI.Debug is
function Title (IO : in Format; Str : in String) return String is
Spaces : constant Natural := (80 - Str'Length) / 2;
Indent : constant String (1 .. Spaces) := (others => ' ');
-
begin
return Indent & Str & New_Line (IO);
end Title;
@@ -307,11 +285,9 @@ package body GNAT.CGI.Debug is
function Variable
(IO : Format;
Name : String;
- Value : String)
- return String
+ Value : String) return String
is
- pragma Warnings (Off, IO);
-
+ pragma Unreferenced (IO);
begin
return " " & Name & " = " & Value;
end Variable;
@@ -324,7 +300,6 @@ package body GNAT.CGI.Debug is
function HTML_Output return String is
HTML : HTML_IO.Format;
-
begin
return IO.Output (Mode => HTML);
end HTML_Output;
@@ -335,7 +310,6 @@ package body GNAT.CGI.Debug is
function Text_Output return String is
Text : Text_IO.Format;
-
begin
return IO.Output (Mode => Text);
end Text_Output;
OpenPOWER on IntegriCloud