Category : C Source Code
Archive   : TCCLB2.ZIP
Filename : FINDDOWN.C

 
Output of file : FINDDOWN.C contained in archive : TCCLB2.ZIP
#include

typedef struct {
int x;
int y;
int Len;
int Type;
char *Address;
int EditFlag;
int NumDecimals;
} FieldStruc;

int FindDown( FieldStruc *Field, int pos, int NUMFIELDS )
{
register int i;
register int choice = -1;
register int abs1, abs2;
register FieldStruc *FS1, *FS3, *FS2=Field + pos;

FS1 = Field;
for (i=0; i if ( i == pos ) goto Increment;
if ( FS1->EditFlag == 0 ) goto Increment;
if ( FS1->y <= FS2->y ) goto Increment;
abs2 = abs( FS1->x - FS2->x );
if ( abs2 > 40 ) goto Increment;
if ( choice == -1 ) {
choice = i;
FS3 = FS1;
abs1 = abs2;
}
else
if ( FS1->y < FS3->y || ( FS1->y == FS3->y && abs2 < abs1 ) ) {
choice = i;
FS3 = FS1;
abs1 = abs2;
}
Increment:
FS1++;
}
if ( choice == -1 )
return( pos );
else
return( choice );
}


  3 Responses to “Category : C Source Code
Archive   : TCCLB2.ZIP
Filename : FINDDOWN.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/