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 |
|
|
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 |