Only tack on \n for the printout; do not put it in the buffer that may
be used by the critical_alert() routine.
before = &argv[4];
afterc = atoi(argv[3]);
after = &argv[4 + beforec];
- whoami = argv[0];
- sprintf(buf, "%s (", table);
+ whoami = (whoami = rindex(argv[0], '/') ? ++whoami : argv[0]);
+
+ strcpy(buf, table);
+ strcat(buf, " (");
for (i = 0; i < beforec; i++) {
if (i > 0)
strcat(buf, ",");
strcat(buf, ",");
strcat(buf, after[i]);
}
- strcat(buf, ")\n");
#ifdef DEBUG
- write(1,buf,strlen(buf));
+ printf("%s\n", buf);
#endif
initialize_sms_error_table();