diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
commit | fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch) | |
tree | bdda434976bc09c864f2e4fa6f16ba1952b1e555 /pkg/xtools/gstrsettab.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'pkg/xtools/gstrsettab.x')
-rw-r--r-- | pkg/xtools/gstrsettab.x | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/pkg/xtools/gstrsettab.x b/pkg/xtools/gstrsettab.x new file mode 100644 index 00000000..ef7d5f68 --- /dev/null +++ b/pkg/xtools/gstrsettab.x @@ -0,0 +1,23 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +# GSTRSETTAB -- Procedure to set tabs, using the integer array tabs. +# The first tabstop is set at first_tabstop, with subsequent tabstops +# at tabsize intervals. + +procedure gstrsettab (tabs, maxtabs, first_tabstop, tabsize) + +int tabs[ARB], first_tabstop, tabsize +int i, maxtabs + +begin + for (i=1; i <= maxtabs; i = i + 1) { + if (i < first_tabstop) + tabs[i] = NO + else if (i == first_tabstop) + tabs[i] = YES + else if (mod ((i - first_tabstop), tabsize) == 0) + tabs[i] = YES + else + tabs[i] = NO + } +end |