source: trunk/src/binutils/include/mpw/fcntl.h@ 1730

Last change on this file since 1730 was 10, checked in by bird, 23 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 3.6 KB
Line 
1/*
2 * FCntl.h -- faccess(), fcntl(), and open() mode flags
3 *
4 * Portions copyright American Telephone & Telegraph
5 * Used with permission, Apple Computer Inc. (1985,1988,1990,1992)
6 * All rights reserved.
7 */
8
9#ifndef __FCNTL__
10#define __FCNTL__
11
12#ifndef __TYPES__
13#include <Types.h>
14#endif
15
16/*
17 * For use by lseek():
18 */
19
20#ifndef __STDIO__ /* these defns exactly paralled in StdIO.h for fseek() */
21#define SEEK_CUR 1
22#define SEEK_END 2
23#define SEEK_SET 0
24#endif
25
26/*
27 * faccess() commands; for general use
28 */
29 /* 'd' => "directory" ops */
30#define F_DELETE (('d'<<8)|0x01)
31#define F_RENAME (('d'<<8)|0x02)
32
33/*
34 * more faccess() commands; for use only by MPW tools
35 */
36
37#define F_OPEN (('d'<<8)|0x00) /* reserved for operating system use */
38 /* 'e' => "editor" ops */
39#define F_GTABINFO (('e'<<8)|0x00) /* get tab offset for file */
40#define F_STABINFO (('e'<<8)|0x01) /* set " " " " */
41#define F_GFONTINFO (('e'<<8)|0x02) /* get font number and size for file */
42#define F_SFONTINFO (('e'<<8)|0x03) /* set " " " " " " */
43#define F_GPRINTREC (('e'<<8)|0x04) /* get print record for file */
44#define F_SPRINTREC (('e'<<8)|0x05) /* set " " " " */
45#define F_GSELINFO (('e'<<8)|0x06) /* get selection information for file */
46#define F_SSELINFO (('e'<<8)|0x07) /* set " " " " */
47#define F_GWININFO (('e'<<8)|0x08) /* get current window position */
48#define F_SWININFO (('e'<<8)|0x09) /* set " " " */
49#define F_GSCROLLINFO (('e'<<8)|0x0A) /* get scroll information */
50#define F_SSCROLLINFO (('e'<<8)|0x0B) /* set " " */
51#define F_GMARKER (('e'<<8)|0x0D) /* Get Marker */
52#define F_SMARKER (('e'<<8)|0x0C) /* Set " */
53#define F_GSAVEONCLOSE (('e'<<8)|0x0F) /* Get Save on close */
54#define F_SSAVEONCLOSE (('e'<<8)|0x0E) /* Set " " " */
55
56/*
57 * argument structures used by various faccess() commands
58 */
59
60struct MarkElement {
61 int start; /* start position of mark */
62 int end; /* end position */
63 unsigned char charCount; /* number of chars in mark name */
64 char name[64]; /* mark name */
65} ; /* note: marker names may be up to 64 characters long */
66
67#ifndef __cplusplus
68typedef struct MarkElement MarkElement;
69#endif
70
71struct SelectionRecord {
72 long startingPos;
73 long endingPos;
74 long displayTop;
75};
76
77#ifndef __cplusplus
78typedef struct SelectionRecord SelectionRecord;
79#endif
80
81
82/*
83 * Mode values accessible to open()