Update to lasso handling. Adjust scroll amount based on difference between mouse...
[AROS.git] / rom / dos / parentdir.c
blob3067bd9083ecc4f8366c3918a7dc098a74698b7e
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
8 #include "dos_intern.h"
9 #include <dos/dos.h>
11 /*****************************************************************************
13 NAME */
14 #include <exec/types.h>
15 #include <proto/dos.h>
17 AROS_LH1(BPTR, ParentDir,
19 /* SYNOPSIS */
20 AROS_LHA(BPTR, lock, D1),
22 /* LOCATION */
23 struct DosLibrary *, DOSBase, 35, Dos)
25 /* FUNCTION
26 Returns a lock to the parent directory of the supplied lock.
28 INPUTS
29 lock - Lock to get parent directory of.
31 RESULT
32 Returns a lock to the parent directory or NULL, in which case the
33 supplied lock has no parent directory (because it is the root
34 directory) or an error occured. IoErr() returns 0 in the former case
35 and a different value on error.
37 NOTES
39 EXAMPLE
41 BUGS
42 Locks get via ParentDir() are currently never unlocked! Use this
43 function with care.
45 SEE ALSO
47 INTERNALS
49 *****************************************************************************/
51 AROS_LIBFUNC_INIT
53 BPTR oldlock = CurrentDir(lock), newlock;
55 newlock = Lock("/", ACCESS_READ);
56 CurrentDir(oldlock);
58 return newlock;
59 AROS_LIBFUNC_EXIT
60 } /* ParentDir */