| 2870 | // |
| 2871 | |
| 2872 | static void gen_raw(const UCHAR* blr, req_t request_type, int request_length, int ident) |
| 2873 | { |
| 2874 | union { |
| 2875 | UCHAR bytewise_blr[4]; |
| 2876 | ULONG longword_blr; |
| 2877 | } blr_hunk; |
| 2878 | |
| 2879 | int length = 1; |
| 2880 | int blr_length = request_length; |
| 2881 | |
| 2882 | TEXT s[256]; |
| 2883 | while (blr_length) |
| 2884 | { |
| 2885 | s[0] = 0; |
| 2886 | blr_hunk.longword_blr = 0; |
| 2887 | for (UCHAR* c = blr_hunk.bytewise_blr; c < blr_hunk.bytewise_blr + sizeof(SLONG); c++) |
| 2888 | { |
| 2889 | if (--blr_length) |
| 2890 | *c = *blr++; |
| 2891 | else |
| 2892 | { |
| 2893 | switch (request_type) |
| 2894 | { |
| 2895 | case REQ_slice: |
| 2896 | *c = isc_sdl_eoc; |
| 2897 | break; |
| 2898 | case REQ_ddl: |
| 2899 | case REQ_create_database: |
| 2900 | *c = *blr++; |
| 2901 | break; |
| 2902 | default: |
| 2903 | *c = blr_eoc; |
| 2904 | } |
| 2905 | |
| 2906 | break; |
| 2907 | } |
| 2908 | } |
| 2909 | |
| 2910 | strcat(s, names[COLUMN]); |
| 2911 | strcat(s, RAW_BLR_TEMPLATE); |
| 2912 | strcat(s, "\n"); |
| 2913 | sprintf(output_buffer, s, names[isc_a_pos], ident, names[UNDER], length++, |
| 2914 | blr_hunk.longword_blr); |
| 2915 | COB_print_buffer(output_buffer, false); |
| 2916 | } |
| 2917 | } |
| 2918 | |
| 2919 | |
| 2920 | //____________________________________________________________ |
no test coverage detected