/[mailutils]/mailutils/mh/mh_format.c
ViewVC logotype

Diff of /mailutils/mh/mh_format.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.36 by gray, Mon Aug 11 11:59:21 2003 UTC revision 1.37 by gray, Tue Aug 12 11:34:21 2003 UTC
# Line 261  print_simple_segment (struct mh_machine Line 261  print_simple_segment (struct mh_machine
261    
262    rest = width - mach->ind;    rest = width - mach->ind;
263    if (rest == 0)    if (rest == 0)
264      return;      {
265          if (len == 1 && str[0] == '\n')
266            put_string (mach, str, len);
267          return;
268        }
269      
270    if (len > rest)    if (len > rest)
271      len = rest;      len = rest;
272    
# Line 1879  builtin_concat (struct mh_machine *mach) Line 1884  builtin_concat (struct mh_machine *mach)
1884  static void  static void
1885  builtin_printhdr (struct mh_machine *mach)  builtin_printhdr (struct mh_machine *mach)
1886  {  {
1887      char *tmp = NULL;
1888      size_t s = 0;
1889      
1890    if (!strobj_is_null (&mach->arg_str))    if (!strobj_is_null (&mach->arg_str))
1891      print_hdr_string (mach, strobj_ptr (&mach->arg_str));      {
1892          s = strobj_len (&mach->arg_str);
1893          tmp = strdup (strobj_ptr (&mach->arg_str));
1894        }
1895      
1896    if (!strobj_is_null (&mach->reg_str))    if (!strobj_is_null (&mach->reg_str))
1897      print_hdr_string (mach, strobj_ptr (&mach->reg_str));      {
1898          s += strobj_len (&mach->reg_str) + 1;
1899          tmp = realloc (tmp, s);
1900          strcat (tmp, strobj_ptr (&mach->reg_str));
1901        }
1902    
1903      if (tmp)
1904        {
1905          print_hdr_string (mach, tmp);
1906          free (tmp);
1907        }
1908  }  }
1909    
1910  static void  static void

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26