| 2965 | // |
| 2966 | |
| 2967 | static void gen_raw(const UCHAR* blr, req_t request_type, int request_length, int ident) |
| 2968 | { |
| 2969 | int length = 1; |
| 2970 | ULONG ltemp = 0; |
| 2971 | int offset = 24; |
| 2972 | UCHAR c; |
| 2973 | TEXT s[256]; |
| 2974 | |
| 2975 | // Dump BLR to WORKING-STORAGE in 4 byte chunks. |
| 2976 | while (request_length--) |
| 2977 | { |
| 2978 | ltemp += (*(blr++) << offset); |
| 2979 | offset -= 8; |
| 2980 | if (offset < 0) |
| 2981 | { |
| 2982 | strcpy(s, COLUMN12); |
| 2983 | strcat(s, RAW_BLR_TEMPLATE); |
| 2984 | strcat(s, "\n"); |
| 2985 | sprintf(output_buffer, s, names[isc_a_pos], ident, names[UNDER], length++, ltemp); |
| 2986 | RMC_print_buffer(output_buffer, false); |
| 2987 | ltemp = 0; |
| 2988 | offset = 24; |
| 2989 | } |
| 2990 | } |
| 2991 | // Add the terminating character and dump last 4 bytes to WORKING-STORAGE |
| 2992 | switch (request_type) |
| 2993 | { |
| 2994 | case REQ_slice: |
| 2995 | c = isc_sdl_eoc; |
| 2996 | break; |
| 2997 | case REQ_ddl: |
| 2998 | case REQ_create_database: |
| 2999 | c = *blr++; |
| 3000 | break; |
| 3001 | default: |
| 3002 | c = blr_eoc; |
| 3003 | } |
| 3004 | |
| 3005 | ltemp += (c << offset); |
| 3006 | strcpy(s, COLUMN12); |
| 3007 | strcat(s, RAW_BLR_TEMPLATE); |
| 3008 | strcat(s, "\n"); |
| 3009 | sprintf(output_buffer, s, names[isc_a_pos], ident, names[UNDER], length++, ltemp); |
| 3010 | RMC_print_buffer(output_buffer, false); |
| 3011 | } |
| 3012 | |
| 3013 | |
| 3014 | //____________________________________________________________ |
no test coverage detected