- if (kmod_list_[accent]) {
- FreeException(kmod_list_[accent]->exception_list);
-
- delete kmod_list_[accent];
- }
-
- kmod_list_[accent] = new kmod_list_decl;
- kmod_list_[accent]->data = keys;
- kmod_list_[accent]->accent = accent;
- if (allowed == "native") {
- kmod_list_[accent]->allowed= lyx_accent_table[accent].native;
- } else {
- kmod_list_[accent]->allowed = allowed;
- }
-
- for(string::size_type i = 0; i < keys.length(); ++i) {
- string * temp =
- &keymap_[static_cast<unsigned char>(keys[i])];
-#warning this is not really clean we should find a cleaner way (Jug)
- *temp = "xx"; /* this is needed for the being sure that the below
- assignment is not assigned to a nullpointer
- (if size of string = 0)
- */
- (*temp)[0] = 0;
- (*temp)[1] = accent;
+ KmodInfo tmp;
+ tmp.data = keys;
+ tmp.accent = accent;
+ kmod_list_[accent] = tmp;
+
+ for (string::size_type i = 0; i < keys.length(); ++i) {
+ string tmp;
+ tmp += char(0);
+ tmp += char(accent);
+ keymap_[keys[i]] = tmp;