Use the approriate command for combining .o files.
[wine/multimedia.git] / include / file.h
blobcc6de40b53b3a55845fe5dfa0c56cecb3bf25126
1 /*
2 * File handling declarations
4 * Copyright 1996 Alexandre Julliard
5 */
7 #ifndef __WINE_FILE_H
8 #define __WINE_FILE_H
10 #include <time.h> /* time_t */
11 #include "winbase.h"
12 #include "wine/windef16.h" /* HFILE16 */
14 #define MAX_PATHNAME_LEN 1024
16 /* Definition of a full DOS file name */
17 typedef struct
19 char long_name[MAX_PATHNAME_LEN]; /* Long pathname in Unix format */
20 char short_name[MAX_PATHNAME_LEN]; /* Short pathname in DOS 8.3 format */
21 int drive;
22 } DOS_FULL_NAME;
24 #define IS_END_OF_NAME(ch) (!(ch) || ((ch) == '/') || ((ch) == '\\'))
26 /* DOS device descriptor */
27 typedef struct
29 char *name;
30 int flags;
31 } DOS_DEVICE;
33 /* locale-independent case conversion */
34 inline static char FILE_tolower( char c )
36 if (c >= 'A' && c <= 'Z') c += 32;
37 return c;
39 inline static char FILE_toupper( char c )
41 if (c >= 'a' && c <= 'z') c -= 32;
42 return c;
45 /* files/file.c */
46 extern int FILE_strcasecmp( const char *str1, const char *str2 );
47 extern int FILE_strncasecmp( const char *str1, const char *str2, int len );
48 extern void FILE_SetDosError(void);
49 extern HFILE FILE_DupUnixHandle( int fd, DWORD access );
50 extern int FILE_GetUnixHandle( HANDLE handle, DWORD access );
51 extern BOOL FILE_Stat( LPCSTR unixName, BY_HANDLE_FILE_INFORMATION *info );
52 extern HFILE16 FILE_Dup2( HFILE16 hFile1, HFILE16 hFile2 );
53 extern HANDLE FILE_CreateFile( LPCSTR filename, DWORD access, DWORD sharing,
54 LPSECURITY_ATTRIBUTES sa, DWORD creation,
55 DWORD attributes, HANDLE template, BOOL fail_read_only );
56 extern HFILE FILE_CreateDevice( int client_id, DWORD access,
57 LPSECURITY_ATTRIBUTES sa );
59 /* files/directory.c */
60 extern int DIR_Init(void);
61 extern UINT DIR_GetWindowsUnixDir( LPSTR path, UINT count );
62 extern UINT DIR_GetSystemUnixDir( LPSTR path, UINT count );
63 extern DWORD DIR_SearchPath( LPCSTR path, LPCSTR name, LPCSTR ext,
64 DOS_FULL_NAME *full_name, BOOL win32 );
66 /* files/dos_fs.c */
67 extern void DOSFS_UnixTimeToFileTime( time_t unixtime, LPFILETIME ft,
68 DWORD remainder );
69 extern time_t DOSFS_FileTimeToUnixTime( const FILETIME *ft, DWORD *remainder );
70 extern BOOL DOSFS_ToDosFCBFormat( LPCSTR name, LPSTR buffer );
71 extern const DOS_DEVICE *DOSFS_GetDevice( const char *name );
72 extern const DOS_DEVICE *DOSFS_GetDeviceByHandle( HFILE hFile );
73 extern HFILE DOSFS_OpenDevice( const char *name, DWORD access );
74 extern BOOL DOSFS_FindUnixName( LPCSTR path, LPCSTR name, LPSTR long_buf,
75 INT long_len, LPSTR short_buf,
76 BOOL ignore_case );
77 extern BOOL DOSFS_GetFullName( LPCSTR name, BOOL check_last,
78 DOS_FULL_NAME *full );
79 extern int DOSFS_FindNext( const char *path, const char *short_mask,
80 const char *long_mask, int drive, BYTE attr,
81 int skip, WIN32_FIND_DATAA *entry );
83 /* win32/device.c */
84 extern HANDLE DEVICE_Open( LPCSTR filename, DWORD access, LPSECURITY_ATTRIBUTES sa );
86 #endif /* __WINE_FILE_H */