Back to index

courier  0.68.2
Classes | Functions
mimegpgstack.h File Reference
#include "config.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mimestack

Functions

int libmail_mimestack_push (struct mimestack **, const char *)
void libmail_mimestack_pop (struct mimestack **)
struct mimestacklibmail_mimestack_search (struct mimestack *, const char *)
void libmail_mimestack_pop_to (struct mimestack **, struct mimestack *)

Class Documentation

struct mimestack

Definition at line 16 of file mimegpgstack.h.

Collaboration diagram for mimestack:
Class Members
char * boundary
struct mimestack * next

Function Documentation

void libmail_mimestack_pop ( struct mimestack **  )

Definition at line 34 of file mimegpgstack.c.

{
       struct mimestack *pp= *p;

       if (pp)
       {
              *p=pp->next;
              free(pp->boundary);
              free(pp);
       }
}

Here is the caller graph for this function:

void libmail_mimestack_pop_to ( struct mimestack **  ,
struct mimestack  
)

Definition at line 46 of file mimegpgstack.c.

{
       while (*p)
       {
              int last=strcmp( (*p)->boundary, s->boundary) == 0;
              libmail_mimestack_pop(p);
              if (last)
                     break;
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

int libmail_mimestack_push ( struct mimestack **  ,
const char *   
)

Definition at line 15 of file mimegpgstack.c.

{
       struct mimestack *ss=(struct mimestack *)
              malloc(sizeof(**s));

       if (!ss)
              return -1;

       if ((ss->boundary=strdup(b)) == NULL)
       {
              free(ss);
              return -1;
       }

       ss->next= *s;
       *s=ss;
       return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

struct mimestack* libmail_mimestack_search ( struct mimestack ,
const char *   
) [read]

Definition at line 57 of file mimegpgstack.c.

{
       int l=strlen(c);

       while (p)
       {
              int ll=strlen(p->boundary);

              if (l >= ll && strncasecmp(p->boundary, c, ll) == 0)
                     break;
              p=p->next;
       }
       return (p);
}

Here is the caller graph for this function: