| 277 | } |
| 278 | |
| 279 | void |
| 280 | early_version_info(boolean pastebuf) |
| 281 | { |
| 282 | char buf1[BUFSZ], buf2[BUFSZ]; |
| 283 | char *buf, *tmp; |
| 284 | |
| 285 | Snprintf(buf1, sizeof buf1, "test"); |
| 286 | /* this is early enough that we have to do our own line-splitting */ |
| 287 | getversionstring(buf1, sizeof buf1); |
| 288 | tmp = strstri(buf1, " ("); /* split at start of version info */ |
| 289 | if (tmp) { |
| 290 | /* retain one buffer so that it all goes into the paste buffer */ |
| 291 | *tmp++ = '\0'; |
| 292 | Snprintf(buf2, sizeof (buf2),"%s\n%s", buf1, tmp); |
| 293 | buf = buf2; |
| 294 | } else { |
| 295 | buf = buf1; |
| 296 | } |
| 297 | |
| 298 | raw_printf("%s", buf); |
| 299 | |
| 300 | if (pastebuf) { |
| 301 | #if defined(RUNTIME_PASTEBUF_SUPPORT) && !defined(LIBNH) |
| 302 | /* |
| 303 | * Call a platform/port-specific routine to insert the |
| 304 | * version information into a paste buffer. Useful for |
| 305 | * easy inclusion in bug reports. |
| 306 | */ |
| 307 | port_insert_pastebuf(buf); |
| 308 | #else |
| 309 | raw_printf("%s", "Paste buffer copy is not available.\n"); |
| 310 | #endif |
| 311 | } |
| 312 | } |
| 313 | |
| 314 | extern const char regex_id[]; |
| 315 |
no test coverage detected