Back to index

courier  0.68.2
Functions
rfc2045decodemimesectionu.c File Reference
#include "rfc2045_config.h"
#include "rfc2045.h"
#include "../unicode/unicode.h"
#include <stdio.h>
#include <unistd.h>
#include <iconv.h>
#include <errno.h>

Go to the source code of this file.

Functions

static int myhandler (const char *, size_t, void *)
int rfc2045_decodetextmimesection (struct rfc2045src *src, struct rfc2045 *rfc, const char *mychset, int *conv_err, int(*handler)(const char *, size_t, void *), void *voidarg)

Function Documentation

static int myhandler ( const char *  cp,
size_t  cnt,
void *  voidarg 
) [static]

Definition at line 64 of file rfc2045decodemimesectionu.c.

{
       return libmail_u_convert(*(libmail_u_convert_handle_t *)
                             voidarg, cp, cnt);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int rfc2045_decodetextmimesection ( struct rfc2045src src,
struct rfc2045 rfc,
const char *  mychset,
int *  conv_err,
int(*)(const char *, size_t, void *)  handler,
void *  voidarg 
)

Definition at line 24 of file rfc2045decodemimesectionu.c.

{
       const char *dummy;
       const char *src_chset;

       libmail_u_convert_handle_t ci;
       int rc;
       int dummy_flag;

       if (!conv_err)
              conv_err= &dummy_flag;

       rfc2045_mimeinfo(rfc, &dummy, &dummy, &src_chset);

       *conv_err=0;

       if ((ci=libmail_u_convert_init(src_chset, mychset, handler, voidarg))
           == NULL)
       {
              *conv_err=1;
              return -1;
       }

       rc=rfc2045_decodemimesection(src, rfc, &myhandler, &ci);

       dummy_flag=0;
       if (libmail_u_convert_deinit(ci, &dummy_flag))
              rc= -1;

       if (dummy_flag)
              *conv_err=1;
       return (rc);
}

Here is the call graph for this function:

Here is the caller graph for this function: