----------------------------------------------------------------------------- -- -- Onions Network Streams Library -- -- O N I O N S -- -- S p e c -- -- Copyright (C) 1997-1998 Regents of the University of California -- -- Onions 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, with or without the single exception listed below; -- either version 2, or (at your option) any later version. Onions 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 -- distributed with Onions; see the file COPYING. If not, write to the -- Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -- 02111-1307, USA. -- -- As a special exception, if other files instantiate generics from this -- library, or you link this library with other files to produce an -- executable, this library does not by itself cause the resulting -- executable to be covered by the GNU General Public License. This -- exception does not however invalidate any other reasons why the -- executable file might be covered by the GNU General Public License. -- -- Created in 1997 by Roy T. Fielding and Kari Nies ----------------------------------------------------------------------------- -- See the file README for information about the Onions library. -- -- Aside from serving as the top of our package namespace, this package -- contains some utility functions for rendering basic Ada95 types -- as a String (without that annoying leading space). -- with Interfaces.C; package Onions is pragma Pure (Onions); -- We are consistently lazy about the C interface -- package C renames Interfaces.C; ---------------------------------------------------------------------- -- Image takes a number and returns it as a String. It differs -- -- from the predefined 'Image attribute in that we get rid of the -- -- annoying space for non-negative numbers. -- ---------------------------------------------------------------------- -- Ada95 types -- function Image (N : Integer) return String; -- Signed C types -- function Image (N : C.short) return String; function Image (N : C.int) return String; function Image (N : C.long) return String; function Image (N : C.ptrdiff_t) return String; -- Unsigned C types -- function Image (N : C.unsigned_short) return String; function Image (N : C.unsigned) return String; function Image (N : C.unsigned_long) return String; function Image (N : C.size_t) return String; end Onions;