2 Unix SMB/Netbios implementation.
6 Copyright (C) Andrew Tridgell 1998
9 The Free Software Foundation, Inc.
11 This file is part of the Midnight Commander.
13 The Midnight Commander is free software: you can redistribute it
14 and/or modify it under the terms of the GNU General Public License as
15 published by the Free Software Foundation, either version 3 of the License,
16 or (at your option) any later version.
18 The Midnight Commander is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
23 You should have received a copy of the GNU General Public License
24 along with this program. If not, see <http://www.gnu.org/licenses/>.
29 extern int DEBUGLEVEL
;
32 /* this is like vsnprintf but the 'n' limit does not include
33 the terminating null. So if you have a 1024 byte buffer then
35 int vslprintf(char *str
, int n
, const char *format
, va_list ap
)
37 int ret
= vsnprintf(str
, n
, format
, ap
);
38 if (ret
> n
|| ret
< 0) {
47 int slprintf(char *str
, int n
, const char *format
, ...)
50 int slprintf(va_alist
)
63 str
= va_arg(ap
,char *);
65 format
= va_arg(ap
,char *);
68 ret
= vslprintf(str
,n
,format
,ap
);