Code for TCP/IP program to print an error message and exit in Networking
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
/*VARARGS1*/int
errexit(constchar *format, ...)
{
va_list args;
va_start(args, format);
vfprintf(stderr, format, args);
va_end(args);
exit(1);
}