Deprecated--

svn path=/trunk/KDE/kdegraphics/kviewshell/plugins/dvi/; revision=506839
This commit is contained in:
Laurent Montel 2006-02-07 18:07:04 +00:00
parent fb0b66bbf1
commit 2d4e0d47b0
25 changed files with 176 additions and 176 deletions

View file

@ -34,7 +34,7 @@ TeXFontDefinition::TeXFontDefinition(QString nfontname, double _displayResolutio
class fontPool *pool, double _enlargement)
{
#ifdef DEBUG_FONT
kdDebug(kvs::dvi) << "TeXFontDefinition::TeXFontDefinition(...); fontname=" << nfontname << ", enlargement=" << _enlargement << endl;
kDebug(kvs::dvi) << "TeXFontDefinition::TeXFontDefinition(...); fontname=" << nfontname << ", enlargement=" << _enlargement << endl;
#endif
enlargement = _enlargement;
@ -60,7 +60,7 @@ TeXFontDefinition::TeXFontDefinition(QString nfontname, double _displayResolutio
TeXFontDefinition::~TeXFontDefinition()
{
#ifdef DEBUG_FONT
kdDebug(kvs::dvi) << "discarding font " << fontname << " at " << (int)(enlargement * MFResolutions[font_pool->getMetafontMode()] + 0.5) << " dpi" << endl;
kDebug(kvs::dvi) << "discarding font " << fontname << " at " << (int)(enlargement * MFResolutions[font_pool->getMetafontMode()] + 0.5) << " dpi" << endl;
#endif
if (font != 0) {
@ -86,7 +86,7 @@ TeXFontDefinition::~TeXFontDefinition()
void TeXFontDefinition::fontNameReceiver(const QString& fname)
{
#ifdef DEBUG_FONT
kdDebug(kvs::dvi) << "void TeXFontDefinition::fontNameReceiver( " << fname << " )" << endl;
kDebug(kvs::dvi) << "void TeXFontDefinition::fontNameReceiver( " << fname << " )" << endl;
#endif
flags |= TeXFontDefinition::FONT_LOADED;
@ -104,7 +104,7 @@ void TeXFontDefinition::fontNameReceiver(const QString& fname)
QString filename_test(font_pool->getExtraSearchPath() + "/" + filename);
file = fopen( QFile::encodeName(filename_test), "r");
if (file == 0) {
kdError(kvs::dvi) << i18n("Cannot find font %1, file %2.").arg(fontname).arg(filename) << endl;
kError(kvs::dvi) << i18n("Cannot find font %1, file %2.").arg(fontname).arg(filename) << endl;
return;
} else
filename = filename_test;
@ -120,7 +120,7 @@ void TeXFontDefinition::fontNameReceiver(const QString& fname)
font = new TeXFont_PK(this);
set_char_p = &dviRenderer::set_char;
if ((checksum != 0) && (checksum != font->checksum))
kdWarning(kvs::dvi) << i18n("Checksum mismatch for font file %1").arg(filename) << endl;
kWarning(kvs::dvi) << i18n("Checksum mismatch for font file %1").arg(filename) << endl;
fontTypeName = "TeX PK";
return;
}
@ -152,12 +152,12 @@ void TeXFontDefinition::fontNameReceiver(const QString& fname)
if (enc.isEmpty() == false) {
#ifdef DEBUG_FONT
kdDebug(kvs::dvi) << "Font " << fontname << " uses encoding " << enc << endl;
kDebug(kvs::dvi) << "Font " << fontname << " uses encoding " << enc << endl;
#endif
font = new TeXFont_PFB(this, font_pool->encodingPool.findByName(enc), font_pool->fontsByTeXName.findSlant(fontname) );
} else {
#ifdef DEBUG_FONT
kdDebug(kvs::dvi) << "Font " << fontname << " does not have an encoding." << endl;
kDebug(kvs::dvi) << "Font " << fontname << " does not have an encoding." << endl;
#endif
font = new TeXFont_PFB(this);
}
@ -168,7 +168,7 @@ void TeXFontDefinition::fontNameReceiver(const QString& fname)
#else
// If we don't have the FreeType library, we should never have
// reached this point. Complain, and leave this font blank
kdError(kvs::dvi) << i18n("Cannot recognize format for font file %1").arg(filename) << endl;
kError(kvs::dvi) << i18n("Cannot recognize format for font file %1").arg(filename) << endl;
#endif
}
@ -214,7 +214,7 @@ void TeXFontDefinition::setDisplayResolution(double _displayResolution_in_dpi)
void TeXFontDefinition::mark_as_used()
{
#ifdef DEBUG_FONT
kdDebug(kvs::dvi) << "TeXFontDefinition::mark_as_used()" << endl;
kDebug(kvs::dvi) << "TeXFontDefinition::mark_as_used()" << endl;
#endif
if (flags & TeXFontDefinition::FONT_IN_USE)

View file

@ -29,9 +29,9 @@ TeXFont_PFB::TeXFont_PFB(TeXFontDefinition *parent, fontEncoding *enc, double sl
{
#ifdef DEBUG_PFB
if (enc != 0)
kdDebug(kvs::dvi) << "TeXFont_PFB::TeXFont_PFB( parent=" << parent << ", encoding=" << enc->encodingFullName << " )" << endl;
kDebug(kvs::dvi) << "TeXFont_PFB::TeXFont_PFB( parent=" << parent << ", encoding=" << enc->encodingFullName << " )" << endl;
else
kdDebug(kvs::dvi) << "TeXFont_PFB::TeXFont_PFB( parent=" << parent << ", encoding=0 )" << endl;
kDebug(kvs::dvi) << "TeXFont_PFB::TeXFont_PFB( parent=" << parent << ", encoding=0 )" << endl;
#endif
fatalErrorInFontLoading = false;
@ -40,13 +40,13 @@ TeXFont_PFB::TeXFont_PFB(TeXFontDefinition *parent, fontEncoding *enc, double sl
if ( error == FT_Err_Unknown_File_Format ) {
errorMessage = i18n("The font file %1 could be opened and read, but its font format is unsupported.").arg(parent->filename);
kdError(kvs::dvi) << errorMessage << endl;
kError(kvs::dvi) << errorMessage << endl;
fatalErrorInFontLoading = true;
return;
} else
if ( error ) {
errorMessage = i18n("The font file %1 is broken, or it could not be opened or read.").arg(parent->filename);
kdError(kvs::dvi) << errorMessage << endl;
kError(kvs::dvi) << errorMessage << endl;
fatalErrorInFontLoading = true;
return;
}
@ -80,12 +80,12 @@ TeXFont_PFB::TeXFont_PFB(TeXFontDefinition *parent, fontEncoding *enc, double sl
// the FreeType library function 'FT_Get_Name_Index()' to
// associate glyph indices to those names.
#ifdef DEBUG_PFB
kdDebug(kvs::dvi) << "Trying to associate glyph indices to names from the encoding vector." << endl;
kDebug(kvs::dvi) << "Trying to associate glyph indices to names from the encoding vector." << endl;
#endif
for(int i=0; i<256; i++) {
charMap[i] = FT_Get_Name_Index( face, (FT_String *)(enc->glyphNameVector[i].ascii()) );
#ifdef DEBUG_PFB
kdDebug(kvs::dvi) << i << ": " << enc->glyphNameVector[i] << ", GlyphIndex=" << charMap[i] << endl;
kDebug(kvs::dvi) << i << ": " << enc->glyphNameVector[i] << ", GlyphIndex=" << charMap[i] << endl;
#endif
}
} else {
@ -105,14 +105,14 @@ TeXFont_PFB::TeXFont_PFB(TeXFontDefinition *parent, fontEncoding *enc, double sl
// Feed the charMap array with the charmap data found in the
// previous step.
#ifdef DEBUG_PFB
kdDebug(kvs::dvi) << "No encoding given: using charmap platform=7, encoding=2 that is contained in the font." << endl;
kDebug(kvs::dvi) << "No encoding given: using charmap platform=7, encoding=2 that is contained in the font." << endl;
#endif
for(int i=0; i<256; i++)
charMap[i] = FT_Get_Char_Index( face, i );
} else {
if ((found == 0) && (face->charmap != 0)) {
#ifdef DEBUG_PFB
kdDebug(kvs::dvi) << "No encoding given: using charmap platform=" << face->charmap->platform_id <<
kDebug(kvs::dvi) << "No encoding given: using charmap platform=" << face->charmap->platform_id <<
", encoding=" << face->charmap->encoding_id << " that is contained in the font." << endl;
#endif
for(int i=0; i<256; i++)
@ -120,7 +120,7 @@ TeXFont_PFB::TeXFont_PFB(TeXFontDefinition *parent, fontEncoding *enc, double sl
} else {
// As a last resort, we use the identity map.
#ifdef DEBUG_PFB
kdDebug(kvs::dvi) << "No encoding given, no suitable charmaps found in the font: using identity charmap." << endl;
kDebug(kvs::dvi) << "No encoding given, no suitable charmaps found in the font: using identity charmap." << endl;
#endif
for(int i=0; i<256; i++)
charMap[i] = i;
@ -139,12 +139,12 @@ TeXFont_PFB::~TeXFont_PFB()
glyph* TeXFont_PFB::getGlyph(quint16 ch, bool generateCharacterPixmap, const QColor& color)
{
#ifdef DEBUG_PFB
kdDebug(kvs::dvi) << "TeXFont_PFB::getGlyph( ch=" << ch << ", '" << (char)(ch) << "', generateCharacterPixmap=" << generateCharacterPixmap << " )" << endl;
kDebug(kvs::dvi) << "TeXFont_PFB::getGlyph( ch=" << ch << ", '" << (char)(ch) << "', generateCharacterPixmap=" << generateCharacterPixmap << " )" << endl;
#endif
// Paranoia checks
if (ch >= TeXFontDefinition::max_num_of_chars_in_font) {
kdError(kvs::dvi) << "TeXFont_PFB::getGlyph(): Argument is too big." << endl;
kError(kvs::dvi) << "TeXFont_PFB::getGlyph(): Argument is too big." << endl;
return glyphtable;
}
@ -169,7 +169,7 @@ glyph* TeXFont_PFB::getGlyph(quint16 ch, bool generateCharacterPixmap, const QCo
QString msg = i18n("FreeType reported an error when setting the character size for font file %1.").arg(parent->filename);
if (errorMessage.isEmpty())
errorMessage = msg;
kdError(kvs::dvi) << msg << endl;
kError(kvs::dvi) << msg << endl;
g->shrunkenCharacter.resize(1,1);
g->shrunkenCharacter.fill(QColor(255, 255, 255));
return g;
@ -185,7 +185,7 @@ glyph* TeXFont_PFB::getGlyph(quint16 ch, bool generateCharacterPixmap, const QCo
QString msg = i18n("FreeType is unable to load glyph #%1 from font file %2.").arg(ch).arg(parent->filename);
if (errorMessage.isEmpty())
errorMessage = msg;
kdError(kvs::dvi) << msg << endl;
kError(kvs::dvi) << msg << endl;
g->shrunkenCharacter.resize(1,1);
g->shrunkenCharacter.fill(QColor(255, 255, 255));
return g;
@ -197,7 +197,7 @@ glyph* TeXFont_PFB::getGlyph(quint16 ch, bool generateCharacterPixmap, const QCo
QString msg = i18n("FreeType is unable to render glyph #%1 from font file %2.").arg(ch).arg(parent->filename);
if (errorMessage.isEmpty())
errorMessage = msg;
kdError(kvs::dvi) << msg << endl;
kError(kvs::dvi) << msg << endl;
g->shrunkenCharacter.resize(1,1);
g->shrunkenCharacter.fill(QColor(255, 255, 255));
return g;
@ -208,7 +208,7 @@ glyph* TeXFont_PFB::getGlyph(quint16 ch, bool generateCharacterPixmap, const QCo
if ((slot->bitmap.width == 0) || (slot->bitmap.rows == 0)) {
if (errorMessage.isEmpty())
errorMessage = i18n("Glyph #%1 is empty.").arg(ch);
kdError(kvs::dvi) << i18n("Glyph #%1 from font file %2 is empty.").arg(ch).arg(parent->filename) << endl;
kError(kvs::dvi) << i18n("Glyph #%1 from font file %2 is empty.").arg(ch).arg(parent->filename) << endl;
g->shrunkenCharacter.resize( 15, 15 );
g->shrunkenCharacter.fill(QColor(255, 0, 0));
g->x2 = 0;
@ -280,7 +280,7 @@ glyph* TeXFont_PFB::getGlyph(quint16 ch, bool generateCharacterPixmap, const QCo
QString msg = i18n("FreeType is unable to load metric for glyph #%1 from font file %2.").arg(ch).arg(parent->filename);
if (errorMessage.isEmpty())
errorMessage = msg;
kdError(kvs::dvi) << msg << endl;
kError(kvs::dvi) << msg << endl;
g->dvi_advance_in_units_of_design_size_by_2e20 = 1;
}
g->dvi_advance_in_units_of_design_size_by_2e20 = (qint32)(((qint64)(1<<20) * (qint64)face->glyph->metrics.horiAdvance) / (qint64)face->units_per_EM);

View file

@ -80,23 +80,23 @@ TeXFont_PK::TeXFont_PK(TeXFontDefinition *parent)
: TeXFont(parent)
{
#ifdef DEBUG_PK
kdDebug(kvs::dvi) << "TeXFont_PK::TeXFont_PK( parent=" << parent << ")" << endl;
kDebug(kvs::dvi) << "TeXFont_PK::TeXFont_PK( parent=" << parent << ")" << endl;
#endif
for(unsigned int i=0; i<TeXFontDefinition::max_num_of_chars_in_font; i++)
characterBitmaps[i] = 0;
file = fopen(QFile::encodeName(parent->filename), "r");
if (file == 0)
kdError(kvs::dvi) << i18n("Cannot open font file %1.").arg(parent->filename) << endl;
kError(kvs::dvi) << i18n("Cannot open font file %1.").arg(parent->filename) << endl;
#ifdef DEBUG_PK
else
kdDebug(kvs::dvi) << "TeXFont_PK::TeXFont_PK(): file opened successfully" << endl;
kDebug(kvs::dvi) << "TeXFont_PK::TeXFont_PK(): file opened successfully" << endl;
#endif
read_PK_index();
#ifdef DEBUG_PK
kdDebug(kvs::dvi) << "TeXFont_PK::TeXFont_PK() ended" << endl;
kDebug(kvs::dvi) << "TeXFont_PK::TeXFont_PK() ended" << endl;
#endif
}
@ -115,12 +115,12 @@ TeXFont_PK::~TeXFont_PK()
glyph* TeXFont_PK::getGlyph(quint16 ch, bool generateCharacterPixmap, const QColor& color)
{
#ifdef DEBUG_PK
kdDebug(kvs::dvi) << "TeXFont_PK::getGlyph( ch=" << ch << ", generateCharacterPixmap=" << generateCharacterPixmap << " )" << endl;
kDebug(kvs::dvi) << "TeXFont_PK::getGlyph( ch=" << ch << ", generateCharacterPixmap=" << generateCharacterPixmap << " )" << endl;
#endif
// Paranoia checks
if (ch >= TeXFontDefinition::max_num_of_chars_in_font) {
kdError(kvs::dvi) << "TeXFont_PK::getGlyph(): Argument is too big." << endl;
kError(kvs::dvi) << "TeXFont_PK::getGlyph(): Argument is too big." << endl;
return glyphtable;
}
@ -132,7 +132,7 @@ glyph* TeXFont_PK::getGlyph(quint16 ch, bool generateCharacterPixmap, const QCol
// If the character is not defined in the PK file, mark the
// character as missing, and print an error message
if (g->addr == 0) {
kdError(kvs::dvi) << i18n("TexFont_PK::operator[]: Character %1 not defined in font %2").arg(ch).arg(parent->filename) << endl;
kError(kvs::dvi) << i18n("TexFont_PK::operator[]: Character %1 not defined in font %2").arg(ch).arg(parent->filename) << endl;
g->addr = -1;
return g;
}
@ -372,7 +372,7 @@ static quint32 bit_masks[33] = {
int TeXFont_PK::PK_get_nyb(FILE *fp)
{
#ifdef DEBUG_PK
kdDebug(kvs::dvi) << "PK_get_nyb" << endl;
kDebug(kvs::dvi) << "PK_get_nyb" << endl;
#endif
unsigned temp;
@ -389,7 +389,7 @@ int TeXFont_PK::PK_get_nyb(FILE *fp)
int TeXFont_PK::PK_packed_num(FILE *fp)
{
#ifdef DEBUG_PK
kdDebug(kvs::dvi) << "PK_packed_num" << endl;
kDebug(kvs::dvi) << "PK_packed_num" << endl;
#endif
int i, j;
@ -421,7 +421,7 @@ int TeXFont_PK::PK_packed_num(FILE *fp)
void TeXFont_PK::PK_skip_specials()
{
#ifdef DEBUG_PK
kdDebug(kvs::dvi) << "TeXFont_PK::PK_skip_specials() called" << endl;
kDebug(kvs::dvi) << "TeXFont_PK::PK_skip_specials() called" << endl;
#endif
int i,j;
@ -429,7 +429,7 @@ void TeXFont_PK::PK_skip_specials()
#ifdef DEBUG_PK
if (fp == 0)
kdDebug(kvs::dvi) << "TeXFont_PK::PK_skip_specials(): file == 0" << endl;
kDebug(kvs::dvi) << "TeXFont_PK::PK_skip_specials(): file == 0" << endl;
#endif
do {
@ -459,7 +459,7 @@ void TeXFont_PK::PK_skip_specials()
while (PK_flag_byte != PK_POST && PK_flag_byte >= PK_CMD_START);
#ifdef DEBUG_PK
kdDebug(kvs::dvi) << "TeXFont_PK::PK_skip_specials() ended" << endl;
kDebug(kvs::dvi) << "TeXFont_PK::PK_skip_specials() ended" << endl;
#endif
}
@ -467,7 +467,7 @@ void TeXFont_PK::PK_skip_specials()
void TeXFont_PK::read_PK_char(unsigned int ch)
{
#ifdef DEBUG_PK
kdDebug(kvs::dvi) << "read_PK_char" << endl;
kDebug(kvs::dvi) << "read_PK_char" << endl;
#endif
int i, j;
@ -496,7 +496,7 @@ void TeXFont_PK::read_PK_char(unsigned int ch)
n = 1;
#ifdef DEBUG_PK
kdDebug(kvs::dvi) << "loading pk char " << ch << ", char type " << n << endl;
kDebug(kvs::dvi) << "loading pk char " << ch << ", char type " << n << endl;
#endif
if (characterBitmaps[ch] == 0)
@ -558,7 +558,7 @@ void TeXFont_PK::read_PK_char(unsigned int ch)
// (Ultra-)Sparc processors.
#ifdef DEBUG_PK
kdDebug(kvs::dvi) << "big Endian byte ordering" << endl;
kDebug(kvs::dvi) << "big Endian byte ordering" << endl;
#endif
if (PK_dyn_f == 14) { /* get raster by bits */
@ -644,7 +644,7 @@ void TeXFont_PK::read_PK_char(unsigned int ch)
// Intel and Alpha processors.
#ifdef DEBUG_PK
kdDebug(kvs::dvi) << "small Endian byte ordering" << endl;
kDebug(kvs::dvi) << "small Endian byte ordering" << endl;
#endif
if (PK_dyn_f == 14) { /* get raster by bits */
@ -720,17 +720,17 @@ void TeXFont_PK::read_PK_char(unsigned int ch)
void TeXFont_PK::read_PK_index()
{
#ifdef DEBUG_PK
kdDebug(kvs::dvi) << "TeXFont_PK::read_PK_index() called" << endl;
kDebug(kvs::dvi) << "TeXFont_PK::read_PK_index() called" << endl;
#endif
if (file == 0) {
kdError(kvs::dvi) << "TeXFont_PK::read_PK_index(): file == 0" << endl;
kError(kvs::dvi) << "TeXFont_PK::read_PK_index(): file == 0" << endl;
return;
}
int magic = two(file);
if (magic != PK_MAGIC) {
kdError(kvs::dvi) << "TeXFont_PK::read_PK_index(): file is not a PK file" << endl;
kError(kvs::dvi) << "TeXFont_PK::read_PK_index(): file is not a PK file" << endl;
return;
}
@ -742,7 +742,7 @@ void TeXFont_PK::read_PK_index()
int hppp = sfour(file);
int vppp = sfour(file);
if (hppp != vppp)
kdWarning(kvs::dvi) << i18n("Font has non-square aspect ratio ") << vppp << ":" << hppp << endl;
kWarning(kvs::dvi) << i18n("Font has non-square aspect ratio ") << vppp << ":" << hppp << endl;
// Read glyph directory (really a whole pass over the file).
for (;;) {
@ -769,10 +769,10 @@ void TeXFont_PK::read_PK_index()
glyphtable[ch].x2 = PK_flag_byte;
fseek(file, (long) bytes_left, SEEK_CUR);
#ifdef DEBUG_PK
kdDebug(kvs::dvi) << "Scanning pk char " << ch << "at " << glyphtable[ch].addr << endl;
kDebug(kvs::dvi) << "Scanning pk char " << ch << "at " << glyphtable[ch].addr << endl;
#endif
}
#ifdef DEBUG_PK
kdDebug(kvs::dvi) << "TeXFont_PK::read_PK_index() called" << endl;
kDebug(kvs::dvi) << "TeXFont_PK::read_PK_index() called" << endl;
#endif
}

View file

@ -21,12 +21,12 @@ TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *parent)
: TeXFont(parent)
{
#ifdef DEBUG_TFM
kdDebug(kvs::dvi) << "TeXFont_TFM::TeXFont_TFM( parent=" << parent << " )" << endl;
kDebug(kvs::dvi) << "TeXFont_TFM::TeXFont_TFM( parent=" << parent << " )" << endl;
#endif
QFile file( parent->filename );
if ( !file.open( QIODevice::ReadOnly ) ) {
kdError(kvs::dvi) << "TeXFont_TFM::TeXFont_TFM(): Could not read TFM file" << endl;
kError(kvs::dvi) << "TeXFont_TFM::TeXFont_TFM(): Could not read TFM file" << endl;
return;
}
QDataStream stream( &file );
@ -36,7 +36,7 @@ TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *parent)
quint16 lf, lh, bc, ec, nw, nh, nd;
stream >> lf >> lh >> bc >> ec >> nw >> nh >> nd;
#ifdef DEBUG_TFM
kdDebug(kvs::dvi) << "lf= " << lf << endl
kDebug(kvs::dvi) << "lf= " << lf << endl
<< "lh= " << lh << endl
<< "bc= " << bc << endl
<< "ec= " << ec << endl
@ -45,7 +45,7 @@ TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *parent)
<< "nd= " << nd << endl;
#endif
if ((bc > ec) || (ec >= TeXFontDefinition::max_num_of_chars_in_font)) {
kdError(kvs::dvi) << "TeXFont_TFM::TeXFont_TFM( filename=" << parent->filename << " ): The font has an invalid bc and ec entries." << endl;
kError(kvs::dvi) << "TeXFont_TFM::TeXFont_TFM( filename=" << parent->filename << " ): The font has an invalid bc and ec entries." << endl;
file.close();
return;
}
@ -54,7 +54,7 @@ TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *parent)
file.at(24);
stream >> checksum >> design_size_in_TeX_points.value;
#ifdef DEBUG_TFM
kdDebug(kvs::dvi) << "checksum = " << checksum << endl
kDebug(kvs::dvi) << "checksum = " << checksum << endl
<< "design_size = " << design_size_in_TeX_points.toDouble() << " TeX Points" << endl
<< " = " << design_size_in_TeX_points.toDouble()*254.0/7227.0 << " cm" << endl;
#endif
@ -93,7 +93,7 @@ TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *parent)
quint8 byte;
stream >> byte;
if (byte >= nw)
kdError(kvs::dvi) << "TeXFont_TFM::TeXFont_TFM( filename=" << parent->filename << " ): The font has an invalid Char-Info table." << endl;
kError(kvs::dvi) << "TeXFont_TFM::TeXFont_TFM( filename=" << parent->filename << " ): The font has an invalid Char-Info table." << endl;
else {
characterWidth_in_units_of_design_size[characterCode] = widthTable_in_units_of_design_size[byte];
g->dvi_advance_in_units_of_design_size_by_2e20 = widthTable_in_units_of_design_size[byte].value;
@ -102,7 +102,7 @@ TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *parent)
stream >> byte;
byte = byte >> 4;
if (byte >= nh)
kdError(kvs::dvi) << "TeXFont_TFM::TeXFont_TFM( filename=" << parent->filename << " ): The font has an invalid Char-Info table." << endl;
kError(kvs::dvi) << "TeXFont_TFM::TeXFont_TFM( filename=" << parent->filename << " ): The font has an invalid Char-Info table." << endl;
else
characterHeight_in_units_of_design_size[characterCode] = heightTable_in_units_of_design_size[byte];
@ -121,12 +121,12 @@ TeXFont_TFM::~TeXFont_TFM()
glyph* TeXFont_TFM::getGlyph(quint16 characterCode, bool generateCharacterPixmap, const QColor& color)
{
#ifdef DEBUG_TFM
kdDebug(kvs::dvi) << "TeXFont_TFM::getGlyph( ch=" << ch << ", generateCharacterPixmap=" << generateCharacterPixmap << " )" << endl;
kDebug(kvs::dvi) << "TeXFont_TFM::getGlyph( ch=" << ch << ", generateCharacterPixmap=" << generateCharacterPixmap << " )" << endl;
#endif
// Paranoia checks
if (characterCode >= TeXFontDefinition::max_num_of_chars_in_font) {
kdError(kvs::dvi) << "TeXFont_TFM::getGlyph(): Argument is too big." << endl;
kError(kvs::dvi) << "TeXFont_TFM::getGlyph(): Argument is too big." << endl;
return glyphtable;
}

View file

@ -21,9 +21,9 @@ quint8 bigEndianByteReader::readUINT8()
// necessary for virtual fonts, which do not end whith EOP.
if (command_pointer >= end_pointer) {
#ifdef DEBUG_ENDIANREADER
kdError(kvs::dvi) << "bigEndianByteReader::readUINT8() tried to read past end of data chunk" << endl;
kdError(kvs::dvi) << "end_pointer = " << end_pointer << endl;
kdError(kvs::dvi) << "command_pointer = " << command_pointer << endl;
kError(kvs::dvi) << "bigEndianByteReader::readUINT8() tried to read past end of data chunk" << endl;
kError(kvs::dvi) << "end_pointer = " << end_pointer << endl;
kError(kvs::dvi) << "command_pointer = " << command_pointer << endl;
#endif
return EOP;
}

View file

@ -83,7 +83,7 @@ dvifile::dvifile(const dvifile *old, fontPool *fp)
size_of_file = old->size_of_file;
end_pointer = dvi_Data()+size_of_file;
if (dvi_Data() == 0) {
kdError(kvs::dvi) << "Not enough memory to copy the DVI-file." << endl;
kError(kvs::dvi) << "Not enough memory to copy the DVI-file." << endl;
return;
}
@ -196,7 +196,7 @@ void dvifile::read_postamble()
command_pointer += len;
#ifdef DEBUG_FONTS
kdDebug(kvs::dvi) << "Postamble: define font \"" << fontname << "\" scale=" << scale << " design=" << design << endl;
kDebug(kvs::dvi) << "Postamble: define font \"" << fontname << "\" scale=" << scale << " design=" << design << endl;
#endif
// According to section A.4 of the DVI driver standard, this font
@ -234,11 +234,11 @@ void dvifile::read_postamble()
void dvifile::prepare_pages()
{
#ifdef DEBUG_DVIFILE
kdDebug(kvs::dvi) << "prepare_pages" << endl;
kDebug(kvs::dvi) << "prepare_pages" << endl;
#endif
if (page_offset.resize(total_pages+1) == false) {
kdError(kvs::dvi) << "No memory for page list!" << endl;
kError(kvs::dvi) << "No memory for page list!" << endl;
return;
}
for(int i=0; i<=total_pages; i++)
@ -267,7 +267,7 @@ void dvifile::prepare_pages()
dvifile::dvifile(const QString& fname, fontPool* pool)
{
#ifdef DEBUG_DVIFILE
kdDebug(kvs::dvi) << "init_dvi_file: " << fname << endl;
kDebug(kvs::dvi) << "init_dvi_file: " << fname << endl;
#endif
errorMsg = QString::null;
@ -289,13 +289,13 @@ dvifile::dvifile(const QString& fname, fontPool* pool)
// whole memory buffer is readable
end_pointer = dvi_Data()+size_of_file;
if (dvi_Data() == 0) {
kdError(kvs::dvi) << i18n("Not enough memory to load the DVI-file.");
kError(kvs::dvi) << i18n("Not enough memory to load the DVI-file.");
return;
}
file.readBlock((char *)dvi_Data(), size_of_file);
file.close();
if (file.status() != QFile::Status(IO_Ok)) {
kdError(kvs::dvi) << i18n("Could not load the DVI-file.");
kError(kvs::dvi) << i18n("Could not load the DVI-file.");
return;
}
@ -313,7 +313,7 @@ dvifile::dvifile(const QString& fname, fontPool* pool)
dvifile::~dvifile()
{
#ifdef DEBUG_DVIFILE
kdDebug(kvs::dvi) << "destroy dvi-file" << endl;
kDebug(kvs::dvi) << "destroy dvi-file" << endl;
#endif
// Delete converted PDF files

View file

@ -69,7 +69,7 @@ dviRenderer::dviRenderer(QWidget *par)
currentlyDrawnPage(0)
{
#ifdef DEBUG_DVIRENDERER
kdDebug(kvs::dvi) << "dviRenderer( parent=" << par << " )" << endl;
kDebug(kvs::dvi) << "dviRenderer( parent=" << par << " )" << endl;
#endif
connect(&font_pool, SIGNAL( setStatusBarText( const QString& ) ), this, SIGNAL( setStatusBarText( const QString& ) ) );
@ -82,7 +82,7 @@ dviRenderer::dviRenderer(QWidget *par)
dviRenderer::~dviRenderer()
{
#ifdef DEBUG_DVIRENDERER
kdDebug(kvs::dvi) << "~dviRenderer" << endl;
kDebug(kvs::dvi) << "~dviRenderer" << endl;
#endif
mutex.lock();
@ -118,34 +118,34 @@ void dviRenderer::showInfo()
void dviRenderer::drawPage(double resolution, RenderedDocumentPagePixmap* page)
{
#ifdef DEBUG_DVIRENDERER
kdDebug(kvs::dvi) << "dviRenderer::drawPage(documentPage *) called, page number " << page->getPageNumber() << endl;
kDebug(kvs::dvi) << "dviRenderer::drawPage(documentPage *) called, page number " << page->getPageNumber() << endl;
#endif
// Paranoid safety checks
if (page == 0) {
kdError(kvs::dvi) << "dviRenderer::drawPage(documentPage *) called with argument == 0" << endl;
kError(kvs::dvi) << "dviRenderer::drawPage(documentPage *) called with argument == 0" << endl;
return;
}
if (page->getPageNumber() == 0) {
kdError(kvs::dvi) << "dviRenderer::drawPage(documentPage *) called for a documentPage with page number 0" << endl;
kError(kvs::dvi) << "dviRenderer::drawPage(documentPage *) called for a documentPage with page number 0" << endl;
return;
}
mutex.lock();
if ( dviFile == 0 ) {
kdError(kvs::dvi) << "dviRenderer::drawPage(documentPage *) called, but no dviFile class allocated." << endl;
kError(kvs::dvi) << "dviRenderer::drawPage(documentPage *) called, but no dviFile class allocated." << endl;
page->clear();
mutex.unlock();
return;
}
if (page->getPageNumber() > dviFile->total_pages) {
kdError(kvs::dvi) << "dviRenderer::drawPage(documentPage *) called for a documentPage with page number " << page->getPageNumber()
kError(kvs::dvi) << "dviRenderer::drawPage(documentPage *) called for a documentPage with page number " << page->getPageNumber()
<< " but the current dviFile has only " << dviFile->total_pages << " pages." << endl;
mutex.unlock();
return;
}
if ( dviFile->dvi_Data() == 0 ) {
kdError(kvs::dvi) << "dviRenderer::drawPage(documentPage *) called, but no dviFile is loaded yet." << endl;
kError(kvs::dvi) << "dviRenderer::drawPage(documentPage *) called, but no dviFile is loaded yet." << endl;
page->clear();
mutex.unlock();
return;
@ -271,7 +271,7 @@ void dviRenderer::showThatSourceInformationIsPresent()
void dviRenderer::embedPostScript()
{
#ifdef DEBUG_DVIRENDERER
kdDebug(kvs::dvi) << "dviRenderer::embedPostScript()" << endl;
kDebug(kvs::dvi) << "dviRenderer::embedPostScript()" << endl;
#endif
if (!dviFile)
@ -317,7 +317,7 @@ void dviRenderer::embedPostScript()
// Prescan phase starts here
#ifdef PERFORMANCE_MEASUREMENT
kdDebug(kvs::dvi) << "Time elapsed till prescan phase starts " << performanceTimer.elapsed() << "ms" << endl;
kDebug(kvs::dvi) << "Time elapsed till prescan phase starts " << performanceTimer.elapsed() << "ms" << endl;
QTime preScanTimer;
preScanTimer.start();
#endif
@ -346,7 +346,7 @@ void dviRenderer::embedPostScript()
#ifdef PERFORMANCE_MEASUREMENT
kdDebug(kvs::dvi) << "Time required for prescan phase: " << preScanTimer.restart() << "ms" << endl;
kDebug(kvs::dvi) << "Time required for prescan phase: " << preScanTimer.restart() << "ms" << endl;
#endif
current_page = currPageSav;
_isModified = true;
@ -380,7 +380,7 @@ bool dviRenderer::isValidFile(const QString& filename) const
bool dviRenderer::setFile(const QString &fname, const KUrl &base)
{
#ifdef DEBUG_DVIRENDERER
kdDebug(kvs::dvi) << "dviRenderer::setFile( fname='" << fname << "', ref='" << ref << "', sourceMarker=" << sourceMarker << " )" << endl;
kDebug(kvs::dvi) << "dviRenderer::setFile( fname='" << fname << "', ref='" << ref << "', sourceMarker=" << sourceMarker << " )" << endl;
#endif
//QMutexLocker lock(&mutex);
@ -489,7 +489,7 @@ bool dviRenderer::setFile(const QString &fname, const KUrl &base)
// PRESCAN STARTS HERE
#ifdef PERFORMANCE_MEASUREMENT
kdDebug(kvs::dvi) << "Time elapsed till prescan phase starts " << performanceTimer.elapsed() << "ms" << endl;
kDebug(kvs::dvi) << "Time elapsed till prescan phase starts " << performanceTimer.elapsed() << "ms" << endl;
QTime preScanTimer;
preScanTimer.start();
#endif
@ -537,7 +537,7 @@ bool dviRenderer::setFile(const QString &fname, const KUrl &base)
#ifdef PERFORMANCE_MEASUREMENT
kdDebug(kvs::dvi) << "Time required for prescan phase: " << preScanTimer.restart() << "ms" << endl;
kDebug(kvs::dvi) << "Time required for prescan phase: " << preScanTimer.restart() << "ms" << endl;
#endif
current_page = currPageSav;
// PRESCAN ENDS HERE
@ -559,7 +559,7 @@ Anchor dviRenderer::parseReference(const QString &reference)
mutex.lock();
#ifdef DEBUG_DVIRENDERER
kdError(kvs::dvi) << "dviRenderer::parseReference( " << reference << " ) called" << endl;
kError(kvs::dvi) << "dviRenderer::parseReference( " << reference << " ) called" << endl;
#endif
if (dviFile == 0) {

View file

@ -78,7 +78,7 @@ extern QPainter *foreGroundPainter;
void dviRenderer::set_char(unsigned int cmd, unsigned int ch)
{
#ifdef DEBUG_RENDER
kdDebug(kvs::dvi) << "set_char #" << ch << endl;
kDebug(kvs::dvi) << "set_char #" << ch << endl;
#endif
glyph *g;
@ -207,13 +207,13 @@ void dviRenderer::set_empty_char(unsigned int, unsigned int)
void dviRenderer::set_vf_char(unsigned int cmd, unsigned int ch)
{
#ifdef DEBUG_RENDER
kdDebug(kvs::dvi) << "dviRenderer::set_vf_char( cmd=" << cmd << ", ch=" << ch << " )" << endl;
kDebug(kvs::dvi) << "dviRenderer::set_vf_char( cmd=" << cmd << ", ch=" << ch << " )" << endl;
#endif
static unsigned char c;
macro *m = &currinf.fontp->macrotable[ch];
if (m->pos == NULL) {
kdError(kvs::dvi) << "Character " << ch << " not defined in font " << currinf.fontp->fontname << endl;
kError(kvs::dvi) << "Character " << ch << " not defined in font " << currinf.fontp->fontname << endl;
m->pos = m->end = &c;
return;
}
@ -248,7 +248,7 @@ void dviRenderer::set_vf_char(unsigned int cmd, unsigned int ch)
void dviRenderer::set_no_char(unsigned int cmd, unsigned int ch)
{
#ifdef DEBUG_RENDER
kdDebug(kvs::dvi) << "dviRenderer::set_no_char( cmd=" << cmd << ", ch =" << ch << " )" << endl;
kDebug(kvs::dvi) << "dviRenderer::set_no_char( cmd=" << cmd << ", ch =" << ch << " )" << endl;
#endif
if (currinf._virtual) {
@ -268,7 +268,7 @@ void dviRenderer::set_no_char(unsigned int cmd, unsigned int ch)
void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro)
{
#ifdef DEBUG_RENDER
kdDebug(kvs::dvi) << "draw_part" << endl;
kDebug(kvs::dvi) << "draw_part" << endl;
#endif
qint32 RRtmp=0, WWtmp=0, XXtmp=0, YYtmp=0, ZZtmp=0;
@ -369,7 +369,7 @@ void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro)
// that at the end of a page, the stack should always be
// empty.
if (!stack.isEmpty()) {
kdDebug(kvs::dvi) << "DRAW: The stack was not empty when the EOP command was encountered." << endl;
kDebug(kvs::dvi) << "DRAW: The stack was not empty when the EOP command was encountered." << endl;
errorMsg = i18n("The stack was not empty when the EOP command was encountered.");
return;
}
@ -591,14 +591,14 @@ void dviRenderer::draw_page()
// elapsed till the kdvi_multipage was constructed, and print
// it. Set the flag so that is message will not be printed again.
if (performanceFlag == 0) {
kdDebug(kvs::dvi) << "Time elapsed till the first page is drawn: " << performanceTimer.restart() << "ms" << endl;
kDebug(kvs::dvi) << "Time elapsed till the first page is drawn: " << performanceTimer.restart() << "ms" << endl;
performanceFlag = 1;
}
#endif
#ifdef DEBUG_RENDER
kdDebug(kvs::dvi) <<"draw_page" << endl;
kDebug(kvs::dvi) <<"draw_page" << endl;
#endif
if (!accessibilityBackground)

View file

@ -41,7 +41,7 @@ extern void parse_special_argument(const QString& strg, const char* argument_nam
void dviRenderer::prescan_embedPS(char *cp, quint8 *beginningOfSpecialCommand)
{
#ifdef DEBUG_PRESCAN
kdDebug(kvs::dvi) << "dviRenderer::prescan_embedPS( cp = " << cp << " ) " << endl;
kDebug(kvs::dvi) << "dviRenderer::prescan_embedPS( cp = " << cp << " ) " << endl;
#endif
// Encapsulated Postscript File
@ -226,7 +226,7 @@ void dviRenderer::prescan_embedPS(char *cp, quint8 *beginningOfSpecialCommand)
void dviRenderer::prescan_removePageSizeInfo(char *cp, quint8 *beginningOfSpecialCommand)
{
#ifdef DEBUG_PRESCAN
kdDebug(kvs::dvi) << "dviRenderer::prescan_embedPS( cp = " << cp << " ) " << endl;
kDebug(kvs::dvi) << "dviRenderer::prescan_embedPS( cp = " << cp << " ) " << endl;
#endif
// Encapsulated Postscript File
@ -241,7 +241,7 @@ void dviRenderer::prescan_removePageSizeInfo(char *cp, quint8 *beginningOfSpecia
void dviRenderer::prescan_ParsePapersizeSpecial(const QString& _cp)
{
#ifdef DEBUG_PRESCAN
kdDebug(kvs::dvi) << "Papersize-Special : papersize" << _cp << endl;
kDebug(kvs::dvi) << "Papersize-Special : papersize" << _cp << endl;
#endif
QString cp = _cp.simplified();
@ -280,7 +280,7 @@ void dviRenderer::prescan_ParseHTMLAnchorSpecial(const QString& _cp)
void dviRenderer::prescan_ParsePSHeaderSpecial(const QString& cp)
{
#ifdef DEBUG_PRESCAN
kdDebug(kvs::dvi) << "PostScript-special, header " << cp.latin1() << endl;
kDebug(kvs::dvi) << "PostScript-special, header " << cp.latin1() << endl;
#endif
QString _file = cp;
@ -303,7 +303,7 @@ void dviRenderer::prescan_ParsePSHeaderSpecial(const QString& cp)
void dviRenderer::prescan_ParsePSBangSpecial(const QString& cp)
{
#ifdef DEBUG_PRESCAN
kdDebug(kvs::dvi) << "PostScript-special, literal header " << cp.latin1() << endl;
kDebug(kvs::dvi) << "PostScript-special, literal header " << cp.latin1() << endl;
#endif
PS_interface->PostScriptHeaderString->append( " @defspecial \n" );
@ -315,7 +315,7 @@ void dviRenderer::prescan_ParsePSBangSpecial(const QString& cp)
void dviRenderer::prescan_ParsePSQuoteSpecial(const QString& cp)
{
#ifdef DEBUG_PRESCAN
kdError(kvs::dvi) << "PostScript-special, literal PostScript " << cp.latin1() << endl;
kError(kvs::dvi) << "PostScript-special, literal PostScript " << cp.latin1() << endl;
#endif
double PS_H = (currinf.data.dvi_h*300.0)/(65536*1200)-300;
@ -330,7 +330,7 @@ void dviRenderer::prescan_ParsePSQuoteSpecial(const QString& cp)
void dviRenderer::prescan_ParsePSSpecial(const QString& cp)
{
#ifdef DEBUG_PRESCAN
kdDebug(kvs::dvi) << "PostScript-special, direct PostScript " << cp << endl;
kDebug(kvs::dvi) << "PostScript-special, direct PostScript " << cp << endl;
#endif
// Unfortunately, in some TeX distribution the hyperref package uses
@ -394,7 +394,7 @@ void dviRenderer::prescan_ParsePSSpecial(const QString& cp)
void dviRenderer::prescan_ParsePSFileSpecial(const QString& cp)
{
#ifdef DEBUG_PRESCAN
kdDebug(kvs::dvi) << "epsf-special: psfile=" << cp <<endl;
kDebug(kvs::dvi) << "epsf-special: psfile=" << cp <<endl;
#endif
QString include_command = cp.simplified();
@ -618,7 +618,7 @@ void dviRenderer::prescan_setChar(unsigned int ch)
void dviRenderer::prescan(parseSpecials specialParser)
{
#ifdef DEBUG_PRESCAN
kdDebug(kvs::dvi) << "dviRenderer::prescan( ... )" << endl;
kDebug(kvs::dvi) << "dviRenderer::prescan( ... )" << endl;
#endif
if (resolutionInDPI == 0.0)

View file

@ -41,7 +41,7 @@ void DVIWidget::mousePressEvent(QMouseEvent* e)
RenderedDviPagePixmap* pageData = dynamic_cast<RenderedDviPagePixmap*>(documentCache->getPage(pageNumber));
if (pageData == 0)
{
kdDebug(kvs::dvi) << "DVIWidget::mousePressEvent(...) pageData for page #" << pageNumber << " is empty" << endl;
kDebug(kvs::dvi) << "DVIWidget::mousePressEvent(...) pageData for page #" << pageNumber << " is empty" << endl;
return;
}
@ -90,7 +90,7 @@ void DVIWidget::mouseMoveEvent(QMouseEvent* e)
// Get a pointer to the page contents
RenderedDviPagePixmap* pageData = dynamic_cast<RenderedDviPagePixmap*>(documentCache->getPage(pageNumber));
if (pageData == 0) {
kdDebug(kvs::dvi) << "DVIWidget::mouseMoveEvent(...) pageData for page #" << pageNumber << " is empty" << endl;
kDebug(kvs::dvi) << "DVIWidget::mouseMoveEvent(...) pageData for page #" << pageNumber << " is empty" << endl;
return;
}

View file

@ -111,7 +111,7 @@ void DVIExport::start(const QString& command,
process_->start(command, args, QIODevice::ReadOnly);
if (!process_->waitForStarted(-1))
#endif
kdError(kvs::dvi) << command << " failed to start" << endl;
kError(kvs::dvi) << command << " failed to start" << endl;
else
started_ = true;
}

View file

@ -41,7 +41,7 @@ DVISourceEditor::DVISourceEditor(dviRenderer& parent,
dynamic_cast<const RenderedDviPagePixmap*> parent->currentlyDrawnPage;
if (currentDVIPage)
{
kdDebug(kvs::dvi) << "Source hyperlink to " << currentDVIPage->sourceHyperLinkList[i].linkText << endl;
kDebug(kvs::dvi) << "Source hyperlink to " << currentDVIPage->sourceHyperLinkList[i].linkText << endl;
}
#endif
@ -76,13 +76,13 @@ DVISourceEditor::DVISourceEditor(dviRenderer& parent,
command = command.replace( "%l", QString::number(splitter.line()) ).replace( "%f", KProcess::quote(TeXfile) );
#ifdef DEBUG_SPECIAL
kdDebug(kvs::dvi) << "Calling program: " << command << endl;
kDebug(kvs::dvi) << "Calling program: " << command << endl;
#endif
// Set up a shell process with the editor command.
process_ = new KShellProcess;
if (process_ == 0) {
kdError(kvs::dvi) << "Could not allocate ShellProcess for the editor command." << endl;
kError(kvs::dvi) << "Could not allocate ShellProcess for the editor command." << endl;
return;
}
connect(process_, SIGNAL(receivedStderr(KProcess *, char *, int)), this, SLOT(output_receiver(KProcess *, char *, int)));
@ -104,7 +104,7 @@ DVISourceEditor::DVISourceEditor(dviRenderer& parent,
*process_ << command;
process_->closeStdin();
if (!process_->start(KProcess::NotifyOnExit, KProcess::AllOutput))
kdError(kvs::dvi) << "Editor failed to start" << endl;
kError(kvs::dvi) << "Editor failed to start" << endl;
else
started_ = true;
}

View file

@ -26,7 +26,7 @@ DVI_SourceFileSplitter::DVI_SourceFileSplitter(const QString &srclink, const QSt
bool possibleNumberMixUp = false;
#ifdef DEBUG_SOURCESPLITTER
kdDebug(kvs::dvi) << "DVI_SourceSplitter: srclink " << srclink << endl;
kDebug(kvs::dvi) << "DVI_SourceSplitter: srclink " << srclink << endl;
#endif
//remove src: if necessary
@ -46,7 +46,7 @@ DVI_SourceFileSplitter::DVI_SourceFileSplitter(const QString &srclink, const QSt
linepart = linepart.trimmed();
#ifdef DEBUG_SOURCESPLITTER
kdDebug(kvs::dvi) << "DVI_SourceSplitter: filepart " << filepart << " linepart " << linepart << endl;
kDebug(kvs::dvi) << "DVI_SourceSplitter: filepart " << filepart << " linepart " << linepart << endl;
#endif
//test if the file exists
@ -70,12 +70,12 @@ DVI_SourceFileSplitter::DVI_SourceFileSplitter(const QString &srclink, const QSt
{
tempInfo.setFile(linepart.right(index) + tempFileName);
#ifdef DEBUG_SOURCESPLITTER
kdDebug(kvs::dvi) << "DVI_SourceSplitter: trying " << tempInfo.fileName() << endl;
kDebug(kvs::dvi) << "DVI_SourceSplitter: trying " << tempInfo.fileName() << endl;
#endif
if ( tempInfo.exists() ) { found = true; break;}
tempInfo.setFile(linepart.right(index) + tempFileName + ".tex");
#ifdef DEBUG_SOURCESPLITTER
kdDebug(kvs::dvi) << "DVI_SourceSplitter: trying " << tempInfo.fileName() << endl;
kDebug(kvs::dvi) << "DVI_SourceSplitter: trying " << tempInfo.fileName() << endl;
#endif
if ( tempInfo.exists() ) { found = true; break;}
}
@ -92,6 +92,6 @@ DVI_SourceFileSplitter::DVI_SourceFileSplitter(const QString &srclink, const QSt
if (!ok) m_line = 0;
#ifdef DEBUG_SOURCESPLITTER
kdDebug(kvs::dvi) << "DVI_SourceSplitter: result: file " << m_fileInfo.absoluteFilePath() << " line " << m_line << endl;
kDebug(kvs::dvi) << "DVI_SourceSplitter: result: file " << m_fileInfo.absoluteFilePath() << " line " << m_line << endl;
#endif
}

View file

@ -24,7 +24,7 @@
fontEncoding::fontEncoding(const QString &encName)
{
#ifdef DEBUG_FONTENC
kdDebug(kvs::dvi) << "fontEncoding( " << encName << " )" << endl;
kDebug(kvs::dvi) << "fontEncoding( " << encName << " )" << endl;
#endif
_isValid = false;
@ -37,7 +37,7 @@ fontEncoding::fontEncoding(const QString &encName)
QIODevice::ReadOnly|QIODevice::Text);
if (!kpsewhich.waitForStarted()) {
kdError(kvs::dvi) << "fontEncoding::fontEncoding(...): kpsewhich could not be started." << endl;
kError(kvs::dvi) << "fontEncoding::fontEncoding(...): kpsewhich could not be started." << endl;
return;
}
@ -46,12 +46,12 @@ fontEncoding::fontEncoding(const QString &encName)
const QString encFileName = QString(kpsewhich.readAll()).trimmed();
if (encFileName.isEmpty()) {
kdError(kvs::dvi) << QString("fontEncoding::fontEncoding(...): The file '%1' could not be found by kpsewhich.").arg(encName) << endl;
kError(kvs::dvi) << QString("fontEncoding::fontEncoding(...): The file '%1' could not be found by kpsewhich.").arg(encName) << endl;
return;
}
#ifdef DEBUG_FONTENC
kdDebug(kvs::dvi) << "FileName of the encoding: " << encFileName << endl;
kDebug(kvs::dvi) << "FileName of the encoding: " << encFileName << endl;
#endif
QFile file( encFileName );
@ -69,7 +69,7 @@ fontEncoding::fontEncoding(const QString &encName)
// Find the name of the encoding
encodingFullName = fileContent.section('[', 0, 0).simplified().mid(1);
#ifdef DEBUG_FONTENC
kdDebug(kvs::dvi) << "encodingFullName: " << encodingFullName << endl;
kDebug(kvs::dvi) << "encodingFullName: " << encodingFullName << endl;
#endif
fileContent = fileContent.section('[', 1, 1).section(']',0,0).simplified();
@ -79,14 +79,14 @@ fontEncoding::fontEncoding(const QString &encName)
for ( QStringList::Iterator it = glyphNameList.begin(); (it != glyphNameList.end())&&(i<256); ++it ) {
glyphNameVector[i] = (*it).simplified();
#ifdef DEBUG_FONTENC
kdDebug(kvs::dvi) << i << ": " << glyphNameVector[i] << endl;
kDebug(kvs::dvi) << i << ": " << glyphNameVector[i] << endl;
#endif
i++;
}
for(; i<256; i++)
glyphNameVector[i] = ".notdef";
} else {
kdError(kvs::dvi) << QString("fontEncoding::fontEncoding(...): The file '%1' could not be opened.").arg(encFileName) << endl;
kError(kvs::dvi) << QString("fontEncoding::fontEncoding(...): The file '%1' could not be opened.").arg(encFileName) << endl;
return;
}

View file

@ -60,7 +60,7 @@ class fontEncoding {
// The constructor takes the name of an encoding file, such as
// '8r.enc', locate the file on the hard disk using the 'kpsewhich'
// command, reads it in and parses it. If the file cannot be
// located, opened or parsed, errors are printed using the kdError()
// located, opened or parsed, errors are printed using the kError()
// channel, and the array glyphNameVector will contain empty
// strings.
fontEncoding(const QString &encName);

View file

@ -41,7 +41,7 @@ fontMap::fontMap()
QIODevice::ReadOnly|QIODevice::Text);
if (!kpsewhich.waitForStarted()) {
kdError(kvs::dvi) << "fontMap::fontMap(): kpsewhich could not be started." << endl;
kError(kvs::dvi) << "fontMap::fontMap(): kpsewhich could not be started." << endl;
return;
}
@ -56,7 +56,7 @@ fontMap::fontMap()
QStringList() << "--format=dvips config" << "ps2pk.map",
QIODevice::ReadOnly|QIODevice::Text);
if (!kpsewhich.waitForStarted()) {
kdError(kvs::dvi) << "fontMap::fontMap(): kpsewhich could not be started." << endl;
kError(kvs::dvi) << "fontMap::fontMap(): kpsewhich could not be started." << endl;
return;
}
@ -65,7 +65,7 @@ fontMap::fontMap()
map_fileName = QString(kpsewhich.readAll()).trimmed();
// If both versions fail, then there is nothing left to do.
if (map_fileName.isEmpty()) {
kdError(kvs::dvi) << "fontMap::fontMap(): The file 'ps2pk.map' could not be found by kpsewhich." << endl;
kError(kvs::dvi) << "fontMap::fontMap(): The file 'ps2pk.map' could not be found by kpsewhich." << endl;
return;
}
}
@ -105,13 +105,13 @@ fontMap::fontMap()
}
file.close();
} else
kdError(kvs::dvi) << QString("fontMap::fontMap(): The file '%1' could not be opened.").arg(map_fileName) << endl;
kError(kvs::dvi) << QString("fontMap::fontMap(): The file '%1' could not be opened.").arg(map_fileName) << endl;
#ifdef DEBUG_FONTMAP
kdDebug(kvs::dvi) << "FontMap file parsed. Results:" << endl;
kDebug(kvs::dvi) << "FontMap file parsed. Results:" << endl;
QMap<QString, fontMapEntry>::Iterator it;
for ( it = fontMapEntries.begin(); it != fontMapEntries.end(); ++it )
kdDebug(kvs::dvi) << "TeXName: " << it.key()
kDebug(kvs::dvi) << "TeXName: " << it.key()
<< ", FontFileName=" << it.data().fontFileName
<< ", FullName=" << it.data().fullFontName
<< ", Encoding=" << it.data().fontEncoding

View file

@ -87,7 +87,7 @@ class fontMap {
and read its contents. If the file 'ps2pk.map' cannot be found
using the kpsewhich command, or if it cannot be read, or is
(partially) in an improper format, an error message is printed
to stderr using the kdDebug() stream. */
to stderr using the kDebug() stream. */
fontMap( void );
/** find the name of a font file (e.g. 'ubkd8a.pfb') from a TeX font

View file

@ -44,7 +44,7 @@ fontPool::fontPool()
0)
{
#ifdef DEBUG_FONTPOOL
kdDebug(kvs::dvi) << "fontPool::fontPool() called" << endl;
kDebug(kvs::dvi) << "fontPool::fontPool() called" << endl;
#endif
setName("Font Pool");
@ -58,7 +58,7 @@ fontPool::fontPool()
#ifdef HAVE_FREETYPE
// Initialize the Freetype Library
if ( FT_Init_FreeType( &FreeType_library ) != 0 ) {
kdError(kvs::dvi) << "Cannot load the FreeType library. KDVI proceeds without FreeType support." << endl;
kError(kvs::dvi) << "Cannot load the FreeType library. KDVI proceeds without FreeType support." << endl;
FreeType_could_be_loaded = false;
} else
FreeType_could_be_loaded = true;
@ -90,12 +90,12 @@ fontPool::fontPool()
if ((result == 0xff) || (result == 0x00)) {
#ifdef DEBUG_FONTPOOL
kdDebug(kvs::dvi) << "fontPool::fontPool(): QPixmap does not support the alpha channel" << endl;
kDebug(kvs::dvi) << "fontPool::fontPool(): QPixmap does not support the alpha channel" << endl;
#endif
QPixmapSupportsAlpha = false;
} else {
#ifdef DEBUG_FONTPOOL
kdDebug(kvs::dvi) << "fontPool::fontPool(): QPixmap supports the alpha channel" << endl;
kDebug(kvs::dvi) << "fontPool::fontPool(): QPixmap supports the alpha channel" << endl;
#endif
QPixmapSupportsAlpha = true;
}
@ -105,7 +105,7 @@ fontPool::fontPool()
fontPool::~fontPool()
{
#ifdef DEBUG_FONTPOOL
kdDebug(kvs::dvi) << "fontPool::~fontPool() called" << endl;
kDebug(kvs::dvi) << "fontPool::~fontPool() called" << endl;
#endif
#ifdef HAVE_FREETYPE
@ -152,7 +152,7 @@ TeXFontDefinition* fontPool::appendx(const QString& fontname, quint32 checksum,
fontp = new TeXFontDefinition(fontname, displayResolution*enlargement, checksum, scale, this, enlargement);
if (fontp == 0) {
kdError(kvs::dvi) << i18n("Could not allocate memory for a font structure!") << endl;
kError(kvs::dvi) << i18n("Could not allocate memory for a font structure!") << endl;
exit(0);
}
fontList.append(fontp);
@ -170,7 +170,7 @@ TeXFontDefinition* fontPool::appendx(const QString& fontname, quint32 checksum,
QString fontPool::status()
{
#ifdef DEBUG_FONTPOOL
kdDebug(kvs::dvi) << "fontPool::status() called" << endl;
kDebug(kvs::dvi) << "fontPool::status() called" << endl;
#endif
QString text;
@ -226,7 +226,7 @@ QString fontPool::status()
bool fontPool::areFontsLocated()
{
#ifdef DEBUG_FONTPOOL
kdDebug(kvs::dvi) << "fontPool::areFontsLocated() called" << endl;
kDebug(kvs::dvi) << "fontPool::areFontsLocated() called" << endl;
#endif
// Is there a font whose name we did not try to find out yet?
@ -238,7 +238,7 @@ bool fontPool::areFontsLocated()
}
#ifdef DEBUG_FONTPOOL
kdDebug(kvs::dvi) << "... yes, all fonts are located (but not necessarily loaded)." << endl;
kDebug(kvs::dvi) << "... yes, all fonts are located (but not necessarily loaded)." << endl;
#endif
return true; // That says that all fonts are located.
}
@ -407,7 +407,7 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo
if (matchingFiles.isEmpty() != true) {
#ifdef DEBUG_FONTPOOL
kdDebug(kvs::dvi) << "Associated " << fontp->fontname << " to " << matchingFiles.first() << endl;
kDebug(kvs::dvi) << "Associated " << fontp->fontname << " to " << matchingFiles.first() << endl;
#endif
QString fname = matchingFiles.first();
fontp->fontNameReceiver(fname);
@ -431,7 +431,7 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo
void fontPool::setCMperDVIunit( double _CMperDVI )
{
#ifdef DEBUG_FONTPOOL
kdDebug(kvs::dvi) << "fontPool::setCMperDVIunit( " << _CMperDVI << " )" << endl;
kDebug(kvs::dvi) << "fontPool::setCMperDVIunit( " << _CMperDVI << " )" << endl;
#endif
if (CMperDVIunit == _CMperDVI)
@ -450,7 +450,7 @@ void fontPool::setCMperDVIunit( double _CMperDVI )
void fontPool::setDisplayResolution( double _displayResolution_in_dpi )
{
#ifdef DEBUG_FONTPOOL
kdDebug(kvs::dvi) << "fontPool::setDisplayResolution( displayResolution_in_dpi=" << _displayResolution_in_dpi << " ) called" << endl;
kDebug(kvs::dvi) << "fontPool::setDisplayResolution( displayResolution_in_dpi=" << _displayResolution_in_dpi << " ) called" << endl;
#endif
// Ignore minute changes by less than 2 DPI. The difference would
@ -459,7 +459,7 @@ void fontPool::setDisplayResolution( double _displayResolution_in_dpi )
// changes the window size by 1 pixel all the time.
if ( fabs(displayResolution_in_dpi - _displayResolution_in_dpi) <= 2.0 ) {
#ifdef DEBUG_FONTPOOL
kdDebug(kvs::dvi) << "fontPool::setDisplayResolution(...): resolution wasn't changed. Aborting." << endl;
kDebug(kvs::dvi) << "fontPool::setDisplayResolution(...): resolution wasn't changed. Aborting." << endl;
#endif
return;
}
@ -494,7 +494,7 @@ void fontPool::markFontsAsLocated()
void fontPool::mark_fonts_as_unused()
{
#ifdef DEBUG_FONTPOOL
kdDebug(kvs::dvi) << "fontPool::mark_fonts_as_unused() called" << endl;
kDebug(kvs::dvi) << "fontPool::mark_fonts_as_unused() called" << endl;
#endif
TeXFontDefinition *fontp = fontList.first();
@ -508,7 +508,7 @@ void fontPool::mark_fonts_as_unused()
void fontPool::release_fonts()
{
#ifdef DEBUG_FONTPOOL
kdDebug(kvs::dvi) << "Release_fonts" << endl;
kDebug(kvs::dvi) << "Release_fonts" << endl;
#endif
TeXFontDefinition *fontp = fontList.first();
@ -536,7 +536,7 @@ void fontPool::mf_output_receiver()
while( (numleft = MetafontOutput.find('\n')) != -1) {
QString line = MetafontOutput.left(numleft+1);
#ifdef DEBUG_FONTPOOL
kdDebug(kvs::dvi) << "MF OUTPUT RECEIVED: " << line;
kDebug(kvs::dvi) << "MF OUTPUT RECEIVED: " << line;
#endif
// Search for a line which marks the beginning of a MetaFont run
// and show the progress dialog at the end of this method.

View file

@ -16,7 +16,7 @@
glyph::glyph()
{
#ifdef DEBUG_GLYPH
kdDebug(kvs::dvi) << "glyph::glyph()" << endl;
kDebug(kvs::dvi) << "glyph::glyph()" << endl;
#endif
addr = 0;

View file

@ -180,7 +180,7 @@ void KDVIMultiPage::preferencesChanged()
// Call method from parent class
KMultiPage::preferencesChanged();
#ifdef KDVI_MULTIPAGE_DEBUG
kdDebug(kvs::dvi) << "preferencesChanged" << endl;
kDebug(kvs::dvi) << "preferencesChanged" << endl;
#endif
bool showPS = Prefs::showPS();
@ -197,7 +197,7 @@ void KDVIMultiPage::print()
KPrinter *printer = getPrinter(false);
// Abort with an error message if no KPrinter could be initialized
if (printer == 0) {
kdError(kvs::dvi) << "KPrinter not available" << endl;
kError(kvs::dvi) << "KPrinter not available" << endl;
return;
}

View file

@ -40,7 +40,7 @@
void KDVIMultiPage::doExportText()
{
#ifdef KDVI_MULTIPAGE_DEBUG
kdDebug(kvs::dvi) << "KDVIMultiPage::doExportText() called" << endl;
kDebug(kvs::dvi) << "KDVIMultiPage::doExportText() called" << endl;
#endif
// Paranoid safety checks

View file

@ -64,7 +64,7 @@ ghostscript_interface::~ghostscript_interface() {
void ghostscript_interface::setPostScript(const PageNumber& page, const QString& PostScript) {
#ifdef DEBUG_PSGS
kdDebug(kvs::dvi) << "ghostscript_interface::setPostScript( " << page << ", ... )" << endl;
kDebug(kvs::dvi) << "ghostscript_interface::setPostScript( " << page << ", ... )" << endl;
#endif
if (pageList.find(page) == 0) {
@ -88,7 +88,7 @@ void ghostscript_interface::setIncludePath(const QString &_includePath) {
void ghostscript_interface::setBackgroundColor(const PageNumber& page, const QColor& background_color, bool permanent) {
#ifdef DEBUG_PSGS
kdDebug(kvs::dvi) << "ghostscript_interface::setBackgroundColor( " << page << ", " << background_color << " )" << endl;
kDebug(kvs::dvi) << "ghostscript_interface::setBackgroundColor( " << page << ", " << background_color << " )" << endl;
#endif
if (pageList.find(page) == 0) {
@ -110,7 +110,7 @@ void ghostscript_interface::setBackgroundColor(const PageNumber& page, const QCo
void ghostscript_interface::restoreBackgroundColor(const PageNumber& page)
{
#ifdef DEBUG_PSGS
kdDebug(kvs::dvi) << "ghostscript_interface::restoreBackgroundColor( " << page << " )" << endl;
kDebug(kvs::dvi) << "ghostscript_interface::restoreBackgroundColor( " << page << " )" << endl;
#endif
if (pageList.find(page) == 0)
return;
@ -124,7 +124,7 @@ void ghostscript_interface::restoreBackgroundColor(const PageNumber& page)
QColor ghostscript_interface::getBackgroundColor(const PageNumber& page) const {
#ifdef DEBUG_PSGS
kdDebug(kvs::dvi) << "ghostscript_interface::getBackgroundColor( " << page << " )" << endl;
kDebug(kvs::dvi) << "ghostscript_interface::getBackgroundColor( " << page << " )" << endl;
#endif
if (pageList.find(page) == 0)
@ -144,11 +144,11 @@ void ghostscript_interface::clear() {
void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, const QString& filename, long magnification) {
#ifdef DEBUG_PSGS
kdDebug(kvs::dvi) << "ghostscript_interface::gs_generate_graphics_file( " << page << ", " << filename << " )" << endl;
kDebug(kvs::dvi) << "ghostscript_interface::gs_generate_graphics_file( " << page << ", " << filename << " )" << endl;
#endif
if (knownDevices.isEmpty()) {
kdError(kvs::dvi) << "No known devices found" << endl;
kError(kvs::dvi) << "No known devices found" << endl;
return;
}
@ -233,7 +233,7 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co
<< PSfileName;
#ifdef DEBUG_PSGS
kdDebug(kvs::dvi) << gs_exe + " " + gs_args.join(" ") << endl;
kDebug(kvs::dvi) << gs_exe + " " + gs_args.join(" ") << endl;
#endif
QProcess gs;
@ -243,7 +243,7 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co
if (!gs.waitForStarted()) {
// Starting ghostscript did not work.
// TODO: Issue error message, switch PS support off.
kdError(kvs::dvi) << "ghostscript could not be started" << endl;
kError(kvs::dvi) << "ghostscript could not be started" << endl;
return;
}
@ -256,14 +256,14 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co
// Check that gs has indeed produced a file.
if (!QFile::exists(filename)) {
kdError(kvs::dvi) << "GS did not generate file " << filename
kError(kvs::dvi) << "GS did not generate file " << filename
<< ", gs exit code " << gs.exitCode() << endl;
// It didn't. Check if the reason is that the device is not compiled into
// ghostscript. If so, try again with another device.
const QString gs_output = gs.readAll();
if (gs_output.contains("Unknown device")) {
kdDebug(kvs::dvi) << QString("The version of ghostscript installed on this computer does not support "
kDebug(kvs::dvi) << QString("The version of ghostscript installed on this computer does not support "
"the '%1' device driver.").arg(*gsDevice) << endl;
knownDevices.remove(gsDevice);
gsDevice = knownDevices.begin();
@ -290,7 +290,7 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co
"drivers. Note that KDVI needs to be restarted to re-enable PostScript support."
"</p></qt>"));
else {
kdDebug(kvs::dvi) << QString("KDVI will now try to use the '%1' device driver.").arg(*gsDevice) << endl;
kDebug(kvs::dvi) << QString("KDVI will now try to use the '%1' device driver.").arg(*gsDevice) << endl;
// The function calls itself recursively until there are no
// devices left to try.
gs_generate_graphics_file(page, filename, magnification);
@ -305,11 +305,11 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co
void ghostscript_interface::graphics(const PageNumber& page, double dpi, long magnification, QPainter* paint) {
#ifdef DEBUG_PSGS
kdDebug(kvs::dvi) << "ghostscript_interface::graphics( " << page << ", " << dpi << ", ... ) called." << endl;
kDebug(kvs::dvi) << "ghostscript_interface::graphics( " << page << ", " << dpi << ", ... ) called." << endl;
#endif
if (paint == 0) {
kdError(kvs::dvi) << "ghostscript_interface::graphics(PageNumber page, double dpi, long magnification, QPainter *paint) called with paint == 0" << endl;
kError(kvs::dvi) << "ghostscript_interface::graphics(PageNumber page, double dpi, long magnification, QPainter *paint) called with paint == 0" << endl;
return;
}
@ -323,7 +323,7 @@ void ghostscript_interface::graphics(const PageNumber& page, double dpi, long ma
// No PostScript? Then return immediately.
if ((info == 0) || (info->PostScriptString->isEmpty())) {
#ifdef DEBUG_PSGS
kdDebug(kvs::dvi) << "No PostScript found. Not drawing anything." << endl;
kDebug(kvs::dvi) << "No PostScript found. Not drawing anything." << endl;
#endif
return;
}

View file

@ -32,10 +32,10 @@ extern QPainter *foreGroundPainter;
void dviRenderer::printErrorMsgForSpecials(const QString& msg)
{
if (dviFile->errorCounter < 25) {
kdError(kvs::dvi) << msg << endl;
kError(kvs::dvi) << msg << endl;
dviFile->errorCounter++;
if (dviFile->errorCounter == 25)
kdError(kvs::dvi) << i18n("That makes 25 errors. Further error messages will not be printed.") << endl;
kError(kvs::dvi) << i18n("That makes 25 errors. Further error messages will not be printed.") << endl;
}
}
@ -252,7 +252,7 @@ void dviRenderer::html_href_special(const QString& _cp)
cp.truncate(cp.find('"'));
#ifdef DEBUG_SPECIAL
kdDebug(kvs::dvi) << "HTML-special, href " << cp.latin1() << endl;
kDebug(kvs::dvi) << "HTML-special, href " << cp.latin1() << endl;
#endif
HTML_href = new QString(cp);
}
@ -261,7 +261,7 @@ void dviRenderer::html_href_special(const QString& _cp)
void dviRenderer::html_anchor_end()
{
#ifdef DEBUG_SPECIAL
kdDebug(kvs::dvi) << "HTML-special, anchor-end" << endl;
kDebug(kvs::dvi) << "HTML-special, anchor-end" << endl;
#endif
if (HTML_href != NULL) {
@ -301,7 +301,7 @@ void parse_special_argument(const QString& strg, const char* argument_name, int*
*variable = int(tmp_float+0.5);
else
// Maybe we should open a dialog here.
kdError(kvs::dvi) << i18n("Malformed parameter in the epsf special command.\n"
kError(kvs::dvi) << i18n("Malformed parameter in the epsf special command.\n"
"Expected a float to follow %1 in %2")
.arg(argument_name).arg(strg) << endl;
}
@ -311,7 +311,7 @@ void parse_special_argument(const QString& strg, const char* argument_name, int*
void dviRenderer::epsf_special(const QString& cp)
{
#ifdef DEBUG_SPECIAL
kdDebug(kvs::dvi) << "epsf-special: psfile=" << cp <<endl;
kDebug(kvs::dvi) << "epsf-special: psfile=" << cp <<endl;
#endif
QString include_command = cp.simplified();
@ -438,7 +438,7 @@ void dviRenderer::epsf_special(const QString& cp)
void dviRenderer::TPIC_flushPath_special()
{
#ifdef DEBUG_SPECIAL
kdDebug(kvs::dvi) << "TPIC special flushPath" << endl;
kDebug(kvs::dvi) << "TPIC special flushPath" << endl;
#endif
if (number_of_elements_in_path == 0) {
@ -456,7 +456,7 @@ void dviRenderer::TPIC_flushPath_special()
void dviRenderer::TPIC_addPath_special(const QString& cp)
{
#ifdef DEBUG_SPECIAL
kdDebug(kvs::dvi) << "TPIC special addPath: " << cp << endl;
kDebug(kvs::dvi) << "TPIC special addPath: " << cp << endl;
#endif
// Adds a point to the path list
@ -490,7 +490,7 @@ void dviRenderer::TPIC_addPath_special(const QString& cp)
void dviRenderer::TPIC_setPen_special(const QString& cp)
{
#ifdef DEBUG_SPECIAL
kdDebug(kvs::dvi) << "TPIC special setPen: " << cp << endl;
kDebug(kvs::dvi) << "TPIC special setPen: " << cp << endl;
#endif
// Sets the pen size in milli-inches

View file

@ -71,7 +71,7 @@
void oops(const QString& message)
{
kdError(kvs::dvi) << i18n("Fatal Error! ") << message << endl;
kError(kvs::dvi) << i18n("Fatal Error! ") << message << endl;
KMessageBox::error( NULL,
i18n("Fatal error.\n\n") +

12
vf.cpp
View file

@ -68,7 +68,7 @@ extern void oops(const QString& message);
void TeXFontDefinition::read_VF_index()
{
#ifdef DEBUG_FONTS
kdDebug(kvs::dvi) << "font::read_VF_index()" << endl;
kDebug(kvs::dvi) << "font::read_VF_index()" << endl;
#endif
FILE *VF_file = file;
unsigned char cmnd;
@ -78,14 +78,14 @@ void TeXFontDefinition::read_VF_index()
flags |= FONT_VIRTUAL;
set_char_p = &dviRenderer::set_vf_char;
#ifdef DEBUG_FONTS
kdDebug(kvs::dvi) << "TeXFontDefinition::read_VF_index: reading VF pixel file " << filename << endl;
kDebug(kvs::dvi) << "TeXFontDefinition::read_VF_index: reading VF pixel file " << filename << endl;
#endif
// Read preamble.
fseek(VF_file, (long) one(VF_file), 1); /* skip comment */
quint32 const file_checksum = four(VF_file);
if (file_checksum && checksum && file_checksum != checksum)
kdError(kvs::dvi) << i18n("Checksum mismatch") << "(dvi = " << checksum << "u, vf = " << file_checksum <<
kError(kvs::dvi) << i18n("Checksum mismatch") << "(dvi = " << checksum << "u, vf = " << file_checksum <<
"u)" << i18n(" in font file ") << filename << endl;
(void) four(VF_file); /* skip design size */
@ -103,7 +103,7 @@ void TeXFontDefinition::read_VF_index()
fontname[len] = '\0';
#ifdef DEBUG_FONTS
kdDebug(kvs::dvi) << "Virtual font defines subfont \"" << fontname << "\" scale=" << scale << " design=" << design << endl;
kDebug(kvs::dvi) << "Virtual font defines subfont \"" << fontname << "\" scale=" << scale << " design=" << design << endl;
#endif
// According to Knuth's documentation found in the web source code
@ -131,7 +131,7 @@ void TeXFontDefinition::read_VF_index()
// Prepare macro array.
macrotable = new macro[max_num_of_chars_in_font];
if (macrotable == 0) {
kdError(kvs::dvi) << i18n("Could not allocate memory for a macro table.") << endl;
kError(kvs::dvi) << i18n("Could not allocate memory for a macro table.") << endl;
exit(0);
}
@ -148,7 +148,7 @@ void TeXFontDefinition::read_VF_index()
cc = four(VF_file);
width = four(VF_file);
if (cc >= 256) {
kdError(kvs::dvi) << i18n("Virtual character ") << cc << i18n(" in font ")
kError(kvs::dvi) << i18n("Virtual character ") << cc << i18n(" in font ")
<< fontname << i18n(" ignored.") << endl;
fseek(VF_file, (long) len, 1);
continue;