error.c

Sapphire/src/client/error.c · 709 B

From the archive sapphire_0.3.zip

Download the archive   « Back to the archive contents

/*
 * Copyright (C) 1995-1997 Christopher D. Granz
 *
 * This header may not be removed.
 *
 * Refer to the file "License" included in this package for further
 * information and before using any of the following.
 */

#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>

#include "client.h"


/*
 * Functions
 */
void fatal( char *pFormat, ... )
{
    va_list vlArgs;
    char cBuf[1024];

    va_start( vlArgs, pFormat );
#ifdef _sysBSD
    vsnprintf( cBuf, 1024, pFormat, vlArgs );
#else
    vsprintf( cBuf, pFormat, vlArgs );
#endif
    fprintf( stderr, "%s\n", cBuf );
    va_end( vlArgs );
    exit( 1 );
}


/*
 * End of error.c
 */

Site Stats

Snippets: 1791
Codebases: 571