Back to index

courier  0.68.2
Functions
rfc822_getaddr.c File Reference
#include "rfc822.h"
#include <stdlib.h>

Go to the source code of this file.

Functions

static void cntlen (char c, void *p)
static void saveaddr (char c, void *p)
char * rfc822_getaddr (const struct rfc822a *rfc, int n)
char * rfc822_gettok (const struct rfc822token *t)

Function Documentation

static void cntlen ( char  c,
void *  p 
) [static]

Definition at line 11 of file rfc822_getaddr.c.

{
       if (c != '\n')
              ++ *(size_t *)p;
}

Here is the caller graph for this function:

char* rfc822_getaddr ( const struct rfc822a rfc,
int  n 
)

Definition at line 27 of file rfc822_getaddr.c.

{
       return rfc822_display_addr_tobuf(rfc, n, NULL);
}

Here is the call graph for this function:

Here is the caller graph for this function:

char* rfc822_gettok ( const struct rfc822token t)

Definition at line 32 of file rfc822_getaddr.c.

{
size_t addrbuflen=0;
char   *addrbuf, *ptr;

       rfc822tok_print(t, &cntlen, &addrbuflen);

       if (!(addrbuf=malloc(addrbuflen+1)))
              return (0);

       ptr=addrbuf;
       rfc822tok_print(t, &saveaddr, &ptr);
       addrbuf[addrbuflen]=0;
       return (addrbuf);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void saveaddr ( char  c,
void *  p 
) [static]

Definition at line 17 of file rfc822_getaddr.c.

{
       if (c != '\n')
       {
       char **cp=(char **)p;

              *(*cp)++=c;
       }
}

Here is the caller graph for this function: