Back to index

courier  0.68.2
comrwmsg8bit.c File Reference
#include "courier.h"
#include "rw.h"
#include "rwint.h"

Go to the source code of this file.


int rw_rewrite_msg (int fp, int(*writefunc)(const char *p, unsigned l, void *), void(*rewritefunc)(struct rw_info *, void(*)(struct rw_info *), void *), void *arg)

Function Documentation

int rw_rewrite_msg ( int  fp,
int(*)(const char *p, unsigned l, void *)  writefunc,
void(*)(struct rw_info *, void(*)(struct rw_info *), void *)  rewritefunc,
void *  arg 

Definition at line 8 of file comrwmsg8bit.c.

struct rwmsginfo rwinfo;
char   buffer[BUFSIZ];
int    i, j;

       rw_rewrite_msg_init(&rwinfo, writefunc, rewritefunc, arg);

       while ((j=read(fp, buffer, sizeof(buffer))) > 0)
              if (rw_rewrite_msgheaders(buffer, j, &rwinfo) < 0)
                     j= -1;

       if ((i=rw_rewrite_msg_finish(&rwinfo)) != 0)
       return (j);

Here is the call graph for this function:

Here is the caller graph for this function: