| 2833 | } |
| 2834 | |
| 2835 | void |
| 2836 | testinglog(const char *filenm, /* ad hoc file name */ |
| 2837 | const char *type, |
| 2838 | const char *reason) /* explanation */ |
| 2839 | { |
| 2840 | FILE *lfile; |
| 2841 | char fnbuf[BUFSZ]; |
| 2842 | |
| 2843 | if (!filenm) |
| 2844 | return; |
| 2845 | Strcpy(fnbuf, filenm); |
| 2846 | if (strchr(fnbuf, '.') == 0) |
| 2847 | Strcat(fnbuf, ".log"); |
| 2848 | lfile = fopen_datafile(fnbuf, "a", TROUBLEPREFIX); |
| 2849 | if (lfile) { |
| 2850 | (void) fprintf(lfile, "%s\n%s\n", type, reason); |
| 2851 | (void) fclose(lfile); |
| 2852 | } |
| 2853 | return; |
| 2854 | } |
| 2855 | |
| 2856 | /* ---------- END PANIC/IMPOSSIBLE/TESTING LOG ----------- */ |
| 2857 |
nothing calls this directly
no test coverage detected