dtinfo subtree DtMmdb

This commit is contained in:
Ulrich Wilkens
2012-10-14 15:38:27 +02:00
committed by Jon Trulson
parent b92cf08899
commit 8c8363f4a5
184 changed files with 1090 additions and 773 deletions

View File

@@ -37,11 +37,7 @@ public:
DECLARE_EXCEPTION(hardCopyRendererException, Exception);
};
#if defined(linux)
#define CASTHCREXCEPT (hardCopyRendererException*)
#else
#define CASTHCREXCEPT
#endif
#endif /* _FPExceptions_h */
/* DO NOT ADD ANY LINES AFTER THIS #endif */

View File

@@ -186,7 +186,7 @@ featureProcessor::getFeatureValueArray(const Feature* f)
if ( f -> value() -> type() == FeatureValue::array )
return (FeatureValueArray*)(f -> value());
else {
MESSAGE(cerr, form("%s is not of an array type.", f -> name()));
MESSAGE(cerr, form("%s is not of an array type.", f -> name().name()));
throw(CASTHCREXCEPT hardCopyRendererException());
}
} else

View File

@@ -25,13 +25,15 @@
#ifndef _fp_h
#define _fp_h 1
#include <iostream.h>
#include <iostream>
using namespace std;
#include "FPExceptions.h"
#include "StyleSheet/Feature.h"
#include "StyleSheet/FeatureValue.h"
#include "StyleSheet/Element.h"
#include "StyleSheet/Const.h"
#include "StyleSheet/Debug.h"
#include "utility/funcs.h"
enum BLOCK_MODE { NON_BLOCK, BLOCK };
extern enum BLOCK_MODE g_block_mode;

View File

@@ -23,7 +23,11 @@
// $TOG: autoNumber.C /main/6 1998/04/17 11:47:13 mgreess $
#include <ctype.h>
#if defined(CSRG_BASED)
#define MAXINT INT_MAX
#else
#include <values.h>
#endif
#include "HardCopy/autoNumber.h"
#include "HardCopy/FPExceptions.h"
@@ -137,7 +141,7 @@ autoNumberNumeric::getValue()
char* ptr = f_buf.get_base();
if (f_values.entries())
sprintf(ptr, form("%s%d%s", f_prefix, f_values.top(), f_postfix));
sprintf(ptr, "%s", form("%s%d%s", f_prefix, f_values.top(), f_postfix));
else
*ptr = 0;
@@ -291,10 +295,12 @@ const char* autoNumberAlphabetic::intToAlpha(int x, enum CaseType a_case)
x = z;
}
for (int k=0; k<digits-i; k++ )
int k;
for (k=0; k<digits-i; k++ )
buf[k] = letters[0];
for (int n=0; n<i; n++ )
int n;
for (n=0; n<i; n++ )
buf[k+n] = buf1[n];
buf[k+n] = 0;
@@ -317,7 +323,7 @@ const char* autoNumberAlphabetic::getValue()
char* ptr = f_buf.get_base();
if (f_values.entries())
sprintf(ptr, form("%s%s%s", f_prefix,
sprintf(ptr, "%s", form("%s%s%s", f_prefix,
intToAlpha(f_values.top(), f_case), f_postfix));
else
*ptr = 0;
@@ -481,13 +487,14 @@ autoNumberRoman::ArabicToRoman(int x)
const char* romanCardinal = romanCardinals[j][buf[i]-'1'];
char precise_romanCardinal[8];
int k;
if (f_case == UPPER) {
for (int k=0; romanCardinal[k]; k++)
for (k=0; romanCardinal[k]; k++)
precise_romanCardinal[k] = romanCardinal[k];
precise_romanCardinal[k] = 0;
}
else {
for (int k=0; romanCardinal[k]; k++)
for (k=0; romanCardinal[k]; k++)
precise_romanCardinal[k] = tolower(romanCardinal[k]);
precise_romanCardinal[k] = 0;
}

View File

@@ -284,7 +284,8 @@ autoNumberFP::defineAutoNumber(const char* nm, const FeatureValue* f)
const char* gi = 0;
autoNumberListT* anList = 0;
for (int i=0; i<controlList -> length(); i++ ) {
int i;
for (i=0; i<controlList -> length(); i++ ) {
gi = stringToCharPtr((*controlList)[i]);
key = new CC_String(gi);
@@ -353,11 +354,11 @@ autoNumberFP::accept(const char* name, const Expression* expr)
{
FeatureValue* fv = 0;
try
mtry
{
fv = expr -> evaluate();
}
catch_any()
mcatch_any()
{
return false;
}