* editcmd.c: Fixed whitespacing issues.
* editdraw.c: Likewise. * syntax.c: Likewise.
Этот коммит содержится в:
родитель
15342acba1
Коммит
e5e3a8f87d
@ -1182,7 +1182,7 @@ edit_replace_prompt (WEdit * edit, char *replace_text, int xpos, int ypos)
|
|||||||
quick_widgets[5].text = label_text->str;
|
quick_widgets[5].text = label_text->str;
|
||||||
|
|
||||||
{
|
{
|
||||||
int retval;
|
int retval;
|
||||||
QuickDialog Quick_input =
|
QuickDialog Quick_input =
|
||||||
{CONFIRM_DLG_WIDTH, CONFIRM_DLG_HEIGTH, 0, 0, N_ (" Confirm replace "),
|
{CONFIRM_DLG_WIDTH, CONFIRM_DLG_HEIGTH, 0, 0, N_ (" Confirm replace "),
|
||||||
"[Input Line Keys]", 0 /*quick_widgets */, 0 };
|
"[Input Line Keys]", 0 /*quick_widgets */, 0 };
|
||||||
@ -1533,12 +1533,12 @@ edit_find_string (long start, unsigned char *exp, int *len, long last_byte, edit
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
*len = strlen ((const char *) exp);
|
*len = strlen ((const char *) exp);
|
||||||
if (replace_case) {
|
if (replace_case) {
|
||||||
for (p = start; p <= last_byte - l; p++) {
|
for (p = start; p <= last_byte - l; p++) {
|
||||||
if ((*get_byte) (data, p) == (unsigned char)exp[0]) { /* check if first char matches */
|
if ((*get_byte) (data, p) == (unsigned char)exp[0]) { /* check if first char matches */
|
||||||
for (f = 0, q = 0; q < l && f < 1; q++)
|
for (f = 0, q = 0; q < l && f < 1; q++)
|
||||||
if ((*get_byte) (data, q + p) != (unsigned char)exp[q])
|
if ((*get_byte) (data, q + p) != (unsigned char)exp[q])
|
||||||
f = 1;
|
f = 1;
|
||||||
if (f == 0)
|
if (f == 0)
|
||||||
return p;
|
return p;
|
||||||
@ -1758,9 +1758,9 @@ edit_replace_cmd (WEdit *edit, int again)
|
|||||||
int argord[NUM_REPL_ARGS];
|
int argord[NUM_REPL_ARGS];
|
||||||
|
|
||||||
if (!edit) {
|
if (!edit) {
|
||||||
g_free (saved1), saved1 = NULL;
|
g_free (saved1), saved1 = NULL;
|
||||||
g_free (saved2), saved2 = NULL;
|
g_free (saved2), saved2 = NULL;
|
||||||
g_free (saved3), saved3 = NULL;
|
g_free (saved3), saved3 = NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,11 +110,11 @@ edit_status (WEdit *edit)
|
|||||||
fname_len = preferred_fname_len;
|
fname_len = preferred_fname_len;
|
||||||
|
|
||||||
if (fname_len + gap + status_len + right_gap >= w) {
|
if (fname_len + gap + status_len + right_gap >= w) {
|
||||||
if (preferred_fname_len + gap + status_len + right_gap >= w)
|
if (preferred_fname_len + gap + status_len + right_gap >= w)
|
||||||
fname_len = preferred_fname_len;
|
fname_len = preferred_fname_len;
|
||||||
else
|
else
|
||||||
fname_len = w - (gap + status_len + right_gap);
|
fname_len = w - (gap + status_len + right_gap);
|
||||||
fname = name_trunc (fname, fname_len);
|
fname = name_trunc (fname, fname_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
widget_move (edit, 0, 0);
|
widget_move (edit, 0, 0);
|
||||||
|
@ -260,7 +260,7 @@ compare_word_to_right (WEdit *edit, long i, const char *text,
|
|||||||
static inline const char *xx_strchr (const unsigned char *s, int c)
|
static inline const char *xx_strchr (const unsigned char *s, int c)
|
||||||
{
|
{
|
||||||
while (*s >= '\005' && *s != (unsigned char) c) {
|
while (*s >= '\005' && *s != (unsigned char) c) {
|
||||||
s++;
|
s++;
|
||||||
}
|
}
|
||||||
return (const char *) s;
|
return (const char *) s;
|
||||||
}
|
}
|
||||||
@ -490,10 +490,10 @@ static int read_one_line (char **line, FILE * f)
|
|||||||
g_string_append_c (p, c);
|
g_string_append_c (p, c);
|
||||||
}
|
}
|
||||||
if (r != 0) {
|
if (r != 0) {
|
||||||
*line = p->str;
|
*line = p->str;
|
||||||
g_string_free (p, FALSE);
|
g_string_free (p, FALSE);
|
||||||
} else {
|
} else {
|
||||||
g_string_free (p, TRUE);
|
g_string_free (p, TRUE);
|
||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
@ -655,7 +655,7 @@ edit_read_syntax_rules (WEdit *edit, FILE *f, char **args, int args_size)
|
|||||||
int argc;
|
int argc;
|
||||||
int i, j;
|
int i, j;
|
||||||
int alloc_contexts = MAX_CONTEXTS,
|
int alloc_contexts = MAX_CONTEXTS,
|
||||||
alloc_words_per_context = MAX_WORDS_PER_CONTEXT,
|
alloc_words_per_context = MAX_WORDS_PER_CONTEXT,
|
||||||
max_alloc_words_per_context = MAX_WORDS_PER_CONTEXT;
|
max_alloc_words_per_context = MAX_WORDS_PER_CONTEXT;
|
||||||
|
|
||||||
args[0] = 0;
|
args[0] = 0;
|
||||||
@ -784,7 +784,7 @@ edit_read_syntax_rules (WEdit *edit, FILE *f, char **args, int args_size)
|
|||||||
|
|
||||||
alloc_words_per_context = MAX_WORDS_PER_CONTEXT;
|
alloc_words_per_context = MAX_WORDS_PER_CONTEXT;
|
||||||
if (++num_contexts >= alloc_contexts) {
|
if (++num_contexts >= alloc_contexts) {
|
||||||
struct context_rule **tmp;
|
struct context_rule **tmp;
|
||||||
|
|
||||||
alloc_contexts += 128;
|
alloc_contexts += 128;
|
||||||
tmp = g_realloc (r, alloc_contexts * sizeof (struct context_rule *));
|
tmp = g_realloc (r, alloc_contexts * sizeof (struct context_rule *));
|
||||||
@ -839,7 +839,7 @@ edit_read_syntax_rules (WEdit *edit, FILE *f, char **args, int args_size)
|
|||||||
check_not_a;
|
check_not_a;
|
||||||
|
|
||||||
if (++num_words >= alloc_words_per_context) {
|
if (++num_words >= alloc_words_per_context) {
|
||||||
struct key_word **tmp;
|
struct key_word **tmp;
|
||||||
|
|
||||||
alloc_words_per_context += 1024;
|
alloc_words_per_context += 1024;
|
||||||
|
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user