- Timestamp:
- Mar 24, 2011, 4:10:53 PM (13 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)
- File:
-
- 1 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
Note: See TracChangeset
for help on using the changeset viewer.