2 * This file has been modified for the cdrkit suite.
4 * The behaviour and appearence of the program code below can differ to a major
5 * extent from the version distributed by the original author(s).
7 * For details, see Changelog file distributed with the cdrkit package. If you
8 * received this file from another source then ask the distributing person for
9 * a log of modifications.
13 /* @(#)match.h 1.9 04/05/23 joerg */
15 * 27th March 1996. Added by Jan-Piet Mens for matching regular expressions
24 #define NOT_SORTED INT_MIN
26 #ifdef MAX /* May be defined in param.h */
29 #define MAX(A, B) (A) > (B) ? (A) : (B)
32 #define EXCLUDE 0 /* Exclude file completely */
33 #define I_HIDE 1 /* ISO9660/Rock Ridge hide */
34 #define J_HIDE 2 /* Joliet hide */
35 #define H_HIDE 3 /* ISO9660 hidden bit set */
38 #define HFS_HIDE 4 /* HFS hide */
42 #endif /* APPLE_HYB */
44 extern int gen_add_match(char *fn, int n);
45 extern int gen_matches(char *fn, int n);
46 extern void gen_add_list(char *fn, int n);
47 extern int gen_ishidden(int n);
48 extern void gen_del_match(int n);
51 extern int add_sort_match(char *fn, int val);
52 extern void add_sort_list(char *fn);
53 extern int sort_matches(char *fn, int val);
54 extern void del_sort(void);
58 * The following are for compatiblity with the separate routines - the
59 * main code should be changed to call the generic routines directly
62 /* filenames to be excluded */
63 #define add_match(FN) gen_add_match((FN), EXCLUDE)
64 #define add_list(FN) gen_add_list((FN), EXCLUDE)
65 #define matches(FN) gen_matches((FN), EXCLUDE)
67 /* ISO9660/Rock Ridge filenames to be hidden */
68 #define i_add_match(FN) gen_add_match((FN), I_HIDE)
69 #define i_add_list(FN) gen_add_list((FN), I_HIDE)
70 #define i_matches(FN) gen_matches((FN), I_HIDE)
71 #define i_ishidden() gen_ishidden(I_HIDE)
73 /* Joliet filenames to be hidden */
74 #define j_add_match(FN) gen_add_match((FN), J_HIDE)
75 #define j_add_list(FN) gen_add_list((FN), J_HIDE)
76 #define j_matches(FN) gen_matches((FN), J_HIDE)
77 #define j_ishidden() gen_ishidden(J_HIDE)
79 /* ISO9660 "hidden" files */
80 #define h_add_match(FN) gen_add_match((FN), H_HIDE)
81 #define h_add_list(FN) gen_add_list((FN), H_HIDE)
82 #define h_matches(FN) gen_matches((FN), H_HIDE)
83 #define h_ishidden() gen_ishidden(H_HIDE)
86 /* HFS filenames to be hidden */
87 #define hfs_add_match(FN) gen_add_match((FN), HFS_HIDE)
88 #define hfs_add_list(FN) gen_add_list((FN), HFS_HIDE)
89 #define hfs_matches(FN) gen_matches((FN), HFS_HIDE)
90 #define hfs_ishidden() gen_ishidden(HFS_HIDE)
91 #endif /* APPLE_HYB */