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

⟦e3325b333⟧ TextFile

    Length: 390 (0x186)
    Types: TextFile
    Names: »movefile.c«

Derivation

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

TextFile

/*
 * movefile - move old to new; bomb if unsuccessful
 */

#include "cfs.h"

movefile (old, new)
char   *old;
char   *new;
{
    extern char *myname;
    char	sysline[5 + (2 * MAXPATHLEN)];

    if (rename (old, new)) {	/* if rename doesn't do it, try cp */
	sprintf (sysline, "cp %s %s", old, new);
	if (system (sysline))
	    return (1);
	else
	    unlink (old);
    }
    return (0);
}