// Decompiled by Jad v1.5.7f. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3)
// Source File Name: LnxLibThin.java
package oracle.sql;
import java.sql.SQLException;
import java.text.DecimalFormatSymbols;
import java.util.Locale;
import oracle.core.lmx.CoreException;
import oracle.gss.util.NLSLocale;
// Referenced classes of package oracle.sql:
// Datum, LnxLib, LnxLibThinFormat, NUMBER
class LnxLibThin
implements LnxLib
{
private class lnxqc
{
static final int LNXQC0 = 0;
static final int LNXQC1 = 1;
static final int LNXQC2 = 2;
static final int LNXQC3 = 3;
static final int LNXQC4 = 4;
static final int LNXQC5 = 5;
static final int LNXQC6 = 6;
static final int LNXQC7 = 7;
static final int LNXQC8 = 8;
static final int LNXQC9 = 9;
static final int LNXQCPLUS = 10;
static final int LNXQCMINUS = 11;
static final int LNXQCSPACE = 12;
static final int LNXQCDOT = 13;
static final int LNXQCCOMMA = 14;
static final int LNXQCDOLLR = 15;
static final int LNXQCLT = 16;
static final int LNXQCGRT = 17;
static final int LNXQCLPT = 18;
static final int LNXQCRPT = 19;
static final int LNXQCHASH = 20;
static final int LNXQCTILDE = 21;
static final int LNXQCASML = 22;
static final int LNXQCBSML = 23;
static final int LNXQCCSML = 24;
static final int LNXQCDSML = 25;
static final int LNXQCESML = 26;
static final int LNXQCFSML = 27;
static final int LNXQCGSML = 28;
static final int LNXQCISML = 29;
static final int LNXQCLSML = 30;
static final int LNXQCMSML = 31;
static final int LNXQCPSML = 32;
static final int LNXQCRSML = 33;
static final int LNXQCSSML = 34;
static final int LNXQCTSML = 35;
static final int LNXQCVSML = 36;
static final int LNXQCALRG = 37;
static final int LNXQCBLRG = 38;
static final int LNXQCCLRG = 39;
static final int LNXQCDLRG = 40;
static final int LNXQCELRG = 41;
static final int LNXQCFLRG = 42;
static final int LNXQCILRG = 43;
static final int LNXQCLLRG = 44;
static final int LNXQCMLRG = 45;
static final int LNXQCPLRG = 46;
static final int LNXQCRLRG = 47;
static final int LNXQCSLRG = 48;
static final int LNXQCTLRG = 49;
lnxqc()
{
}
}
LnxLibThin()
{
}
private long LNXQH2N_DIGIT(char c, int i, long l)
{
byte byte0 = 65;
byte byte1 = 97;
byte byte2 = 70;
byte byte3 = 102;
byte byte4 = 48;
if(c >= 'a' && c <= 'f')
{
long l1 = l + (long)((c - 97) + 10 << i);
return l1;
}
if(c >= 'A' && c <= 'F')
{
long l2 = l + (long)((c - 65) + 10 << i);
return l2;
} else
{
long l3 = l + (long)(c - 48 << i);
return l3;
}
}
private static int LnxmulSetDigit1(byte abyte0[], int i, int j)
{
int k = j / 100;
int l = j / 10000;
i -= 2;
abyte0[i + 1] = (byte)((j - k * 100) + 1);
abyte0[i] = (byte)((k - l * 100) + 1);
return l;
}
private static void LnxmulSetDigit2(byte abyte0[], int i, int j)
{
int k = j / 100;
i -= 2;
abyte0[i] = (byte)(k + 1);
abyte0[i + 1] = (byte)((j - k * 100) + 1);
}
private static int LnxmulSetSum(int ai[], int ai1[], int i, int j, int k, int l)
{
return l + ai[i - k] * ai1[j + k];
}
private static void _negateNumber(byte abyte0[])
{
for(int i = abyte0.length - 1; i > 0; i--)
abyte0[i] = LnxqNegate[abyte0[i]];
abyte0[0] = (byte)(~abyte0[0]);
}
private static byte[] _setLength(byte abyte0[], int i)
{
boolean flag = NUMBER._isPositive(abyte0);
byte abyte1[];
if(flag)
abyte1 = new byte[i];
else
if(i <= 20 && abyte0[i - 1] != 102)
{
abyte1 = new byte[i + 1];
abyte1[i] = 102;
} else
{
abyte1 = new byte[i];
}
System.arraycopy(abyte0, 0, abyte1, 0, i);
return abyte1;
}
private static byte digitPtr(int i, int j, boolean flag)
{
return flag ? LnxqDigit_N[i][j] : LnxqDigit_P[i][j];
}
public byte[] lnxabs(byte abyte0[])
throws SQLException
{
byte abyte1[] = new byte[abyte0.length];
if(NUMBER._isPositive(abyte0))
{
System.arraycopy(abyte0, 0, abyte1, 0, abyte0.length);
return abyte1;
}
if(NUMBER._isNegInf(abyte0))
return NUMBER.posInf().shareBytes();
int i = abyte0.length;
if(abyte0[i - 1] == 102)
i--;
System.arraycopy(abyte0, 0, abyte1, 0, i);
_negateNumber(abyte1);
return _setLength(abyte1, i);
}
public byte[] lnxacos(byte abyte0[])
throws SQLException
{
return lnxqtri(abyte0, 0);
}
public byte[] lnxadd(byte abyte0[], byte abyte1[])
throws SQLException
{
int i = abyte0.length;
int j = 0;
int k = abyte1.length;
int l = 0;
byte abyte2[] = new byte[41];
int i1 = 0;
int i2 = 0;
int j2 = 0;
int l4 = 0;
int i5 = 0;
int j5 = 0;
int l2 = i1 + 1;
boolean flag1 = NUMBER._isPositive(abyte0);
int l5 = abyte0[0] >= 0 ? 255 - abyte0[0] : 256 + abyte0[0];
if(!flag1 && abyte0[i - 1] == 102)
i--;
int k5 = i - 1;
boolean flag2 = NUMBER._isPositive(abyte1);
int j6 = abyte1[0] >= 0 ? 255 - abyte1[0] : 256 + abyte1[0];
if(!flag2 && abyte1[k - 1] == 102)
k--;
int i6 = k - 1;
if(l5 == 255 && (k5 == 0 || abyte0[1] == 101))
{
boolean flag3 = flag1;
if(flag3)
return NUMBER._makePosInf();
else
return NUMBER._makeNegInf();
}
if(j6 == 255 && (i6 == 0 || abyte1[1] == 101))
{
boolean flag4 = flag2;
if(flag4)
return NUMBER._makePosInf();
else
return NUMBER._makeNegInf();
}
if(l5 == 128 && k5 == 0)
{
abyte2 = new byte[k];
System.arraycopy(abyte1, 0, abyte2, 0, k);
boolean flag5 = flag2;
int j7 = k;
return _setLength(abyte2, j7);
}
if(j6 == 128 && i6 == 0)
{
abyte2 = new byte[i];
System.arraycopy(abyte0, 0, abyte2, 0, i);
boolean flag6 = flag1;
int k7 = i;
return _setLength(abyte2, k7);
}
int k4 = l5 - j6;
byte abyte3[][];
boolean flag7;
int i7;
byte byte2;
if(flag1 == flag2)
{
flag7 = flag1;
if(flag7)
{
abyte3 = LnxqAdd_PPP;
i7 = 1;
byte2 = 1;
} else
{
abyte3 = LnxqAdd_NNN;
i7 = 101;
byte2 = -1;
}
} else
{
int k9 = k4;
if(k9 == 0)
{
int i8 = j + 1;
int l8 = l + 1;
int j9;
for(j9 = j + (k5 >= i6 ?