mirror of https://github.com/MidnightCommander/mc
1998-04-15 Miguel de Icaza <miguel@nuclecu.unam.mx>
* screen.c (string_file_nlinks): The buffer was too small and we were overwriting parts of it. * subshell.c (do_subshell_chdir): Memory leak fix. * find.c (do_search): Do not use undefined order of evaluation. * user.c: Do not use undefined order of evaluation. * dlg.c (init_dlg): Do init the default return value.
This commit is contained in:
parent
515e64efdc
commit
036af40392
|
@ -353,7 +353,7 @@ dialog_panel_callback (struct Dlg_head *h, int id, int msg)
|
|||
|
||||
/* Find out which one of the widgets is the WPanel */
|
||||
p = (WPanel *) find_widget_type (h, (callback_fn) panel_callback);
|
||||
g_return_if_fail (p != 0);
|
||||
g_return_val_if_fail (p != 0, 0);
|
||||
|
||||
current_widget = (void *) h->current->widget;
|
||||
|
||||
|
|
|
@ -157,6 +157,8 @@ radio_toggle (GtkObject *object, WRadio *r)
|
|||
{
|
||||
int idx = (int) gtk_object_get_data (object, "index");
|
||||
|
||||
printf ("WEEEEE RADIO!\n");
|
||||
|
||||
if (!GTK_TOGGLE_BUTTON (object)->active)
|
||||
return;
|
||||
|
||||
|
@ -264,7 +266,7 @@ x_update_input (WInput *in)
|
|||
GnomeEntry *gnome_entry;
|
||||
GtkEntry *entry;
|
||||
char *text;
|
||||
int draw;
|
||||
int draw = 0;
|
||||
|
||||
/* If the widget has not been initialized yet (done by WIDGET_INIT) */
|
||||
if (!in->widget.wdata)
|
||||
|
@ -475,6 +477,7 @@ x_create_buttonbar (Dlg_head *h, widget_data parent, WButtonBar *bb)
|
|||
}
|
||||
gtk_widget_show (hbox);
|
||||
bb->widget.wdata = (widget_data) hbox;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -51,7 +51,7 @@ flags=ew
|
|||
|
||||
[findfile-Widget-tree]
|
||||
geometry=4,6,1,1
|
||||
flags=
|
||||
flags=ns
|
||||
|
||||
[findfile-Widget-ok]
|
||||
geometry=3,6,1,1
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
1998-04-15 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
||||
|
||||
* screen.c (string_file_nlinks): The buffer was too small and we
|
||||
were overwriting parts of it.
|
||||
|
||||
* subshell.c (do_subshell_chdir): Memory leak fix.
|
||||
|
||||
* find.c (do_search): Do not use undefined order of evaluation.
|
||||
|
||||
* user.c: Do not use undefined order of evaluation.
|
||||
|
||||
* dlg.c (init_dlg): Do init the default return value.
|
||||
|
||||
Sun Apr 12 03:09:17 1998 Norbert Warmuth <k3190@fh-sw.de>
|
||||
|
||||
* cmd.c (view_other_cmd): #ifdef'd application_keypad_mode and
|
||||
|
|
|
@ -180,13 +180,13 @@ static void get_two_colors (char **cpp, struct colorpair *colorpairp)
|
|||
|
||||
void configure_colors_string (char *the_color_string)
|
||||
{
|
||||
char *color_string;
|
||||
char *color_string, *p;
|
||||
int i, found;
|
||||
|
||||
if (!the_color_string)
|
||||
return;
|
||||
|
||||
color_string = strdup (the_color_string);
|
||||
p = color_string = strdup (the_color_string);
|
||||
while (color_string && *color_string){
|
||||
while (*color_string == ' ' || *color_string == '\t')
|
||||
color_string++;
|
||||
|
@ -208,6 +208,7 @@ void configure_colors_string (char *the_color_string)
|
|||
color_string++;
|
||||
}
|
||||
}
|
||||
free (p);
|
||||
}
|
||||
|
||||
static void configure_colors (void)
|
||||
|
|
|
@ -758,6 +758,7 @@ void init_dlg (Dlg_head *h)
|
|||
while (!dlg_focus (h))
|
||||
h->current = h->current->next;
|
||||
|
||||
h->ret_value = 0;
|
||||
h->running = 1;
|
||||
x_init_dlg (h);
|
||||
}
|
||||
|
|
|
@ -569,7 +569,7 @@ do_search (struct Dlg_head *h)
|
|||
if (!(count & 31)){
|
||||
if (verbose){
|
||||
#ifndef HAVE_X
|
||||
pos = (++pos) % 4;
|
||||
pos = (pos + 1) % 4;
|
||||
attrset (NORMALC);
|
||||
dlg_move (h, FIND2_Y-6, FIND2_X - 4);
|
||||
addch (rotating_dash [pos]);
|
||||
|
|
|
@ -794,6 +794,7 @@ int mi_getch ()
|
|||
Gpm_Event ev;
|
||||
int key;
|
||||
|
||||
ev->x = -1;
|
||||
while ((key = get_event (&ev, 0, 1)) == 0)
|
||||
;
|
||||
return key;
|
||||
|
|
|
@ -264,7 +264,7 @@ string_file_permission (file_entry *fe, int len)
|
|||
char *
|
||||
string_file_nlinks (file_entry *fe, int len)
|
||||
{
|
||||
static char buffer [16];
|
||||
static char buffer [20];
|
||||
|
||||
sprintf (buffer, "%16d", fe->buf.st_nlink);
|
||||
return buffer;
|
||||
|
|
|
@ -757,8 +757,6 @@ void do_subshell_chdir (char *directory, int do_update, int reset_prompt)
|
|||
return;
|
||||
}
|
||||
|
||||
temp = strdup (directory);
|
||||
|
||||
/* The initial space keeps this out of the command history (in bash
|
||||
because we set "HISTCONTROL=ignorespace") */
|
||||
write (subshell_pty, " cd ", 4);
|
||||
|
@ -766,8 +764,9 @@ void do_subshell_chdir (char *directory, int do_update, int reset_prompt)
|
|||
temp = name_quote (directory, 0);
|
||||
write (subshell_pty, temp, strlen (temp));
|
||||
free (temp);
|
||||
} else
|
||||
} else {
|
||||
write (subshell_pty, "/", 1);
|
||||
}
|
||||
write (subshell_pty, "\n", 1);
|
||||
|
||||
subshell_state = RUNNING_COMMAND;
|
||||
|
|
|
@ -549,7 +549,7 @@ void execute_menu_command (char *s)
|
|||
prompt [len] = *commands;
|
||||
prompt [len+1] = 0;
|
||||
} else
|
||||
prompt [sizeof (prompt)] = 0;
|
||||
prompt [sizeof (prompt)-1] = 0;
|
||||
}
|
||||
} else if (expand_prefix_found){
|
||||
expand_prefix_found = 0;
|
||||
|
@ -659,7 +659,9 @@ void user_menu_cmd (void)
|
|||
} else if (*p == '+'){
|
||||
if (*(p+1) == '='){
|
||||
/* Combined adding and default */
|
||||
p = test_line (++p, &accept_entry);
|
||||
char *q = p++;
|
||||
|
||||
p = test_line (q, &accept_entry);
|
||||
if (selected == 0 && accept_entry)
|
||||
selected = menu_lines;
|
||||
} else {
|
||||
|
@ -668,8 +670,9 @@ void user_menu_cmd (void)
|
|||
}
|
||||
} else if (*p == '='){
|
||||
if (*(p+1) == '+'){
|
||||
char *q = p++;
|
||||
/* Combined adding and default */
|
||||
p = test_line (++p, &accept_entry);
|
||||
p = test_line (q, &accept_entry);
|
||||
if (selected == 0 && accept_entry)
|
||||
selected = menu_lines;
|
||||
} else {
|
||||
|
|
|
@ -482,7 +482,9 @@ int quick_dialog_skip (QuickDialog *qd, int nskip)
|
|||
dd->data = qd->title;
|
||||
|
||||
for (qw = qd->widgets; qw->widget_type; qw++){
|
||||
#ifndef HAVE_X
|
||||
#ifdef HAVE_X
|
||||
xpos = ypos = 0;
|
||||
#else
|
||||
xpos = (qd->xlen * qw->relative_x)/qw->x_divisions;
|
||||
ypos = (qd->ylen * qw->relative_y)/qw->y_divisions;
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue