Add warning to buffer.h

This commit is contained in:
Victor Fernandes 2017-01-30 16:35:51 -05:00
parent b9b910439a
commit 028638ee84
3 changed files with 4 additions and 3 deletions

View File

@ -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);

View File

@ -14,7 +14,7 @@
/* standard header files */
#include <stdio.h> /* standard input/output */
#include <mm_malloc.h> /* for dynamic memory allocation*/
#include <mm_malloc.h> /* for dynamic memory allocation. NOTE: USE MALLOC.H FOR LINUX/WINDOWS.THIS IS FOR MACOS ONLY*/
#include <limits.h> /* implementation-defined data type ranges and limits */
/* constant definitions */

BIN
platy_gnu

Binary file not shown.