| 2159 | // |
| 2160 | |
| 2161 | static void gen_get_segment( const act* action, int column) |
| 2162 | { |
| 2163 | blb* blob; |
| 2164 | if (action->act_flags & ACT_sql) |
| 2165 | blob = (blb*) action->act_request->req_blobs; |
| 2166 | else |
| 2167 | blob = (blb*) action->act_object; |
| 2168 | |
| 2169 | if (action->act_error || (action->act_flags & ACT_sql)) |
| 2170 | printa(column, "firebird.ISC_GET_SEGMENT (isc_status, isc_%d, isc_%d, %d, isc_%d'address);", |
| 2171 | blob->blb_ident, |
| 2172 | blob->blb_len_ident, |
| 2173 | blob->blb_seg_length, blob->blb_buff_ident); |
| 2174 | else |
| 2175 | printa(column, "firebird.ISC_GET_SEGMENT (isc_status(1), isc_%d, isc_%d, %d, isc_%d'address);", |
| 2176 | blob->blb_ident, |
| 2177 | blob->blb_len_ident, |
| 2178 | blob->blb_seg_length, blob->blb_buff_ident); |
| 2179 | |
| 2180 | if (action->act_flags & ACT_sql) |
| 2181 | { |
| 2182 | const ref* into = action->act_object; |
| 2183 | set_sqlcode(action, column); |
| 2184 | printa(column, "if (SQLCODE = 0) or (SQLCODE = 101) then"); |
| 2185 | printa(column + INDENT, "%s := isc_%d;", into->ref_value, blob->blb_buff_ident); |
| 2186 | if (into->ref_null_value) |
| 2187 | printa(column + INDENT, "%s := isc_%d;", into->ref_null_value, blob->blb_len_ident); |
| 2188 | endif(column); |
| 2189 | } |
| 2190 | } |
| 2191 | |
| 2192 | |
| 2193 | //____________________________________________________________ |
no test coverage detected