renamed mc_sml_buf_update_read_bytes to

sml_buf_update_bytes_read
This commit is contained in:
Juri Glass 2011-06-16 16:55:30 +02:00
parent f6a9c978ba
commit 19af19ebaa
6 changed files with 9 additions and 9 deletions

View file

@ -99,7 +99,7 @@ unsigned char *sml_buf_get_current_buf(sml_buffer *buf);
void sml_buf_optional_write(sml_buffer *buf);
// Sets the number of bytes read (moves the cursor forward)
void mc_sml_buf_update_read_bytes(sml_buffer *buf, int bytes);
void sml_buf_update_bytes_read(sml_buffer *buf, int bytes);
// Checks if the next field is a skipped optional field, updates the buffer accordingly
int mc_sml_is_optional_skipped(sml_buffer *buf);

View file

@ -66,7 +66,7 @@ sml_file *sml_file_parse(unsigned char *buffer, size_t buffer_len) {
if(sml_buf_get_current_byte(buf) == SML_MESSAGE_END) {
// reading trailing zeroed bytes
mc_sml_buf_update_read_bytes(buf, 1);
sml_buf_update_bytes_read(buf, 1);
continue;
}

View file

@ -68,7 +68,7 @@ sml_message *sml_message_parse(sml_buffer *buf) {
if (sml_buf_has_errors(buf)) goto error;
if (sml_buf_get_current_byte(buf) == SML_MESSAGE_END) {
mc_sml_buf_update_read_bytes(buf, 1);
sml_buf_update_bytes_read(buf, 1);
}
return msg;

View file

@ -42,7 +42,7 @@ u64 mc_sml_parse_number(sml_buffer *buf, unsigned char type, int max_size) {
for (i = 0; i < l; i++) {
n <<= 8;
n |= sml_buf_get_current_byte(buf);
mc_sml_buf_update_read_bytes(buf, 1);
sml_buf_update_bytes_read(buf, 1);
}
return n;
}

View file

@ -94,7 +94,7 @@ octet_string *sml_octet_string_parse(sml_buffer *buf) {
}
octet_string *str = sml_octet_string_init(sml_buf_get_current_buf(buf), l);
mc_sml_buf_update_read_bytes(buf, l);
sml_buf_update_bytes_read(buf, l);
return str;
}

View file

@ -34,12 +34,12 @@ int sml_buf_get_next_length(sml_buffer *buf) {
if ((byte & SML_ANOTHER_TL) != SML_ANOTHER_TL) {
break;
}
mc_sml_buf_update_read_bytes(buf, 1);
sml_buf_update_bytes_read(buf, 1);
if(list) {
list += -1;
}
}
mc_sml_buf_update_read_bytes(buf, 1);
sml_buf_update_bytes_read(buf, 1);
return length + list;
}
@ -93,7 +93,7 @@ unsigned char *sml_buf_get_current_buf(sml_buffer *buf) {
return &(buf->buffer[buf->cursor]);
}
void mc_sml_buf_update_read_bytes(sml_buffer *buf, int bytes) {
void sml_buf_update_bytes_read(sml_buffer *buf, int bytes) {
buf->cursor += bytes;
}
@ -123,7 +123,7 @@ void sml_buffer_free(sml_buffer *buf) {
int mc_sml_is_optional_skipped(sml_buffer *buf) {
if (sml_buf_get_current_byte(buf) == SML_OPTIONAL_SKIPPED) {
mc_sml_buf_update_read_bytes(buf, 1);
sml_buf_update_bytes_read(buf, 1);
return 1;
}
return 0;