w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

ps2pk.c File Reference
#include "basics.h"
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "filenames.h"
#include "psearch.h"
#include "pkout.h"
#include "ffilest.h"
#include "objects.h"
#include "spaces.h"
#include "paths.h"
#include "regions.h"
#include "t1stdio.h"
#include "util.h"
#include "fontfcn.h"
Include dependency graph for ps2pk.c:

Go to the source code of this file.

Macros

#define Succesful   85
 
#define POINTSPERINCH   72.27
 
#define DEFAULTRES   300
 
#define DEFAULTPOINTSIZE   10.0
 

Functions

static uint32_t checksum (encoding, int[256])
 
static uint32_t old_checksum (encoding, int[256])
 
static int next_pixel (void)
 
static void first_pixel (CharInfoRec *)
 
static int32_t TFMwidth (int)
 
static int h_escapement (int)
 
static void add_option (const char *, const char *)
 
int main (int argc, char *argv[])
 
int CheckFSFormat (int format, int fmask, int *bit, int *Byte, int *scan, int *glyph, int *image)
 
intptr_t MakeAtom (const char *p, unsigned int len, int foo)
 
voidXalloc (size_t size)
 
void Xfree (void *p)
 

Variables

FontScalableRec vals
 
FontEntryRec entry
 
char * encfile = 0
 
char * afmfile
 
char ps2pk_args [256] = "none"
 
double pointsize = 0.0
 
int W
 
int H
 
int base_resolution = 300
 
int x_resolution = 0
 
int y_resolution = 0
 
int verbose = 0
 
int debug = 0
 
uint32_t(* pchecksum )(encoding, int[256]) = checksum
 
static int row
 
static int col
 
static int data
 
static int bitno
 
static unsigned char * p_data
 
static float HXU = -1.0
 

Macro Definition Documentation

◆ DEFAULTPOINTSIZE

#define DEFAULTPOINTSIZE   10.0

Definition at line 213 of file ps2pk.c.

◆ DEFAULTRES

#define DEFAULTRES   300

Definition at line 212 of file ps2pk.c.

◆ POINTSPERINCH

#define POINTSPERINCH   72.27

Definition at line 211 of file ps2pk.c.

◆ Succesful

#define Succesful   85

Definition at line 204 of file ps2pk.c.

Function Documentation

◆ add_option()

static void add_option ( const char *  option,
const char *  value 
)
static

Definition at line 662 of file ps2pk.c.

References NULL, ps2pk_args, sprintf, and strlen().

Referenced by main().

◆ CheckFSFormat()

int CheckFSFormat ( int  format,
int  fmask,
int bit,
int Byte,
int scan,
int glyph,
int image 
)

Definition at line 677 of file ps2pk.c.

◆ checksum()

static uint32_t checksum ( encoding  ev,
int  width[256] 
)
static

Definition at line 572 of file ps2pk.c.

References ev, i, NULL, p, s1, s2, and width.

◆ first_pixel()

static void first_pixel ( CharInfoRec G)
static

Definition at line 608 of file ps2pk.c.

References bitno, col, G, H, p_data, row, and W.

Referenced by main().

◆ h_escapement()

static int h_escapement ( int  wx)
static

Definition at line 653 of file ps2pk.c.

References HXU, pointsize, wx, and x_resolution.

Referenced by main(), and pk_char().

◆ main()

◆ MakeAtom()

intptr_t MakeAtom ( const char *  p,
unsigned int  len,
int  foo 
)

Definition at line 686 of file ps2pk.c.

References p.

◆ next_pixel()

static int next_pixel ( void  )
static

Definition at line 592 of file ps2pk.c.

Referenced by main().

◆ old_checksum()

static uint32_t old_checksum ( encoding  ev,
int  width[256] 
)
static

Definition at line 554 of file ps2pk.c.

References ev, i, NULL, p, s1, s2, and width.

Referenced by main().

◆ TFMwidth()

static int32_t TFMwidth ( int  wx)
static

Definition at line 643 of file ps2pk.c.

References wx.

Referenced by main().

◆ Xalloc()

void* Xalloc ( size_t  size)

Definition at line 698 of file ps2pk.c.

References fatal, malloc, NULL, p, and size.

◆ Xfree()

void Xfree ( void p)

Definition at line 706 of file ps2pk.c.

References free, and p.

Referenced by ComputeStdProps(), t1_Free(), Type1CloseFont(), and Type1OpenScalable().

Variable Documentation

◆ afmfile

char * afmfile

Definition at line 207 of file ps2pk.c.

Referenced by main().

◆ base_resolution

int base_resolution = 300

Definition at line 217 of file ps2pk.c.

Referenced by main().

◆ bitno

int bitno
static

Definition at line 588 of file ps2pk.c.

Referenced by first_pixel(), flip_bit(), jbg_split_planes(), and next_pixel().

◆ col

int col
static

Definition at line 587 of file ps2pk.c.

Referenced by first_pixel(), and next_pixel().

◆ data

int data
static

Definition at line 588 of file ps2pk.c.

Referenced by next_pixel().

◆ debug

int debug = 0

Definition at line 221 of file ps2pk.c.

Referenced by main().

◆ encfile

char* encfile = 0

Definition at line 207 of file ps2pk.c.

Referenced by main().

◆ entry

FontEntryRec entry

Definition at line 203 of file ps2pk.c.

Referenced by main().

◆ H

int H

Definition at line 216 of file ps2pk.c.

Referenced by first_pixel(), main(), and next_pixel().

◆ HXU

float HXU = -1.0
static

Definition at line 649 of file ps2pk.c.

Referenced by h_escapement().

◆ p_data

unsigned char* p_data
static

Definition at line 589 of file ps2pk.c.

Referenced by first_pixel(), and next_pixel().

◆ pchecksum

uint32_t(* pchecksum) (encoding, int[256]) ( encoding  ,
int  [256] 
) = checksum

Definition at line 226 of file ps2pk.c.

Referenced by main().

◆ pointsize

double pointsize = 0.0

Definition at line 215 of file ps2pk.c.

Referenced by h_escapement(), main(), pk_preamble(), ps2pk_postamble(), drvPIC::show_text(), and T1FillVals().

◆ ps2pk_args

char ps2pk_args[256] = "none"

Definition at line 209 of file ps2pk.c.

Referenced by add_option(), and main().

◆ row

int row
static

Definition at line 587 of file ps2pk.c.

Referenced by __gmpn_hgcd_matrix_update_q(), _cairo_gl_surface_map_to_image(), _cairo_image_spans(), _cairo_image_spans_and_zero(), _cairo_pdf_emit_imagemask(), _cairo_ps_emit_imagemask(), _cairo_svg_document_emit_bitmap_glyph_data(), _cairo_xlib_surface_draw_image(), _findRow(), _gdImageBmpCtx(), _gdScaleOneAxis(), _get_image_surface(), _trace_mask_to_path(), _write_image_surface(), add_raster_data(), addflood(), adjust_colormap(), average_drawproc(), blit(), bmp_read_1bit(), bmp_read_4bit(), bmp_read_8bit(), bmp_read_direct(), bmp_read_rle(), BMPreadrow(), BMPwriterow(), build_channels(), build_rle_packet(), RBBITableBuilder::buildSafeReverseTable(), Splash::clear(), TileCompositor::clearBitmap(), cmsIT8GetDataRowCol(), cmsIT8GetDataRowColDbl(), cmsIT8SetDataRowCol(), cmsIT8SetDataRowColDbl(), OT::MarkBasePosFormat1::collect_variation_indices(), OT::MarkLigPosFormat1::collect_variation_indices(), OT::MarkMarkPosFormat1::collect_variation_indices(), color_quantize(), color_quantize3(), compress(), compress_row(), convert(), convertpng(), SplashBitmap::convertToXBGR(), crc32_combine_(), decompress_rle_bits(), deep_to_ppm(), direct_to_ppm(), dith_dither(), do_24_body(), do_direct_body(), do_ham_body(), do_std_body(), do_translation(), drawBarcode(), HtmlOutputDev::drawPngImage(), encode(), enumToU(), expand_bottom_edge(), expand_right_edge(), RBBITableBuilder::exportSafeTable(), RBBITableBuilder::exportTable(), fill_rect(), finish_output_bmp(), first_pixel(), flood(), Bitmap::forAllPixels(), full_step(), gdImageCreateFromWBMPCtx(), gdImageNeuQuant(), Matrix::get(), OT::AnchorMatrix::get_anchor(), OT::VarData::get_delta(), getfaxrow(), getStateProp(), gtStripContig(), gtStripSeparate(), gtTileContig(), gtTileSeparate(), ham_to_ppm(), hasValidTrailBytes(), image_to_pnm(), init_pchg(), init_read(), isSingleOrLead(), jcopy_sample_rows(), jpg_run(), load_rgba(), Page::loadThumb(), main(), make_pixel_array(), mf_trap_paintrow(), next_pixel(), next_pixrow(), NeXTDecode(), nextrow(), nextrow_pscale(), numa2dAddNumber(), numa2dGetCount(), numa2dGetFValue(), numa2dGetIValue(), numa2dGetNuma(), otl_gpos_dump_pair(), output_pbm(), output_ppm(), pass2_fs_dither(), pass2_no_dither(), pbm_defaultfont(), pbm_dissectfont(), pbm_dumpfont(), pbm_readpbm(), pbm_writepbm(), pcx_16col_to_ppm(), pcx_256col_to_ppm(), pcx_truecol_to_ppm(), pgm_general_convolve(), pgm_horizontal_convolve(), pgm_mean_convolve(), pgm_readpgm(), pgm_vertical_convolve(), pgm_writepgm(), pixCountPixelsInRow(), pixGetRGBLine(), pk_runlengths(), PkRaster(), png_do_bgr(), png_do_chop(), png_do_compose(), png_do_encode_alpha(), png_do_expand(), png_do_expand_16(), png_do_expand_palette(), png_do_gamma(), png_do_gray_to_rgb(), png_do_invert(), png_do_pack(), png_do_packswap(), png_do_quantize(), png_do_read_filler(), png_do_read_interlace(), png_do_read_intrapixel(), png_do_read_invert_alpha(), png_do_read_swap_alpha(), png_do_rgb_to_gray(), png_do_scale_16_to_8(), png_do_shift(), png_do_strip_channel(), png_do_swap(), png_do_unpack(), png_do_unshift(), png_do_write_interlace(), png_do_write_intrapixel(), png_do_write_invert_alpha(), png_do_write_swap_alpha(), png_free_data(), png_image_read_background(), png_image_read_colormapped(), png_image_read_direct(), png_image_write_main(), png_push_have_row(), png_read_filter_row(), png_read_filter_row_avg(), png_read_filter_row_paeth_1byte_pixel(), png_read_filter_row_paeth_multibyte_pixel(), png_read_filter_row_sub(), png_read_filter_row_up(), png_read_row(), png_read_rows(), png_run(), png_write_row(), png_write_rows(), pnm_promoteformat(), pnm_readpnm(), pnm_writepnm(), poles(), ppm_computecolorhash(), ppm_general_convolve(), ppm_horizontal_convolve(), ppm_mean_convolve(), ppm_readppm(), ppm_to_16col_pcx(), ppm_to_256col_pcx(), ppm_to_truecol_pcx(), ppm_vertical_convolve(), ppm_writeppm(), ppmd_filledrectangle(), ppmd_line(), pre_process_context(), preload_image(), premultiply_argb(), prescan_quantize(), printwbmp(), ptstiff3_save_image(), putdigit(), quantize3_ord_dither(), quantize_fs_dither(), quantize_ord_dither(), radeon_bo_get_image(), read_16bit(), read_8bit(), read_bitfield_bits(), read_default(), read_ppm_map(), read_separate(), ReadATKRaster(), ReadParamFile(), ReadRow(), readwbmp(), rect(), res_120x144(), res_60x72(), row_callback(), Bitmap::rowPtr(), poppler::image::save(), selGetElement(), selSetElement(), DateTimeMatcher::set(), Bitmap::setBits(), sq_measurecircle_drawproc(), sq_rainbowcircle_drawproc(), start_pass(), start_pass_fdctmgr(), std_to_ppm(), OT::hdmx::subset(), OT::MarkBasePosFormat1::subset(), OT::MarkMarkPosFormat1::subset(), TabbingGetColumnAlignments(), TabbingGetRow(), TabularBeginRow(), TabularCline(), TabularGetRow(), TabularHline(), ThunderDecodeRow(), tiff2png(), TIFFComputeStrip(), TIFFReadRGBAStrip(), TIFFReadRGBATile(), TIFFReadScanline(), TIFFSeek(), TIFFWriteScanline(), upvec_compact_68(), upvec_compactToUTrie2Handler_68(), upvec_getRow_68(), upvec_getValue_68(), upvec_open_68(), write_png_gray(), write_png_gray_alpha(), write_png_palette(), write_png_rgb(), write_png_rgb_alpha(), write_pnm(), write_raw_pbm(), PSImage::writeIdrawImage(), ImageOutputDev::writeImageFile(), SplashBitmap::writeImgFile(), writePageImage(), writepk(), SplashBitmap::writePNMFile(), NetPBMWriter::writeRow(), PNGWriter::writeRow(), and writewbmp().

◆ vals

◆ verbose

int verbose = 0

Definition at line 221 of file ps2pk.c.

Referenced by main().

◆ W

int W

Definition at line 216 of file ps2pk.c.

Referenced by first_pixel(), main(), and next_pixel().

◆ x_resolution

int x_resolution = 0

Definition at line 218 of file ps2pk.c.

Referenced by h_escapement(), and main().

◆ y_resolution

int y_resolution = 0

Definition at line 219 of file ps2pk.c.

Referenced by main().