date and time created 87/02/15 16:03:42 by lepreau
authorJay Lepreau <lepreau@ucbvax.Berkeley.EDU>
Mon, 16 Feb 1987 08:03:42 +0000 (00:03 -0800)
committerJay Lepreau <lepreau@ucbvax.Berkeley.EDU>
Mon, 16 Feb 1987 08:03:42 +0000 (00:03 -0800)
SCCS-vsn: local/sccscmds/sccscmds.2/util/verify.c 1.1
SCCS-vsn: local/sccscmds/sccscmds.ok/util/verify.c 1.1

usr/src/local/sccscmds/sccscmds.2/util/verify.c [new file with mode: 0644]
usr/src/local/sccscmds/sccscmds.ok/util/verify.c [new file with mode: 0644]

diff --git a/usr/src/local/sccscmds/sccscmds.2/util/verify.c b/usr/src/local/sccscmds/sccscmds.2/util/verify.c
new file mode 100644 (file)
index 0000000..cacd50f
--- /dev/null
@@ -0,0 +1,18 @@
+static char Sccsid[] "@(#)verify       2.1";
+/*
+       If `astr1' contains any characters not in `str2' return the
+       offset of the first such character found in `astr1',
+       else return -1.
+*/
+
+verify(astr1,str2)
+char *astr1;
+register char *str2;
+{
+       register char *str1;
+
+       for (str1=astr1; *str1; str1++)
+               if (!any(*str1,str2))
+                       return(str1 - astr1 - 1);
+       return(-1);
+}
diff --git a/usr/src/local/sccscmds/sccscmds.ok/util/verify.c b/usr/src/local/sccscmds/sccscmds.ok/util/verify.c
new file mode 100644 (file)
index 0000000..cacd50f
--- /dev/null
@@ -0,0 +1,18 @@
+static char Sccsid[] "@(#)verify       2.1";
+/*
+       If `astr1' contains any characters not in `str2' return the
+       offset of the first such character found in `astr1',
+       else return -1.
+*/
+
+verify(astr1,str2)
+char *astr1;
+register char *str2;
+{
+       register char *str1;
+
+       for (str1=astr1; *str1; str1++)
+               if (!any(*str1,str2))
+                       return(str1 - astr1 - 1);
+       return(-1);
+}