Apache HTTPD
Macros | Functions | Variables
sed1.c File Reference
#include "apr.h"
#include "apr_lib.h"
#include "libsed.h"
#include "sed.h"
#include "apr_strings.h"
#include "regexp.h"

Go to the source code of this file.

Macros

#define INIT_BUF_SIZE   1024
 
#define MAX_BUF_SIZE   1024*8192
 

Functions

int sed_step (char *p1, char *p2, int circf, step_vars_storage *vars)
 
static int substitute (sed_eval_t *eval, sed_reptr_t *ipc, step_vars_storage *step_vars)
 
static apr_status_t execute (sed_eval_t *eval)
 
static int match (sed_eval_t *eval, char *expbuf, int gf, step_vars_storage *step_vars)
 
static apr_status_t dosub (sed_eval_t *eval, char *rhsbuf, int n, step_vars_storage *step_vars)
 
static charplace (sed_eval_t *eval, char *asp, char *al1, char *al2)
 
static apr_status_t command (sed_eval_t *eval, sed_reptr_t *ipc, step_vars_storage *step_vars)
 
static apr_status_t wline (sed_eval_t *eval, char *buf, apr_size_t sz)
 
static apr_status_t arout (sed_eval_t *eval)
 
static void eval_errf (sed_eval_t *eval, const char *fmt,...)
 
static apr_status_t grow_buffer (apr_pool_t *pool, char **buffer, char **spend, apr_size_t *cursize, apr_size_t newsize)
 
static apr_status_t grow_line_buffer (sed_eval_t *eval, apr_size_t newsize)
 
static apr_status_t grow_hold_buffer (sed_eval_t *eval, apr_size_t newsize)
 
static apr_status_t grow_gen_buffer (sed_eval_t *eval, apr_size_t newsize, char **gspend)
 
static apr_status_t appendmem_to_linebuf (sed_eval_t *eval, const char *sz, apr_size_t len)
 
static apr_status_t append_to_linebuf (sed_eval_t *eval, const char *sz, step_vars_storage *step_vars)
 
static apr_status_t copy_to_linebuf (sed_eval_t *eval, const char *sz, step_vars_storage *step_vars)
 
static apr_status_t append_to_holdbuf (sed_eval_t *eval, const char *sz)
 
static apr_status_t copy_to_holdbuf (sed_eval_t *eval, const char *sz)
 
static apr_status_t append_to_genbuf (sed_eval_t *eval, const char *sz, char **gspend)
 
static apr_status_t copy_to_genbuf (sed_eval_t *eval, const char *sz)
 
apr_status_t sed_init_eval (sed_eval_t *eval, sed_commands_t *commands, sed_err_fn_t *errfn, void *data, sed_write_fn_t *writefn, apr_pool_t *p)
 
apr_status_t sed_reset_eval (sed_eval_t *eval, sed_commands_t *commands, sed_err_fn_t *errfn, void *data)
 
void sed_destroy_eval (sed_eval_t *eval)
 
apr_status_t sed_eval_file (sed_eval_t *eval, apr_file_t *fin, void *fout)
 
apr_status_t sed_eval_buffer (sed_eval_t *eval, const char *buf, apr_size_t bufsz, void *fout)
 
apr_status_t sed_finalize_eval (sed_eval_t *eval, void *fout)
 

Variables

static const char *const trans [040]
 
static const char rub [] = {"\\177"}
 

Macro Definition Documentation

◆ INIT_BUF_SIZE

#define INIT_BUF_SIZE   1024

Definition at line 89 of file sed1.c.

◆ MAX_BUF_SIZE

#define MAX_BUF_SIZE   1024*8192

Definition at line 90 of file sed1.c.

Function Documentation

◆ append_to_genbuf()

static apr_status_t append_to_genbuf ( sed_eval_t eval,
const char sz,
char **  gspend 
)
static

Definition at line 256 of file sed1.c.

◆ append_to_holdbuf()

static apr_status_t append_to_holdbuf ( sed_eval_t eval,
const char sz 
)
static

Definition at line 227 of file sed1.c.

◆ append_to_linebuf()

static apr_status_t append_to_linebuf ( sed_eval_t eval,
const char sz,
step_vars_storage step_vars 
)
static

Definition at line 187 of file sed1.c.

◆ appendmem_to_linebuf()

static apr_status_t appendmem_to_linebuf ( sed_eval_t eval,
const char sz,
apr_size_t  len 
)
static

Definition at line 169 of file sed1.c.

◆ arout()

static apr_status_t arout ( sed_eval_t eval)
static

< Open the file for reading

<

Deprecated:
See also
APR_FOPEN_READ

Definition at line 1060 of file sed1.c.

◆ command()

static apr_status_t command ( sed_eval_t eval,
sed_reptr_t ipc,
step_vars_storage step_vars 
)
static

Definition at line 766 of file sed1.c.

◆ copy_to_genbuf()

static apr_status_t copy_to_genbuf ( sed_eval_t eval,
const char sz 
)
static

Definition at line 276 of file sed1.c.

◆ copy_to_holdbuf()

static apr_status_t copy_to_holdbuf ( sed_eval_t eval,
const char sz 
)
static

Definition at line 247 of file sed1.c.

◆ copy_to_linebuf()

static apr_status_t copy_to_linebuf ( sed_eval_t eval,
const char sz,
step_vars_storage step_vars 
)
static

Definition at line 217 of file sed1.c.

◆ dosub()

static apr_status_t dosub ( sed_eval_t eval,
char rhsbuf,
int  n,
step_vars_storage step_vars 
)
static

Definition at line 688 of file sed1.c.

◆ eval_errf()

static void eval_errf ( sed_eval_t eval,
const char fmt,
  ... 
)
static

Definition at line 77 of file sed1.c.

◆ execute()

static apr_status_t execute ( sed_eval_t eval)
static

Definition at line 523 of file sed1.c.

◆ grow_buffer()

static apr_status_t grow_buffer ( apr_pool_t pool,
char **  buffer,
char **  spend,
apr_size_t cursize,
apr_size_t  newsize 
)
static

Definition at line 95 of file sed1.c.

◆ grow_gen_buffer()

static apr_status_t grow_gen_buffer ( sed_eval_t eval,
apr_size_t  newsize,
char **  gspend 
)
static

Definition at line 151 of file sed1.c.

◆ grow_hold_buffer()

static apr_status_t grow_hold_buffer ( sed_eval_t eval,
apr_size_t  newsize 
)
static

Definition at line 142 of file sed1.c.

◆ grow_line_buffer()

static apr_status_t grow_line_buffer ( sed_eval_t eval,
apr_size_t  newsize 
)
static

Definition at line 133 of file sed1.c.

◆ match()

static int match ( sed_eval_t eval,
char expbuf,
int  gf,
step_vars_storage step_vars 
)
static

Definition at line 644 of file sed1.c.

◆ place()

static char * place ( sed_eval_t eval,
char asp,
char al1,
char al2 
)
static

Definition at line 747 of file sed1.c.

◆ sed_destroy_eval()

void sed_destroy_eval ( sed_eval_t eval)

Definition at line 367 of file sed1.c.

◆ sed_eval_buffer()

apr_status_t sed_eval_buffer ( sed_eval_t eval,
const char buf,
apr_size_t  bufsz,
void *  fout 
)

Definition at line 406 of file sed1.c.

◆ sed_eval_file()

apr_status_t sed_eval_file ( sed_eval_t eval,
apr_file_t fin,
void *  fout 
)

Definition at line 383 of file sed1.c.

◆ sed_finalize_eval()

apr_status_t sed_finalize_eval ( sed_eval_t eval,
void *  fout 
)

Definition at line 480 of file sed1.c.

◆ sed_init_eval()

apr_status_t sed_init_eval ( sed_eval_t eval,
sed_commands_t commands,
sed_err_fn_t errfn,
void *  data,
sed_write_fn_t writefn,
apr_pool_t p 
)

Definition at line 294 of file sed1.c.

◆ sed_reset_eval()

apr_status_t sed_reset_eval ( sed_eval_t eval,
sed_commands_t commands,
sed_err_fn_t errfn,
void *  data 
)

< Open the file for writing

<

Deprecated:
See also
APR_FOPEN_WRITE

< Create the file if not there

<

Deprecated:
See also
APR_FOPEN_CREATE

< use OS's default permissions

<

Deprecated:
See also
APR_FPROT_OS_DEFAULT

Definition at line 305 of file sed1.c.

◆ sed_step()

int sed_step ( char p1,
char p2,
int  circf,
step_vars_storage vars 
)
extern

Definition at line 358 of file regexp.c.

◆ substitute()

static int substitute ( sed_eval_t eval,
sed_reptr_t ipc,
step_vars_storage step_vars 
)
static

Definition at line 665 of file sed1.c.

◆ wline()

static apr_status_t wline ( sed_eval_t eval,
char buf,
apr_size_t  sz 
)
static

Definition at line 1101 of file sed1.c.

Variable Documentation

◆ rub

const char rub[] = {"\\177"}
static

Definition at line 61 of file sed1.c.

◆ trans

const char* const trans[040]
static

Definition at line 28 of file sed1.c.