2 * Copyright (c) 2005, 2008 Sun Microsystems, Inc. All Rights Reserved.
3 * Use is subject to license terms.
5 * Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
8 * University Copyright- Copyright (c) 1982, 1986, 1988
9 * The Regents of the University of California
12 * University Acknowledgment- Portions of this document are derived from
13 * software developed by the University of California, Berkeley, and its
16 * Licensed under the Apache License, Version 2.0 (the "License");
17 * you may not use this file except in compliance with the License.
18 * You may obtain a copy of the License at
19 * http://www.apache.org/licenses/LICENSE-2.0.
21 * Unless required by applicable law or agreed to in writing, software
22 * distributed under the License is distributed on an "AS IS" BASIS,
23 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
25 * See the License for the specific language governing permissions and
26 * limitations under the License.
54 #define PLACE(c) ep[c >> 3] |= bittab[c & 07]
55 #define ISTHERE(c) (ep[c >> 3] & bittab[c & 07])
57 typedef struct _step_vars_storage {
58 char *loc1, *loc2, *locs;
65 typedef struct _sed_comp_args {
66 int circf; /* Regular expression starts with ^ */
67 int nbra; /* braces count */
70 extern char *sed_compile(sed_commands_t *commands, sed_comp_args *compargs,
71 char *ep, char *endbuf, int seof);
72 extern void command_errf(sed_commands_t *commands, const char *fmt, ...)
73 __attribute__((format(printf,2,3)));
75 #define SEDERR_CGMES "command garbled: %s"
76 #define SEDERR_SMMES "Space missing before filename: %s"
77 #define SEDERR_TMMES "too much command text: %s"
78 #define SEDERR_LTLMES "label too long: %s"
79 #define SEDERR_ULMES "undefined label: %s"
80 #define SEDERR_DLMES "duplicate labels: %s"
81 #define SEDERR_TMLMES "too many labels: %s"
82 #define SEDERR_AD0MES "no addresses allowed: %s"
83 #define SEDERR_AD1MES "only one address allowed: %s"
84 #define SEDERR_TOOBIG "suffix too large: %s"
85 #define SEDERR_OOMMES "out of memory"
86 #define SEDERR_COPFMES "cannot open pattern file: %s"
87 #define SEDERR_COIFMES "cannot open input file: %s"
88 #define SEDERR_TMOMES "too many {'s"
89 #define SEDERR_TMCMES "too many }'s"
90 #define SEDERR_NRMES "first RE may not be null"
91 #define SEDERR_UCMES "unrecognized command: %s"
92 #define SEDERR_TMWFMES "too many files in w commands"
93 #define SEDERR_COMES "cannot open %s"
94 #define SEDERR_CCMES "cannot create %s"
95 #define SEDERR_TMLNMES "too many line numbers"
96 #define SEDERR_TMAMES "too many appends after line %lld"
97 #define SEDERR_TMRMES "too many reads after line %lld"
98 #define SEDERR_DOORNG "``\\digit'' out of range: %s"
99 #define SEDERR_EDMOSUB "ending delimiter missing on substitution: %s"
100 #define SEDERR_EDMOSTR "ending delimiter missing on string: %s"
101 #define SEDERR_FNTL "file name too long: %s"
102 #define SEDERR_CLTL "command line too long"
103 #define SEDERR_TSNTSS "transform strings not the same size: %s"
104 #define SEDERR_OLTL "output line too long."
105 #define SEDERR_HSOVERFLOW "hold space overflowed."
106 #define SEDERR_INTERNAL "internal sed error"
112 #endif /* _REGEXP_H */