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