(void) fprintf(stderr, _("%s: Can't link from %s to "), progname, fromname); (void) perror(toname);
const char *e = strerror(errno); (void) fprintf(stderr, _("%s: Can't link from %s to %s: %s\n"), progname, fromname, toname, e);
dolink(fromfile, tofile)const char * const	fromfile;const char * const	tofile;{	register char *	fromname;	register char *	toname;	if (fromfile[0] == '/')		fromname = ecpyalloc(fromfile);	else {		fromname = ecpyalloc(directory);		fromname = ecatalloc(fromname, "/");		fromname = ecatalloc(fromname, fromfile);	}	if (tofile[0] == '/')		toname = ecpyalloc(tofile);	else {		toname = ecpyalloc(directory);		toname = ecatalloc(toname, "/");		toname = ecatalloc(toname, tofile);	}	/*	** We get to be careful here since	** there's a fair chance of root running us.	*/	if (!itsdir(toname))		(void) remove(toname);	if (link(fromname, toname) != 0) {		if (mkdirs(toname) != 0)			(void) exit(EXIT_FAILURE);		if (link(fromname, toname) != 0) {			(void) fprintf(stderr, _("%s: Can't link from %s to "),				progname, fromname);			(void) perror(toname);			(void) exit(EXIT_FAILURE);		}	}	ifree(fromname);	ifree(toname);}