Back to index

courier  0.68.2
Functions
showmsg2html.c File Reference
#include "sqwebmail.h"
#include "msg2html.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>

Go to the source code of this file.

Functions

void rfc2045_error (const char *p)
void error (const char *p)
void fake_exit (int rc)
int main (int argc, char **argv)

Function Documentation

void error ( const char *  p)

Definition at line 23 of file showmsg2html.c.

{
       fprintf(stderr, "%s\n", p);
       exit(1);
}
void fake_exit ( int  rc)

Definition at line 29 of file showmsg2html.c.

{
       exit(rc);
}
int main ( int  argc,
char **  argv 
)

Definition at line 34 of file showmsg2html.c.

{
       FILE *fp;
       struct rfc2045 *rfc;
       struct msg2html_info *info;

       if (argc < 2)
              return 0;

       if ((fp=fopen(argv[1], "r")) == NULL)
       {
              perror(argv[1]);
              exit(1);
       }

       rfc=rfc2045_fromfp(fp);

       info=msg2html_alloc("utf-8");
       info->showhtml=1;
       msg2html(fp, rfc, info);
       fclose(fp);
       msg2html_free(info);
       rfc2045_free(rfc);
       return (0);
}

Here is the call graph for this function:

void rfc2045_error ( const char *  p)

Definition at line 17 of file showmsg2html.c.

{
       fprintf(stderr, "%s\n", p);
       exit(1);
}