From: Nicolas Perotin <nperotin@ifhamy.insa-lyon.fr>
Subject: VladBot 3.0 for K&R/C
To: irvdwijk@cs.vu.nl
Date: Fri, 10 Feb 1995 16:49:57 +0100 (MET)

> Btw, could you mail me a very detailed description of HOW you got the bot to
> compile with CC (including stuff like ftp-adresses for unprotoize etc), I've
> received lots of requests for this..

1. Get Unproto5 (latest version currently available) from any ftp site
(I think Unproto4 will do it also, but i didn't tried it)

Here is a short list of sites where you can find it:

 UNPROTO5.SHAR.Z 48493 BYTES: (Shared/Compressed version)
     * /cs.bu.edu:/pub/unproto/unproto5.shar.Z 93-06-20
     * /cs-ftp.bu.edu:/pub/unproto/unproto5.shar.Z 93-06-20
     * /svin02.info.win.tue.nl:/pub/programming/unproto5.shar.Z 93-06-17
     * /svin02.info.win.tue.nl:/pub/unix/unproto5.shar.Z 93-06-17

 UNPROTO5.TAR.GZ 30693 BYTES: (Tarred/gziped version)
     * /uceng.uc.edu:/pub/wuarchive/packages/first-virtual/code/other/unpr
       oto5.tar.gz 94-10-20

 UNPROTO.TAR 122880 BYTES: (Tarred only version)
     * /uceng.uc.edu:/pub/wuarchive/packages/first-virtual/code/other/unpr
       oto5.tar 94-10-20


2. Install the archive and compile the new cpp.

Unproto patch the original cpp command, which transform the ANSI source in K&R
Read the README file in the unproto archive for operations to compile the new 
cpp.


3. Modify the Makefile for vladbot:
add option	-Qpath "directory where is the new cpp"
and option	-I"directory where are the ANSI/C includes" 
in the CFLAGS of the Makefile for your system

The first option tell cc to use the new cpp instead of the standard one.
The second tell cc to search includes in the directory specified above. Use
the directory of unproto, which contains ANSI/C includes (such as stdargs.h, 
etc...)	


4. Compile the bot using this new cpp. the compiler shouldn't find errors on 
ANSI/C syntax.

The compiler will find errors for assignment in declaration of arrays, such as
'automatic assignment not allowed'.

Edit the .c which causes the error, and rewrite the line in K&R C.
example:
		char dummy[] = "";
should become
		char dummy[];
		dummy[0] = '\0';

Some other error may be caused by
		char *dummy[] = { "dummy line", "dummy line 2", ... };
it should become
		char *dummy[x]; /* where x is the nb of elements */
		dummy[0]=strcpy(malloc(strlen("dummy line")+1),"dummy line");
		dummy[1]=...

Last errors come from 'const'. Just remove the 'const' in the var declaration

You should modify all errors and recompile the bot each time.

--
Nicolas Perotin -- nperotin@ifhamy.insa-lyon.fr -- (PGP Public key available)
Fingerprint=48 9E 6C 51 7B A3 D1 C9  68 AA 9C E5 5A C8 08 35 KeyID=0x10031781 
