Custom keybindings in mcedit
Roland Illig
roland.illig at gmx.de
Tue Apr 26 19:39:23 UTC 2005
Vitja Makarov wrote:
> This implements keyboard bindings for mcedit. I think that tunable
> bindings is a cool stuff ;) Here is also my config for bindings. This
> patch applies to the latest cvs source.
I like your patch, and I have some things to criticize:
* in struct NameMap, you should declare name as "const char *".
* likewise for struct Command.
* use concat_dir_and_file() instead of g_concat_strings().
* don't use C++ (or C99) comments. /* use these instead */
* in split_line(), use GPtrArray instead of writing
memory management routines yourself.
* isspace() must be called like this: isspace((unsigned char) *str).
* g_strdup() never returns NULL.
* please use memset() instead of bzero().
* don't use int as return-type for function when you mean
a boolean type -- that's what gboolean is for.
I don't want to fix these things myself. You can just learn from these
hints. Some are specific to mc, but others are general purpose hints.
When you think you have applied most of these hints, you are very
welcome to contribute your patch again.
> I also had written gdb & make support but it's not stable enought..
Please explain. It might be interesting.
Roland
More information about the mc-devel
mailing list