This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct circular_buffer | |
{ | |
void *buffer; // data buffer | |
void *buffer_end; // end of data buffer | |
size_t capacity; // maximum number of items in the buffer | |
size_t count; // number of items in the buffer | |
size_t sz; // size of each item in the buffer | |
void *head; // pointer to head | |
void *tail; // pointer to tail | |
} circular_buffer; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |