projects
/
selector.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cosmetics.
[selector.git]
/
selector.c
diff --git
a/selector.c
b/selector.c
index
95d8968
..
b0f30ce
100644
(file)
--- a/
selector.c
+++ b/
selector.c
@@
-128,7
+128,7
@@
void str_to_positive_integers(char *string, int *values, int nb) {
return;
} else {
fprintf(stderr,
return;
} else {
fprintf(stderr,
- "
S
elector: Missing value in `%s'.\n", string);
+ "
s
elector: Missing value in `%s'.\n", string);
exit(EXIT_FAILURE);
}
}
exit(EXIT_FAILURE);
}
}
@@
-136,17
+136,17
@@
void str_to_positive_integers(char *string, int *values, int nb) {
gotone = 0;
} else {
fprintf(stderr,
gotone = 0;
} else {
fprintf(stderr,
- "
S
elector: Too many values in `%s'.\n", string);
+ "
s
elector: Too many values in `%s'.\n", string);
exit(EXIT_FAILURE);
}
} else {
fprintf(stderr,
exit(EXIT_FAILURE);
}
} else {
fprintf(stderr,
- "
S
elector: Empty value in `%s'.\n", string);
+ "
s
elector: Empty value in `%s'.\n", string);
exit(EXIT_FAILURE);
}
} else {
fprintf(stderr,
exit(EXIT_FAILURE);
}
} else {
fprintf(stderr,
- "
S
elector: Syntax error in `%s'.\n", string);
+ "
s
elector: Syntax error in `%s'.\n", string);
exit(EXIT_FAILURE);
}
s++;
exit(EXIT_FAILURE);
}
s++;
@@
-428,8
+428,7
@@
void kill_after_cursor(char *buffer, int *position) {
/*********************************************************************/
/*********************************************************************/
-int previous_visible(int current_line, int nb_lines, char **lines,
- matcher_t *matcher) {
+int previous_visible(int current_line, char **lines, matcher_t *matcher) {
int line = current_line - 1;
while(line >= 0 && !match(lines[line], matcher)) line--;
return line;
int line = current_line - 1;
while(line >= 0 && !match(lines[line], matcher)) line--;
return line;
@@
-502,8
+501,7
@@
void update_screen(int *current_focus_line, int *displayed_focus_line,
new_focus_line = next_visible(*current_focus_line, nb_lines, lines,
&matcher);
if(new_focus_line < 0) {
new_focus_line = next_visible(*current_focus_line, nb_lines, lines,
&matcher);
if(new_focus_line < 0) {
- new_focus_line = previous_visible(*current_focus_line, nb_lines, lines,
- &matcher);
+ new_focus_line = previous_visible(*current_focus_line, lines, &matcher);
}
}
}
}
@@
-522,7
+520,7
@@
void update_screen(int *current_focus_line, int *displayed_focus_line,
} else {
/* We want to go up, let's find the first visible line above */
for(m = 0; l >= 0 && m < -motion; m++) {
} else {
/* We want to go up, let's find the first visible line above */
for(m = 0; l >= 0 && m < -motion; m++) {
- l = previous_visible(l,
nb_lines,
lines, &matcher);
+ l = previous_visible(l, lines, &matcher);
if(l >= 0) {
new_focus_line = l;
}
if(l >= 0) {
new_focus_line = l;
}
@@
-753,7
+751,7
@@
void read_file(struct hash_table_t *hash_table,
file = fopen(input_filename, "r");
if(!file) {
file = fopen(input_filename, "r");
if(!file) {
- fprintf(stderr, "
S
elector: Can not open `%s'.\n", input_filename);
+ fprintf(stderr, "
s
elector: Can not open `%s'.\n", input_filename);
exit(EXIT_FAILURE);
}
exit(EXIT_FAILURE);
}
@@
-786,7
+784,7
@@
void read_file(struct hash_table_t *hash_table,
if(eol == BUFFER_SIZE) {
raw_line[BUFFER_SIZE - 1] = '\0';
if(eol == BUFFER_SIZE) {
raw_line[BUFFER_SIZE - 1] = '\0';
- fprintf(stderr, "
S
elector: Line too long (max is %d characters):\n",
+ fprintf(stderr, "
s
elector: Line too long (max is %d characters):\n",
BUFFER_SIZE);
fprintf(stderr, raw_line);
fprintf(stderr, "\n");
BUFFER_SIZE);
fprintf(stderr, raw_line);
fprintf(stderr, "\n");
@@
-859,7
+857,7
@@
int main(int argc, char **argv) {
struct hash_table_t *hash_table;
if(!isatty(STDIN_FILENO)) {
struct hash_table_t *hash_table;
if(!isatty(STDIN_FILENO)) {
- fprintf(stderr, "
S
elector: The standard input is not a tty.\n");
+ fprintf(stderr, "
s
elector: The standard input is not a tty.\n");
exit(EXIT_FAILURE);
}
exit(EXIT_FAILURE);
}
@@
-1082,7
+1080,7
@@
int main(int argc, char **argv) {
color_bg_highlight < 0 || color_bg_highlight >= COLORS) {
echo();
endwin();
color_bg_highlight < 0 || color_bg_highlight >= COLORS) {
echo();
endwin();
- fprintf(stderr, "
S
elector: Color numbers have to be between 0 and %d.\n",
+ fprintf(stderr, "
s
elector: Color numbers have to be between 0 and %d.\n",
COLORS - 1);
exit(EXIT_FAILURE);
}
COLORS - 1);
exit(EXIT_FAILURE);
}
@@
-1234,7
+1232,7
@@
int main(int argc, char **argv) {
fprintf(out, "\n");
} else {
fprintf(stderr,
fprintf(out, "\n");
} else {
fprintf(stderr,
- "
S
elector: Can not open %s for writing.\n",
+ "
s
elector: Can not open %s for writing.\n",
output_filename);
exit(EXIT_FAILURE);
}
output_filename);
exit(EXIT_FAILURE);
}