Category : Databases and related files
Archive   : TCLOCK1.ZIP
Filename : DUM.C

 
Output of file : DUM.C contained in archive : TCLOCK1.ZIP
/* A program to dump the contents of a .log file
9/89
*/


#include
#include

main(argc,argv)
int argc;
char *argv[];
{
FILE *fp;
int i,j;
char s[14];

strcpy(s, argv[1]);

if(!(fp=fopen(s,"r+b"))) exit(1);

j = 0;
printf("\nClock log file dump utility.\n\n\n");
while(!feof(fp))
{
fread(&i, sizeof(i), 1, fp);

if(!feof(fp))
{
if(j == 0)
printf("User ID: %d \n",i);
if(j == 1)
printf("Clock In: Sec-%d",i);
if(j == 2)
printf(" Min-%d",i);
if(j == 3)
printf(" Hour-%d\n",i);
if(j == 4)
printf("Clock In: Day-%d",i);
if(j == 5)
printf(" Mnth-%d",i);
if(j == 6)
printf(" Year-%d\n",i);
if(j == 8)
printf("Clock Out: Sec-%d",i);
if(j == 9)
printf(" Min-%d",i);
if(j == 10)
printf(" Hour-%d\n",i);
if(j == 11)
printf("Clock Out: Day-%d",i);
if(j == 12)
printf(" Mnth-%d",i);
if(j == 13)
{
printf(" Year-%d\n\n",i);
j = -1;
}

}
j++;

}

}


  3 Responses to “Category : Databases and related files
Archive   : TCLOCK1.ZIP
Filename : DUM.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/