while I am ignorant of C language,
1. I remember somewhere that the file should end with "while1",I did not find any such.
2. __config .... is used in asm
3. you need to know basically which C is this as there are many variants.
4. the include files , especially the delay.c is needed for any compilation.
PS: the C is Hi-Tech C, as indicated in article
the definitions were modified and a new file attached. you may even delete the"delay.c"
Can you try this file please?