1 /*
2   OS
3   A veneer to simple library and OS services
4   Trivially implemented on ANSI platforms, but the Psion
5   gives better performance when the ANSI library is not used.
6   JBS 15 June 1994
7 */
8 
9 #ifndef _OS_
10 
11 #define _OS_
12 
13 #include "types.h"
14 
15 typedef void *filep;
16 
17 filep os_open_read(const char *);
18 filep os_wild_read(const char *); /* Search drives */
19 filep os_open_write(const char *);
20 filep os_open_append(const char *);
21 int os_close(filep);
22 int os_seek_fore(filep, long_word);
23 int os_seek_back(filep, long_word);
24 int os_read(void *, size_t, int, filep);
25 int os_write(void *, size_t, int, filep);
26 
27 void os_exit(int);
28 
29 void os_mcpy(void *, void *, size_t);
30 void os_mset(char *, size_t, char);
31 
32 void os_strcpy(char *, const char *);
33 void os_strcat(char *, const char *);
34 int os_strlen(const char *);
35 int os_strcmp(const char *, const char *);
36 
37 void *os_alloc(size_t);
38 void os_free(void *);
39 void *os_realloc(void *, size_t);
40 
41 char os_lower(char);
42 
43 long_word os_time(void);
44 
45 char *os_leaf(char *);
46 
47 void os_patch_save(char *); /* Normalise to a save position filename */
48 
49 int os_strpos(char *, char);
50 
51 #endif /* __MACHINE__ */
52