CharsetRegistry.cxx revision 7c478bd95313f5f23a4c958a745db2134aa03244
// Copyright (c) 1994, 1997 James Clark
// See the file COPYING for copying permission.
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __GNUG__
#pragma implementation
#endif
#include "splib.h"
#include "CharsetRegistry.h"
#include "ExternalId.h"
#include "CharsetInfo.h"
#include "StringC.h"
#include "types.h"
#include "macros.h"
#ifdef SP_NAMESPACE
namespace SP_NAMESPACE {
#endif
{
}
public:
if (n_) {
p_++;
n_--;
return 1;
}
else
return 0;
}
private:
};
public:
CharsetRegistryDescIter(const unsigned short *p)
if (n_ == 0) {
if (n_ == 0)
return 0;
p_++;
}
int i = 1;
for (; i < n_; i++)
break;
p_ += i;
c_ += i;
n_ -= i;
return 1;
}
private:
const unsigned short *p_;
};
static struct {
const char *esc;
} escTable[] = {
};
{ 0, 128, 0 },
};
{ 0, 32, 0 },
{ 127, 1, 127 },
};
{ 0, 32, 128 },
};
{ 32, 96, 160 },
};
{ 0, 65536, 0 },
};
{ 0, 0x80000000, 0 },
};
static struct {
} rangeTable[] = {
};
static const unsigned short iso8859_2[] = {
#include "iso8859-2.h"
};
static const unsigned short iso8859_3[] = {
#include "iso8859-3.h"
};
static const unsigned short iso8859_4[] = {
#include "iso8859-4.h"
};
static const unsigned short iso8859_5[] = {
#include "iso8859-5.h"
};
static const unsigned short iso8859_6[] = {
#include "iso8859-6.h"
};
static const unsigned short iso8859_7[] = {
#include "iso8859-7.h"
};
static const unsigned short iso8859_8[] = {
#include "iso8859-8.h"
};
static const unsigned short iso8859_9[] = {
#include "iso8859-9.h"
};
static const unsigned short iso646_jis_G0[] = {
#include "iso646-jis.h"
};
static const unsigned short jis0201[] = {
#include "jis0201.h"
};
#ifdef SP_MULTI_BYTE
static const unsigned short jis0208[] = {
#include "jis0208.h"
};
static const unsigned short jis0212[] = {
#include "jis0212.h"
};
static const unsigned short gb2312[] = {
#include "gb2312.h"
};
static const unsigned short ksc5601[] = {
#include "ksc5601.h"
};
static const unsigned short big5[] = {
#include "big5.h"
};
#endif /* SP_MULTI_BYTE */
static const struct {
const unsigned short *desc;
} descTable[] = {
#ifdef SP_MULTI_BYTE
#endif
};
const CharsetInfo &charset)
{
// Canonicalize the escape sequence by mapping esc -> ESC,
// removing leading zeros from escape sequences, and removing
// initial spaces.
StringC s;
else if (charset.digitWeight(c) >= 0
&& s.size() > 0
&& (s.size() == 1
s[s.size() - 1] = c;
s += c;
}
if (*p == 0x1B)
else {
static const char digits[] = "0123456789";
int c = (unsigned char)*p >> 4;
if (c >= 10)
c = (*p & 0xf);
if (c >= 10)
}
if (p[1])
}
if (s == esc)
}
return UNREGISTERED;
}
{
}
}
return 0;
}
#ifdef SP_NAMESPACE
}
#endif