rendered paste body#include <stdio.h>#include <stdlib.h>#include <string.h>#include "stringbuffer.h"stringBuffer* newStringBuffer(){ stringBuffer *new; new = malloc(sizeof(stringBuffer)); if (new == NULL) printf("Stringbuffer konnte nicht erstellt werden.\n"); new->top = NULL; return new;}void stringBufferAppend(stringBuffer* buffer, char* text){ stringBufferElement *new, *tmp; new = malloc(sizeof(stringBufferElement)); if (new == NULL) printf("StringBufferElement konnte nicht erstellt werden.\n"); tmp = buffer->top; buffer->top = new; new->next = tmp; new->value = malloc(strlen(text)+1); strcpy(new->value, text);}void stringBufferInsert(stringBuffer* buffer, int address, char* text){ }void stringBufferConcatenate(stringBuffer* buf1, stringBuffer* buf2){ stringBufferElement *tmp; tmp = buf2->top; while (tmp != NULL) { stringBufferAppend(buf1, tmp->value); tmp = tmp->next; } free(buf2);}void stringBufferSort(stringBuffer* buf){}int stringBufferLength(stringBuffer* buf){ stringBufferElement *tmp; int count = 0; tmp = buf->top; while (tmp != NULL) { count++; tmp = tmp->next; } return count;}void stringBufferPrint(stringBuffer* buf){ stringBufferElement *tmp; tmp = buf->top; while (tmp != NULL) { printf("%s\n", tmp->value); tmp = tmp->next; }}