diff options
author | Bardur Arantsson <bardur@scientician.net> | 2014-06-26 21:54:30 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2014-06-27 07:42:41 +0200 |
commit | f50ed5b5c1e3caa38a5409cc22ea53fefd5c1209 (patch) | |
tree | 827ac3d7301849f2608dba0c1465d65137fffd94 /src/cmd4.cc | |
parent | 143808187704f8feec1b71f4e1c9a4b7efb1d9d6 (diff) |
Remove most of z-virt.[ch]
This commit leaves only safe_calloc() as a convenient "non-failing"
calloc().
Diffstat (limited to 'src/cmd4.cc')
-rw-r--r-- | src/cmd4.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/cmd4.cc b/src/cmd4.cc index 7a6fbe7c..c71c28f3 100644 --- a/src/cmd4.cc +++ b/src/cmd4.cc @@ -2004,11 +2004,9 @@ void do_cmd_macros(void) /* Convert to ascii */ text_to_ascii(macro__buf, tmp); - /* Free old keymap */ - string_free(keymap_act[mode][(byte)(buf[0])]); - /* Make new keymap */ - keymap_act[mode][(byte)(buf[0])] = string_make(macro__buf); + free(keymap_act[mode][(byte)(buf[0])]); + keymap_act[mode][(byte)(buf[0])] = strdup(macro__buf); /* Prompt */ msg_print("Added a keymap."); @@ -2027,10 +2025,8 @@ void do_cmd_macros(void) /* Get a keymap trigger */ do_cmd_macro_aux_keymap(buf); - /* Free old keymap */ - string_free(keymap_act[mode][(byte)(buf[0])]); - /* Make new keymap */ + free(keymap_act[mode][(byte)(buf[0])]); keymap_act[mode][(byte)(buf[0])] = NULL; /* Prompt */ |