Toward the end of this function, what is the purpose of "v = -v;" ?
It's what is causing my precision to show as negative on some fields in
my XML (I haven't yet found a pattern or reason).  Before I just comment
it out, I wanted to see if it had a purpose.  It may well be indicitive
of a hidden bug somewhere, of a misunderstanding due to OS400 version
differences.

(I'm on V4R2)

/* Convert a signed decimal field to a C `int' */
static int
signed2int (buf, len)
        Byte *buf;
        int len;
{
  int v = 0;
  while (len)
    {
      v *= 10;
      v += buf[0] & 0x0f;
      len--;
      buf++;
    }
  if ((buf[0] & 0xf0) == 0xd0)
    v = -v;
  return v;
}


+---
| This is the LINUX5250 Mailing List!
| To submit a new message, send your mail to [EMAIL PROTECTED]
| To subscribe to this list send email to [EMAIL PROTECTED]
| To unsubscribe from this list send email to [EMAIL PROTECTED]
| Questions should be directed to the list owner/operator: [EMAIL PROTECTED]
+---

Reply via email to