Changeset 47e0a6a
- Timestamp:
- Mar 24, 2011, 4:10:53 PM (14 years ago)
- Branches:
- master, release-1.10, release-1.8, release-1.9
- Children:
- 283ff1e
- Parents:
- d07af84
- git-author:
- David Benjamin <davidben@mit.edu> (03/11/11 00:17:26)
- git-committer:
- David Benjamin <davidben@mit.edu> (03/24/11 16:10:53)
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
editwin.c
rddbbcffa r47e0a6a 301 301 302 302 if (lock > 0) { 303 locktext = g_new(char, lock+1); 304 strncpy(locktext, e->buff, lock); 305 locktext[lock] = 0; 303 locktext = g_strndup(e->buff, lock); 306 304 } 307 305 … … 1059 1057 void owl_editwin_yank(owl_editwin *e) 1060 1058 { 1061 c har *killbuf = owl_global_get_kill_buffer(&g);1059 const char *killbuf = owl_global_get_kill_buffer(&g); 1062 1060 1063 1061 if (killbuf != NULL) … … 1067 1065 static const char *oe_copy_buf(owl_editwin *e, const char *buf, int len) 1068 1066 { 1069 char *p; 1070 char *killbuf = owl_global_get_kill_buffer(&g); 1071 1072 p = g_new(char, len + 1); 1073 1074 if (p != NULL) { 1075 g_free(killbuf); 1076 memcpy(p, buf, len); 1077 p[len] = 0; 1078 owl_global_set_kill_buffer(&g,p); 1079 } 1080 1081 return p; 1067 owl_global_set_kill_buffer(&g, buf, len); 1068 return owl_global_get_kill_buffer(&g); 1082 1069 } 1083 1070 -
global.c
rf25df21 r47e0a6a 957 957 } 958 958 959 c har *owl_global_get_kill_buffer(owl_global *g) {959 const char *owl_global_get_kill_buffer(owl_global *g) { 960 960 return g->kill_buffer; 961 961 } 962 962 963 void owl_global_set_kill_buffer(owl_global *g,char *kill) { 964 g->kill_buffer = kill; 965 } 963 void owl_global_set_kill_buffer(owl_global *g, const char *kill, int len) { 964 g_free(g->kill_buffer); 965 g->kill_buffer = g_strndup(kill, len); 966 } -
keymap.c
r45e2c95 r47e0a6a 197 197 owl_keymap *km; 198 198 km = g_new(owl_keymap, 1); 199 if (!km) return NULL;200 199 owl_keymap_init(km, name, desc, default_fn, prealways_fn, postalways_fn); 201 200 owl_keyhandler_add_keymap(kh, km); -
popexec.c
rddbbcffa r47e0a6a 23 23 24 24 pe = g_new(owl_popexec, 1); 25 if (!pe) return NULL;26 25 pe->winactive=0; 27 26 pe->pid=0;
Note: See TracChangeset
for help on using the changeset viewer.