mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 01:23:03 +01:00
Remove JPN_ defines
This commit is contained in:
parent
7b73a032d2
commit
f55579f424
@ -184,24 +184,6 @@ int CLIB_ROUTINE main( int argc, char *argv[])
|
||||
sw_ods7 = FALSE;
|
||||
#endif
|
||||
|
||||
#if (defined JPN_EUC || defined JPN_SJIS)
|
||||
DDL_interp = HOST_INTERP;
|
||||
|
||||
/* Initialize the array which is used to map untagged versions of
|
||||
ddl verbs into tagged versions. */
|
||||
|
||||
DDL_tagged_verbs[gds__dyn_description] = gds__dyn_description2;
|
||||
DDL_tagged_verbs[gds__dyn_fld_computed_source] =
|
||||
gds__dyn_fld_computed_source2;
|
||||
DDL_tagged_verbs[gds__dyn_fld_edit_string] = gds__dyn_fld_edit_string2;
|
||||
DDL_tagged_verbs[gds__dyn_fld_query_header] = gds__dyn_fld_query_header2;
|
||||
DDL_tagged_verbs[gds__dyn_fld_validation_source] =
|
||||
gds__dyn_fld_validation_source2;
|
||||
DDL_tagged_verbs[gds__dyn_trg_msg] = gds__dyn_trg_msg2;
|
||||
DDL_tagged_verbs[gds__dyn_trg_source] = gds__dyn_trg_source2;
|
||||
DDL_tagged_verbs[gds__dyn_view_source] = gds__dyn_view_source2;
|
||||
#endif
|
||||
|
||||
file_name_1[0] = file_name_2[0] = 0;
|
||||
|
||||
for (--argc; argc; argc--) {
|
||||
|
@ -639,11 +639,6 @@ EXTERN TEXT *DDL_default_user, *DDL_default_password;
|
||||
EXTERN ACT DDL_actions;
|
||||
EXTERN DBB database;
|
||||
|
||||
#if (defined JPN_EUC || defined JPN_SJIS)
|
||||
EXTERN USHORT DDL_interp;
|
||||
EXTERN TEXT DDL_tagged_verbs[256];
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
|
||||
#include "../dudley/ddl_proto.h"
|
||||
|
@ -4143,19 +4143,7 @@ static void store_query_header( DUDLEY_NOD node, SLONG * blob_id)
|
||||
USHORT bpb_length;
|
||||
UCHAR bpb[20];
|
||||
|
||||
#if (defined JPN_EUC || defined JPN_SJIS)
|
||||
/* always create bpb since query header is a text blob */
|
||||
|
||||
UCHAR* p = bpb;
|
||||
*p++ = gds__bpb_version1;
|
||||
*p++ = gds__bpb_source_interp;
|
||||
*p++ = 2;
|
||||
*p++ = DDL_interp;
|
||||
*p++ = DDL_interp >> 8;
|
||||
bpb_length = p - bpb;
|
||||
#else
|
||||
bpb_length = 0;
|
||||
#endif /* (defined JPN_EUC || defined JPN_SJIS) */
|
||||
|
||||
blob = create_blob(blob_id, bpb_length, bpb);
|
||||
|
||||
@ -4227,19 +4215,7 @@ static void store_text( TXT text, SLONG * blob_id)
|
||||
USHORT bpb_length;
|
||||
UCHAR bpb[20];
|
||||
|
||||
#if (defined JPN_EUC || defined JPN_SJIS)
|
||||
/* create bpb for text blob */
|
||||
|
||||
UCHAR* p = bpb;
|
||||
*p++ = gds__bpb_version1;
|
||||
*p++ = gds__bpb_source_interp;
|
||||
*p++ = 2;
|
||||
*p++ = DDL_interp;
|
||||
*p++ = DDL_interp >> 8;
|
||||
bpb_length = p - bpb;
|
||||
#else
|
||||
bpb_length = 0;
|
||||
#endif /* (defined JPN_EUC || defined JPN_SJIS) */
|
||||
|
||||
blob = create_blob(blob_id, bpb_length, bpb);
|
||||
LEX_put_text(blob, text);
|
||||
|
@ -293,59 +293,6 @@ static void decompile_blr_literal(SCHAR * string)
|
||||
*b = 0;
|
||||
break;
|
||||
|
||||
#if (defined JPN_SJIS || defined JPN_EUC)
|
||||
case (blr_text2):
|
||||
{
|
||||
USHORT len;
|
||||
|
||||
/* Convert strings to local encoding */
|
||||
|
||||
scale = gds__vax_integer((UCHAR*) p, 2);
|
||||
p += 2;
|
||||
size = gds__vax_integer((UCHAR*) p, 2);
|
||||
p += 2;
|
||||
*b++ = '"';
|
||||
|
||||
if (DDL_interp == scale) {
|
||||
while (size--)
|
||||
*b++ = *p++;
|
||||
}
|
||||
|
||||
else if (DDL_interp == gds__interp_jpn_euc &&
|
||||
scale == gds__interp_jpn_sjis) {
|
||||
if (KANJI_sjis2euc(p, size, b, 253, &len)) {
|
||||
put_comment(250);
|
||||
/* msg 250: **** unable to decompile missing value *** */
|
||||
return;
|
||||
}
|
||||
b += len;
|
||||
p += size;
|
||||
}
|
||||
|
||||
else if (DDL_interp == gds__interp_jpn_sjis &&
|
||||
scale == gds__interp_jpn_euc) {
|
||||
if (KANJI_euc2sjis(p, size, b, 253, &len)) {
|
||||
put_comment(250);
|
||||
/* msg 250: **** unable to decompile missing value *** */
|
||||
return;
|
||||
}
|
||||
b += len;
|
||||
p += size;
|
||||
}
|
||||
|
||||
else {
|
||||
put_comment(250);
|
||||
/* msg 250: **** unable to decompile missing value *** */
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
*b++ = '"';
|
||||
*b = 0;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
case (blr_long):
|
||||
scale = *p++;
|
||||
value = gds__vax_integer((UCHAR*) p, 4);
|
||||
@ -1859,18 +1806,6 @@ static void print_blob(SLONG * blob_id, TEXT type)
|
||||
blob = NULL;
|
||||
bpb = r = bpb_buffer;
|
||||
|
||||
#if (defined JPN_EUC || defined JPN_SJIS)
|
||||
if ((type == 'u') || (type == 'h')) {
|
||||
/* create bpb for description blob and query header blob */
|
||||
|
||||
*r++ = gds__bpb_version1;
|
||||
*r++ = gds__bpb_target_interp;
|
||||
*r++ = 2;
|
||||
*r++ = DDL_interp;
|
||||
*r++ = DDL_interp >> 8;
|
||||
}
|
||||
#endif /* (defined JPN_EUC || defined JPN_SJIS) */
|
||||
|
||||
if (gds__open_blob2(status_vector,
|
||||
GDS_REF(DB),
|
||||
GDS_REF(gds_trans),
|
||||
@ -2117,11 +2052,7 @@ static void type_scalar(USHORT dtype,
|
||||
}
|
||||
|
||||
if (scale)
|
||||
#if (defined JPN_SJIS || defined JPN_EUC)
|
||||
|
||||
if (dtype != blr_text && dtype != blr_cstring && dtype != blr_varying)
|
||||
#endif
|
||||
ib_fprintf(output_file, " scale %d", scale);
|
||||
ib_fprintf(output_file, " scale %d", scale);
|
||||
|
||||
if (subtype
|
||||
&& (dtype == blr_text || dtype == blr_varying
|
||||
|
@ -56,12 +56,6 @@ int GENERATE_acl( SCL class_, UCHAR * buffer)
|
||||
SCE item;
|
||||
USHORT i;
|
||||
|
||||
#if (defined JPN_SJIS || defined JPN_EUC)
|
||||
|
||||
/* This does not need Japanization because Kanji User names are not supported */
|
||||
|
||||
#endif
|
||||
|
||||
p = buffer;
|
||||
*p++ = ACL_version;
|
||||
|
||||
@ -241,16 +235,8 @@ static void generate( STR blr, DUDLEY_NOD node)
|
||||
l = constant->con_desc.dsc_length;
|
||||
switch (constant->con_desc.dsc_dtype) {
|
||||
case dtype_text:
|
||||
#if (!(defined JPN_SJIS || defined JPN_EUC))
|
||||
|
||||
STUFF(blr_text);
|
||||
|
||||
#else
|
||||
|
||||
STUFF(blr_text2);
|
||||
STUFF_WORD(DDL_interp)
|
||||
#endif
|
||||
STUFF_WORD(l);
|
||||
STUFF_WORD(l);
|
||||
break;
|
||||
|
||||
case dtype_short:
|
||||
|
@ -25,9 +25,6 @@
|
||||
#include "../dudley/ddl.h"
|
||||
#include "../dudley/parse.h"
|
||||
|
||||
#if (defined JPN_SJIS || defined JPN_EUC)
|
||||
#include "../intl/kanji.h"
|
||||
#endif
|
||||
#include "../dudley/ddl_proto.h"
|
||||
#include "../dudley/hsh_proto.h"
|
||||
|
||||
@ -472,22 +469,8 @@ static BOOLEAN scompare(
|
||||
return FALSE;
|
||||
|
||||
while (length1--)
|
||||
#ifdef JPN_SJIS
|
||||
{
|
||||
#endif
|
||||
if ((c1 = *string1++) != (c2 = *string2++) && UPPER(c1) != UPPER(c2))
|
||||
return FALSE;
|
||||
#ifdef JPN_SJIS
|
||||
|
||||
/* Do not upcase second byte of a sjis kanji character */
|
||||
|
||||
if (KANJI1(c1) && length1 > 1) {
|
||||
if ((c1 = *string1++) != (c2 = *string2++))
|
||||
return FALSE;
|
||||
length1--;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -237,7 +237,9 @@ void LEX_init( void *file)
|
||||
* scratch trace file to keep all input.
|
||||
*
|
||||
**************************************/
|
||||
#ifdef __BORLANDC__
|
||||
TEXT *p;
|
||||
#endif
|
||||
|
||||
#if !(defined WIN_NT)
|
||||
trace_file = (IB_FILE *) gds__temp_file(TRUE, SCRATCH, 0);
|
||||
@ -355,11 +357,7 @@ TOK LEX_token(void)
|
||||
|
||||
/* On end of file, generate furious but phony end of line tokens */
|
||||
|
||||
#if (defined JPN_SJIS || defined JPN_EUC)
|
||||
class_ = (JPN1_CHAR(c) ? CHR_LETTER : classes[c]);
|
||||
#else
|
||||
class_ = classes[c];
|
||||
#endif
|
||||
|
||||
if (DDL_eof) {
|
||||
p = token->tok_string;
|
||||
@ -376,39 +374,8 @@ TOK LEX_token(void)
|
||||
return NULL;
|
||||
}
|
||||
else if (class_ & CHR_letter) {
|
||||
#if (! ( defined JPN_EUC || defined JPN_SJIS) )
|
||||
while (classes[c = nextchar()] & CHR_ident)
|
||||
*p++ = c;
|
||||
#else
|
||||
|
||||
p--;
|
||||
while (1) {
|
||||
if (KANJI1(c)) {
|
||||
/* If it is a double byte kanji either EUC or SJIS
|
||||
then handle both the bytes together */
|
||||
|
||||
*p++ = c;
|
||||
c = nextchar(TRUE);
|
||||
if (!KANJI2(c)) {
|
||||
c = *(--p);
|
||||
break;
|
||||
}
|
||||
else
|
||||
*p++ = c;
|
||||
}
|
||||
else {
|
||||
#ifdef JPN_SJIS
|
||||
if ((SJIS_SINGLE(c)) || (classes[c] & CHR_ident))
|
||||
#else
|
||||
if (classes[c] & CHR_ident)
|
||||
#endif
|
||||
*p++ = c;
|
||||
else
|
||||
break;
|
||||
}
|
||||
c = nextchar(TRUE);
|
||||
}
|
||||
#endif /* JPN_SJIS || JPN_EUC */
|
||||
|
||||
retchar(c);
|
||||
token->tok_type = tok_ident;
|
||||
@ -572,9 +539,6 @@ static int skip_white(void)
|
||||
SSHORT c, next, class_;
|
||||
|
||||
while ((c = nextchar()) != EOF) {
|
||||
#if (defined JPN_SJIS || defined JPN_EUC)
|
||||
c = c & 0xff;
|
||||
#endif
|
||||
|
||||
class_ = classes[c];
|
||||
if (class_ & CHR_white)
|
||||
|
@ -477,15 +477,6 @@ SYM PARSE_symbol(enum tok_t type)
|
||||
do {
|
||||
c = *q++;
|
||||
*p++ = UPPER(c);
|
||||
#ifdef JPN_SJIS
|
||||
/* Do not uppercase the second byte of a SJIS character */
|
||||
|
||||
if (KANJI1(c) && l > 1) {
|
||||
*p++ = *q++;
|
||||
l--;
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
while (--l);
|
||||
else
|
||||
|
@ -1632,22 +1632,9 @@ static void put_query_header( STR dyn, TEXT attribute, DUDLEY_NOD node)
|
||||
if (!node)
|
||||
return;
|
||||
|
||||
#if (!(defined JPN_SJIS || defined JPN_EUC))
|
||||
|
||||
CHECK_DYN(3);
|
||||
STUFF(attribute);
|
||||
|
||||
#else
|
||||
|
||||
/* Put tagged version of the dynamic verb */
|
||||
|
||||
CHECK_DYN(5);
|
||||
STUFF((DDL_tagged_verbs[attribute]));
|
||||
STUFF_WORD(DDL_interp);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
offset = dyn->str_current - dyn->str_start;
|
||||
dyn->str_current = dyn->str_current + 2;
|
||||
for (ptr = node->nod_arg, end = ptr + node->nod_count; ptr < end; ptr++) {
|
||||
@ -1684,22 +1671,7 @@ static void put_symbol( STR dyn, TEXT attribute, SYM symbol)
|
||||
l = symbol->sym_length;
|
||||
|
||||
CHECK_DYN(l + 5);
|
||||
#if (! (defined JPN_SJIS || defined JPN_EUC) )
|
||||
|
||||
STUFF(attribute);
|
||||
|
||||
#else
|
||||
|
||||
/* If a taggged version of the dynamic verb exists then put the tagged verb */
|
||||
|
||||
if (DDL_tagged_verbs[attribute]) {
|
||||
STUFF((DDL_tagged_verbs[attribute]));
|
||||
STUFF_WORD(DDL_interp);
|
||||
}
|
||||
else
|
||||
STUFF(attribute);
|
||||
|
||||
#endif
|
||||
STUFF_WORD(l);
|
||||
|
||||
for (string = symbol->sym_string; *string;)
|
||||
@ -1729,23 +1701,8 @@ static void put_text( STR dyn, UCHAR attribute, TXT text)
|
||||
return;
|
||||
|
||||
CHECK_DYN(length + 5);
|
||||
#if (! (defined JPN_SJIS || defined JPN_EUC) )
|
||||
|
||||
STUFF(attribute);
|
||||
|
||||
#else
|
||||
|
||||
/* If a taggged version of the dynamic verb exists then put the tagged verb */
|
||||
|
||||
if (DDL_tagged_verbs[attribute]) {
|
||||
STUFF(DDL_tagged_verbs[attribute]);
|
||||
STUFF_WORD(DDL_interp);
|
||||
}
|
||||
else
|
||||
STUFF(attribute);
|
||||
|
||||
#endif
|
||||
|
||||
STUFF_WORD(length);
|
||||
LEX_get_text(dyn->str_current, text);
|
||||
dyn->str_current += length;
|
||||
|
Loading…
Reference in New Issue
Block a user