aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/g-cgicoo.adb
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2005-09-05 10:07:00 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2005-09-05 10:07:00 +0200
commita2cb348ef4d982ff951a398a07e71f7bdff020ab (patch)
tree4719707ee1466c01c795cf2a027236826eba7d41 /gcc/ada/g-cgicoo.adb
parentf67b3771d51db363dc9c6e9d721b71568fceff14 (diff)
downloadgcc-a2cb348ef4d982ff951a398a07e71f7bdff020ab.zip
gcc-a2cb348ef4d982ff951a398a07e71f7bdff020ab.tar.gz
gcc-a2cb348ef4d982ff951a398a07e71f7bdff020ab.tar.bz2
a-dirval-mingw.adb, [...]: Minor reformatting
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 From-SVN: r103894
Diffstat (limited to 'gcc/ada/g-cgicoo.adb')
-rw-r--r--gcc/ada/g-cgicoo.adb35
1 files changed, 19 insertions, 16 deletions
diff --git a/gcc/ada/g-cgicoo.adb b/gcc/ada/g-cgicoo.adb
index 8d64b5e..50c9ce8 100644
--- a/gcc/ada/g-cgicoo.adb
+++ b/gcc/ada/g-cgicoo.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 2000-2003 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- --
@@ -43,12 +43,12 @@ package body GNAT.CGI.Cookie is
use Ada;
Valid_Environment : Boolean := False;
- -- This boolean will be set to True if the initialization was fine.
+ -- This boolean will be set to True if the initialization was fine
Header_Sent : Boolean := False;
- -- Will be set to True when the header will be sent.
+ -- Will be set to True when the header will be sent
- -- Cookie data that have been added.
+ -- Cookie data that has been added
type String_Access is access String;
@@ -67,14 +67,14 @@ package body GNAT.CGI.Cookie is
end record;
package Cookie_Table is new Table (Cookie_Data, Positive, 1, 5, 50);
- -- This is the table to keep all cookies to be sent back to the server.
+ -- This is the table to keep all cookies to be sent back to the server
package Key_Value_Table is new Table (Key_Value, Positive, 1, 1, 50);
- -- This is the table to keep all cookies received from the server.
+ -- This is the table to keep all cookies received from the server
procedure Check_Environment;
pragma Inline (Check_Environment);
- -- This procedure will raise Data_Error if Valid_Environment is False.
+ -- This procedure will raise Data_Error if Valid_Environment is False
procedure Initialize;
-- Initialize CGI package by reading the runtime environment. This
@@ -149,7 +149,7 @@ package body GNAT.CGI.Cookie is
HTTP_COOKIE : constant String := Metavariable (CGI.HTTP_Cookie);
procedure Set_Parameter_Table (Data : String);
- -- Parse Data and insert information in Key_Value_Table.
+ -- Parse Data and insert information in Key_Value_Table
-------------------------
-- Set_Parameter_Table --
@@ -161,8 +161,8 @@ package body GNAT.CGI.Cookie is
-- Add a single parameter into the table at index K. The parameter
-- format is "key=value".
- Count : constant Positive
- := 1 + Strings.Fixed.Count (Data, Strings.Maps.To_Set (";"));
+ Count : constant Positive :=
+ 1 + Strings.Fixed.Count (Data, Strings.Maps.To_Set (";"));
-- Count is the number of parameters in the string. Parameters are
-- separated by ampersand character.
@@ -185,6 +185,8 @@ package body GNAT.CGI.Cookie is
end if;
end Add_Parameter;
+ -- Start of processing for Set_Parameter_Table
+
begin
Key_Value_Table.Set_Last (Count);
@@ -196,11 +198,13 @@ package body GNAT.CGI.Cookie is
Index := Sep + 2;
end loop;
- -- add last parameter
+ -- Add last parameter
Add_Parameter (Count, Data (Index .. Data'Last));
end Set_Parameter_Table;
+ -- Start of processing for Initialize
+
begin
if HTTP_COOKIE /= "" then
Set_Parameter_Table (HTTP_COOKIE);
@@ -245,7 +249,6 @@ package body GNAT.CGI.Cookie is
(Header : String := Default_Header;
Force : Boolean := False)
is
-
procedure Output_Cookies;
-- Iterate through the list of cookies to be sent to the server
-- and output them.
@@ -264,7 +267,7 @@ package body GNAT.CGI.Cookie is
Max_Age : Natural;
Path : String;
Secure : Boolean);
- -- Output one cookie in the CGI header.
+ -- Output one cookie in the CGI header
-----------------------
-- Output_One_Cookie --
@@ -344,7 +347,8 @@ package body GNAT.CGI.Cookie is
Domain : String := "";
Max_Age : Natural := Natural'Last;
Path : String := "/";
- Secure : Boolean := False) is
+ Secure : Boolean := False)
+ is
begin
Cookie_Table.Increment_Last;
@@ -364,8 +368,7 @@ package body GNAT.CGI.Cookie is
function Value
(Key : String;
- Required : Boolean := False)
- return String
+ Required : Boolean := False) return String
is
begin
Check_Environment;