xaizek / hstr (License: Apachev2) (since 2018-12-07)
Bash and Zsh shell history suggest box - easily view, navigate, search and manage your command history.
Commit 492a366d0f7432a0038147c178823bd1ea08ab86

Making hstr compilable without warnings.
Author: Martin Dvorak
Author date (UTC): 2014-04-27 11:09
Committer name: Martin Dvorak
Committer date (UTC): 2014-04-27 11:09
Parent(s): 53b8ca470ea05187969e193dee3b3fddee7317e6
Signing key:
Tree: 3ff3aa3a8624b2b5592bb17f47ee1c1ec3aedfc2
File Lines added Lines deleted
src/Makefile.am 1 0
src/hashset.c 1 1
src/hstr_regexp.c 3 1
src/include/hashset.h 1 1
File src/Makefile.am changed (mode: 100644) (index 0476e56..ee05677)
... ... hh_SOURCES = \
11 11 hstr_history.c include/hstr_history.h \ hstr_history.c include/hstr_history.h \
12 12 hstr_utils.c include/hstr_utils.h \ hstr_utils.c include/hstr_utils.h \
13 13 hstr_favorites.c include/hstr_favorites.h \ hstr_favorites.c include/hstr_favorites.h \
14 hstr_regexp.c include/hstr_regexp.h \
14 15 radixsort.c include/radixsort.h \ radixsort.c include/radixsort.h \
15 16 hstr.c hstr.c
File src/hashset.c changed (mode: 100644) (index 0f79a2a..ecfadde)
... ... int hashset_put(HashSet *hs, const char *key, void *value)
74 74 return 1; return 1;
75 75 } }
76 76
77 int hashset_add(const HashSet * hs, const char *key)
77 int hashset_add(HashSet * hs, const char *key)
78 78 { {
79 79 return hashset_put(hs, key, "nil"); return hashset_put(hs, key, "nil");
80 80 } }
File src/hstr_regexp.c changed (mode: 100644) (index 61cea9d..64690ed)
9 9
10 10 #include "include/hstr_regexp.h" #include "include/hstr_regexp.h"
11 11
12 #include "include/hstr_utils.h"
13
12 14 #define REGEXP_MATCH_BUFFER_SIZE 1 #define REGEXP_MATCH_BUFFER_SIZE 1
13 15
14 16 void hstr_regexp_init(HstrRegexp *hstrRegexp) void hstr_regexp_init(HstrRegexp *hstrRegexp)
 
... ... bool hstr_regexp_match(HstrRegexp *hstrRegexp, char *regexp, char *text, regmatc
27 29 int compilationStatus=regcomp(compiled, regexp, compilationFlags); int compilationStatus=regcomp(compiled, regexp, compilationFlags);
28 30 //printf("\nCompilation: %d",compilationStatus); //printf("\nCompilation: %d",compilationStatus);
29 31 if(!compilationStatus) { if(!compilationStatus) {
30 hashset_put(&hstrRegexp->cache, strdup(regexp), compiled);
32 hashset_put(&hstrRegexp->cache, hstr_strdup(regexp), compiled);
31 33 } else { } else {
32 34 free(compiled); free(compiled);
33 35 // TODO error handling: regerror() to turn error codes to messages // TODO error handling: regerror() to turn error codes to messages
File src/include/hashset.h changed (mode: 100644) (index 43f4bd8..b6424e3)
... ... typedef struct {
30 30 void hashset_init(HashSet *hs); void hashset_init(HashSet *hs);
31 31
32 32 int hashset_contains(const HashSet *hs, const char *key); int hashset_contains(const HashSet *hs, const char *key);
33 int hashset_add(const HashSet *hs, const char *key);
33 int hashset_add(HashSet *hs, const char *key);
34 34 int hashset_size(const HashSet *hs); int hashset_size(const HashSet *hs);
35 35 char** hashset_keys(const HashSet *hs); char** hashset_keys(const HashSet *hs);
36 36
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/hstr

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/hstr

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master