1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-12-06 21:56:34 +01:00

Add enum for file_type() and a little cleanup

This commit is contained in:
jfreegman
2018-10-08 22:28:36 -04:00
parent 258736995d
commit 8f0e6026f0
5 changed files with 30 additions and 18 deletions

View File

@@ -129,10 +129,9 @@ static const char special_commands[SPECIAL_COMMANDS][MAX_CMDNAME_SIZE] = {
/* Returns true if input command is in the special_commands array. */
static bool is_special_command(const char *input)
{
int s = char_find(0, input, ' ');
int i;
const int s = char_find(0, input, ' ');
for (i = 0; i < SPECIAL_COMMANDS; ++i) {
for (int i = 0; i < SPECIAL_COMMANDS; ++i) {
if (strncmp(input, special_commands[i], s) == 0) {
return true;
}