File: lsparse.h

package info (click to toggle)
fdclone 3.01b-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 4,772 kB
  • ctags: 8,674
  • sloc: ansic: 100,552; makefile: 4,497; sh: 1,480; sed: 224
file content (84 lines) | stat: -rw-r--r-- 2,126 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*
 *	lsparse.h
 *
 *	definitions & function prototype declarations for "lsparse.c"
 */

#ifndef	__LSPARSE_H_
#define	__LSPARSE_H_

#include "typesize.h"
#include "namelist.h"

#if	defined (FD) && (FD < 2) && !defined (OLDPARSE)
#define	OLDPARSE
#endif

#define	MAXLSPARSEFIELD		9
#define	MAXLSPARSESEP		3
typedef struct _lsparse_t {
	char *ext;
	char *comm;
#ifndef	OLDPARSE
	char **format;
	char **lignore;
	char **lerror;
#endif
	u_char topskip;
	u_char bottomskip;
#ifdef	OLDPARSE
	u_char field[MAXLSPARSEFIELD];
	u_char delim[MAXLSPARSEFIELD];
	u_char width[MAXLSPARSEFIELD];
	u_char sep[MAXLSPARSESEP];
	u_char lines;
#endif
	u_char flags;
} lsparse_t;

#define	F_MODE			0
#define	F_UID			1
#define	F_GID			2
#define	F_SIZE			3
#define	F_YEAR			4
#define	F_MON			5
#define	F_DAY			6
#define	F_TIME			7
#define	F_NAME			8
#define	LF_IGNORECASE		0001
#define	LF_DIRLOOP		0002
#define	LF_DIRNOPREP		0004
#define	LF_FILELOOP		0010
#define	LF_FILENOPREP		0020
#define	LF_NOTRAVERSE		0040
#define	LF_BASENAME		0100
#define	SKP_NONE		MAXUTYPE(u_char)
#define	FLD_NONE		MAXUTYPE(u_char)
#define	SEP_NONE		MAXUTYPE(u_char)

extern u_int getfmode __P_((int));
extern int getfsymbol __P_((u_int));
#ifdef	NOUID
extern int logical_access __P_((u_int));
#define	logical_access2(s)	logical_access((u_int)((s) -> st_mode))
#else
extern int logical_access __P_((u_int, u_id_t, g_id_t));
#define	logical_access2(s)	logical_access((u_int)((s) -> st_mode), \
					(s) -> st_uid, (s) -> st_gid)
#endif
#ifdef	DEP_LSPARSE
extern VOID initlist __P_((namelist *, CONST char *));
extern VOID todirlist __P_((namelist *, u_int));
extern int dirmatchlen __P_((CONST char *, CONST char *));
extern int parsefilelist __P_((VOID_P, CONST lsparse_t *,
		namelist *, int *, char *(*)__P_((VOID_P))));
extern namelist *addlist __P_((namelist *, int, int *));
extern VOID freelist __P_((namelist *, int));
extern int lsparse __P_((VOID_P, CONST lsparse_t *,
		namelist **, char *(*)__P_((VOID_P))));
extern int Xstrptime __P_((CONST char *, CONST char *, struct tm *, int *));
#endif

extern int (*lsintrfunc)__P_((VOID_A));

#endif	/* !__LSPARSE_H_ */