non-compressing send token */
| 312 | |
| 313 | /* non-compressing send token */ |
| 314 | static void simple_send_token(int f, int32 token, struct map_struct *buf, OFF_T offset, int32 n) |
| 315 | { |
| 316 | if (n > 0) { |
| 317 | int32 len = 0; |
| 318 | while (len < n) { |
| 319 | int32 n1 = MIN(CHUNK_SIZE, n-len); |
| 320 | write_int(f, n1); |
| 321 | write_buf(f, map_ptr(buf, offset+len, n1), n1); |
| 322 | len += n1; |
| 323 | } |
| 324 | } |
| 325 | /* a -2 token means to send data only and no token */ |
| 326 | if (token != -2) |
| 327 | write_int(f, -(token+1)); |
| 328 | } |
| 329 | |
| 330 | /* Flag bytes in compressed stream are encoded as follows: */ |
| 331 | #define END_FLAG 0 /* that's all folks */ |
no test coverage detected