Changeset 7659079 for fmtext.c


Ignore:
Timestamp:
Feb 26, 2011, 12:57:17 AM (14 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.10, release-1.8, release-1.9
Children:
237d02c
Parents:
fb6e8e3
git-author:
David Benjamin <davidben@mit.edu> (02/25/11 15:14:41)
git-committer:
David Benjamin <davidben@mit.edu> (02/26/11 00:57:17)
Message:
Don't precompute UTF-8 encodings of format characters

GString can append gunichar just fine.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fmtext.c

    r1137802 r7659079  
    5050
    5151  /* Reset attributes */
    52   if (bg) g_string_append(f->buff, OWL_FMTEXT_UTF8_BGDEFAULT);
    53   if (fg) g_string_append(f->buff, OWL_FMTEXT_UTF8_FGDEFAULT);
    54   if (a)  g_string_append(f->buff, OWL_FMTEXT_UTF8_ATTR_NONE);
     52  if (bg) g_string_append_unichar(f->buff, OWL_FMTEXT_UC_BGDEFAULT);
     53  if (fg) g_string_append_unichar(f->buff, OWL_FMTEXT_UC_FGDEFAULT);
     54  if (a)  g_string_append_unichar(f->buff, OWL_FMTEXT_UC_ATTR | OWL_FMTEXT_UC_ATTR);
    5555}
    5656
     
    180180
    181181  /* Reset attributes */
    182   g_string_append(f->buff, OWL_FMTEXT_UTF8_BGDEFAULT);
    183   g_string_append(f->buff, OWL_FMTEXT_UTF8_FGDEFAULT);
    184   g_string_append(f->buff, OWL_FMTEXT_UTF8_ATTR_NONE);
     182  g_string_append_unichar(f->buff, OWL_FMTEXT_UC_BGDEFAULT);
     183  g_string_append_unichar(f->buff, OWL_FMTEXT_UC_FGDEFAULT);
     184  g_string_append_unichar(f->buff, OWL_FMTEXT_UC_ATTR | OWL_FMTEXT_UC_ATTR);
    185185}
    186186
Note: See TracChangeset for help on using the changeset viewer.