summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguido <guido@FreeBSD.org>1994-06-02 20:25:30 +0000
committerguido <guido@FreeBSD.org>1994-06-02 20:25:30 +0000
commitd14fac757a0ff9e57fe8ed77d238656f6db472cf (patch)
tree0759541af9483d7bd862615900161be036428d6e
parent2fdc4a4a0a8975dff8a67c11f60407816a4142c6 (diff)
downloadFreeBSD-src-d14fac757a0ff9e57fe8ed77d238656f6db472cf.zip
FreeBSD-src-d14fac757a0ff9e57fe8ed77d238656f6db472cf.tar.gz
Move skey.h to /usr/include so other packages will be able to use
libskey. (such as wu-ftp and xdm). Editted skey so it matches the standard /usr/include way.
-rw-r--r--lib/libskey/authfile.c2
-rw-r--r--lib/libskey/md4.c2
-rw-r--r--lib/libskey/md4.h13
-rw-r--r--lib/libskey/put.c10
-rw-r--r--lib/libskey/skey_crypt.c3
-rw-r--r--lib/libskey/skeylogin.c4
-rw-r--r--lib/libskey/skeysubr.c2
-rw-r--r--usr.bin/key/skey.c2
-rw-r--r--usr.bin/keyinit/Makefile1
-rw-r--r--usr.bin/keyinit/skeyinit.c2
10 files changed, 18 insertions, 23 deletions
diff --git a/lib/libskey/authfile.c b/lib/libskey/authfile.c
index d93b846..ae7b0ac 100644
--- a/lib/libskey/authfile.c
+++ b/lib/libskey/authfile.c
@@ -11,6 +11,7 @@
#include <syslog.h>
#include <unistd.h>
#include <stdlib.h>
+#include <skey.h>
#if (MAXHOSTNAMELEN < 64) /* AIX weirdness */
#undef MAXHOSTNAMELEN
@@ -20,7 +21,6 @@
#define MAXHOSTNAMELEN 255
#endif
-#include "skey.h"
#include "pathnames.h"
static int isaddr();
diff --git a/lib/libskey/md4.c b/lib/libskey/md4.c
index 84d7661..495f444 100644
--- a/lib/libskey/md4.c
+++ b/lib/libskey/md4.c
@@ -107,7 +107,7 @@
#define gg(A,B,C,D,i,s) A = rot((A + g(B,C,D) + X[i] + C2),s)
#define hh(A,B,C,D,i,s) A = rot((A + h(B,C,D) + X[i] + C3),s)
-void MDreverse __ARGS((unsigned long *X));
+void MDreverse __P((unsigned long *X));
/* MDprint(MDp)
* Print message digest buffer MDp as 32 hexadecimal digits.
diff --git a/lib/libskey/md4.h b/lib/libskey/md4.h
index 5f2e031..c0d3419 100644
--- a/lib/libskey/md4.h
+++ b/lib/libskey/md4.h
@@ -1,8 +1,5 @@
-#ifdef __STDC__
-#define __ARGS(X) X /* For ANSI C */
-#else
-#define __ARGS(X) ()
-#endif
+
+#include <sys/cdefs.h>
/*
*
@@ -23,7 +20,7 @@ typedef struct {
* Input: MD -- an MDptr
* Initialize the MDstruct prepatory to doing a message digest computation.
*/
-extern void MDbegin __ARGS((MDptr MDp));
+extern void MDbegin __P((MDptr MDp));
/* MDupdate(MD,X,count)
* Input: MD -- an MDptr
@@ -37,7 +34,7 @@ extern void MDbegin __ARGS((MDptr MDp));
* every MD computation should end with one call to MDupdate with a
* count less than 512. Zero is OK for a count.
*/
-extern void MDupdate __ARGS((MDptr MDp,unsigned char *X,unsigned int count));
+extern void MDupdate __P((MDptr MDp,unsigned char *X,unsigned int count));
/* MDprint(MD)
* Input: MD -- an MDptr
@@ -45,6 +42,6 @@ extern void MDupdate __ARGS((MDptr MDp,unsigned char *X,unsigned int count));
* Order is from low-order byte of buffer[0] to high-order byte of buffer[3].
* Each byte is printed with high-order hexadecimal digit first.
*/
-extern void MDprint __ARGS((MDptr MDp));
+extern void MDprint __P((MDptr MDp));
/* End of md4.h */
diff --git a/lib/libskey/put.c b/lib/libskey/put.c
index 1ef1ec0..0f62d22 100644
--- a/lib/libskey/put.c
+++ b/lib/libskey/put.c
@@ -2,12 +2,12 @@
#include <string.h>
#include <assert.h>
#include <ctype.h>
-#include "skey.h"
+#include <skey.h>
-static unsigned long extract __ARGS((char *s,int start,int length));
-static void standard __ARGS((char *word));
-static void insert __ARGS((char *s, int x, int start, int length));
-static int wsrch __ARGS((char *w,int low,int high));
+static unsigned long extract __P((char *s,int start,int length));
+static void standard __P((char *word));
+static void insert __P((char *s, int x, int start, int length));
+static int wsrch __P((char *w,int low,int high));
/* Dictionary for integer-word translations */
char Wp[2048][4] = {
diff --git a/lib/libskey/skey_crypt.c b/lib/libskey/skey_crypt.c
index ca1024f..b61bef0 100644
--- a/lib/libskey/skey_crypt.c
+++ b/lib/libskey/skey_crypt.c
@@ -3,8 +3,7 @@
#include <string.h>
#include <stdio.h>
#include <pwd.h>
-
-#include "skey.h"
+#include <skey.h>
/* skey_crypt - return encrypted UNIX passwd if s/key or regular password ok */
diff --git a/lib/libskey/skeylogin.c b/lib/libskey/skeylogin.c
index bc49cb7..f2d4104 100644
--- a/lib/libskey/skeylogin.c
+++ b/lib/libskey/skeylogin.c
@@ -19,12 +19,12 @@
#include <sys/stat.h>
#include <time.h>
#include <errno.h>
-#include "skey.h"
+#include <skey.h>
#define KEYFILE "/etc/skeykeys"
char *skipspace();
-int skeylookup __ARGS((struct skey *mp,char *name));
+int skeylookup __P((struct skey *mp,char *name));
#define setpriority(x,y,z) /* nothing */
diff --git a/lib/libskey/skeysubr.c b/lib/libskey/skeysubr.c
index 9762f1a..bfac3a3 100644
--- a/lib/libskey/skeysubr.c
+++ b/lib/libskey/skeysubr.c
@@ -8,8 +8,8 @@
#include <fcntl.h>
#include <termios.h>
#endif
+#include <skey.h>
#include "md4.h"
-#include "skey.h"
#if (defined(__MSDOS__) || defined(MPU8086) || defined(MPU8080) \
|| defined(vax) || defined (MIPSEL))
diff --git a/usr.bin/key/skey.c b/usr.bin/key/skey.c
index e025312..d1bc239 100644
--- a/usr.bin/key/skey.c
+++ b/usr.bin/key/skey.c
@@ -18,7 +18,7 @@
#include <fcntl.h>
#endif
#include "libskey/md4.h"
-#include "libskey/skey.h"
+#include <skey.h>
char *readpass();
void usage();
diff --git a/usr.bin/keyinit/Makefile b/usr.bin/keyinit/Makefile
index 4c44d30..a716f14 100644
--- a/usr.bin/keyinit/Makefile
+++ b/usr.bin/keyinit/Makefile
@@ -4,7 +4,6 @@
PROG= keyinit
MAN1= keyinit.1
-CFLAGS+=-I${.CURDIR}/../../lib
DPADD= /usr/bin/libskey.a
LDADD= -lskey
diff --git a/usr.bin/keyinit/skeyinit.c b/usr.bin/keyinit/skeyinit.c
index d13bd6b..bf110c8 100644
--- a/usr.bin/keyinit/skeyinit.c
+++ b/usr.bin/keyinit/skeyinit.c
@@ -4,7 +4,7 @@
#include <stdio.h>
#include <string.h>
#include <pwd.h>
-#include "libskey/skey.h"
+#include <skey.h>
#include <stdio.h>
#include <time.h>
OpenPOWER on IntegriCloud