DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T e

⟦6d2791804⟧ TextFile

    Length: 1878 (0x756)
    Types: TextFile
    Names: »error.c«

Derivation

└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
    └─⟦e83f91978⟧ »EurOpenD22/isode/osimis-2.0.tar.Z« 
        └─⟦d846658bd⟧ 
            └─⟦this⟧ »osimis/smap/error.c« 

TextFile

/*
 * Copyright (c) 1988 University College London
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms are permitted
 * provided that the above copyright notice and this paragraph are
 * duplicated in all such forms and that any documentation,
 * advertising materials, and other materials related to such
 * distribution and use acknowledge that the software was developed
 * by the Department of Computer Science, University College London.
 * The name of the University may not be used to
 * endorse or promote products derived from this software without
 * specific prior written permission.
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

#include <stdio.h>
#include "defs.h"

extern char *progname;


/* VARARGS2 */

error (what, fmt, a, b, c, d, e, f, g, h, i, j)         /*up to ten args*/
char  *what, *fmt, *a, *b, *c, *d, *e, *f, *g, *h, *i, *j;
{
    fflush(stdout);

    fprintf(stderr, "%s: Error: ", progname);
    fprintf(stderr, fmt, a, b, c, d, e, f, g, h, i, j);
    if (what)
	fputc(' ', stderr), perror(what);
    else
	fputc('\n', stderr);

    fflush(stderr);
    _exit(1);
}


/*
 *  prints a system call error message and exits
 */

/* VARARGS2 */

syserr (fmt, a, b, c, d, e, f, g, h, i, j)	/*up to ten args*/
char  *fmt, *a, *b, *c, *d, *e, *f, *g, *h, *i, *j;
{
    extern int  errno, sys_nerr;
    extern char *sys_errlist[];

    fflush(stdout);

    fprintf(stderr, "%s: System Error: ", progname);
    fprintf(stderr, fmt, a, b, c, d, e, f, g, h, i, j);
    fprintf(stderr, " (errno = %d", errno);
    if (errno > 0 and errno < sys_nerr)
	fprintf(stderr, "; %s)\n", sys_errlist[errno]);
    else
	fprintf(stderr, ")\n");

    fflush(stderr);
    _exit(1);
}