1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright (c) 1996, by Sun Microsystems, Inc. 24 * All Rights Reserved. 25 */ 26 27 #ifndef _RULES_H 28 #define _RULES_H 29 30 #pragma ident "%Z%%M% %I% %E% SMI" 31 32 #define MAX_RULE_SZ MAXPATHLEN+80 33 34 #define BASE "BASE" 35 #define IGNORE "IGNORE" 36 #define LIST "LIST" 37 #define VERSION "PACKINGRULES" 38 39 #define VERMAJOR 1 40 #define VERMINOR 1 41 42 #define TMPRULES ".packingrules" 43 #define CMDCHAR '!' 44 45 struct item { 46 int i_flag; 47 char *i_str; 48 struct item *i_next; 49 }; 50 51 #ifdef MAIN 52 #define EXTERN 53 #else 54 #define EXTERN extern 55 #endif 56 57 EXTERN char *basedir; 58 EXTERN struct item list_hd; 59 EXTERN struct item gign_hd; 60 EXTERN struct item lign_hd; 61 EXTERN struct item *last_list; 62 EXTERN struct item *last_gign; 63 EXTERN struct item *last_lign; 64 EXTERN int def_gign_flags; 65 EXTERN int def_lign_flags; 66 EXTERN int def_list_flags; 67 EXTERN int bang_list_flags; 68 69 EXTERN int global_flags; 70 71 #undef EXTERN 72 73 /* 74 * Define values for item struct flags 75 */ 76 #define LF_NULL 0 77 #define LF_STRIP_DOTSLASH 1 78 #define LF_REGEX 2 79 #define LF_SYMLINK 4 80 81 #define WILDCARD(x, y) (x = strpbrk(y, "*?.^[]{}$")) 82 83 #endif /* _RULES_H */ 84