… for info/warn/error
…r than hardcoded colorings
…heme at initialization
… download fails.
…ore than once
…next and alpm_list_getdata
remove some unused code and be more descriptive if/when any errors occur. manually allocate a buffer to avoid undefined behavior when passing NULL to getcwd
…esponse code. should have added this ages ago
…put of the operation, not the input
Instead of duping the already allocated buffer, find the end of it and insert a '\0' in place of the closing paren. Pass this pointer to our array parsing function if its not optdepends. To look for the next array, we then just advance 1 character past the previously found end.
use strtok instead of strsep because it will consider multiple successive delimeters to be a single delimeter. use strcspn to find the length of the string containing valid characters up to the first found reject character. Using this length, replace the first reject character with a '\0'. this replaces the kludgy for loop that iterated over each character, calling strchr on each iteration.