This file is indexed.

/usr/share/ada/adainclude/aws/soap-wsdl-parameters.adb is in libaws2.10.2-dev 2.10.2-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
------------------------------------------------------------------------------
--                              Ada Web Server                              --
--                                                                          --
--                     Copyright (C) 2003-2011, AdaCore                     --
--                                                                          --
--  This library is free software; you can redistribute it and/or modify    --
--  it under the terms of the GNU General Public License as published by    --
--  the Free Software Foundation; either version 2 of the License, or (at   --
--  your option) any later version.                                         --
--                                                                          --
--  This library 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.  See the GNU       --
--  General Public License for more details.                                --
--                                                                          --
--  You should have received a copy of the GNU General Public License       --
--  along with this library; if not, write to the Free Software Foundation, --
--  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.          --
--                                                                          --
------------------------------------------------------------------------------

with Ada.Text_IO;
with Ada.Unchecked_Deallocation;

package body SOAP.WSDL.Parameters is

   ------------
   -- Append --
   ------------

   procedure Append (P : in out P_Set; Param : Parameter) is
      N : P_Set;
   begin
      if P = null then
         P := new Parameter'(Param);
      else

         N := P;

         while N.Next /= null loop
            N := N.Next;
         end loop;

         N.Next := new Parameter'(Param);

      end if;
   end Append;

   ------------
   -- Length --
   ------------

   function Length (P : P_Set) return Natural is
      N      : P_Set := P;
      Result : Natural := 0;
   begin
      while N /= null loop
         Result := Result + 1;
         N := N.Next;
      end loop;
      return Result;
   end Length;

   ------------
   -- Output --
   ------------

   procedure Output (P : P_Set) is

      use Ada;
      use type Parameters.Kind;
      use type Parameters.P_Set;

      procedure Output (P : P_Set; K : Natural);

      ------------
      -- Output --
      ------------

      procedure Output (P : P_Set; K : Natural) is
      begin
         if P /= null then
            Text_IO.Put (String'(1 .. K => ' '));

            if P.Mode = Parameters.K_Simple then
               Text_IO.Put ("[simple] ");
               Text_IO.Put_Line
                 (To_String (P.Name) & " ; " & To_Ada (P.P_Type));

            elsif P.Mode = Parameters.K_Derived then
               Text_IO.Put ("[derived] ");
               Text_IO.Put_Line
                 (To_String (P.Name) & " ; " & To_String (P.D_Name));

            elsif P.Mode = Parameters.K_Enumeration then
               Text_IO.Put ("[enumeration] ");
               Text_IO.Put_Line
                 (To_String (P.Name) & " ; " & To_String (P.E_Name));

            else
               if P.Mode = Parameters.K_Array then
                  Text_IO.Put ("[array] ");
               else
                  Text_IO.Put ("[record] ");
               end if;

               Text_IO.Put_Line
                 (To_String (P.Name) & " ; " & To_String (P.T_Name));

               Output (P.P, K + 3);
            end if;

            Output (P.Next, K);
         end if;
      end Output;

   begin
      Output (P, 6);
   end Output;

   -------------
   -- Release --
   -------------

   procedure Release (P : in out P_Set) is

      procedure Unchecked_Free is
        new Ada.Unchecked_Deallocation (Parameter, P_Set);

      procedure Unchecked_Free is
        new Ada.Unchecked_Deallocation (E_Node, E_Node_Access);

   begin
      if P /= null then
         if P.Mode = K_Array or else P.Mode = K_Record then
            Release (P.P);

         elsif P.Mode = K_Enumeration then
            declare
               C, N : E_Node_Access;
            begin
               C := P.E_Def;

               while C /= null loop
                  N := C.Next;
                  Unchecked_Free (C);
                  C := N;
               end loop;
            end;
         end if;

         Release (P.Next);
         Unchecked_Free (P);
      end if;
   end Release;

   ---------------
   -- Type_Name --
   ---------------

   function Type_Name (P : WSDL.Parameters.P_Set) return String is
   begin
      case P.Mode is
         when K_Simple           => return WSDL.To_Ada (P.P_Type);
         when K_Derived          => return To_String (P.D_Name);
         when K_Array | K_Record => return To_String (P.T_Name);
         when K_Enumeration      => return To_String (P.E_Name);
      end case;
   end Type_Name;

end SOAP.WSDL.Parameters;