#include "bmepsi.h"
Defines | |
#define | B2BO_C 1 |
Inside the b2bo.c module. | |
Functions | |
static BO * | search_default_configuration (char *n) |
Check whether the named configuration is a buildin default. | |
static int | boe_compare (void *l, void *r, int cr) |
Compare to default option set table entries. | |
static void | boe_delete (BOENTRY *boe) |
Destroy BOENTRY. | |
static BOENTRY * | boe_new (char *n) |
Create new BOENTRY. | |
static unsigned long | change_opt_set (\unsigned long ov, unsigned long fl,\char *s, int d, int *b\) |
Change one option bit in option set. | |
static void | set_media_size (BJ *bj, BO *bo, char *l, int *back) |
Set media size. | |
static dk_bif_sof_t | retrieve_jfif_sof_set (char *line) |
Retrieve allowed SOFs from a text line. | |
int | bmeps_bo_add_line (BJ *bj, BO *bo, char *s) |
Add one configuration line to options set. | |
static int | read_configuration (BJ *bj, dk_app_t *a, char *n, dk_storage_t *s, dk_storage_iterator_t *si) |
Read configuration from file. | |
static void | search_config_file (BJ *bj, dk_app_t *a, char *n, BO *bo) |
Search configuration file for language-specific configuration. | |
int | bmeps_bo_get_pref_lang (BJ *bj, char *buffer, size_t sz) |
Retrieve preferred language from preferences system. | |
void | bmeps_bo_get_configuration (BJ *bj, char *langdef) |
Load configuration for a language. | |
static void | show_setting (BO *bo, int n) |
Show configuration settings. | |
static void | show_entry (BO *bo) |
Show settings for bmeps option set. | |
void | print_config_line (char *k, char *v) |
Print one configuration line. | |
int | bmeps_bo_show_configuration_file (BJ *bj) |
Show configuration file contents. | |
int | bmeps_bo_write_configuration_file (BJ *bj) |
Save standard input into new configuration file. | |
Variables | |
static char | str_epsoutput [] = { "EPSOUTPUT" } |
Name of environment variable containg default configuration. | |
static char * | str_output_types [] = { "ps", "pdf", "bb", NULL } |
Output types. | |
static char * | str_pdf_levels [] = { "1.2", "1.3", "1.4", NULL } |
PDF levels. | |
static char | commasep [] = { ", \t\r\n" } |
Whitespaces. | |
static char | colonsep [] = { ": \t\r\n" } |
Whitespaces and the colon. | |
static char | dotsep [] = { ". \t\r\n" } |
Whitespaces and the dot. | |
static char | cfgfilename [] = { "bmeps.conf" } |
Name of configuration file. | |
static char * | str_encodings [] |
Abbreviations for encodings. | |
static char * | str_fit_methods [] |
PDF page fitting methods. | |
static MSENTRY | media_sizes [] |
Known media sizes. | |
static char * | pk [] |
Preference key to search for language. | |
static char * | cmd00 [] = { "o$utput", "t$ype", NULL } |
Configuration command: output type. | |
static char * | cmd01 [] = { "l$evel", NULL } |
Configuration command: level. | |
static char * | cmd02 [] = { "e$ncoding", NULL } |
Configuration command: encoding. | |
static char * | cmd03 [] = { "b$ackground", NULL } |
Configuration command: background. | |
static char * | cmd04 [] = { "i$mage", "m$ask", "t$rigger", "l$evel", NULL } |
Configuration command: image mask trigger level. | |
static char * | cmd05 [] = { "m$edia", "s$ize", NULL } |
Configuration command: media size. | |
static char * | cmd06 [] = { "s$eparated", "d$ictionary", NULL } |
Configuration command: separated dictionary. | |
static char * | cmd07 [] = { "o$perator", "d$ictionary", NULL } |
Configuration command: operator dictionary. | |
static char * | cmd08 [] = { "m$ultiple", "d$ata", "s$ources", NULL } |
Configuration command: multiple data sources. | |
static char * | cmd09 [] = { "a$lways", "u$se", "d$efault", "b$ackground", NULL } |
Configuration command: always use default background. | |
static char * | cmd10 [] = { "m$ix", NULL } |
Configuration command: mix. | |
static char * | cmd11 [] = { "c$reate", "i$mage", "m$ask", NULL } |
Configuration command: create image mask. | |
static char * | cmd12 [] = { "dsc", "c$omments", NULL } |
Configuration command: dsc comments. | |
static char * | cmd13 [] = { "sh$owpage", NULL } |
Configuration command: showpage. | |
static char * | cmd14 [] = { "v$mreclaim", NULL } |
Configuration command: vmreclaim. | |
static char * | cmd15 [] = { "u$se", "r$esolution", "c$hunk", NULL } |
Configuration command: use resolution chunk. | |
static char * | cmd16 [] = { "t$ransfer", "a$lpha", "c$hannel", NULL } |
Configuration command: transfer alpha channel. | |
static char * | cmd17 [] = { "p$aper", "s$ize", NULL } |
Configuration command: paper size. | |
static char * | cmd18 [] = { "d$raft", NULL } |
Configuration command: draft. | |
static char * | cmd19 [] = { "i$nterpolate", NULL } |
Configuration command: interpolate. | |
static char * | cmd20 [] = { "c$olor", NULL } |
Configuration command: color. | |
static char * | cmd21 [] = { "j$fif", "s$of", "s$et", NULL } |
Configuration command: jfif sof set. | |
static char * | cmd22 [] = { "j$peg", "i$nterpolate", NULL } |
Configuration command: jpeg interpolate. | |
static char * | cmd23 [] = { "p$df", "f$it", NULL } |
Configuration command: pdf fit. | |
static char * | cmd24 [] = { "a$llow", "p$df", "p$age", "a$ttributes", NULL } |
Configuration command: allow pdf page attributes. | |
static char * | cmd25 [] = { "f$orce", "d$ct", "p$assthrough", NULL } |
Configuration command: force dct passthrough. | |
static char ** | cmd [] |
All configuration commands. | |
static char * | cmd_strings [] |
Command strings for writing configuration file. | |
static char * | ft_suffixes [] |
Suffixes for the output file types. | |
static BO | bo_ps1 |
Default options for PS 1. | |
static BO | bo_bb |
Default options for bounding box. | |
static BO | bo_ps2 |
Default options for PS 2. | |
static BO | bo_ps3 |
Default options for PS 3. | |
static BO | bo_eps1 |
Default options for EPS 1. | |
static BO | bo_eps2 |
Default options for EPS 2. | |
static BO | bo_eps3 |
Default options for EPS 3. | |
static BO | bo_pdf12 |
Default options for PDF 1.2. | |
static BO | bo_pdf13 |
Default options for PDF 1.3. | |
static BO | bo_pdf14 |
Default options for PDF 1.4. | |
static BO | bo_faxps2 |
Default options for Fax to PS2. | |
static BO | bo_faxpdf |
Default options for Fax to PDF. | |
static BOENTRY | boentry [] |
Default options table. | |
static char | str_asterisk [] = { "*" } |
Asterisk string. | |
static char | str_all [] = { "all" } |
String all. | |
static char * | str_encodings_for_output [] |
Encoding names used to show configuration. | |
static char * | str_fittings_for_output [] |
Fit options used to show configuration. | |
static char | conf_sub_dir [] = { "/.defaults" } |
Subdirectory in HOME where to place config file. | |
static char | conf_file_name [] = { "/bmeps.conf" } |
Configuration file name. | |
static char | hd [] = { "$(user.home)" } |
Default home directory. | |
static char * | suffixes_to_test [] = { "", ".gz", ".bz2", NULL } |
Text for compressed configuration file. | |
static char | sccs_id [] = { "@(#)b2bo.ctr 1.27 %IG" } |
SCCIS ID. |
#define B2BO_C 1 |
Inside the b2bo.c module.
Add one configuration line to options set.
bj | Bmeps job. | |
bo | Bmeps options set. | |
s | Line from configuration file. |
void bmeps_bo_get_configuration | ( | BJ * | bj, | |
char * | langdef | |||
) |
Load configuration for a language.
Add language definition and options to bmeps job.
bj | Bmeps job. | |
langdef | Language definition. |
int bmeps_bo_get_pref_lang | ( | BJ * | bj, | |
char * | buffer, | |||
size_t | sz | |||
) |
Retrieve preferred language from preferences system.
bj | Bmeps job. | |
buffer | Buffer for language string. | |
sz | Buffer size. |
int bmeps_bo_show_configuration_file | ( | BJ * | bj | ) |
Show configuration file contents.
bj | Bmeps job. |
int bmeps_bo_write_configuration_file | ( | BJ * | bj | ) |
Save standard input into new configuration file.
bj | Bmeps job. |
static int boe_compare | ( | void * | l, | |
void * | r, | |||
int | cr | |||
) | [static] |
static void boe_delete | ( | BOENTRY * | boe | ) | [static] |
static BOENTRY* boe_new | ( | char * | n | ) | [static] |
static unsigned long change_opt_set | ( | \unsigned long | ov, | |
unsigned long | fl, | |||
\char * | s, | |||
int | d, | |||
int *b\ | ||||
) | [static] |
Change one option bit in option set.
ov | Old (original) option set. | |
fl | Bit to change. | |
s | String containing a boolean. | |
d | Default value. | |
b | Ignored. |
void print_config_line | ( | char * | k, | |
char * | v | |||
) |
Print one configuration line.
k | Configuration line key. | |
v | Configuration line value. |
static int read_configuration | ( | BJ * | bj, | |
dk_app_t * | a, | |||
char * | n, | |||
dk_storage_t * | s, | |||
dk_storage_iterator_t * | si | |||
) | [static] |
Read configuration from file.
bj | Bmeps job. | |
a | Application structure. | |
n | Ignored. | |
s | Storage to save the file contents. | |
si | Iterator through storage. |
static dk_bif_sof_t retrieve_jfif_sof_set | ( | char * | line | ) | [static] |
Retrieve allowed SOFs from a text line.
line | Text line to inspect. |
Search configuration file for language-specific configuration.
bj | Bmeps job. | |
a | Application structure. | |
n | Language name (for example: "eps" or "pdf"). | |
bo | Option set to fill. |
static BO* search_default_configuration | ( | char * | n | ) | [static] |
Check whether the named configuration is a buildin default.
n | Configuration name. |
Set media size.
bj | Bmeps job. | |
bo | Bmeps option set | |
l | Text line containing the values. | |
back | Pointer to result variable. This variable is set to 1 on success, left unchanged on errors. |
static void show_entry | ( | BO * | bo | ) | [static] |
Show settings for bmeps option set.
bo | Option set to show. |
static void show_setting | ( | BO * | bo, | |
int | n | |||
) | [static] |
Show configuration settings.
bo | Bmeps option set. | |
n | Index of option to show. |
Initial value:
{ 2 , 1 , 0, 0, 0UL, 0UL, 1.0, 1.0, 1.0, 0.000001, { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 } }
Initial value:
{ 0 , 1 , 0, 0, ( 0x00000008UL ), 0UL, 1.0, 1.0, 1.0, 0.000001, { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 } }
Initial value:
{ 0 , 2 , ( 1 | 4 | 2 ), (DKBIF_JFIF_SOF0 | DKBIF_JFIF_SOF1), ( 0x00000008UL | 0x00000001UL | 0x00000004UL | 0x00000200UL | 0x00004000UL | 0x00000040UL | 0x00000002UL | 0x00010000UL ), 0UL, 1.0, 1.0, 1.0, 0.000001, { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 } }
Initial value:
{ 0 , 3 , ( 1 | 4 | 16 ), (DKBIF_JFIF_SOF0 | DKBIF_JFIF_SOF1), ( 0x00000008UL | 0x00000001UL | 0x00000004UL | 0x00000200UL | 0x00004000UL | 0x00000040UL | 0x00010000UL ), 0UL, 1.0, 1.0, 1.0, 0.000001, { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 } }
Initial value:
{ 1 , 13 , ( 1 | 2 | 4 | 16 ), (DKBIF_JFIF_SOF0 | DKBIF_JFIF_SOF1), ( 0x00000800UL | 0x00000001UL | 0x00000200UL | 0x00004000UL | 0x00001000UL | 0x00010000UL ), ( 1UL | 4UL ), 1.0, 1.0, 1.0, 0.000001, { 0.0, 0.0, 595.0, 842.0, 0.0, 0.0, 595.0, 842.0 } }
Initial value:
{ 0 , 2 , ( 1 | 4 | 2 ), (DKBIF_JFIF_SOF0 | DKBIF_JFIF_SOF1), ( 0x00000008UL | 0x00000001UL | 0x00000004UL | 0x00000200UL | 0x00004000UL | 0x00001000UL | 0x00000080UL | 0x00000040UL | 0x00000002UL | 0x00010000UL ), 0UL, 1.0, 1.0, 1.0, 0.000001, { 0.0, 0.0, 595.0, 842.0, 0.0, 0.0, 595.0, 842.0 } }
Initial value:
{ 1 , 11 , ( 1 | 4 | 16 ), (DKBIF_JFIF_SOF0 | DKBIF_JFIF_SOF1), ( 0x00000008UL | 0x00000001UL | 0x00000004UL | 0x00000200UL | 0x00004000UL | 0x00010000UL ), 0UL, 1.0, 1.0, 1.0, 0.000001, { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 } }
Initial value:
{ 1 , 12 , ( 1 | 4 | 16 ), (DKBIF_JFIF_SOF0 | DKBIF_JFIF_SOF1), ( 0x00000008UL | 0x00000001UL | 0x00000004UL | 0x00000200UL | 0x00004000UL | 0x00010000UL ), 0UL, 1.0, 1.0, 1.0, 0.000001, { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 } }
Initial value:
{ 1 , 13 , ( 1 | 4 | 16 ), (DKBIF_JFIF_SOF0 | DKBIF_JFIF_SOF1), ( 0x00000800UL | 0x00000001UL | 0x00000004UL | 0x00000200UL | 0x00004000UL | 0x00010000UL ), 4UL , 1.0, 1.0, 1.0, 0.000001, { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 } }
Initial value:
{ 0 , 1 , 0, 0, ( 0x00000008UL ), 0UL, 1.0, 1.0, 1.0, 0.000001, { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 } }
Initial value:
{ 0 , 2 , ( 1 | 2 | 4 ), (DKBIF_JFIF_SOF0 | DKBIF_JFIF_SOF1), ( 0x00000008UL | 0x00000001UL | 0x00000004UL | 0x00000200UL | 0x00004000UL | 0x00000002UL | 0x00010000UL ), 0UL, 1.0, 1.0, 1.0, 0.000001, { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 } }
Initial value:
{ 0 , 3 , ( 1 | 4 | 16 ), (DKBIF_JFIF_SOF0 | DKBIF_JFIF_SOF1), ( 0x00000008UL | 0x00000001UL | 0x00000004UL | 0x00000200UL | 0x00004000UL | 0x00010000UL ), 0UL, 1.0, 1.0, 1.0, 0.000001, { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 } }
Initial value:
{ { "ps1", &bo_ps1 }, { "ps2", &bo_ps2 }, { "ps3", &bo_ps3 }, { "ps", &bo_ps2 }, { "eps1", &bo_eps1 }, { "eps2", &bo_eps2 }, { "eps3", &bo_eps3 }, { "eps", &bo_eps2 }, { "faxps", &bo_faxps2 }, { "pdf12", &bo_pdf12 }, { "pdf13", &bo_pdf13 }, { "pdf14", &bo_pdf14 }, { "pdf", &bo_pdf14 }, { "faxpdf", &bo_faxpdf }, { "bb", &bo_bb }, { NULL, NULL } }
char** cmd[] [static] |
char* cmd00[] = { "o$utput", "t$ype", NULL } [static] |
Configuration command: output type.
char* cmd01[] = { "l$evel", NULL } [static] |
Configuration command: level.
char* cmd02[] = { "e$ncoding", NULL } [static] |
Configuration command: encoding.
char* cmd03[] = { "b$ackground", NULL } [static] |
Configuration command: background.
char* cmd04[] = { "i$mage", "m$ask", "t$rigger", "l$evel", NULL } [static] |
Configuration command: image mask trigger level.
char* cmd05[] = { "m$edia", "s$ize", NULL } [static] |
Configuration command: media size.
char* cmd06[] = { "s$eparated", "d$ictionary", NULL } [static] |
Configuration command: separated dictionary.
char* cmd07[] = { "o$perator", "d$ictionary", NULL } [static] |
Configuration command: operator dictionary.
char* cmd08[] = { "m$ultiple", "d$ata", "s$ources", NULL } [static] |
Configuration command: multiple data sources.
char* cmd09[] = { "a$lways", "u$se", "d$efault", "b$ackground", NULL } [static] |
Configuration command: always use default background.
char* cmd10[] = { "m$ix", NULL } [static] |
Configuration command: mix.
char* cmd11[] = { "c$reate", "i$mage", "m$ask", NULL } [static] |
Configuration command: create image mask.
char* cmd12[] = { "dsc", "c$omments", NULL } [static] |
Configuration command: dsc comments.
char* cmd13[] = { "sh$owpage", NULL } [static] |
Configuration command: showpage.
char* cmd14[] = { "v$mreclaim", NULL } [static] |
Configuration command: vmreclaim.
char* cmd15[] = { "u$se", "r$esolution", "c$hunk", NULL } [static] |
Configuration command: use resolution chunk.
char* cmd16[] = { "t$ransfer", "a$lpha", "c$hannel", NULL } [static] |
Configuration command: transfer alpha channel.
char* cmd17[] = { "p$aper", "s$ize", NULL } [static] |
Configuration command: paper size.
char* cmd18[] = { "d$raft", NULL } [static] |
Configuration command: draft.
char* cmd19[] = { "i$nterpolate", NULL } [static] |
Configuration command: interpolate.
char* cmd20[] = { "c$olor", NULL } [static] |
Configuration command: color.
char* cmd21[] = { "j$fif", "s$of", "s$et", NULL } [static] |
Configuration command: jfif sof set.
char* cmd22[] = { "j$peg", "i$nterpolate", NULL } [static] |
Configuration command: jpeg interpolate.
char* cmd23[] = { "p$df", "f$it", NULL } [static] |
Configuration command: pdf fit.
char* cmd24[] = { "a$llow", "p$df", "p$age", "a$ttributes", NULL } [static] |
Configuration command: allow pdf page attributes.
char* cmd25[] = { "f$orce", "d$ct", "p$assthrough", NULL } [static] |
Configuration command: force dct passthrough.
char* cmd_strings[] [static] |
Initial value:
{ "output type", "level", "encoding", "background", "image mask trigger level", "media size", "separated dictionary", "operator dictionary", "multiple data sources", "always use default background", "mix", "create image mask", "dsc comments", "showpage", "vmreclaim", "use resolution chunk", "transfer alpha channel", "paper size", "draft", "interpolate", "color", "jfif sof set", "jpeg interpolate", "pdf fit", "allow pdf page attributes", "force dct passthrough", NULL }
char* ft_suffixes[] [static] |
Initial value:
{ "pdf", "eps", "ps", "bb", NULL }
MSENTRY media_sizes[] [static] |
Initial value:
{ { "A3", {0.0, 0.0, 842.0, 1190.0, 0.0, 0.0, 842.0, 1190.0 } }, { "A4", {0.0, 0.0, 595.0, 842.0, 0.0, 0.0, 595.0, 842.0 } }, { "A5", {0.0, 0.0, 420.0, 595.0, 0.0, 0.0, 420.0, 595.0 } }, { "B4", {0.0, 0.0, 729.0, 1032.0, 0.0, 0.0, 729.0, 1032.0 } }, { "B5", {0.0, 0.0, 516.0, 729.0, 0.0, 0.0, 516.0, 729.0 } }, { "Letter", {0.0, 0.0, 612.0, 792.0, 0.0, 0.0, 612.0, 792.0 } }, { "Legal", {0.0, 0.0, 612.0, 1008.0, 0.0, 0.0, 612.0, 1008.0 } }, { "Tabloid", {0.0, 0.0, 792.0, 1224.0, 0.0, 0.0, 792.0, 1224.0 } }, { "Ledger", {0.0, 0.0, 1224.0, 792.0, 0.0, 0.0, 1224.0, 792.0 } }, { "Statement", {0.0, 0.0, 396.0, 612.0, 0.0, 0.0, 396.0, 612.0 } }, { "Executive", {0.0, 0.0, 540.0, 720.0, 0.0, 0.0, 540.0, 720.0 } }, { "Folio", {0.0, 0.0, 612.0, 936.0, 0.0, 0.0, 612.0, 936.0 } }, { "Quarto", {0.0, 0.0, 610.0, 780.0, 0.0, 0.0, 610.0, 780.0 } }, { "10x14", {0.0, 0.0, 720.0, 1008.0, 0.0, 0.0, 720.0, 1008.0 } }, { NULL, {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 } } }
char* pk[] [static] |
Initial value:
{
"/language",
NULL
}
char* str_encodings[] [static] |
Initial value:
{ "a$scii85", "r$un-length", "l$zw", "f$late", "d$ct", NULL }
char* str_encodings_for_output[] [static] |
Initial value:
{ "flate", "dct", "lzw", "run-length", "ascii85", NULL }
char* str_fit_methods[] [static] |
Initial value:
{ "w$idth", "h$eight", "p$age", NULL }
char* str_fittings_for_output[] [static] |
Initial value:
{ "width", "height", "page", NULL }