| 327 | } |
| 328 | |
| 329 | char * |
| 330 | strconcat3 (const char *s1, |
| 331 | const char *s2, |
| 332 | const char *s3) |
| 333 | { |
| 334 | size_t len = 0; |
| 335 | char *res; |
| 336 | |
| 337 | if (s1) |
| 338 | len += strlen (s1); |
| 339 | if (s2) |
| 340 | len += strlen (s2); |
| 341 | if (s3) |
| 342 | len += strlen (s3); |
| 343 | |
| 344 | res = xmalloc (len + 1); |
| 345 | *res = 0; |
| 346 | if (s1) |
| 347 | strcat (res, s1); |
| 348 | if (s2) |
| 349 | strcat (res, s2); |
| 350 | if (s3) |
| 351 | strcat (res, s3); |
| 352 | |
| 353 | return res; |
| 354 | } |
| 355 | |
| 356 | char * |
| 357 | xasprintf (const char *format, |