From 08d37ab642e8cb80774a87270fd6a3f9fab783fb Mon Sep 17 00:00:00 2001 From: Soeren Sandmann Date: Wed, 22 Dec 2004 16:04:45 +0000 Subject: Auto*ify dvi and dvi/dvilib Tue Dec 21 21:45:43 2004 Soeren Sandmann * Makefile.am: * dvi/dvilib/Makefile.am: * dvi/Makefile.am: * configure.ac: Auto*ify dvi and dvi/dvilib * dvi/Makefile: Remove from CVS * dvi/dvilib/dl-pkfont.cc (unpack_bitmap): Fix uchar/uint confusion. * dvi/dvilib/dl-fontdefinition.{cc,hh}: New DviFontMap class * dvi/dvilib/dl-vffont.{cc,hh}: Many bugfixes to VF code. --- (limited to 'dvi/dvilib/dl-dvi-file.hh') diff --git a/dvi/dvilib/dl-dvi-file.hh b/dvi/dvilib/dl-dvi-file.hh index d6c0201..bcc90aa 100755 --- a/dvi/dvilib/dl-dvi-file.hh +++ b/dvi/dvilib/dl-dvi-file.hh @@ -8,44 +8,50 @@ #include "dl-dvi-fontdefinition.hh" #include "dl-loader.hh" -namespace DviLib { +namespace DviLib +{ const uint N_PAGE_COUNTERS = 10; // \count0 ... \count9 - class DviPageHeader : public RefCounted { + class DviPageHeader : public RefCounted + { public: int count[N_PAGE_COUNTERS]; uint address; // address of this page, not the preceding }; - class DviPage : public AbstractDviProgram { + class DviPage : public AbstractDviProgram + { DviProgram& program; + DviFontMap *fontmap; int count[N_PAGE_COUNTERS]; // \count0 ... \count9 public: - DviPage (DviProgram& p, int c[N_PAGE_COUNTERS]) : + DviPage (DviProgram& p, int c[N_PAGE_COUNTERS], DviFontMap *fontmap) : program (p) { - for (uint i=0; ifontmap = fontmap; + this->fontmap->ref(); + for (uint i = 0; i < N_PAGE_COUNTERS; ++i) count[i] = c[i]; } - DviPage (DviPageHeader& h, DviProgram& p) : - program (p) - { - for (uint i=0; i fontdefinitions; + + DviFontMap *fontmap; }; - class DviFile : public RefCounted { + class DviFile : public RefCounted + { AbstractLoader &loader; DviFilePreamble *preamble; @@ -87,7 +96,7 @@ namespace DviLib { uint get_n_pages () { return n_pages; } DviFontdefinition *get_fontdefinition (uint n) { - return postamble->fontdefinitions[n]; + return postamble->fontmap->get_fontdefinition (n); } uint get_numerator () { return postamble->numerator; } uint get_denominator () { return postamble->denominator; } -- cgit v0.9.1