-void add_to_buffer(buffer *p_Buffer, char message[],char message_level){
- unsigned int x=0;
-
- p_Buffer->head++;
-
- printf("p_Buffer->tail=%d\n",p_Buffer->tail);
- printf("p_Buffer->head=%d\n",p_Buffer->head);
- if (p_Buffer->head >=BUFFER_SIZE) {
- printf("buffer overflow\n");
- p_Buffer->head -= BUFFER_SIZE; /*wrap the head around the buffer*/
- printf("new p_Buffer->head=%d\n",p_Buffer->head);
-
- /*if the buffer is full then delete last entry by moving the tail*/
- if (p_Buffer->head==p_Buffer->tail){
- printf("moving buffer tail from %d to ",p_Buffer->tail);
- p_Buffer->tail++;
- printf("%d\n",p_Buffer->tail);
- if (p_Buffer->tail >=BUFFER_SIZE) p_Buffer->tail -= BUFFER_SIZE;/*wrap the tail around the buffer*/
- }
+void append_to_buffer(buffer *p_Buffer, char *message,char message_level,char print){
+ /*wrapper function for add_to_buffer_root_function*/
+ add_to_buffer_root_function(p_Buffer,message, message_level,APPEND_MESSAGE,print);
+}