From 19af19ebaa123401476333377990b3b1b5486c41 Mon Sep 17 00:00:00 2001 From: Juri Glass Date: Thu, 16 Jun 2011 16:55:30 +0200 Subject: [PATCH] renamed mc_sml_buf_update_read_bytes to sml_buf_update_bytes_read --- sml/include/sml/sml_shared.h | 2 +- sml/src/sml.c | 2 +- sml/src/sml_message.c | 2 +- sml/src/sml_number.c | 2 +- sml/src/sml_octet_string.c | 2 +- sml/src/sml_shared.c | 8 ++++---- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sml/include/sml/sml_shared.h b/sml/include/sml/sml_shared.h index 02e762b..c1f5234 100644 --- a/sml/include/sml/sml_shared.h +++ b/sml/include/sml/sml_shared.h @@ -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); diff --git a/sml/src/sml.c b/sml/src/sml.c index 0fe2d6d..888f034 100644 --- a/sml/src/sml.c +++ b/sml/src/sml.c @@ -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; } diff --git a/sml/src/sml_message.c b/sml/src/sml_message.c index 75461f6..1231c84 100644 --- a/sml/src/sml_message.c +++ b/sml/src/sml_message.c @@ -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; diff --git a/sml/src/sml_number.c b/sml/src/sml_number.c index e5a6960..0a50983 100644 --- a/sml/src/sml_number.c +++ b/sml/src/sml_number.c @@ -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; } diff --git a/sml/src/sml_octet_string.c b/sml/src/sml_octet_string.c index 22699e3..f223891 100644 --- a/sml/src/sml_octet_string.c +++ b/sml/src/sml_octet_string.c @@ -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; } diff --git a/sml/src/sml_shared.c b/sml/src/sml_shared.c index 425cec0..879cc7d 100644 --- a/sml/src/sml_shared.c +++ b/sml/src/sml_shared.c @@ -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;