Mercurial > dropbear
comparison buffer.c @ 844:68facbc41273
merge again
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Fri, 01 Nov 2013 00:19:25 +0800 |
parents | 7dcb46da72d9 |
children | bae0b34bc059 7c899f24a85b |
comparison
equal
deleted
inserted
replaced
834:e378da7eae5d | 844:68facbc41273 |
---|---|
267 buf_putint(buf, len); | 267 buf_putint(buf, len); |
268 buf_putbytes(buf, str, len); | 268 buf_putbytes(buf, str, len); |
269 | 269 |
270 } | 270 } |
271 | 271 |
272 /* puts an entire buffer as a SSH string. ignore pos of buf_str. */ | |
273 void buf_putbufstring(buffer *buf, const buffer* buf_str) { | |
274 buf_putstring(buf, buf_str->data, buf_str->len); | |
275 } | |
276 | |
272 /* put the set of len bytes into the buffer, incrementing the pos, increasing | 277 /* put the set of len bytes into the buffer, incrementing the pos, increasing |
273 * len if required */ | 278 * len if required */ |
274 void buf_putbytes(buffer *buf, const unsigned char *bytes, unsigned int len) { | 279 void buf_putbytes(buffer *buf, const unsigned char *bytes, unsigned int len) { |
275 memcpy(buf_getwriteptr(buf, len), bytes, len); | 280 memcpy(buf_getwriteptr(buf, len), bytes, len); |
276 buf_incrwritepos(buf, len); | 281 buf_incrwritepos(buf, len); |