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 - download

⟦090c271d2⟧ TextFile

    Length: 343 (0x157)
    Types: TextFile
    Names: »openwrite.c«

Derivation

└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki
    └─ ⟦this⟧ »EUUGD11/euug-87hel/sec8/cfs/openwrite.c« 

TextFile

/*
 * openwrite - open a file for write; bomb if unsuccesful
 */

#include <stdio.h>
#include <sys/file.h>

FILE *
openwrite (file)
char   *file;
{
    extern char *myname;
    FILE	*fd;

    fd = fopen (file, "w+");
    if (fd == NULL) {
	fprintf (stderr, "%s: can't open %s for writing\n", myname, file);
	exit (1);
    }
    return (fd);
}