Changeset 6c171f1 for editwin.c


Ignore:
Timestamp:
Oct 7, 2009, 12:46:39 AM (15 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
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)
Message:
Use g_unichar_to_utf8 in a way that doesn’t require memset.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • editwin.c

    ra85d225 r6c171f1  
    12521252
    12531253  if (!g_unichar_iscntrl(c) || c == '\n' || c== '\t' ) {
    1254     memset(tmp, 0, 7);
    1255 
    12561254    if (c == '\n' && e->style == OWL_EDITWIN_STYLE_ONELINE) {
    12571255      return;
     
    12961294      return; /* our work here is done */
    12971295
    1298     g_unichar_to_utf8(c, tmp);
     1296    tmp[g_unichar_to_utf8(c, tmp)] = '\0';
    12991297    owl_editwin_replace(e, 0, tmp);
    13001298  }
Note: See TracChangeset for help on using the changeset viewer.