stever@videovax.TEK.COM (10/20/86)
I have kept a running list of changes and updates to Dave Wecker's vt100.
The following diffs are for version 2.2. The diff to init.c corrects a
problem pointed out by Dawn Banks in article <4625@decwrl.DEC.COM>
(posted on August 4th). Lattice C is unable to cope with the construct
[n+1]. To avoid problems here, all occurrences of [n+1] are replaced by
[nplus1], which is defined as an int and set equal to n+1 (surprise!).
The diffs to kermit.c and script.c are taken from a very recent article
by Dave Wecker (<5980@decwrl.DEC.COM>). These correct problems that
he found. Dave also mentioned the need to remove a couple of lines
from vt100.h, but this was apparently done by the mod.amiga.sources
moderator.
The changes to init.c will suit it to the Lattice compiler without
breaking Manx.
Steve Rice
----------------------------------------------------------------------------
{decvax | hplabs | ihnp4 | uw-beaver}!tektronix!videovax!stever
============================================================================
*** init.c.orig Thu Oct 16 11:12:11 1986
--- init.c Fri Oct 17 18:25:03 1986
***************
*** 349,355
/*****************************************************************/
void InitFileItems()
{
! int n;
/* initialize each menu item and IntuiText with loop */
for( n=0; n<FILEMAX; n++ )
--- 349,355 -----
/*****************************************************************/
void InitFileItems()
{
! int n, nplus1;
/* initialize each menu item and IntuiText with loop */
for( n=0; n<FILEMAX; n++ )
***************
*** 354,360
/* initialize each menu item and IntuiText with loop */
for( n=0; n<FILEMAX; n++ )
{
! FileItem[n].NextItem = &FileItem[n+1];
FileItem[n].LeftEdge = 0;
FileItem[n].TopEdge = 10 * n;
FileItem[n].Width = 120;
--- 354,361 -----
/* initialize each menu item and IntuiText with loop */
for( n=0; n<FILEMAX; n++ )
{
! nplus1 = n+1;
! FileItem[n].NextItem = &FileItem[nplus1];
FileItem[n].LeftEdge = 0;
FileItem[n].TopEdge = 10 * n;
FileItem[n].Width = 120;
***************
*** 395,401
/************************************************************************/
void InitCommItems()
{
! int n;
/* initialize each menu item and IntuiText with loop */
for( n=0; n<COMMAX; n++ )
--- 396,402 -----
/************************************************************************/
void InitCommItems()
{
! int n, nplus1;
/* initialize each menu item and IntuiText with loop */
for( n=0; n<COMMAX; n++ )
***************
*** 400,406
/* initialize each menu item and IntuiText with loop */
for( n=0; n<COMMAX; n++ )
{
! CommItem[n].NextItem = &CommItem[n+1];
CommItem[n].LeftEdge = 0;
CommItem[n].TopEdge = 10 * n;
CommItem[n].Width = 88;
--- 401,408 -----
/* initialize each menu item and IntuiText with loop */
for( n=0; n<COMMAX; n++ )
{
! nplus1 = n+1;
! CommItem[n].NextItem = &CommItem[nplus1];
CommItem[n].LeftEdge = 0;
CommItem[n].TopEdge = 10 * n;
CommItem[n].Width = 88;
***************
*** 436,442
for( n=0; n<RSMAX; n++ )
{
! RSItem[n].NextItem = &RSItem[n+1];
RSItem[n].LeftEdge = 75;
RSItem[n].TopEdge = 10 * n;
RSItem[n].Width = 56;
--- 438,445 -----
for( n=0; n<RSMAX; n++ )
{
! nplus1 = n+1;
! RSItem[n].NextItem = &RSItem[nplus1];
RSItem[n].LeftEdge = 75;
RSItem[n].TopEdge = 10 * n;
RSItem[n].Width = 56;
***************
*** 484,490
for( n=0; n<PARMAX; n++ )
{
! ParItem[n].NextItem = &ParItem[n+1];
ParItem[n].LeftEdge = 75;
ParItem[n].TopEdge = 10 * n;
ParItem[n].Width = 56;
--- 487,494 -----
for( n=0; n<PARMAX; n++ )
{
! nplus1 = n+1;
! ParItem[n].NextItem = &ParItem[nplus1];
ParItem[n].LeftEdge = 75;
ParItem[n].TopEdge = 10 * n;
ParItem[n].Width = 56;
***************
*** 525,531
/* initialize each menu item and IntuiText with loop */
for( n=0; n<XFMAX; n++ )
{
! XFItem[n].NextItem = &XFItem[n+1];
XFItem[n].LeftEdge = 75;
XFItem[n].TopEdge = 10 * n;
XFItem[n].Width = 80;
--- 529,536 -----
/* initialize each menu item and IntuiText with loop */
for( n=0; n<XFMAX; n++ )
{
! nplus1 = n+1;
! XFItem[n].NextItem = &XFItem[nplus1];
XFItem[n].LeftEdge = 75;
XFItem[n].TopEdge = 10 * n;
XFItem[n].Width = 80;
***************
*** 563,569
/*****************************************************************/
void InitScriptItems()
{
! int n;
/* initialize each menu item and IntuiText with loop */
for( n=0; n<SCRIPTMAX; n++ )
--- 568,574 -----
/*****************************************************************/
void InitScriptItems()
{
! int n, nplus1;
/* initialize each menu item and IntuiText with loop */
for( n=0; n<SCRIPTMAX; n++ )
***************
*** 568,574
/* initialize each menu item and IntuiText with loop */
for( n=0; n<SCRIPTMAX; n++ )
{
! ScriptItem[n].NextItem = &ScriptItem[n+1];
ScriptItem[n].LeftEdge = 0;
ScriptItem[n].TopEdge = 10 * n;
ScriptItem[n].Width = 128;
--- 573,580 -----
/* initialize each menu item and IntuiText with loop */
for( n=0; n<SCRIPTMAX; n++ )
{
! nplus1 = n+1;
! ScriptItem[n].NextItem = &ScriptItem[nplus1];
ScriptItem[n].LeftEdge = 0;
ScriptItem[n].TopEdge = 10 * n;
ScriptItem[n].Width = 128;
***************
*** 602,608
/*****************************************************************/
void InitUtilItems()
{
! int n;
/* initialize each menu item and IntuiText with loop */
for( n=0; n<UTILMAX; n++ )
--- 608,614 -----
/*****************************************************************/
void InitUtilItems()
{
! int n, nplus1;
/* initialize each menu item and IntuiText with loop */
for( n=0; n<UTILMAX; n++ )
***************
*** 607,613
/* initialize each menu item and IntuiText with loop */
for( n=0; n<UTILMAX; n++ )
{
! UtilItem[n].NextItem = &UtilItem[n+1];
UtilItem[n].LeftEdge = 0;
UtilItem[n].TopEdge = 10 * n;
UtilItem[n].Width = 88;
--- 613,620 -----
/* initialize each menu item and IntuiText with loop */
for( n=0; n<UTILMAX; n++ )
{
! nplus1 = n+1;
! UtilItem[n].NextItem = &UtilItem[nplus1];
UtilItem[n].LeftEdge = 0;
UtilItem[n].TopEdge = 10 * n;
UtilItem[n].Width = 88;
============================================================================
*** kermit.c.orig Sat Oct 18 02:09:46 1986
--- kermit.c Sat Oct 18 02:14:22 1986
***************
*** 784,790
data[3] = ctl(MYPCHAR);
data[4] = tochar(MYEOL);
data[5] = MYQUOTE;
! if ((p_parity >= 0) || ebqflg) { /* 8-bit quoting... */
data[6] = MYEBQ; /* If parity or flag on, send &. */
if ((ebq > 0040 && ebq < 0100) || /* If flag off, then turn it on */
(ebq > 0140 && ebq < 0177) || /* if other side has asked us to */
--- 784,790 -----
data[3] = ctl(MYPCHAR);
data[4] = tochar(MYEOL);
data[5] = MYQUOTE;
! if ((p_parity > 0) || ebqflg) { /* 8-bit quoting... */
data[6] = MYEBQ; /* If parity or flag on, send &. */
if ((ebq > 0040 && ebq < 0100) || /* If flag off, then turn it on */
(ebq > 0140 && ebq < 0177) || /* if other side has asked us to */
***************
*** 811,817
if (data[6] == 0) return;
ebq = data[6];
if ((ebq > 040 && ebq < 0100) || (ebq > 0140 && ebq < 0177)) ebqflg = 1;
! else if (((p_parity >= 0) || ebqflg) && (ebq == 'Y')) {
ebqflg = 1;
ebq = '&';
}
--- 811,817 -----
if (data[6] == 0) return;
ebq = data[6];
if ((ebq > 040 && ebq < 0100) || (ebq > 0140 && ebq < 0177)) ebqflg = 1;
! else if (((p_parity > 0) || ebqflg) && (ebq == 'Y')) {
ebqflg = 1;
ebq = '&';
}
============================================================================
*** script.c.orig Sat Oct 18 02:05:58 1986
--- script.c Sat Oct 18 02:09:32 1986
***************
*** 339,344
exit_script();
script_start(p);
}
}
void cmd_ks(file)
--- 339,345 -----
exit_script();
script_start(p);
}
+ else exit_script();
}
void cmd_ks(file)
============================================================================