From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- pkg/system/help/lroff/textlen.x | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 pkg/system/help/lroff/textlen.x (limited to 'pkg/system/help/lroff/textlen.x') 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 +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 -- cgit