*
*/
-/* To use it as a super-history-search for bash:
- selector -q -b -i -d -v -w -l ${HISTSIZE} <(history)
+/*
+
+ To use it as a super-history-search for bash:
+ selector -q -b -i -d -v -w -l ${HISTSIZE} <(history)
+
*/
#define _GNU_SOURCE
}
}
-/*********************************************************************/
-/* A quick and dirty hash table
+/*********************************************************************
+ A quick and dirty hash table
- The table itself stores indexes of the strings taken in a char
- **table. When a string is added, if it was already in the table,
- the new index replaces the previous one. */
+ The table itself stores indexes of the strings taken in a char
+ **table. When a string is added, if it was already in the table, the
+ new index replaces the previous one. */
int *new_hash_table(int hash_table_size) {
int *result, k;
int k;
/* This is my recipe. I checked, it seems to work (as long as
- hash_table_size is not a multiple of 387433 that should be okay) */
+ hash_table_size is not a multiple of 387433 that should be
+ okay) */
for(k = 0; new_string[k]; k++) {
code = code * 387433 + (unsigned int) (new_string[k]);
return -1;
}
-/*********************************************************************/
-/* A matcher matches either with a collection of substrings, or with a
- regexp */
+/*********************************************************************
+ A matcher matches either with a collection of substrings, or with a
+ regexp */
typedef struct {
regex_t preg;
}
}
-/*********************************************************************/
-/* Buffer edition */
+/*********************************************************************
+ Buffer edition */
void delete_char(char *buffer, int *position) {
if(buffer[*position]) {
echo();
endwin();
-/* Here we come back to standard display */
+ /* Here we come back to standard display */
if((key == KEY_ENTER || key == '\n')) {