xref: /openbsd-src/gnu/usr.bin/cvs/vms/dir.h (revision 461cc63e7458ce60db55037c1a7656349538b52f)
150bf276cStholo /* GNU Emacs VMS directory definition file.
250bf276cStholo    Copyright (C) 1986 Free Software Foundation, Inc.
350bf276cStholo 
450bf276cStholo This file is part of GNU Emacs.
550bf276cStholo 
650bf276cStholo GNU Emacs is free software; you can redistribute it and/or modify
750bf276cStholo it under the terms of the GNU General Public License as published by
850bf276cStholo the Free Software Foundation; either version 1, or (at your option)
950bf276cStholo any later version.
1050bf276cStholo 
1150bf276cStholo GNU Emacs is distributed in the hope that it will be useful,
1250bf276cStholo but WITHOUT ANY WARRANTY; without even the implied warranty of
1350bf276cStholo MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14*461cc63eStholo GNU General Public License for more details.  */
1550bf276cStholo 
1650bf276cStholo /*
1750bf276cStholo  * Files-11 Ver. 2 directory structure (VMS V4.x - long names)
1850bf276cStholo  */
1950bf276cStholo #ifndef DIR$K_LENGTH
2050bf276cStholo 
2150bf276cStholo #define	DIR$C_FID	0
2250bf276cStholo #define	DIR$C_LINKNAME	1
2350bf276cStholo #define	DIR$K_LENGTH	6
2450bf276cStholo #define	DIR$C_LENGTH	6
2550bf276cStholo #define	DIR$S_DIRDEF	6
2650bf276cStholo #define	DIR$W_SIZE	0
2750bf276cStholo #define	DIR$W_VERLIMIT	2
2850bf276cStholo #define	DIR$B_FLAGS	4
2950bf276cStholo #define	DIR$S_TYPE	3
3050bf276cStholo #define	DIR$V_TYPE	0
3150bf276cStholo #define	DIR$V_NEXTREC	6
3250bf276cStholo #define	DIR$V_PREVREC	7
3350bf276cStholo #define	DIR$B_NAMECOUNT	5
3450bf276cStholo #define	DIR$S_NAME	80
3550bf276cStholo #define	DIR$T_NAME	6
3650bf276cStholo 
3750bf276cStholo #define	DIR$K_VERSION	8
3850bf276cStholo #define	DIR$C_VERSION	8
3950bf276cStholo #define	DIR$S_DIRDEF1	8
4050bf276cStholo #define	DIR$W_VERSION	0
4150bf276cStholo #define	DIR$S_FID	6
4250bf276cStholo #define	DIR$W_FID	2
4350bf276cStholo #define	DIR$W_FID_NUM	2
4450bf276cStholo #define	DIR$W_FID_SEQ	4
4550bf276cStholo #define	DIR$W_FID_RVN	6
4650bf276cStholo #define	DIR$B_FID_RVN	6
4750bf276cStholo #define	DIR$B_FID_NMX	7
4850bf276cStholo 
4950bf276cStholo #define	DIR$S_DIRDEF2	1
5050bf276cStholo #define	DIR$T_LINKNAME	0
5150bf276cStholo 
5250bf276cStholo typedef struct dir$_name {
5350bf276cStholo /*  short dir$w_size;		/* if you read with RMS, it eats this... */
5450bf276cStholo   short dir$w_verlimit;			/* maximum number of versions */
5550bf276cStholo   union {
5650bf276cStholo     unsigned char dir_b_flags;
5750bf276cStholo #define dir$b_flags dir__b_flags.dir_b_flags
5850bf276cStholo     struct {
5950bf276cStholo       unsigned char dir_v_type: DIR$S_TYPE;
6050bf276cStholo #define dir$v_type dir__b_flags.dir___b_flags.dir_v_type
6150bf276cStholo       unsigned char: 3;
6250bf276cStholo       unsigned char dir_v_nextrec: 1;
6350bf276cStholo #define dir$v_nextrec dir__b_flags.dir___b_flags.dir_v_nextrec
6450bf276cStholo       unsigned char dir_v_prevrec: 1;
6550bf276cStholo #define dir$v_prevrec dir__b_flags.dir___b_flags.dir_v_prevrec
6650bf276cStholo     } dir___b_flags;
6750bf276cStholo   } dir__b_flags;
6850bf276cStholo   unsigned char dir$b_namecount;
6950bf276cStholo   char dir$t_name[];
7050bf276cStholo } dir$_dirdef;		/* only the fixed first part */
7150bf276cStholo 
7250bf276cStholo typedef struct dir$_version {
7350bf276cStholo   short dir$w_version;
7450bf276cStholo   short dir$w_fid_num;
7550bf276cStholo   short dir$w_fid_seq;
7650bf276cStholo   union {
7750bf276cStholo     short dir_w_fid_rvn;
7850bf276cStholo #define dir$w_fid_rvn dir__w_fid_rvn.dir_w_fid_rvn
7950bf276cStholo     struct {
8050bf276cStholo       char dir_b_fid_rvn;
8150bf276cStholo #define dir$b_fid_rvn dir__w_fid_rvn.dir___w_fid_rvn.dir_b_fid_rvn
8250bf276cStholo       char dir_b_fid_nmx;
8350bf276cStholo #define dir$b_fid_nmx dir__w_fid_rvn.dir___w_fid_rvn.dir_b_fid_nmx
8450bf276cStholo     } dir___w_fid_rvn;
8550bf276cStholo   } dir__w_fid_rvn;
8650bf276cStholo } dir$_dirdef1;		/* one for each version of the file */
8750bf276cStholo 
8850bf276cStholo typedef
8950bf276cStholo struct dir$_linkname {
9050bf276cStholo   char    dir$t_linkname[];
9150bf276cStholo } dir$_dirdef2;
9250bf276cStholo 
9350bf276cStholo #endif
94