1 /*- 2 * Copyright (c) 1980 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.proprietary.c% 6 */ 7 8 #ifndef lint 9 static char sccsid[] = "@(#)lnblnk_.c 5.3 (Berkeley) 04/12/91"; 10 #endif /* not lint */ 11 12 /* 13 * find last occurrence of a non-blank character in string 14 * 15 * calling sequence: 16 * character*(*) string 17 * indx = lnblnk (string) 18 * where: 19 * indx will be the index of the last occurence 20 * of a non-blank character in string, or zero if not found. 21 */ 22 23 long lnblnk_(str, slen) 24 char *str; long slen; 25 { 26 register char *p = str + slen; 27 28 while (--p >= str && *p == ' ' ) ; 29 return((long)(++p - str)); 30 } 31