pst2dii.cpp File Reference

#include <iostream>
#include <string>
#include <vector>
#include "define.h"
#include "lzfu.h"
Include dependency graph for pst2dii.cpp:

Go to the source code of this file.

Data Structures

struct  file_ll

Defines

#define C_TIME_SIZE   500

Functions

static void open_png ()
static void close_png ()
static void version ()
static void usage ()
static char * removeCR (char *c)
static char * skip_header_prologue (char *headers)
static void check_filename (string &fname)
static string write_separate_attachment (string fname, pst_item_attach *current_attach, int attach_num, pst_file *pst)
static void print_pdf_short (const char *line, int len, int color)
static void new_line ()
static void print_pdf_single (const char *line, int color)
static void print_pdf_only (char *line, int color)
static void print_pdf (char *line)
static void open_pdf (char *line)
static void close_pdf ()
static void write_simple (const char *tag, const char *value)
static void write_simple (const char *tag, string value)
static void write_simple (const char *tag, const char *value, const char *value2)
static string extract_header (char *headers, const char *field)
static void write_normal_email (file_ll &f, pst_item *item, pst_file *pst)
static void create_enter_dir (file_ll &f, file_ll *parent, pst_item *item)
static void close_enter_dir (file_ll &f)
static void process (pst_item *outeritem, file_ll *parent, pst_desc_tree *d_ptr)
int main (int argc, char *const *argv)

Variables

const char * convert = "/usr/bin/convert"
const char * prog_name = NULL
const char * bates_prefix = ""
int bates_index = 0
const char * output_directory = "."
const char * output_file = "load.dii"
char * font_file = NULL
int bates_color = 0xff0000
int email_sequence = 0
char * pdf_name = NULL
FILE * dii_file = NULL
pst_file pstfile
bool pdf_open = false
char * pst_folder
int page_sequence
string conversion
vector< string > png_names
bool png_open = false
int line_height
int char_width
int col_number
int col_max
int line_number
int line_max
int x_position
int y_position
int black
int red
gdImagePtr image
const int DPI = 300
const double sz = 10.0
const int margin = DPI/2
const int LINE_SIZE = 2000
const int PAGE_WIDTH = DPI*17/2
const int PAGE_HEIGHT = DPI*11

Define Documentation

#define C_TIME_SIZE   500

Definition at line 74 of file pst2dii.cpp.

Referenced by write_normal_email().


Function Documentation

static void check_filename ( string &  fname  )  [static]
static void close_enter_dir ( file_ll f  )  [static]

Definition at line 597 of file pst2dii.cpp.

static void close_pdf (  )  [static]

Definition at line 381 of file pst2dii.cpp.

References close_png(), conversion, dii_file, pdf_name, and png_names.

Referenced by write_normal_email().

Here is the call graph for this function:

static void close_png (  )  [static]

Definition at line 343 of file pst2dii.cpp.

References conversion, image, page_sequence, png_names, png_open, and pst_malloc().

Referenced by close_pdf(), and print_pdf_short().

Here is the call graph for this function:

static void create_enter_dir ( file_ll f,
file_ll parent,
pst_item item 
) [static]
static string extract_header ( char *  headers,
const char *  field 
) [static]

Definition at line 419 of file pst2dii.cpp.

Referenced by write_normal_email().

int main ( int  argc,
char *const *  argv 
)
static void new_line (  )  [static]

Definition at line 251 of file pst2dii.cpp.

References col_number, line_height, line_number, margin, x_position, and y_position.

Referenced by print_pdf_only(), and print_pdf_single().

static void open_pdf ( char *  line  )  [static]

Definition at line 364 of file pst2dii.cpp.

References conversion, convert, dii_file, email_sequence, open_png(), output_directory, page_sequence, pdf_name, png_names, pst_folder, and pst_malloc().

Referenced by write_normal_email().

Here is the call graph for this function:

static void open_png (  )  [static]
static void print_pdf ( char *  line  )  [static]

Definition at line 298 of file pst2dii.cpp.

References black, dii_file, print_pdf_only(), and pst_fwrite().

Referenced by write_normal_email().

Here is the call graph for this function:

static void print_pdf_only ( char *  line,
int  color 
) [static]

Definition at line 283 of file pst2dii.cpp.

References new_line(), and print_pdf_single().

Referenced by open_png(), print_pdf(), and write_normal_email().

Here is the call graph for this function:

static void print_pdf_short ( const char *  line,
int  len,
int  color 
) [static]

Definition at line 215 of file pst2dii.cpp.

References close_png(), col_number, DPI, font_file, image, line_max, line_number, open_png(), sz, x_position, and y_position.

Referenced by print_pdf_single().

Here is the call graph for this function:

static void print_pdf_single ( const char *  line,
int  color 
) [static]

Definition at line 261 of file pst2dii.cpp.

References col_max, col_number, new_line(), and print_pdf_short().

Referenced by print_pdf_only().

Here is the call graph for this function:

static void process ( pst_item outeritem,
file_ll parent,
pst_desc_tree d_ptr 
) [static]
static char * removeCR ( char *  c  )  [static]

Definition at line 113 of file pst2dii.cpp.

References DEBUG_ENT, and DEBUG_RET.

Referenced by write_normal_email().

static char * skip_header_prologue ( char *  headers  )  [static]

Definition at line 134 of file pst2dii.cpp.

Referenced by write_normal_email().

static void usage ( void   )  [static]

Definition at line 95 of file pst2dii.cpp.

References prog_name, and version().

Here is the call graph for this function:

static void version ( void   )  [static]

Definition at line 81 of file pst2dii.cpp.

References VERSION.

static void write_normal_email ( file_ll f,
pst_item item,
pst_file pst 
) [static]
static string write_separate_attachment ( string  fname,
pst_item_attach current_attach,
int  attach_num,
pst_file pst 
) [static]
static void write_simple ( const char *  tag,
const char *  value,
const char *  value2 
) [static]

Definition at line 409 of file pst2dii.cpp.

References dii_file.

static void write_simple ( const char *  tag,
string  value 
) [static]

Definition at line 402 of file pst2dii.cpp.

References dii_file.

static void write_simple ( const char *  tag,
const char *  value 
) [static]

Definition at line 395 of file pst2dii.cpp.

References dii_file.

Referenced by write_normal_email().


Variable Documentation

int bates_color = 0xff0000

Definition at line 43 of file pst2dii.cpp.

Referenced by main(), and open_png().

int bates_index = 0

Definition at line 39 of file pst2dii.cpp.

Referenced by main(), open_png(), and write_normal_email().

const char* bates_prefix = ""

Definition at line 38 of file pst2dii.cpp.

Referenced by main(), and open_png().

int black

Definition at line 63 of file pst2dii.cpp.

Referenced by open_png(), print_pdf(), and write_normal_email().

Definition at line 59 of file pst2dii.cpp.

Referenced by open_png().

int col_max

Definition at line 60 of file pst2dii.cpp.

Referenced by open_png(), and print_pdf_single().

Definition at line 60 of file pst2dii.cpp.

Referenced by new_line(), open_png(), print_pdf_short(), and print_pdf_single().

string conversion

Definition at line 53 of file pst2dii.cpp.

Referenced by close_pdf(), close_png(), and open_pdf().

const char* convert = "/usr/bin/convert"

Definition at line 36 of file pst2dii.cpp.

Referenced by open_pdf().

FILE* dii_file = NULL

Definition at line 46 of file pst2dii.cpp.

Referenced by close_pdf(), main(), open_pdf(), print_pdf(), write_normal_email(), and write_simple().

const int DPI = 300

Definition at line 66 of file pst2dii.cpp.

Referenced by open_png(), and print_pdf_short().

int email_sequence = 0

Definition at line 44 of file pst2dii.cpp.

Referenced by open_pdf().

char* font_file = NULL

Definition at line 42 of file pst2dii.cpp.

Referenced by main(), open_png(), and print_pdf_short().

gdImagePtr image

Definition at line 64 of file pst2dii.cpp.

Referenced by close_png(), open_png(), and print_pdf_short().

Definition at line 58 of file pst2dii.cpp.

Referenced by new_line(), and open_png().

int line_max

Definition at line 61 of file pst2dii.cpp.

Referenced by open_png(), and print_pdf_short().

Definition at line 61 of file pst2dii.cpp.

Referenced by new_line(), open_png(), and print_pdf_short().

const int LINE_SIZE = 2000

Definition at line 69 of file pst2dii.cpp.

Referenced by main(), open_png(), and write_normal_email().

const int margin = DPI/2

Definition at line 68 of file pst2dii.cpp.

Referenced by new_line(), and open_png().

const char* output_directory = "."

Definition at line 40 of file pst2dii.cpp.

Referenced by main(), open_pdf(), and write_separate_attachment().

const char* output_file = "load.dii"

Definition at line 41 of file pst2dii.cpp.

Referenced by main().

const int PAGE_HEIGHT = DPI*11

Definition at line 71 of file pst2dii.cpp.

Referenced by open_png().

Definition at line 52 of file pst2dii.cpp.

Referenced by close_png(), and open_pdf().

const int PAGE_WIDTH = DPI*17/2

Definition at line 70 of file pst2dii.cpp.

Referenced by open_png().

char* pdf_name = NULL

Definition at line 45 of file pst2dii.cpp.

Referenced by close_pdf(), and open_pdf().

bool pdf_open = false

Definition at line 50 of file pst2dii.cpp.

vector<string> png_names

Definition at line 54 of file pst2dii.cpp.

Referenced by close_pdf(), close_png(), and open_pdf().

bool png_open = false

Definition at line 57 of file pst2dii.cpp.

Referenced by close_png(), and open_png().

const char* prog_name = NULL

Definition at line 37 of file pst2dii.cpp.

Referenced by main(), and usage().

char* pst_folder

Definition at line 51 of file pst2dii.cpp.

Referenced by open_pdf(), and open_png().

Definition at line 47 of file pst2dii.cpp.

int red

Definition at line 63 of file pst2dii.cpp.

Referenced by open_png().

const double sz = 10.0

Definition at line 67 of file pst2dii.cpp.

Referenced by open_png(), and print_pdf_short().

Definition at line 62 of file pst2dii.cpp.

Referenced by new_line(), open_png(), and print_pdf_short().

Definition at line 62 of file pst2dii.cpp.

Referenced by new_line(), open_png(), and print_pdf_short().


Generated on 6 Jul 2016 for 'LibPst' by  doxygen 1.6.1