X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=render.c;h=ebaec937d08211d0ba36fe69bbce2fd0fd4ae352;hb=cb5385b932956072fc14fd6531c45f12c9cc4925;hp=b0fb21a37183f6fd0f256d77fd01e3dce0f2c661;hpb=bc8adcf5e271186d94f15fc0c4c5db678055c5ef;p=taskasaur.git diff --git a/render.c b/render.c index b0fb21a..ebaec93 100644 --- a/render.c +++ b/render.c @@ -1,5 +1,6 @@ #include "headers/render.h" +#include #include "config.h" int init_tscolors(void); @@ -76,3 +77,14 @@ create_todowin(void) return 0; } +int +ungetstr(char* str) +{ + // ignore null character (it's fine even if strlen = 0) + for (int i = strlen(str)-1; i >= 0; i--) { + ungetch(str[i]); + } + + return 0; +} +