~ubuntu-branches/debian/stretch/adabrowse/stretch

« back to all changes in this revision

Viewing changes to util-text-internal.adb

  • Committer: Bazaar Package Importer
  • Author(s): Ludovic Brenta
  • Date: 2004-02-14 13:22:40 UTC
  • Revision ID: james.westby@ubuntu.com-20040214132240-cqumhiq1677pkvzo
Tags: upstream-4.0.2
ImportĀ upstreamĀ versionĀ 4.0.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
-------------------------------------------------------------------------------
 
2
--
 
3
--  <STRONG>Copyright &copy; 2001, 2002 by Thomas Wolf.</STRONG>
 
4
--  <BLOCKQUOTE>
 
5
--    This piece of software is free software; you can redistribute it and/or
 
6
--    modify it under the terms of the  GNU General Public License as published
 
7
--    by the Free Software  Foundation; either version 2, or (at your option)
 
8
--    any later version. This software is distributed in the hope that it will
 
9
--    be useful, but <EM>without any warranty</EM>; without even the implied
 
10
--    warranty of <EM>merchantability or fitness for a particular purpose.</EM>
 
11
--    See the GNU General Public License for  more details. You should have
 
12
--    received a copy of the GNU General Public License with this distribution,
 
13
--    see file "<A HREF="GPL.txt">GPL.txt</A>". If not, write to the Free
 
14
--    Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
 
15
--    USA.
 
16
--  </BLOCKQUOTE>
 
17
--  <BLOCKQUOTE>
 
18
--    As a special exception from the GPL, if other files instantiate generics
 
19
--    from this unit, or you link this unit with other files to produce an
 
20
--    executable, this unit does not by itself cause the resulting executable
 
21
--    to be covered by the GPL. This exception does not however invalidate any
 
22
--    other reasons why the executable file might be covered by the GPL.
 
23
--  </BLOCKQUOTE>
 
24
--
 
25
--  <AUTHOR>
 
26
--    Thomas Wolf  (TW) <E_MAIL>
 
27
--  </AUTHOR>
 
28
--
 
29
--  <PURPOSE>
 
30
--    Direct access to the internal string buffer.
 
31
--  </PURPOSE>
 
32
--
 
33
--  <NOT_TASK_SAFE>
 
34
--
 
35
--  <STORAGE>
 
36
--    Dynamic storage allocation in the default pool.
 
37
--  </STORAGE>
 
38
--
 
39
--  <HISTORY>
 
40
--    07-JUN-2002   TW  Initial version.
 
41
--  </HISTORY>
 
42
-------------------------------------------------------------------------------
 
43
 
 
44
pragma License (Modified_GPL);
 
45
 
 
46
package body Util.Text.Internal is
 
47
 
 
48
   function Get_Ptr
 
49
     (Source : in Unbounded_String)
 
50
     return String_Access
 
51
   is
 
52
   begin
 
53
      return Source.Data;
 
54
   end Get_Ptr;
 
55
 
 
56
   procedure Set_Ptr
 
57
     (Source : in out Unbounded_String;
 
58
      Ptr    : in     String_Access)
 
59
   is
 
60
   begin
 
61
      Free (Source.Data);
 
62
      if Ptr /= null then
 
63
         Source.Data := Ptr;
 
64
      else
 
65
         Source.Data := Null_String'Access;
 
66
      end if;
 
67
   end Set_Ptr;
 
68
 
 
69
end Util.Text.Internal;