Instead of "eax" and "edx" in asm constraints use "a" and "d"
[tangerine.git] / rom / intuition / getprefs.c
blobd8bb1479dec19d311ae42fd5329bae6c350eb2dd
1 /*
2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
4 $Id$
5 */
7 #include <intuition/preferences.h>
8 #include <proto/exec.h>
9 #include "intuition_intern.h"
11 /*****************************************************************************
13 NAME */
14 #include <proto/intuition.h>
16 AROS_LH2(struct Preferences *, GetPrefs,
18 /* SYNOPSIS */
19 AROS_LHA(struct Preferences * , prefbuffer, A0),
20 AROS_LHA(WORD , size, D0),
22 /* LOCATION */
23 struct IntuitionBase *, IntuitionBase, 22, Intuition)
25 /* FUNCTION
26 Gets a copy of the current Preferences structure.
28 INPUTS
29 prefbuffer - The buffer which contains your settings for the
30 preferences.
31 size - The number of bytes of the buffer you want to be copied.
33 RESULT
34 Returns your parameter buffer.
36 NOTES
38 EXAMPLE
40 BUGS
42 SEE ALSO
43 GetDefPrefs(), SetPrefs()
45 INTERNALS
47 *****************************************************************************/
49 AROS_LIBFUNC_INIT
50 AROS_LIBBASE_EXT_DECL(struct IntuitionBase *,IntuitionBase)
52 DEBUG_GETPREFS(dprintf("GetPrefs: Buffer 0x%lx Size 0x%lx Inform %d\n",
53 prefbuffer, size));
55 if (prefbuffer != NULL && size != 0)
57 ULONG lock = LockIBase(0);
59 CopyMem(GetPrivIBase(IntuitionBase)->ActivePreferences,
60 prefbuffer,
61 size <= sizeof(struct Preferences) ? size : sizeof(struct Preferences));
63 UnlockIBase(lock);
66 return (struct Preferences *)prefbuffer;
68 AROS_LIBFUNC_EXIT
69 } /* GetPrefs */