xref: /illumos-gate/usr/src/lib/libdwarf/common/pro_encode_nm.h (revision 6446bd46ed1b4e9f69da153665f82181ccaedad5)
1 /*
2 
3   Copyright (C) 2000,2004 Silicon Graphics, Inc.  All Rights Reserved.
4 
5   This program is free software; you can redistribute it and/or modify it
6   under the terms of version 2.1 of the GNU Lesser General Public License
7   as published by the Free Software Foundation.
8 
9   This program is distributed in the hope that it would be useful, but
10   WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 
13   Further, this software is distributed without any warranty that it is
14   free of the rightful claim of any third person regarding infringement
15   or the like.  Any license provided herein, whether implied or
16   otherwise, applies only to this software file.  Patent licenses, if
17   any, provided herein do not apply to combinations of this program with
18   other software, or any other product whatsoever.
19 
20   You should have received a copy of the GNU Lesser General Public
21   License along with this program; if not, write the Free Software
22   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
23   USA.
24 
25 */
26 
27 
28 
29 /*  Bytes needed to encode a number.
30     Not a tight bound, just a reasonable bound.
31 */
32 #define ENCODE_SPACE_NEEDED   (2*sizeof(Dwarf_Unsigned))
33 
34 
35 int _dwarf_pro_encode_leb128_nm(Dwarf_Unsigned val, int *nbytes,
36     char *space, int splen);
37 
38 int _dwarf_pro_encode_signed_leb128_nm(Dwarf_Signed value, int *nbytes,
39     char *space, int splen);
40