- Code: Select all
int V=112,M=136,P=8e3,C=799,X,Y,Q,N,
I'm pretty sure that in C99 it is still allowed to leave out the 'int ' here,
making it an implicit type declaration and having 4 chars saved (same
as was already done with main).
- Code: Select all
V=112,M=136,P=8e3,C=799,X,Y,Q,N,
The 'ints' can't be removed from the local variable declarations though, but they can
be removed from the function prototypes.
- Code: Select all
D(k,q,l,e,x,n)
int k,q,l,e,x,n;
Actually, the whole prototype can go, saving 16:
- Code: Select all
D(k,q,l,e,x,n)
While we're at it, this one looks wasteful:
- Code: Select all
char n[]=".?pnkbrq?P?NKBRQ";
The array can be made implicitly, and n changed into a pointer,
which seems safe to me in this case:
- Code: Select all
char *n=".?pnkbrq?P?NKBRQ";
Then we have the issue of main's locals:
- Code: Select all
main()
{
int k=8,*p,c[9],d;
Doing this costs 4 chars and is not needed. Just lump
them together with the other globals. 'd' then gets in a naming
conflict, so rename it into 'e'.
- Code: Select all
V=112,M=136,P=8e3,C=799,X,Y,Q,N,
d[]={-16,-15,-17,0,1,16,0,1,16,15,17,0,14,18,31,33,0,
1,1,3,-1,3,5,9,
7,-1,11,6,8,3,6},
k=8,*p,c[9],e;
^
...
main()
...
{e=6;N=0;W N<1e6)D(k,-P,P,Q,8,e++);}
^ ^
So 25 off, we're well below 1000 now.