Store a Cobol array of BINARY(4) fields into a status vector
| 415 | |
| 416 | // Store a Cobol array of BINARY(4) fields into a status vector |
| 417 | static void CobolToStatus(ISC_STATUS *stat, const argument_entry *arg) |
| 418 | { |
| 419 | const ISC_UCHAR *src = arg->a_address; |
| 420 | if (src) |
| 421 | for (int i = 0; i < ISC_STATUS_LENGTH; i++) |
| 422 | { |
| 423 | *(stat++) = (ISC_STATUS)((*src << 24) + |
| 424 | (*(src + 1) << 16) + |
| 425 | (*(src + 2) << 8) + |
| 426 | *(src + 3)); |
| 427 | src += 4; |
| 428 | } |
| 429 | } |
| 430 | |
| 431 | // Store a C integer into a Cobol format memory buffer |
| 432 | static void CvtIntToCobol(ISC_UCHAR *s, ISC_UINT64 l, ISC_USHORT len) |