X-Git-Url: https://git.danieliu.xyz/?p=taskasaur.git;a=blobdiff_plain;f=utils.c;h=f6f719a9264ac88866abcbecdbbbeddc5319d48b;hp=ecf4b70ce604ba51a0ed5332f24771fc6fca7c16;hb=72509aeb4746b7ea2bd9cc84cfd45dfb87042e07;hpb=303071d6e0488d7da4dc810897948b8ed97354d2 diff --git a/utils.c b/utils.c index ecf4b70..f6f719a 100644 --- a/utils.c +++ b/utils.c @@ -39,7 +39,6 @@ wrap_text(char* str, int max_width, int* lines) str_read += max_width; line_count += 1; - } *lines = line_count; @@ -48,4 +47,17 @@ wrap_text(char* str, int max_width, int* lines) } +/* array stuff */ +int +ar_swap_item(void** arr, int src_index, int dest_index) +{ + void* temp; + + temp = arr[dest_index]; + arr[dest_index] = arr[src_index]; + arr[src_index] = temp; + + return 0; +} +