File: gstrsettab.x

package info (click to toggle)
iraf 2.18.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 86,000 kB
  • sloc: ansic: 115,890; fortran: 74,576; lisp: 18,888; yacc: 5,642; sh: 961; lex: 596; makefile: 509; asm: 159; csh: 54; xml: 33; sed: 4
file content (23 lines) | stat: -rw-r--r-- 604 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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