Make 'fortran float sin(), cos();' work with gcc by replacing it with
[unix-history] / usr / src / usr.bin / f77 / libF77 / lnblnk_.c
CommitLineData
5b707b9f 1/*
989888af
RE
2 * Copyright (c) 1980 Regents of the University of California.
3 * All rights reserved. The Berkeley software License Agreement
4 * specifies the terms and conditions for redistribution.
5b707b9f 5 *
bb3ec388
RE
6 * @(#)lnblnk_.c 5.2 %G%
7 *
5b707b9f
DW
8 * find last occurrence of a non-blank character in string
9 *
10 * calling sequence:
11 * character*(*) string
12 * indx = lnblnk (string)
13 * where:
14 * indx will be the index of the last occurence
15 * of a non-blank character in string, or zero if not found.
16 */
17
18long lnblnk_(str, slen)
19char *str; long slen;
20{
21 register char *p = str + slen;
22
23 while (--p >= str && *p == ' ' ) ;
24 return((long)(++p - str));
25}