version 1.10, 2003/06/03 02:56:16 |
version 1.11, 2003/06/10 22:20:51 |
|
|
#define OUT(s) { fwrite(s, sizeof(u_char), psl, stdout); } |
#define OUT(s) { fwrite(s, sizeof(u_char), psl, stdout); } |
|
|
void |
void |
process() |
process(void) |
{ |
{ |
struct s_command *cp; |
struct s_command *cp; |
SPACE tspace; |
SPACE tspace; |
|
|
* flag to process ranges. Interprets the non-select (``!'') flag. |
* flag to process ranges. Interprets the non-select (``!'') flag. |
*/ |
*/ |
static inline int |
static inline int |
applies(cp) |
applies(struct s_command *cp) |
struct s_command *cp; |
|
{ |
{ |
int r; |
int r; |
|
|
|
|
* and then swap them. |
* and then swap them. |
*/ |
*/ |
static int |
static int |
substitute(cp) |
substitute(struct s_command *cp) |
struct s_command *cp; |
|
{ |
{ |
SPACE tspace; |
SPACE tspace; |
regex_t *re; |
regex_t *re; |
|
|
* therefore it also resets the substitution done (sdone) flag. |
* therefore it also resets the substitution done (sdone) flag. |
*/ |
*/ |
static void |
static void |
flush_appends() |
flush_appends(void) |
{ |
{ |
FILE *f; |
FILE *f; |
int count, i; |
int count, i; |
|
|
} |
} |
|
|
static void |
static void |
lputs(s) |
lputs(char *s) |
char *s; |
|
{ |
{ |
int count; |
int count; |
char *escapes, *p; |
char *escapes, *p; |
|
|
} |
} |
|
|
static inline int |
static inline int |
regexec_e(preg, string, eflags, nomatch, slen) |
regexec_e(regex_t *preg, const char *string, int eflags, |
regex_t *preg; |
int nomatch, size_t slen) |
const char *string; |
|
int eflags, nomatch; |
|
size_t slen; |
|
{ |
{ |
int eval; |
int eval; |
|
|
|
|
* Based on a routine by Henry Spencer |
* Based on a routine by Henry Spencer |
*/ |
*/ |
static void |
static void |
regsub(sp, string, src) |
regsub(SPACE *sp, char *string, char *src) |
SPACE *sp; |
|
char *string, *src; |
|
{ |
{ |
int len, no; |
int len, no; |
char c, *dst; |
char c, *dst; |
|
|
* space as necessary. |
* space as necessary. |
*/ |
*/ |
void |
void |
cspace(sp, p, len, spflag) |
cspace(SPACE *sp, char *p, size_t len, enum e_spflag spflag) |
SPACE *sp; |
|
char *p; |
|
size_t len; |
|
enum e_spflag spflag; |
|
{ |
{ |
size_t tlen; |
size_t tlen; |
|
|
|
|
* Close all cached opened files and report any errors |
* Close all cached opened files and report any errors |
*/ |
*/ |
void |
void |
cfclose(cp, end) |
cfclose(struct s_command *cp, struct s_command *end) |
struct s_command *cp, *end; |
|
{ |
{ |
|
|
for (; cp != end; cp = cp->next) |
for (; cp != end; cp = cp->next) |