renamed mc_sml_buf_get_current_buf to
sml_buf_get_current_buf
This commit is contained in:
parent
a31efa8215
commit
98173c0d1b
4 changed files with 5 additions and 5 deletions
|
@ -94,7 +94,7 @@ int sml_buf_get_next_type(sml_buffer *buf);
|
|||
unsigned char sml_buf_get_current_byte(sml_buffer *buf);
|
||||
|
||||
// Returns a pointer to the current buffer position.
|
||||
unsigned char *mc_sml_buf_get_current_buf(sml_buffer *buf);
|
||||
unsigned char *sml_buf_get_current_buf(sml_buffer *buf);
|
||||
|
||||
void mc_sml_optional_write(sml_buffer *buf);
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
/*
|
||||
void mc_sml_hexdump_rest(sml_buffer *buf) {
|
||||
int i;
|
||||
unsigned char *rest = mc_sml_buf_get_current_buf(buf);
|
||||
unsigned char *rest = sml_buf_get_current_buf(buf);
|
||||
for (i = 0; i < buf->buffer_len - buf->cursor; i++) {
|
||||
printf("%02X ", (unsigned char) rest[i]);
|
||||
if ((i + 1) % 8 == 0) {
|
||||
|
|
|
@ -93,14 +93,14 @@ octet_string *sml_octet_string_parse(sml_buffer *buf) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
octet_string *str = sml_octet_string_init(mc_sml_buf_get_current_buf(buf), l);
|
||||
octet_string *str = sml_octet_string_init(sml_buf_get_current_buf(buf), l);
|
||||
mc_sml_buf_update_read_bytes(buf, l);
|
||||
return str;
|
||||
}
|
||||
|
||||
void sml_octet_string_write(octet_string *str, sml_buffer *buf) {
|
||||
sml_buf_set_type_and_length(buf, SML_TYPE_OCTET_STRING, (unsigned int) str->len);
|
||||
memcpy(mc_sml_buf_get_current_buf(buf), str->str, str->len);
|
||||
memcpy(sml_buf_get_current_buf(buf), str->str, str->len);
|
||||
buf->cursor += str->len;
|
||||
}
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ unsigned char sml_buf_get_current_byte(sml_buffer *buf) {
|
|||
return buf->buffer[buf->cursor];
|
||||
}
|
||||
|
||||
unsigned char *mc_sml_buf_get_current_buf(sml_buffer *buf) {
|
||||
unsigned char *sml_buf_get_current_buf(sml_buffer *buf) {
|
||||
return &(buf->buffer[buf->cursor]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue