date and time created 81/02/19 21:58:17 by dlw
authorDavid Wasley <dlw@ucbvax.Berkeley.EDU>
Fri, 20 Feb 1981 13:58:17 +0000 (05:58 -0800)
committerDavid Wasley <dlw@ucbvax.Berkeley.EDU>
Fri, 20 Feb 1981 13:58:17 +0000 (05:58 -0800)
SCCS-vsn: usr.bin/f77/libF77/lnblnk_.c 1.1

usr/src/usr.bin/f77/libF77/lnblnk_.c [new file with mode: 0644]

diff --git a/usr/src/usr.bin/f77/libF77/lnblnk_.c b/usr/src/usr.bin/f77/libF77/lnblnk_.c
new file mode 100644 (file)
index 0000000..8b1a599
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+char id_lnblnk[] = "@(#)lnblnk_.c      1.1";
+ *
+ * find last occurrence of a non-blank character in string
+ *
+ * calling sequence:
+ *     character*(*) string
+ *     indx = lnblnk (string)
+ * where:
+ *     indx will be the index of the last occurence
+ *     of a non-blank character in string, or zero if not found.
+ */
+
+long lnblnk_(str, slen)
+char *str; long slen;
+{
+       register char *p = str + slen;
+
+       while (--p >= str && *p == ' ' ) ;
+       return((long)(++p - str));
+}