Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 76 lines (62 sloc) 2.455 kB
cf92e3b @mbert Import Elvis 2.0 (written by Steve Kirkendall)
authored
1 /* opsys.h */
2 /* Copyright 1995 by Steve Kirkendall */
3
4
5
6 typedef enum
7 {
8 DIR_INVALID, /* malformed filename (can't happen with UNIX) */
9 DIR_BADPATH, /* unable to check file */
10 DIR_NOTFILE, /* directory or other non-file */
11 DIR_NEW, /* file doesn't exist yet */
12 DIR_UNREADABLE, /* file exists but is unreadable */
13 DIR_READONLY, /* file is readable but not writable */
14 DIR_READWRITE /* file is readable and writable. */
15 } DIRPERM;
16
17 BEGIN_EXTERNC
18 extern BOOLEAN blkopen P_((BOOLEAN force, BLK *buf));
19 extern void blkclose P_((BLK *buf));
20 extern void blkwrite P_((BLK *buf, _BLKNO_ blkno));
21 extern void blkread P_((BLK *buf, _BLKNO_ blkno));
22 extern void blksync P_((void));
23
24 extern char *dirfirst P_((char *wildexpr, BOOLEAN ispartial));
25 extern char *dirnext P_((void));
26 extern BOOLEAN diriswild P_((char *wildexpr));
27 extern DIRPERM dirperm P_((char *filename));
28 extern char *dirdir P_((char *pathname));
29 extern char *dirfile P_((char *pathname));
30 extern char *dirpath P_((char *dir, char *file));
31 extern char *dircwd P_((void));
32 extern BOOLEAN dirchdir P_((char *pathname));
33
34 extern BOOLEAN prgopen P_((char *command, BOOLEAN willwrite, BOOLEAN willread));
35 extern int prgwrite P_((CHAR *buf, int nbytes));
36 extern BOOLEAN prggo P_((void));
37 extern int prgread P_((CHAR *buf, int nbytes));
38 extern int prgclose P_((void));
39
40 extern int txtopen P_((char *filename, _char_ rwa, BOOLEAN binary));
41 extern void txtclose P_((void));
42 extern int txtwrite P_((CHAR *buf, int nbytes));
43 extern int txtread P_((CHAR *buf, int nbytes));
44
8d1ac0c @mbert Import Elvis 2.1 (written by Steve Kirkendall)
authored
45 #if defined(PROTOCOL_HTTP) || defined(PROTOCOL_FTP)
46 typedef struct
47 {
48 int fd; /* file descriptor of a socket to read from */
49 int left; /* number of chars used from buf */
50 int right; /* total number of chars in buf */
51 char buf[4096]; /* buffer */
52 } sockbuf_t;
53
54 #define netbuffer(sb) ((sb)->buf + (sb)->left)
55 #define netbytes(sb) ((sb)->right - (sb)->left)
56 #define netconsume(sb, n) ((sb)->left += (n))
57
58 sockbuf_t *netconnect P_((char *site_port, unsigned int defport));
59 void netdisconnect P_((sockbuf_t *sb));
60 BOOLEAN netread P_((sockbuf_t *sb));
61 char *netgetline P_((sockbuf_t *sb));
62 BOOLEAN netwrite P_((sockbuf_t *sb, char *data, int len));
63 BOOLEAN netputline P_((sockbuf_t *sb, char *command, char *arg1, char *arg2));
64 char *netself P_((void));
65 #endif
66
cf92e3b @mbert Import Elvis 2.0 (written by Steve Kirkendall)
authored
67 #ifdef OSINIT
68 extern void osinit P_((char *argv0));
69 #endif
8d1ac0c @mbert Import Elvis 2.1 (written by Steve Kirkendall)
authored
70
71 #if ANY_UNIX
72 extern char *expanduserhome P_((char *pathname, char *dest));
73 #endif
74
cf92e3b @mbert Import Elvis 2.0 (written by Steve Kirkendall)
authored
75 END_EXTERNC
Something went wrong with that request. Please try again.