ln.c revision cc6c5292fa8a241fe50604cf6a918edfbf7cd7d2
/*
* Copyright 1991 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* ln
*/
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
int fflag; /* force flag set? */
int sflag;
int linkit(char *, char *);
void Perror(char *);
int
{
int i, r;
fflag++;
argv++;
argc--;
}
sflag++;
argv++;
argc--;
}
if (argc == 0)
goto usage;
else if (argc == 1) {
argc++;
}
if (argc > 2) {
goto usage;
goto usage;
}
r = 0;
for (i = 0; i < argc-1; i++)
exit(r);
"Usage: ln [-f] [-s] f1\n\
ln [-f] [-s] f1 f2\n\
ln [-f] [-s] f1 ... fn d1\n");
return (1);
}
int
{
char *tail;
char *strrchr();
/* is target a directory? */
return (1);
}
if (tail == 0)
else
tail++;
return (1);
}
}
else
return (1);
}
return (0);
}
void
Perror(char *s)
{
perror(s);
}