Changeset 28ee32b for functions.c


Ignore:
Timestamp:
Dec 24, 2007, 2:53:11 AM (16 years ago)
Author:
Alejandro R. Sedeño <asedeno@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
762512d
Parents:
5bc0f68
Message:
UTF-8 - first pass

unicode changes:
* remove downstr() from text.c, replace on site with calls to g_utf8_strdown.
  In place downcasing is not a good idea, so the downstr() contract is unfulfillable.

* make owl_text_truncate_cols() and owl_fmtext_truncate_cols() understand character width.
  This may need more work. Some code duplication - see if we can refactor.

* stristr() rewritten to yse g_utf_casefold() instead of downstr(), and restructured to have a single return.

* only_whitespace() rewritten for unicode.

glib changes:
* rewrite owl_sprintf() in terms of g_strdup_vprintf()

WARNING: THIS IS NOT SAFE YET. Network data is not yet sanitized. Non
UTF-8 inputs may do horrible things to you. This phase is just
working on rendering.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    r93ee554 r28ee32b  
    25982598  }
    25992599  /* downcase it */
    2600   downstr(filtname);
     2600  {
     2601    char *temp = g_utf8_strdown(filtname, -1);
     2602    if (temp) {
     2603      owl_free(filtname);
     2604      filtname = temp;
     2605    }
     2606  }
    26012607  /* turn spaces, single quotes, and double quotes into dots */
    26022608  owl_text_tr(filtname, ' ', '.');
Note: See TracChangeset for help on using the changeset viewer.