don't use NULL or cast NULL where appropriate.
[AROS-Contrib.git] / dopus / Config / lsprintf.c
blob36c831eaf278dd4e8d338e555ae272c2b62bea1f
1 /* Directory Opus 4
2 Original GPL release version 4.12
3 Copyright 1993-2000 Jonathan Potter
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 All users of Directory Opus 4 (including versions distributed
20 under the GPL) are entitled to upgrade to the latest version of
21 Directory Opus version 5 at a reduced price. Please see
22 http://www.gpsoft.com.au for more information.
24 The release of Directory Opus 4 under the GPL in NO WAY affects
25 the existing commercial status of Directory Opus 5.
29 #include <proto/exec.h>
30 #include <aros/asmcall.h>
32 void SwapMem(char *src, char *dst, int size)
34 register char tmp;
35 register int i;
37 for (i = 0; i < size; i ++) {
38 tmp = *dst;
39 *dst ++ = *src;
40 *src ++ = tmp;
44 AROS_UFH2 (void, stuffChar,
45 AROS_UFHA(char, c, D0),
46 AROS_UFHA(char **, buf, A3)
49 AROS_USERFUNC_INIT
50 *(*buf) ++ = c;
51 AROS_USERFUNC_EXIT
54 void lsprintf(char *str, char *fmt, ...)
56 char *buf;
58 buf = str;
60 RawDoFmt(fmt,&fmt+1,(VOID_FUNC)stuffChar, &buf);