Changeset 259e60a8 for message.c


Ignore:
Timestamp:
May 30, 2011, 7:46:21 PM (10 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.8, release-1.9
Children:
44976fe, 9835b7a
Parents:
8ffa264
git-author:
Jason Gross <jgross@mit.edu> (05/18/11 16:25:58)
git-committer:
Anders Kaseorg <andersk@mit.edu> (05/30/11 19:46:21)
Message:
Remove the length limit on field values in :info
File:
1 edited

Legend:

Unmodified
Added
Removed
  • message.c

    r3a3863e r259e60a8  
    120120  int i, j;
    121121  owl_pair *p;
    122   char *buff;
     122  char *buff, *tmpbuff;
    123123
    124124  owl_fmtext_init_null(fm);
     
    127127  for (i=0; i<j; i++) {
    128128    p=owl_list_get_element(&(m->attributes), i);
    129     buff=g_strdup_printf("  %-15.15s: %-35.35s\n", owl_pair_get_key(p), owl_pair_get_value(p));
     129
     130    tmpbuff = g_strdup(owl_pair_get_value(p));
     131    g_strdelimit(tmpbuff, "\n", '~');
     132    g_strdelimit(tmpbuff, "\r", '!');
     133    buff = g_strdup_printf("  %-15.15s: %s\n", owl_pair_get_key(p), tmpbuff);
     134    g_free(tmpbuff);
     135
    130136    if(buff == NULL) {
    131       buff=g_strdup_printf("  %-15.15s: %-35.35s\n", owl_pair_get_key(p), "<error>");
     137      buff = g_strdup_printf("  %-15.15s: %s\n", owl_pair_get_key(p), "<error>");
    132138      if(buff == NULL)
    133139        buff=g_strdup("   <error>\n");
Note: See TracChangeset for help on using the changeset viewer.