Cleaned up src/lib/utils library. Renamed server_ functions to more logical
names. All system processes can now either use panic() or report() from libutils, or redefine their own function. Assertions are done via the standard <assert.h> functionality.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#include "utils.h"
|
||||
|
||||
/*===========================================================================*
|
||||
* report *
|
||||
*===========================================================================*/
|
||||
PUBLIC void report(who, mess, num)
|
||||
char *who; /* server identification */
|
||||
char *mess; /* message format to print */
|
||||
int num; /* number to go with the message */
|
||||
{
|
||||
/* Display a message for a server. */
|
||||
|
||||
if (num != NO_NUM) {
|
||||
printf("%s: %s %d\n", who, mess, num);
|
||||
} else {
|
||||
printf("%s: %s\n", who, mess);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user