#include <ctype.h>#include <sys/types.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include <stdio.h>Go to the source code of this file.
Classes | |
| struct | cmd_t |
| struct | label |
Defines | |
| #define | MAXBUF 4000 |
| #define | MAXAPPENDS 20 |
| #define | MAXTAGS 9 |
| #define | EQCMD 0x01 |
| #define | ACMD 0x02 |
| #define | BCMD 0x03 |
| #define | CCMD 0x04 |
| #define | DCMD 0x05 |
| #define | CDCMD 0x06 |
| #define | GCMD 0x07 |
| #define | CGCMD 0x08 |
| #define | HCMD 0x09 |
| #define | CHCMD 0x0A |
| #define | ICMD 0x0B |
| #define | LCMD 0x0C |
| #define | NCMD 0x0D |
| #define | CNCMD 0x0E |
| #define | PCMD 0x0F |
| #define | CPCMD 0x10 |
| #define | QCMD 0x11 |
| #define | RCMD 0x12 |
| #define | SCMD 0x13 |
| #define | TCMD 0x14 |
| #define | CTCMD 0x15 |
| #define | WCMD 0x16 |
| #define | CWCMD 0x17 |
| #define | XCMD 0x18 |
| #define | YCMD 0x19 |
| #define | BAD ((char *) -1) |
| #define | STAR 1 |
| #define | CCHR 2 |
| #define | CDOT 4 |
| #define | CCL 6 |
| #define | CNL 8 |
| #define | CDOL 10 |
| #define | CBRA 12 |
| #define | CKET 14 |
| #define | CBACK 16 |
| #define | CLNUM 18 |
| #define | CEND 20 |
| #define | CEOF 22 |
| #define | CMASK 0xFF |
| #define | MAXCMDS 500 |
| #define | MAXLINES 256 |
| #define | POOLSIZE 20000 |
| #define | WFILES 10 |
| #define | RELIMIT 256 |
| #define | MAXDEPTH 20 |
| #define | MAXLABS 50 |
| #define | SKIPWS(pc) while ((*pc==' ') || (*pc=='\t')) pc++ |
| #define | ABORT(msg) (fprintf(stderr, msg, linebuf), quit(2)) |
| #define | IFEQ(x, v) if (*x == v) x++ , |
| #define | H 0x80 |
| #define | LOWCMD 56 |
| #define | MAXHOLD MAXBUF |
| #define | GENSIZ MAXBUF |
| #define | TRUE 1 |
| #define | FALSE 0 |
Typedefs | |
| typedef struct cmd_t | sedcmd |
Functions | |
| _PROTOTYPE (int main,(int argc, char **argv)) | |
| _PROTOTYPE (static void compile,(void)) | |
| _PROTOTYPE (static int cmdcomp,(int cchar)) | |
| _PROTOTYPE (static char *rhscomp,(char *rhsp, int delim)) | |
| _PROTOTYPE (static char *recomp,(char *expbuf, int redelim)) | |
| _PROTOTYPE (static int cmdline,(char *cbuf)) | |
| _PROTOTYPE (static char *address,(char *expbuf)) | |
| _PROTOTYPE (static char *gettext,(char *txp)) | |
| _PROTOTYPE (static label *search,(label *ptr)) | |
| _PROTOTYPE (static char *ycomp,(char *ep, int delim)) | |
| _PROTOTYPE (void quit,(int n)) | |
| _PROTOTYPE (void execute,(void)) | |
| _PROTOTYPE (static int selected,(sedcmd *ipc)) | |
| _PROTOTYPE (static int match,(char *expbuf, int gf)) | |
| _PROTOTYPE (static int advance,(char *lp, char *ep)) | |
| _PROTOTYPE (static void dosub,(char *rhsbuf)) | |
| _PROTOTYPE (static char *place,(char *asp, char *al1, char *al2)) | |
| _PROTOTYPE (static void listto,(char *p1, FILE *fp)) | |
| _PROTOTYPE (static void truncated,(int h)) | |
| _PROTOTYPE (static void command,(sedcmd *ipc)) | |
| _PROTOTYPE (static void openfile,(char *file)) | |
| _PROTOTYPE (static char *getline,(char *buf)) | |
| _PROTOTYPE (static int Memcmp,(char *a, char *b, int count)) | |
| int | main (int argc, argv) |
| void | quit (int n) |
| void | execute () |
Variables | |
| char | linebuf [MAXBUF+1] |
| sedcmd | cmds [MAXCMDS+1] |
| long | linenum [MAXLINES] |
| int | nflag |
| int | eargc |
| char ** | eargv |
| char | bits [] = {1, 2, 4, 8, 16, 32, 64, 128} |
| #define ABORT | ( | msg | ) | (fprintf(stderr, msg, linebuf), quit(2)) |
| _PROTOTYPE | ( | static char * | getline, | |
| (char *buf) | ||||
| ) |
| _PROTOTYPE | ( | static void | openfile, | |
| (char *file) | ||||
| ) |
| _PROTOTYPE | ( | static void | command, | |
| (sedcmd *ipc) | ||||
| ) |
| _PROTOTYPE | ( | static void | truncated, | |
| (int h) | ||||
| ) |
| _PROTOTYPE | ( | static char * | place, | |
| (char *asp, char *al1, char *al2) | ||||
| ) |
| _PROTOTYPE | ( | static void | dosub, | |
| (char *rhsbuf) | ||||
| ) |
| _PROTOTYPE | ( | static int | advance, | |
| (char *lp, char *ep) | ||||
| ) |
| _PROTOTYPE | ( | static int | match, | |
| (char *expbuf, int gf) | ||||
| ) |
| _PROTOTYPE | ( | static int | selected, | |
| (sedcmd *ipc) | ||||
| ) |
| _PROTOTYPE | ( | void | execute, | |
| (void) | ||||
| ) |
| _PROTOTYPE | ( | void | quit, | |
| (int n) | ||||
| ) |
| _PROTOTYPE | ( | static char * | gettext, | |
| (char *txp) | ||||
| ) |
| _PROTOTYPE | ( | static char * | address, | |
| (char *expbuf) | ||||
| ) |
| _PROTOTYPE | ( | static int | cmdline, | |
| (char *cbuf) | ||||
| ) |
| _PROTOTYPE | ( | static char * | recomp, | |
| (char *expbuf, int redelim) | ||||
| ) |
| _PROTOTYPE | ( | static char * | rhscomp, | |
| (char *rhsp, int delim) | ||||
| ) |
| _PROTOTYPE | ( | static int | cmdcomp, | |
| (int cchar) | ||||
| ) |
| _PROTOTYPE | ( | static void | compile, | |
| (void) | ||||
| ) |
| _PROTOTYPE | ( | int | main, | |
| (int argc, char **argv) | ||||
| ) |
1.5.8