aboutsummaryrefslogtreecommitdiff
path: root/pkg/system/help/lroff/textlen.x
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /pkg/system/help/lroff/textlen.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'pkg/system/help/lroff/textlen.x')
-rw-r--r--pkg/system/help/lroff/textlen.x20
1 files changed, 20 insertions, 0 deletions
diff --git a/pkg/system/help/lroff/textlen.x b/pkg/system/help/lroff/textlen.x
new file mode 100644
index 00000000..e192314f
--- /dev/null
+++ b/pkg/system/help/lroff/textlen.x
@@ -0,0 +1,20 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <chars.h>
+include "lroff.h"
+
+# TEXTLEN -- Return the number of printable characters in a text string.
+
+int procedure textlen (text_string)
+
+char text_string[ARB]
+int ip, nchars
+
+begin
+ nchars = 0
+ for (ip=1; text_string[ip] != EOS; ip=ip+1)
+ if (!INVISIBLE (text_string[ip]))
+ nchars = nchars + 1
+
+ return (nchars)
+end