OSDN Git Service

Revert "Revert "Merge branch 'master' of git.osdn.net:/gitroot/hengband/hengband""
[hengband/hengband.git] / src / util / angband-files.h
1 #pragma once
2
3 #include "system/angband.h"
4
5 /* Force definitions -- see fd_seek() */
6 #ifndef SEEK_SET
7 #define SEEK_SET 0
8 #endif
9 #ifndef SEEK_CUR
10 #define SEEK_CUR 1
11 #endif
12 #ifndef SEEK_END
13 #define SEEK_END 2
14 #endif
15
16 /* Force definitions -- see fd_lock() */
17 #ifndef F_UNLCK
18 #define F_UNLCK 0
19 #endif
20 #ifndef F_RDLCK
21 #define F_RDLCK 1
22 #endif
23 #ifndef F_WRLCK
24 #define F_WRLCK 2
25 #endif
26
27 #ifdef SET_UID
28 extern void user_name(char *buf, int id);
29 #ifndef HAVE_USLEEP
30 extern int usleep(huge usecs);
31 #endif
32 #endif
33
34 errr path_parse(char *buf, int max, concptr file);
35 errr path_build(char *buf, int max, concptr path, concptr file);
36 FILE *angband_fopen(concptr file, concptr mode);
37 FILE *angband_fopen_temp(char *buf, int max);
38 errr angband_fgets(FILE *fff, char *buf, huge n);
39 errr angband_fputs(FILE *fff, concptr buf, huge n);
40 errr angband_fclose(FILE *fff);
41 errr fd_kill(concptr file);
42 errr fd_move(concptr file, concptr what);
43 errr fd_copy(concptr file, concptr what);
44 int fd_make(concptr file, BIT_FLAGS mode);
45 int fd_open(concptr file, int flags);
46 errr fd_lock(int fd, int what);
47 errr fd_seek(int fd, huge n);
48 errr fd_chop(int fd, huge n);
49 errr fd_read(int fd, char *buf, huge n);
50 errr fd_write(int fd, concptr buf, huge n);
51 errr fd_close(int fd);