Category : C Source Code
Archive   : C-TOOLBX.ZIP
Filename : PERFDISP.C

 
Output of file : PERFDISP.C contained in archive : C-TOOLBX.ZIP
/* perfdisp.c - measures the performance of disp_page */
#include "stdio.h"

char filename[81] ;
char s[2500] ;
extern int row , col ;
long filesize ;
long top_of_page ;
int ix ;

main()
{
int j , ll ;
char c ;

/* initialize filename , top_of_page and filesize */
strcpy(filename,"< file name >") ;
top_of_page = 3000 ;
filesize = 123456789 ;

/* build list of chars to be displayed */
printf("\n line length:") ;
scanf("%d",&ll) ;
for( j=0 ; j < ll ; j = j+1 )
{ s[j] = ' '+j ; }
s[ll] = '\0' ;

/* set up a standing start */
printf("\n press enter to start") ;
scanf("%c%c",&c,&c) ;

/* display the page 10 times for accuracy */
for(j=1 ; j <= 10 ; j = j+1 )
{ display_page() ; }

printf("\n ** thru **") ;
}

int get_next_char()
{
if( s[ix] == '\0' )
{ ix = 0 ;
return('\0') ;
}
else
{ ix = ix + 1 ;
return( s[ix-1] ) ;
}
}

int move_to(pos)
long pos ;
{
ix = 0 ;
}





  3 Responses to “Category : C Source Code
Archive   : C-TOOLBX.ZIP
Filename : PERFDISP.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/