aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--args.c2
-rw-r--r--input_field.c5
-rw-r--r--main.c2
-rw-r--r--state.h2
5 files changed, 6 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 35133a7..fa7465e 100644
--- a/Makefile
+++ b/Makefile
@@ -54,7 +54,7 @@ compile_flags:
echo $(CFLAGS) | tr ' ' '\n' > compile_flags.txt
clean:
- rm -rf $(BIN) $(OBJDIR)
+ rm -rf $(BIN) $(OBJDIR) swenu-exes
install: all
install -m 755 ./$(BIN) $(PREFIX)/bin
diff --git a/args.c b/args.c
index b992d7d..157bf07 100644
--- a/args.c
+++ b/args.c
@@ -46,7 +46,7 @@ void parse_args(client_state* state, int argc, char* argv[]) {
state->orderless = true;
break;
case 'i':
- state->strstr = strcasestr;
+ state->strstr2 = strcasestr;
break;
case 's':
array_insert_many(state->input_buffer, 0, optarg, strlen(optarg));
diff --git a/input_field.c b/input_field.c
index c221e6f..d8c5c23 100644
--- a/input_field.c
+++ b/input_field.c
@@ -35,7 +35,7 @@ void refilter_items(client_state* state) {
float part = 0;
bool add = true;
array_for_all(char*, j, parts) {
- if (state->strstr(i->text, *j)) {
+ if (state->strstr2(i->text, *j)) {
part += strlen(*j);
}
else {
@@ -57,7 +57,7 @@ void refilter_items(client_state* state) {
}
else {
array_for_all(item_t, i, state->items) {
- if (state->strstr(i->text, input_buffer_string) != NULL) {
+ if (state->strstr2(i->text, input_buffer_string) != NULL) {
array_add(state->filtered_items, (item_display_t){ .item = i });
}
}
@@ -166,4 +166,3 @@ key_repeat_t execute_keypress(client_state* state, xkb_keysym_t keysym) {
return KEY_NO_REPEAT;
}
-
diff --git a/main.c b/main.c
index 4d7c89b..29dc26e 100644
--- a/main.c
+++ b/main.c
@@ -45,7 +45,7 @@ int main(int argc, char* argv[]) {
state.input_buffer = array_new(char, 0);
state.filtered_items = array_new(item_display_t, 0);
state.page_indices = array_new(size_t, 0);
- state.strstr = strstr;
+ state.strstr2 = strstr;
// check locale
setlocale(LC_ALL, "");
diff --git a/state.h b/state.h
index 1eab360..dbcc8fe 100644
--- a/state.h
+++ b/state.h
@@ -121,7 +121,7 @@ typedef struct {
bool verbose;
bool password;
bool orderless;
- char* (*strstr)(const char*, const char*);
+ char* (*strstr2)(const char*, const char*);
// input
item_t* items;