Use GSList for buffer entries

This commit is contained in:
James Booth
2014-07-18 23:07:08 +01:00
parent 2a435cd3de
commit 1e6b70943a
3 changed files with 42 additions and 57 deletions

View File

@@ -14,15 +14,11 @@ typedef struct prof_buff_entry_t {
char *message;
} ProfBuffEntry;
typedef struct prof_buff_t {
ProfBuffEntry entry[BUFF_SIZE];
int wrap;
int current;
} ProfBuff;
typedef struct prof_buff_t *ProfBuff;
ProfBuff* buffer_create();
void buffer_free(ProfBuff* buffer);
void buffer_push(ProfBuff* buffer, const char show_char, const char * const date_fmt, int flags, int attrs, const char * const from, const char * const message);
int buffer_size(ProfBuff* buffer);
ProfBuffEntry buffer_yield_entry(ProfBuff* buffer, int entry);
#endif
ProfBuff buffer_create();
void buffer_free(ProfBuff buffer);
void buffer_push(ProfBuff buffer, const char show_char, const char * const date_fmt, int flags, int attrs, const char * const from, const char * const message);
int buffer_size(ProfBuff buffer);
ProfBuffEntry buffer_yield_entry(ProfBuff buffer, int entry);
#endif