Changeset 6c171f1
- Timestamp:
- Oct 7, 2009, 12:46:39 AM (14 years ago)
- Branches:
- master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- dca3b27
- Parents:
- a85d225
- git-author:
- Anders Kaseorg <andersk@mit.edu> (10/03/09 19:40:34)
- git-committer:
- Anders Kaseorg <andersk@mit.edu> (10/07/09 00:46:39)
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
editwin.c
ra85d225 r6c171f1 1252 1252 1253 1253 if (!g_unichar_iscntrl(c) || c == '\n' || c== '\t' ) { 1254 memset(tmp, 0, 7);1255 1256 1254 if (c == '\n' && e->style == OWL_EDITWIN_STYLE_ONELINE) { 1257 1255 return; … … 1296 1294 return; /* our work here is done */ 1297 1295 1298 g_unichar_to_utf8(c, tmp);1296 tmp[g_unichar_to_utf8(c, tmp)] = '\0'; 1299 1297 owl_editwin_replace(e, 0, tmp); 1300 1298 } -
fmtext.c
r0ed5c57 r6c171f1 57 57 58 58 /* Set attributes */ 59 if (a) { 60 memset(attrbuff,0,6); 61 g_unichar_to_utf8(OWL_FMTEXT_UC_ATTR | attr, attrbuff); 62 strcat(f->textbuff, attrbuff); 63 } 64 if (fg) { 65 memset(attrbuff,0,6); 66 g_unichar_to_utf8(OWL_FMTEXT_UC_FGCOLOR | fgcolor, attrbuff); 67 strcat(f->textbuff, attrbuff); 68 } 69 if (bg) { 70 memset(attrbuff,0,6); 71 g_unichar_to_utf8(OWL_FMTEXT_UC_BGCOLOR | bgcolor, attrbuff); 72 strcat(f->textbuff, attrbuff); 73 } 59 if (a) 60 strncat(f->textbuff, attrbuff, 61 g_unichar_to_utf8(OWL_FMTEXT_UC_ATTR | attr, attrbuff)); 62 if (fg) 63 strncat(f->textbuff, attrbuff, 64 g_unichar_to_utf8(OWL_FMTEXT_UC_FGCOLOR | fgcolor, attrbuff)); 65 if (bg) 66 strncat(f->textbuff, attrbuff, 67 g_unichar_to_utf8(OWL_FMTEXT_UC_BGCOLOR | bgcolor, attrbuff)); 74 68 75 69 strcat(f->textbuff, text); … … 202 196 _owl_fmtext_realloc(f, newlen); 203 197 204 if (a) { 205 memset(attrbuff,0,6); 206 g_unichar_to_utf8(OWL_FMTEXT_UC_ATTR | attr, attrbuff); 207 strcat(f->textbuff, attrbuff); 208 } 209 if (fg) { 210 memset(attrbuff,0,6); 211 g_unichar_to_utf8(OWL_FMTEXT_UC_FGCOLOR | fgcolor, attrbuff); 212 strcat(f->textbuff, attrbuff); 213 } 214 if (bg) { 215 memset(attrbuff,0,6); 216 g_unichar_to_utf8(OWL_FMTEXT_UC_BGCOLOR | bgcolor, attrbuff); 217 strcat(f->textbuff, attrbuff); 218 } 198 if (a) 199 strncat(f->textbuff, attrbuff, 200 g_unichar_to_utf8(OWL_FMTEXT_UC_ATTR | attr, attrbuff)); 201 if (fg) 202 strncat(f->textbuff, attrbuff, 203 g_unichar_to_utf8(OWL_FMTEXT_UC_FGCOLOR | fgcolor, attrbuff)); 204 if (bg) 205 strncat(f->textbuff, attrbuff, 206 g_unichar_to_utf8(OWL_FMTEXT_UC_BGCOLOR | bgcolor, attrbuff)); 219 207 220 208 strncat(f->textbuff, in->textbuff+start, stop-start+1);
Note: See TracChangeset
for help on using the changeset viewer.