Changeset e19eb97 for keymap.c


Ignore:
Timestamp:
Aug 15, 2009, 7:08:18 PM (12 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
1077891a
Parents:
fa4562c
git-author:
Anders Kaseorg <andersk@mit.edu> (08/04/09 02:37:51)
git-committer:
Anders Kaseorg <andersk@mit.edu> (08/15/09 19:08:18)
Message:
Add const qualifiers for char * and void *.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • keymap.c

    r4d86e06 re19eb97  
    33
    44/* returns 0 on success */
    5 int owl_keymap_init(owl_keymap *km, char *name, char *desc, void (*default_fn)(owl_input), void (*prealways_fn)(owl_input), void (*postalways_fn)(owl_input))
     5int owl_keymap_init(owl_keymap *km, const char *name, const char *desc, void (*default_fn)(owl_input), void (*prealways_fn)(owl_input), void (*postalways_fn)(owl_input))
    66{
    77  if (!name || !desc) return(-1);
     
    3030
    3131/* creates and adds a key binding */
    32 int owl_keymap_create_binding(owl_keymap *km, char *keyseq, char *command, void (*function_fn)(void), char *desc)
     32int owl_keymap_create_binding(owl_keymap *km, const char *keyseq, const char *command, void (*function_fn)(void), const char *desc)
    3333{
    3434  owl_keybinding *kb, *curkb;
     
    103103    char buff[100];
    104104    owl_cmd *cmd;
    105     char *tmpdesc, *desc = "";
     105    const char *tmpdesc, *desc = "";
    106106
    107107    kb = owl_list_get_element(&km->bindings, i);
     
    149149}
    150150
    151 owl_keymap *owl_keyhandler_create_and_add_keymap(owl_keyhandler *kh, char *name, char *desc, void (*default_fn)(owl_input), void (*prealways_fn)(owl_input), void (*postalways_fn)(owl_input))
     151owl_keymap *owl_keyhandler_create_and_add_keymap(owl_keyhandler *kh, const char *name, const char *desc, void (*default_fn)(owl_input), void (*prealways_fn)(owl_input), void (*postalways_fn)(owl_input))
    152152{
    153153  owl_keymap *km;
     
    167167}
    168168
    169 owl_keymap *owl_keyhandler_get_keymap(owl_keyhandler *kh, char *mapname)
     169owl_keymap *owl_keyhandler_get_keymap(owl_keyhandler *kh, const char *mapname)
    170170{
    171171  return owl_dict_find_element(&kh->keymaps, mapname);
     
    187187/* sets the active keymap, which will also reset any key state.
    188188 * returns the new keymap, or NULL on failure. */
    189 owl_keymap *owl_keyhandler_activate(owl_keyhandler *kh, char *mapname)
     189owl_keymap *owl_keyhandler_activate(owl_keyhandler *kh, const char *mapname)
    190190{
    191191  owl_keymap *km;
Note: See TracChangeset for help on using the changeset viewer.