head	1.3;
access;
symbols
	SLASHEM_0_0_6E5F2:1.2
	SLASHEM_0_0_6E4F6:1.2;
locks; strict;
comment	@# @;


1.3
date	2001.12.11.20.43.49;	author j_ali;	state dead;
branches;
next	1.2;

1.2
date	2001.09.18.22.20.21;	author j_ali;	state Exp;
branches;
next	1.1;

1.1
date	2001.09.06.18.06.38;	author j_ali;	state Exp;
branches;
next	;


desc
@@


1.3
log
@Implemented NhExt sub-protocol 1

A hacked up version of the proxy window interface can now be built.
This has both the client (the game) and the server (the window
interface) in the same executable.

Caveats:

* NhExt sub-protocol 0 isn't supported yet;
* The server side is hard-coded to use the GTK2 window port.
* Call backs aren't implemented (and nor do we have a spec. yet).
* There is no facility for defining non-standard remote procedures
  (even though the NhExt specification has provision for them).
@
text
@# $Id: Makefile,v 1.2 2001/09/18 22:20:21 j_ali Exp $
# Copyright (c) Slash'EM Development Team 2001
# NetHack may be freely redistributed.  See license for details.
#
# This makefile is for maintainer use. It is not needed when building the game.

AWK = awk

CFLAGS = -g -I../../include
#RPCLIB = -lrpclib

# ----------------------------------------
#
# Nothing below this line should have to be changed.

# timestamps for primary header files, matching src/Makefile
CONFIG_H = ../../src/config.h-t
HACK_H  = ../../src/hack.h-t

CSRC = nhxdr.c nhextxdr.c

all:	tests

FORCE:

tests:	test_xdr rpcgen-test_xdr test_ext FORCE
	@@echo ""
	@@echo Testing NhExt XDR routines...
	@@echo The output of these two tests should be identical:
	@@echo ============================
	- test_xdr -w | rpcgen-test_xdr -r
	@@echo ============================
	- rpcgen-test_xdr -w | test_xdr -r
	@@echo ============================
	@@echo ""
	@@echo Testing NhExt sub-protocol 1 support routines...
	@@echo ============================
	- test_ext
	@@echo ============================

test_xdr:	test_xdr.c nhxdr.o nhextxdr.o
	$(CC) $(CFLAGS) -URPCGEN -o test_xdr test_xdr.c nhxdr.o nhextxdr.o

rpcgen-test_xdr:	test_xdr.c
	$(CC) $(CFLAGS) -DRPCGEN -o rpcgen-test_xdr test_xdr.c $(RPCLIB)

rpcgen-nhext.h rpcgen-nhext_xdr.c:	rpcgen-nhext.x
	rpcgen rpcgen-nhext.x

rpcgen-nhext.x:	ext_protocol.html
	$(AWK) '/<h3>init<\/h3>/ { init=1; } /<pre>/ { if (init) output=1; next;} /<\/pre>/ { output=0; } { if (output) print }' < ext_protocol.html > rpcgen-nhext.x

test_ext:	test_ext.c nhext.o nhxdr.o nhextxdr.o
	$(CC) $(CFLAGS) -o test_ext test_ext.c nhext.o nhxdr.o nhextxdr.o

clean:
	$(RM) *.o test_xdr rpcgen-test_xdr

spotless:	clean
	$(RM) rpcgen-nhext.h rpcgen-nhext_xdr.c rpcgen-nhext.x

depend: ../../sys/unix/depend.awk $(CSRC)
	$(AWK) -f ../../sys/unix/depend.awk ../../include/*.h $(CSRC) | \
	sed -e 's:\.\./include:\.\./\.\./include:' \
	    -e 's:\.\./\.\./include/nhxdr.h:nhxdr.h:' >makedep
	@@echo '/^# DO NOT DELETE THIS LINE OR CHANGE ANYTHING BEYOND IT/+2,$$d' >eddep
	@@echo '$$r makedep' >>eddep
	@@echo 'w' >>eddep
	@@cp Makefile Makefile.bak
	ed - Makefile < eddep
	@@rm -f eddep makedep
	@@echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
	@@echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
	@@echo '# see make depend above' >> Makefile
	- diff Makefile.bak Makefile
	@@rm -f Makefile.bak

# DO NOT DELETE THIS LINE OR CHANGE ANYTHING BEYOND IT

# config.h timestamp
$(CONFIG_H): ../../include/config.h
	touch $(CONFIG_H)
# hack.h timestamp
$(HACK_H): ../../include/hack.h
	touch $(HACK_H)
#
nhxdr.o: nhxdr.c $(HACK_H) nhxdr.h
nhext.o: nhext.c
nhextxdr.o: nhextxdr.c $(HACK_H) nhxdr.h
# DEPENDENCIES MUST END AT END OF FILE
# IF YOU PUT STUFF HERE IT WILL GO AWAY
# see make depend above
@


1.2
log
@Implemented & tested the support routines for NhExt sub-protocol 1.

I've also thrown together an implementation of a server module
(which might be linked with a window interface to produce a
proxy server). There's no way it will compile yet.

The next stage is to try and see how this could dovetail into an
existing windowing interface. I really want to use GTK for this
since it is suitably complicated that it is likely to throw up
many difficulties and because it is the most important interface
to supply as a proxy module to solve our security problems.

Unfortunately, the GTK interface is very bad at doing the job it is
supposed to in the procedures. An example of this is select_player.
The interface currently grabs the values of initrole etc., before
the procedure is even called. It will take quite a while to iron
out these kind of problems before we can proceed.
@
text
@d1 1
a1 1
# $Id: Makefile,v 1.1 2001/09/06 18:06:38 j_ali Exp $
@


1.1
log
@Implemented NhExt XDR (low level protocol for proxy window).

Also included is a test program for this module.

I've started work on nhext_rpc(), but while this now compiles I have
done no testing as yet.
@
text
@d1 1
a1 1
# $Id$
d9 1
a9 1
CFLAGS = -I../../include
d26 1
a26 1
tests:	test_xdr rpcgen-test_xdr FORCE
d28 2
a29 1
	@@echo The output of the two tests should be identical:
d35 5
d53 3
d88 1
@

