Category : C Source Code
Archive   : STRNG.ZIP
Filename : PHASE1.C

 
Output of file : PHASE1.C contained in archive : STRNG.ZIP
/*

phase1.c - the first phase

Kuba

*/

#include
#include
#include "phase.h"
#include "helpfnc.h"
#include "lex.h"

static int read_file(int nf)
{
enum laelem la;

lex_anal_start();

while((la=lex_anal())!=LA_EOF)
if(la==LA_ERR ||
la==LA_STRING &&
add_string(la_lex_elem.string.addr, la_lex_elem.string.len, nf)<0)
return(1);

printf("Free memory %u KB.\n", coreleft()/1024);
return(0);
}

int phase1(void)
{
int i;

puts("PASS 1: Reading files and creating string table");

start_enum_files();

for(i=0;i {
if(enum_file(1))
return(1);
if(read_file(i))
return(1);
fclose(actfile.fp);
}

printf("%u different strings.\n", top_str);

return(0);
}


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