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)  

nup.c File Reference
#include <stdio.h>
#include <string.h>
Include dependency graph for nup.c:

Go to the source code of this file.

Macros

#define version   "1.4"
 
#define TRUE   1
 
#define FALSE   0
 
#define BB   "%%BoundingBox:"
 
#define OPR   "%%Orientation: Portrait"
 
#define OLS   "%%Orientation: Landscape"
 
#define DPS   "%%DocumentPaperSizes:"
 
#define EC   "%%EndComments"
 
#define EPL   "%%EndProlog"
 
#define BSU   "%%BeginSetup"
 
#define ESU   "%%EndSetup"
 
#define BDM   "%%BeginDocument:"
 
#define EDM   "%%EndDocument"
 
#define PAGE   "%%Page:"
 
#define TR   "%%Trailer"
 
#define PAGES   "%%Pages:"
 
#define Default   -1
 
#define Letter   0
 
#define Legal   1
 
#define Tabloid   2
 
#define B4   3
 
#define B5   4
 
#define A5   5
 
#define A4   6
 
#define A3   7
 

Functions

 main (int argc, argv)
 
 printprologue ()
 
 printheader ()
 
 printscript ()
 
 printsetup ()
 
 skipdocument ()
 
 printprocset ()
 

Variables

struct {
   char *   size
 
   char *   command
 
   int   width
 
   int   height
 
paperinfo []
 
char * program
 
char line [BUFSIZ]
 
int paper = -1
 
int origpaper = -1
 
int pagespersheet = 2
 
char shrink = 1
 
int drawline = 0
 
int verbose = 0
 

Macro Definition Documentation

◆ A3

#define A3   7

Definition at line 43 of file nup.c.

◆ A4

#define A4   6

Definition at line 42 of file nup.c.

◆ A5

#define A5   5

Definition at line 41 of file nup.c.

◆ B4

#define B4   3

Definition at line 39 of file nup.c.

◆ B5

#define B5   4

Definition at line 40 of file nup.c.

◆ BB

#define BB   "%%BoundingBox:"

Definition at line 18 of file nup.c.

◆ BDM

#define BDM   "%%BeginDocument:"

Definition at line 28 of file nup.c.

◆ BSU

#define BSU   "%%BeginSetup"

Definition at line 26 of file nup.c.

◆ Default

#define Default   -1

Definition at line 35 of file nup.c.

◆ DPS

#define DPS   "%%DocumentPaperSizes:"

Definition at line 21 of file nup.c.

◆ EC

#define EC   "%%EndComments"

Definition at line 22 of file nup.c.

◆ EDM

#define EDM   "%%EndDocument"

Definition at line 29 of file nup.c.

◆ EPL

#define EPL   "%%EndProlog"

Definition at line 24 of file nup.c.

◆ ESU

#define ESU   "%%EndSetup"

Definition at line 27 of file nup.c.

◆ FALSE

#define FALSE   0

Definition at line 16 of file nup.c.

◆ Legal

#define Legal   1

Definition at line 37 of file nup.c.

◆ Letter

#define Letter   0

Definition at line 36 of file nup.c.

◆ OLS

#define OLS   "%%Orientation: Landscape"

Definition at line 20 of file nup.c.

◆ OPR

#define OPR   "%%Orientation: Portrait"

Definition at line 19 of file nup.c.

◆ PAGE

#define PAGE   "%%Page:"

Definition at line 31 of file nup.c.

◆ PAGES

#define PAGES   "%%Pages:"

Definition at line 33 of file nup.c.

◆ Tabloid

#define Tabloid   2

Definition at line 38 of file nup.c.

◆ TR

#define TR   "%%Trailer"

Definition at line 32 of file nup.c.

◆ TRUE

#define TRUE   1

Definition at line 15 of file nup.c.

◆ version

static void version (   void)    "1.4"

Definition at line 10 of file nup.c.

Referenced by _cairo_gl_get_flavor(), _cairo_gl_get_version(), _cairo_pdf_surface_start_page(), _cairo_svg_document_create(), _cairo_svg_surface_create_for_stream_internal(), _cairo_svg_version_has_page_set_support(), _cairo_xcb_connection_query_render(), _ISO2022Open(), _render_restrict_env(), VersionInfo::add(), addCollation(), VersionInfo::append(), BitsRect(), BitsRegion(), cairo_pdf_surface_restrict_to_version(), cairo_pdf_version_to_string(), cairo_svg_surface_restrict_to_version(), cairo_svg_version_to_string(), cairo_xcb_device_debug_cap_xrender_version(), check_for_pdf(), check_version(), Compiler::Compiler(), create_type1_font(), createFileNames(), graphite2::Face::Table::decompress(), deflateInit2_(), deflateInit_(), do_bitmap(), do_pixmap(), do_query_font_version(), doargs(), dpx_file_apply_filter(), examine_app14(), find_gs(), get_gs_string_product(), get_op(), getini(), MiKTeXCom::getVersion(), GSDLL::gs_load_dll(), gs_load_dll(), gxv_bsln_validate(), gxv_just_validate(), gxv_kern_subtable_validate(), gxv_kern_validate_generic(), gxv_lcar_validate(), gxv_mort_validate(), gxv_morx_validate(), gxv_opbd_validate(), gxv_prop_property_validate(), gxv_prop_validate(), gxv_trak_validate(), inflateBackInit_(), inflateInit2_(), inflateInit_(), init_settings(), interpret_pict(), CollationDataReader::isAcceptable(), jpeg_CreateCompress(), jpeg_CreateDecompress(), Load_TrueType_Ebdt(), graphite2::GlyphCache::Loader::Loader(), lua_version(), luaopen_zlib(), main(), MAIN__(), NamesReadTTF(), normalizationCorrectionsLineFn(), openFile(), options(), otfcc_readCPAL(), otfcc_readMeta(), otfcc_readVDMX(), otv_BASE_validate(), otv_GDEF_validate(), otv_GPOS_validate(), otv_GSUB_validate(), outzone(), ZxDoc::parseXMLDecl(), pdf_enc_set_password(), pdf_open(), pdf_out_set_version(), pdf_set_version(), PDFDoc::PDFDoc(), pfed_read_glyph_layer(), pfed_read_layer(), pfed_readguidelines(), pfed_readotherlayers(), pkg_archiveLibrary(), pmxab(), print_version(), print_version_and_exit(), PS_Head(), read_directory(), read_header_part(), read_lua_cidinfo(), ReadATKRaster(), graphite2::Silf::readClassMap(), graphite2::FeatureMap::readFeats(), ReadGIF(), graphite2::Silf::readGraphite(), graphite2::Face::readGraphite(), readttfbase(), readttfencodings(), readttfgdef(), readttfheader(), readttfkerns(), AAT::KerxTable< T >::sanitize(), BasicDVIReader::setDVIVersion(), Normalizer2DataBuilder::setUnicodeVersion(), setUnicodeVersion(), setUnicodeVersionNC(), X509CertificateInfo::setVersion(), SFD_Read(), sfnt_init_face(), sfnt_open_font(), drvSAMPL::show_image(), Efont::Type1Font::skeleton_make(), Efont::Type1Font::skeleton_make_copy(), spoofDataIsAcceptable(), tt_face_get_kerning(), tt_face_load_maxp(), tt_face_load_os2(), ttf_dumpkerns(), ttf_dumpsfkerns(), ttf_write_OS2(), ttfLoadKERN(), u_charAge_68(), usage(), usage2(), writezone(), XML_ExpatVersionInfo(), zlib_deflateInit2_(), and zlib_deflateInit_().

Function Documentation

◆ main()

main ( int  argc,
argv   
)

◆ printheader()

printheader ( )

◆ printprocset()

printprocset ( )

Definition at line 278 of file nup.c.

References Default, drawline, origpaper, pagespersheet, printf(), and shrink.

Referenced by printprologue().

◆ printprologue()

printprologue ( )

Definition at line 157 of file nup.c.

References BUFSIZ, EPL, FALSE, fgets, fputs, NULL, printheader(), printprocset(), fc-lang::stdout, strncmp(), and TRUE.

Referenced by main().

◆ printscript()

printscript ( )

Definition at line 218 of file nup.c.

References BDM, BSU, BUFSIZ, count, Default, FALSE, fgets, fputs, NULL, PAGE, PAGES, pagespersheet, printf(), printsetup(), setup(), skipdocument(), fc-lang::stdout, strncmp(), TR, and TRUE.

Referenced by main().

◆ printsetup()

printsetup ( )

Definition at line 249 of file nup.c.

References BUFSIZ, ESU, FALSE, fgets, fputs, NULL, origpaper, paperinfo, printf(), fc-lang::stdout, strncmp(), and TRUE.

Referenced by printscript().

◆ skipdocument()

skipdocument ( )

Definition at line 264 of file nup.c.

References BDM, BUFSIZ, EDM, FALSE, fgets, fputs, NULL, fc-lang::stdout, strncmp(), and TRUE.

Referenced by printscript().

Variable Documentation

◆ command

char* command

Definition at line 47 of file nup.c.

◆ drawline

int drawline = 0

Definition at line 70 of file nup.c.

Referenced by main(), and printprocset().

◆ height

int height

Definition at line 49 of file nup.c.

Referenced by printheader().

◆ line

char line[BUFSIZ]

Definition at line 62 of file nup.c.

◆ origpaper

int origpaper = -1

Definition at line 65 of file nup.c.

Referenced by printheader(), printprocset(), and printsetup().

◆ pagespersheet

int pagespersheet = 2

Definition at line 68 of file nup.c.

Referenced by main(), printheader(), printprocset(), and printscript().

◆ paper

int paper = -1

Definition at line 64 of file nup.c.

◆ 

paperinfo[] { ... } struct
Initial value:
= {
{"Letter", "@letter", 612, 792},
{"Legal", "@legal", 612, 1008},
{"Tabloid", "@tabloid", 792, 1224},
{"B4", "@b4", 709, 1001},
{"B5", "@b5", 499, 709},
{"A5", "@a5", 420, 595},
{"A4", "@a4", 595, 842},
{"A3", "@a3", 842, 1191},
}

Referenced by main(), printheader(), and printsetup().

◆ program

char* program

Definition at line 61 of file nup.c.

Referenced by main(), and printheader().

◆ shrink

◆ size

char* size

Definition at line 46 of file nup.c.

Referenced by main(), and printheader().

◆ verbose

int verbose = 0

Definition at line 71 of file nup.c.

Referenced by main().

◆ width

int width

Definition at line 48 of file nup.c.

Referenced by printheader().