Radix cross Linux

The main Radix cross Linux repository contains the build scripts of packages, which have the most complete and common functionality for desktop machines

452 Commits   2 Branches   1 Tag
/*
 * Reimplementation of err/warnx.
 */

char err_rcsid[] = 
  "$Id: err.c,v 1.1 1997/04/05 22:13:31 dholland Exp $";

#include <stdlib.h> /* exit() */
#include <stdio.h>
#include <stdarg.h>
#include <err.h>

void err(int eval, const char *fmt, ...) {
    va_list ap;
    va_start(ap, fmt);
    fprintf(stderr, "rup: ");
    vfprintf(stderr, fmt, ap);
    fprintf(stderr, "%m\n");
    va_end(ap);
    exit(eval);
}

void warnx(const char *fmt, ...) {
    va_list ap;
    va_start(ap, fmt);
    fprintf(stderr, "rup: ");
    vfprintf(stderr, fmt, ap);
    fprintf(stderr, "\n");
    va_end(ap);
}