From 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 Mon Sep 17 00:00:00 2001 From: Joe Hunkeler Date: Tue, 11 Aug 2015 16:51:37 -0400 Subject: Repatch (from linux) of OSX IRAF --- sys/fmtio/stridx.x | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 sys/fmtio/stridx.x (limited to 'sys/fmtio/stridx.x') diff --git a/sys/fmtio/stridx.x b/sys/fmtio/stridx.x new file mode 100644 index 00000000..dda74f5a --- /dev/null +++ b/sys/fmtio/stridx.x @@ -0,0 +1,17 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +# STRIDX -- Return the index of the first occurrence of a character in a +# string. + +int procedure stridx (ch, str) + +char ch, str[ARB] +int ip + +begin + do ip = 1, ARB + if (str[ip] == EOS) + return (0) + else if (str[ip] == ch) + return (ip) +end -- cgit