1 | /*
|
---|
2 | * direct.h
|
---|
3 | *
|
---|
4 | * Functions for manipulating paths and directories, (included from io.h),
|
---|
5 | * and functions for manipulating the current drive assignment.
|
---|
6 | *
|
---|
7 | * $Id: direct.h,v 71af661f5309 2016/04/26 22:05:33 keithmarshall $
|
---|
8 | *
|
---|
9 | * Written by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
---|
10 | * Copyright (C) 1997, 1999-2001, 2003, 2004, 2007, 2016, MinGW.org Project.
|
---|
11 | *
|
---|
12 | *
|
---|
13 | * Permission is hereby granted, free of charge, to any person obtaining a
|
---|
14 | * copy of this software and associated documentation files (the "Software"),
|
---|
15 | * to deal in the Software without restriction, including without limitation
|
---|
16 | * the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
---|
17 | * and/or sell copies of the Software, and to permit persons to whom the
|
---|
18 | * Software is furnished to do so, subject to the following conditions:
|
---|
19 | *
|
---|
20 | * The above copyright notice, this permission notice, and the following
|
---|
21 | * disclaimer shall be included in all copies or substantial portions of
|
---|
22 | * the Software.
|
---|
23 | *
|
---|
24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
---|
25 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
---|
26 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
---|
27 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
---|
28 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
---|
29 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF OR OTHER
|
---|
30 | * DEALINGS IN THE SOFTWARE.
|
---|
31 | *
|
---|
32 | */
|
---|
33 | #ifndef _DIRECT_H
|
---|
34 | #pragma GCC system_header
|
---|
35 |
|
---|
36 | /* In addition to inclusion in its own right, this header supports
|
---|
37 | * selective inclusion by <wchar.h>; thus...
|
---|
38 | */
|
---|
39 | #ifndef __WCHAR_H_SOURCED__
|
---|
40 | /* ...we defer definition of the normal multiple inclusion guard,
|
---|
41 | * until we know that this is NOT a selective inclusion request.
|
---|
42 | */
|
---|
43 | #define _DIRECT_H
|
---|
44 |
|
---|
45 | #define __DIRECT_H_SOURCED__
|
---|
46 | /* All MinGW headers are required to include <_mingw.h>; additionally,
|
---|
47 | * much of the content which we need here is defined in <io.h>, but we
|
---|
48 | * also need the declaration of the _getdiskfree() function prototype,
|
---|
49 | * and the definition for its associated _diskfree_t data structure,
|
---|
50 | * from <dos.h>; thus, we may simply include <dos.h> here, and let
|
---|
51 | * it take care of including both <mingw.h> and <io.h> for us.
|
---|
52 | */
|
---|
53 | #include "dos.h"
|
---|
54 |
|
---|
55 | #undef __DIRECT_H_SOURCED__
|
---|
56 | #endif /* !__WCHAR_H_SOURCED__ */
|
---|
57 |
|
---|
58 | #ifndef RC_INVOKED
|
---|
59 |
|
---|
60 | _BEGIN_C_DECLS
|
---|
61 |
|
---|
62 | #ifdef _DIRECT_H
|
---|
63 | /* Functions for manipulating disk drive selection; these are declared
|
---|
64 | * only when <direct.h> is included in its own right.
|
---|
65 | */
|
---|
66 | _CRTIMP __cdecl __MINGW_NOTHROW int _getdrive (void);
|
---|
67 | _CRTIMP __cdecl __MINGW_NOTHROW unsigned long _getdrives(void);
|
---|
68 | _CRTIMP __cdecl __MINGW_NOTHROW int _chdrive (int);
|
---|
69 | _CRTIMP __cdecl __MINGW_NOTHROW char *_getdcwd (int, char*, int);
|
---|
70 |
|
---|
71 | #endif /* _DIRECT_H */
|
---|
72 |
|
---|
73 | /* The following group of function prototypes are to be declared
|
---|
74 | * either when including <dirent.h> in its own right, or when it
|
---|
75 | * is included selectively by <wchar.h>; however...
|
---|
76 | */
|
---|
77 | #if defined __MSVCRT__ && ! (defined _DIRENT_H && defined _WCHAR_H)
|
---|
78 | /*
|
---|
79 | * ...they are available only within MSVCRT.DLL, (i.e. they are
|
---|
80 | * NOT provided by CRTDLL.DLL), and if both _DIRENT_H and _WCHAR_H
|
---|
81 | * are already defined, by the time we get to here, then this must
|
---|
82 | * be an inclusion of <dirent.h> in its own right, AFTER they have
|
---|
83 | * already been declared on behalf of <wchar.h>; there is no need
|
---|
84 | * to declare them again.
|
---|
85 | */
|
---|
86 | _CRTIMP __cdecl __MINGW_NOTHROW int _wchdir (const wchar_t *);
|
---|
87 | _CRTIMP __cdecl __MINGW_NOTHROW wchar_t *_wgetcwd (wchar_t *, int);
|
---|
88 | _CRTIMP __cdecl __MINGW_NOTHROW wchar_t *_wgetdcwd (int, wchar_t *, int);
|
---|
89 | _CRTIMP __cdecl __MINGW_NOTHROW int _wmkdir (const wchar_t *);
|
---|
90 | _CRTIMP __cdecl __MINGW_NOTHROW int _wrmdir (const wchar_t *);
|
---|
91 |
|
---|
92 | #endif /* __MSVCRT__ && ! (defined _DIRENT_H && defined _WCHAR_H) */
|
---|
93 |
|
---|
94 | _END_C_DECLS
|
---|
95 |
|
---|
96 | #endif /* ! RC_INVOKED */
|
---|
97 | #endif /* !_DIRECT_H: $RCSfile: direct.h,v $: end of file */
|
---|