Re: User menu entries in editor not working

Hi, David!

> I just installed Mandrake 8.1 and the latest MC snapshot (friday). Most menu
> entries (like insert Changelog) didn't work. A temporary file was created
> but no changes got to the edited file.

The scripting support in mcedit is terrible.  _Most_ code doesn't work
correctly (except the parts that I already fixed).  It appears that most
code was never tested.  Also, the code is written by somebody with a very
poor knowledge of C.  Here's the example from edit.h:

#ifdef _EDIT_C
char *edit_init_error_msg = NULL;
#else                           /* ! _EDIT_C */ 
extern char *edit_init_error_msg;
#endif                          /* ! _EDIT_C */ 

The compiler never gets a chance to compare that the type of
"edit_init_error_msg" used in edit.c is the same as seen from other files.  
There are more variables declared this way.

The error file is not created on startup.  However, if it doesn't exist
after the command finishes, it's considered an error.  But
edit_error_dialog() is disabled if called from edit.c (insane!!!) - that's
why you don't see the error message.

I'll make another round of cleanups in the editor today.  Hopefully it 
will fix the menu.

Pavel Roskin

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]