1
1
Этот коммит содержится в:
Paul Sheer 1998-09-18 14:22:49 +00:00
родитель 1607d36a09
Коммит 1a9db64987
3 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@ -229,6 +229,7 @@ WEdit *edit_init (WEdit * edit, int lines, int columns, const char *filename, co
#endif
if (!edit) {
edit = malloc (sizeof (WEdit));
memset (edit, 0, sizeof (sizeof (WEdit)));
to_free = 1;
}
if (!edit) {

Просмотреть файл

@ -661,7 +661,7 @@ extern int gtk_edit_fixed_font;
# else
# define WIN_MESSAGES edit->widget->mainid, 20, 20
# define WIN_MESSAGES edit->widget ? edit->widget->mainid : CRoot, 20, 20
# endif

Просмотреть файл

@ -317,7 +317,7 @@ CWidget *CDrawEditor (const char *identifier, Window parent, int x, int y,
mkdir (catstrs (home_dir, EDIT_DIR, 0), 0700);
made_directory = 1;
}
e = w->editor = edit_init (0, height / FONT_PIX_PER_LINE, width / FONT_MEAN_WIDTH, filename, text, starting_directory, text_size);
e = w->editor = CMalloc (sizeof (WEdit));
w->funcs = mouse_funcs_new (w->editor, &edit_mouse_funcs);
if (!w->editor) {
@ -326,8 +326,10 @@ CWidget *CDrawEditor (const char *identifier, Window parent, int x, int y,
return 0;
}
w->editor->widget = w;
w->editor = edit_init (e, height / FONT_PIX_PER_LINE, width / FONT_MEAN_WIDTH, filename, text, starting_directory, text_size);
w->funcs->data = (void *) w->editor;
if (!e) {
if (!w->editor) {
free (e);
CDestroyWidget (w->ident);
return 0;
}