diff --git a/buffer.c b/buffer.c index ccf6526..17b95ef 100644 --- a/buffer.c +++ b/buffer.c @@ -239,7 +239,7 @@ short b_setmark(Buffer* const pBD, short mark) { - pBuffer const pBD * Return value: 1, 0 */ -int b_eob(Buffer* const pBD) { + int b_eob(Buffer* const pBD) { if (!pBD) { return R_FAIL1; } return pBD->eob; } @@ -356,12 +356,13 @@ char b_getc(Buffer* const pBD) { int b_print(Buffer* const pBD) { int char_count = 0; /* Counter to track how many characters were sent to output */ char char_buf; /* "Buffer" character to load before output */ - short tmp_offset = pBD->getc_offset; + short tmp_offset = OFFSET_RESET; if (!pBD || !pBD->cb_head) { return R_FAIL1; } if (b_isempty(pBD) == TRUE) { printf("The Buffer is empty.\n"); } else { + tmp_offset = pBD->getc_offset; pBD->getc_offset = OFFSET_RESET; do { char_buf = b_getc(pBD); diff --git a/buffer.h b/buffer.h index 4a5bb39..e89a10b 100755 --- a/buffer.h +++ b/buffer.h @@ -14,7 +14,7 @@ /* standard header files */ #include /* standard input/output */ -#include /* for dynamic memory allocation*/ +#include /* for dynamic memory allocation. NOTE: USE MALLOC.H FOR LINUX/WINDOWS.THIS IS FOR MACOS ONLY*/ #include /* implementation-defined data type ranges and limits */ /* constant definitions */ diff --git a/platy_gnu b/platy_gnu index 59a334b..9386402 100755 Binary files a/platy_gnu and b/platy_gnu differ