| 3042 | // |
| 3043 | |
| 3044 | static void gen_tpb(const tpb* tpb_buffer, int column) |
| 3045 | { |
| 3046 | printa(column, "isc_tpb_%d\t: CONSTANT firebird.tpb (1..%d) := (", |
| 3047 | tpb_buffer->tpb_ident, tpb_buffer->tpb_length); |
| 3048 | |
| 3049 | int length = tpb_buffer->tpb_length; |
| 3050 | const TEXT* text = (TEXT*) tpb_buffer->tpb_string; |
| 3051 | TEXT buffer[80]; |
| 3052 | TEXT* p = buffer; |
| 3053 | |
| 3054 | while (--length) |
| 3055 | { |
| 3056 | const TEXT c = *text++; |
| 3057 | sprintf(p, "%d, ", c); |
| 3058 | while (*p) |
| 3059 | p++; |
| 3060 | if (p - buffer > 60) |
| 3061 | { |
| 3062 | printa(column + INDENT, " %s", buffer); |
| 3063 | p = buffer; |
| 3064 | *p = 0; |
| 3065 | } |
| 3066 | } |
| 3067 | |
| 3068 | // handle the last character |
| 3069 | |
| 3070 | const TEXT c = *text++; |
| 3071 | sprintf(p, "%d", c); |
| 3072 | printa(column + INDENT, "%s", buffer); |
| 3073 | printa(column, ");"); |
| 3074 | } |
| 3075 | |
| 3076 | |
| 3077 | //____________________________________________________________ |
no test coverage detected