#charset "UTF-8"

#include <tads.h>
#include <file.h>
#include <date.h>
#include <charset.h>

//  use of "tab" tag with "multiple" attribute

main()
{
"<br>";
"XTads T2 banner test";
"
";
"<BR HEIGHT=0>";
"<TAB MULTIPLE=4>Should show a top aligned status line";


/*
"<br>line1
<BR HEIGHT=0><tab multiple=4>line2 line2";
*/

/*
"aaaaaaaaa <tab id=t1>Bbbbbbbbbbbbbbbbbbbbbbbb <tab id=t2>Cccccccccccccc <tab id=t3>Ddddddd <tab id=t4>Eeee <tab id=t5>Ffffffffff<br>
?<tab to=t1>B<tab to=t2>C<tab to=t3>D<tab to=t4>Ee<tab to=t5>F<br>";
inputKey();
*/

/*
"aaa<br>
<ol>
	<li>1</li>
	<li>22<tab multiple=4>2a</li>
	<li><tab multiple=4>3</li>
</ol>
<br>bbb";
inputKey();
*/

/*
"aaa<br>
<ul>
	<li>1</li>
	<li>22<tab multiple=4>2a</li>
</ul>
<br>bbb";
inputKey();
*/

/* indent_2 bug:
"<br>
x <tab indent=1>x <tab indent=1> x<tab indent=1> x<br>
xx <tab indent=1> x <tab indent=1> x <tab indent=1>x <br>
";
inputKey();
*/

/* indent_3 bug:
"xxxxx<br>
<tab indent=4><br>
yyyyyy
";
inputKey();
*/

/* id_15c bug:
"aaaaaaa|<tab id=t1>bbbbbbbbbbbbb|<tab id=t2 align=right>cccccccccc|<tab id=t3>dddddddddd<br>";
//"<tab to=t1><tab to=t2>ccc<tab to=t3>ddd<br>";
"<tab to=t1><tab to=t2><br>";
	// !!! bug trigged by this line
	// get 4 actual tab chars - should be 3
	// recalc does: t1 t2 t1 t2 -- but not t3
	// para's old tabs stops are; t1 t2 t1 t2 t3 -- WHAT?!
		// it's because we're adding tabstops that don't get corresponding tab chars
"<tab to=t1><tab to=t2><tab to=t3>ddd<br>";
*/

/*
"aaaaaaa|<tab id=t1>bbbbbbbbbbbbb|<tab id=t2 align=right>cccccccccc|<tab id=t3>dddddddddd|<tab id=t4 align=center>eeeeeeee|<tab id=t5>ffffffff<br>";
"<tab to=t1><tab to=t2>ccc<tab to=t3>ddd<tab to=t4>eee<tab to=t5>fff<br>";
"<tab to=t1><tab to=t2><br>";
	// !!! bug trigged by this line
"<tab to=t1><tab to=t2><tab to=t3>ddd<tab to=t4>eee<tab to=t5>fff<br>";
*/

/*
	local texts = 
'xxxxxxxxxxxxx<br>\
<tab align=center>r<br>\
<tab align=center>Cr<tab align=center>s<br>\
';

	local b0 = nil;
	"<<texts>>";
	inputKey();
    
    local b1 = bannerCreate(b0, BannerFirst, nil, BannerTypeText, BannerAlignRight,
                       50, BannerSizePercent,
                       BannerStyleBorder);
    //bannerSay(b1, texts);
	inputKey();

	bannerDelete(b1);
	inputKey();
*/

/*
	local texts = 
'xxxxxxxxxxxxx<br>\
abbbbbbbbbbbbbbbbbbbb<tab align=center>rs<br>\
';

	local b0 = nil;
	"<<texts>>";
	inputKey();
    
    local b1 = bannerCreate(b0, BannerFirst, nil, BannerTypeText, BannerAlignLeft,
                       50, BannerSizePercent,
                       BannerStyleBorder);
   bannerSay(b1, texts);
	inputKey();

    local b2 = bannerCreate(b1, BannerFirst, nil, BannerTypeText, BannerAlignRight,
                       50, BannerSizePercent,
                       BannerStyleBorder);
    bannerSay(b2, texts);
	inputKey();
	
	bannerDelete(b2);
	inputKey();

	bannerDelete(b1);
	inputKey();
*/

/*
"xxxxxxxxxxxxxxxxxxxxxx<br>
<tab align=center>r<br>
<tab align=center>r<tab align=center>s<br>";
*/

/*
"xxxxxxxxxxxxxxxxxxxxxx<br>
<tab align=center>cccc<br>
ab<tab align=center>cccc<br>
asasas<tab align=center>cccc<br>
aswwwwwwwwwwwwwwwwwwwwwasas<tab align=center>cccc<br>";
*/

/*
 "----------<tab id=one>1----.<tab id=two align=decimal dp='.'>2---------------<tab id=three>3";
 "---<tab id=four>4-----------------<tab id=five>5---------";
 "--------<tab id=six>6------\n";
 "<tab to=two>dec.2 <tab to=three align=right>three-right\n";
*/

/*
 "----------<tab id=one>1----.<tab id=two>2---------------<tab id=three>3";
 "---<tab id=four>4-----------------<tab id=five>5---------";
 "--------<tab id=six>6------\n";
 "<tab to=two align=decimal dp='.'>dec.2 <tab to=three align=right>three-right\n";
*/

/*
 "----------<tab id=one>1-----<tab id=two>2---------------<tab id=three>3";
 "---<tab id=four>4-----------------<tab id=five>5---------";
 "--------<tab id=six>6------\n";
 "<tab to=one align=center>one-center<tab to=two>two\n";
*/

/*
 "----------<tab id=one>1-----<tab id=two>2---------------<tab id=three>3";
 "---<tab id=four>4-----------------<tab id=five>5---------";
 "--------<tab id=six>6------\n";
 "<tab to=one>one<tab to=three>three\n";
 "<tab to=two>two<tab to=four>four\n";
 "<tab to=one align=center>one-center<tab to=two>two\n";
*/

/*
 "----------<tab id=one>1-----<tab id=two>2---------------<tab id=three>3";
 "---<tab id=four>4-----------------<tab id=five>5---------";
 "--------<tab id=six>6------\n";
 "<tab to=one>one<tab to=three>three\n";
 "<tab to=two>two<tab to=four>four\n";
 "<tab to=one align=center>one-center<tab to=two>two
 <tab to=three align=right>three-right\n";
*/

/*
"<tab multiple=4>x<tab multiple=4>x<tab multiple=4>x<br>
x<tab multiple=4>x<tab multiple=4>x<tab multiple=4>x<br>
xx<tab multiple=4>x<tab multiple=4>x<tab multiple=4>x<br>
xxx<tab multiple=4>x<tab multiple=4>x<tab multiple=4>x<br>
xxxx<tab multiple=4>x<tab multiple=4>x<tab multiple=4>x<br>
xxxxx<tab multiple=4>x<tab multiple=4>x<tab multiple=4>x<br>";
*/

/* plant extra nl bug: 
"off the road. ";
"<BR HEIGHT=0>";
"<TAB indent=7>";
"<BR HEIGHT=0>";
"<BR HEIGHT=0>";
"Your boss Mr.&nbsp;Teeterwaller is ";
*/

/* plant extra nl bug: 
"off the<tab id=t1> road. ";
"<BR HEIGHT=0>";
"<TAB to=t1>" ;  // caused bug
"<BR HEIGHT=0>";
"<BR HEIGHT=0>";
"Your boss Mr.&nbsp;Teeterwaller is ";
*/

/* plant extra nl bug:
"off the road. ";
"<BR HEIGHT=0>";
"<TAB MULTIPLE=4>" ; // caused bug
"<BR HEIGHT=0>";
"<BR HEIGHT=0>";
"<TAB MULTIPLE=4>Your boss Mr.&nbsp;Teeterwaller is ";
*/

/* plant sign alignment bug:
//"<br>";
"Road, near car";
"<BR HEIGHT=0>";
"<TAB MULTIPLE=4>The road stretches off into the dim moonlight to the east and";
" ";
"west.  Mr.&nbsp;Teeterwaller's car sits in the shoulder, parked just slightly";
" ";
"off the road.";
*/

/*
// plant sign alignment bug:
"before
<blockquote><font face='TADS-Sans'>Conners City&nbsp;&nbsp;&nbsp;&nbsp;<tab 
id=dist>25 mi <br>Knighting<tab to=dist>37 mi <br>Milltown<tab to=dist>51 mi 
</font></blockquote>
after";
*/

//"a<tab>b<tab>c<tab><tab>d";

//"<tab multiple=0><tab multiple=0>a";

/*
"a<br>";
"<tab multiple=1>a<br>";
"<tab multiple=1><tab multiple=1>a<br>";
"<tab multiple=1><tab multiple=1><tab multiple=1>a<br>";
"<tab multiple=1><tab multiple=1><tab multiple=1><tab multiple=1>a<br>";
*/

//"a<tab multiple=1>b";

//inputKey();
}
