Files
Sepp J Morris 31738079c4 Upload
Digital Research
2020-11-06 18:50:37 +01:00

27 lines
896 B
C
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*----------------------------------------------------------------------*\
| NAME : tabinit |
| CREATED : 23-August-83 LAST MODIFIED: 19-September-83 |
| FUNCTION: Tabinit initializes a tab position array used to |
| determine how many spaces to replace the tab with. |
| INPUT : tabstop -- ptr to tab stop array |
| max_len -- length of tabstop array |
| OUTPUT : Tabstop array initialized: 1 at tab stop colums and |
| zero elsewhere. |
| No return value. |
\*----------------------------------------------------------------------*/
#include <portab.h>
VOID tabinit( tabstop,max_len,tabpos )
WORD tabstop[];
WORD max_len;
WORD tabpos;
{
WORD col;
tabstop[0] = 0; /* using 1 index addr. */
for( col=1; col < max_len; col++ ) /* tabstop[0] not used */
tabstop[col] = ( (col % tabpos) == 1 );
}