[Tux4kids-commits] r1036 - in tuxmath/branches/lan: . po server

David Bruce dbruce-guest at alioth.debian.org
Fri Jun 12 11:40:19 UTC 2009


Author: dbruce-guest
Date: 2009-06-12 11:40:18 +0000 (Fri, 12 Jun 2009)
New Revision: 1036

Added:
   tuxmath/branches/lan/server/Makefile.am
   tuxmath/branches/lan/server/testclient.c
Modified:
   tuxmath/branches/lan/Makefile.am
   tuxmath/branches/lan/aclocal.m4
   tuxmath/branches/lan/config.guess
   tuxmath/branches/lan/config.sub
   tuxmath/branches/lan/configure.ac
   tuxmath/branches/lan/po/Makefile.in.in
   tuxmath/branches/lan/po/nn.gmo
   tuxmath/branches/lan/po/nn.po
   tuxmath/branches/lan/server/server.c
Log:
start of /server directory with autotools build structure and example server and client programs from http://gpwiki.org



Modified: tuxmath/branches/lan/Makefile.am
===================================================================
--- tuxmath/branches/lan/Makefile.am	2009-06-12 08:05:55 UTC (rev 1035)
+++ tuxmath/branches/lan/Makefile.am	2009-06-12 11:40:18 UTC (rev 1036)
@@ -12,6 +12,7 @@
 	intl	\
 	linebreak \
 	po	\
+	server	\
 	src
 
 ACLOCAL_AMFLAGS = -I m4

Modified: tuxmath/branches/lan/aclocal.m4
===================================================================
--- tuxmath/branches/lan/aclocal.m4	2009-06-12 08:05:55 UTC (rev 1035)
+++ tuxmath/branches/lan/aclocal.m4	2009-06-12 11:40:18 UTC (rev 1036)
@@ -1,4 +1,4 @@
-# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.10.2 -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 # 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
@@ -13,8 +13,8 @@
 
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(AC_AUTOCONF_VERSION, [2.61],,
-[m4_warning([this file was generated for autoconf 2.61.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
+[m4_warning([this file was generated for autoconf 2.63.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically `autoreconf'.])])
@@ -177,7 +177,7 @@
 fi[]dnl
 ])# PKG_CHECK_MODULES
 
-# Copyright (C) 2002, 2003, 2005, 2006, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -192,7 +192,7 @@
 [am__api_version='1.10'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.10.1], [],
+m4_if([$1], [1.10.2], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -206,12 +206,12 @@
 # AM_SET_CURRENT_AUTOMAKE_VERSION
 # -------------------------------
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.10.1])dnl
+[AM_AUTOMAKE_VERSION([1.10.2])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
@@ -461,19 +461,28 @@
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-#serial 3
+#serial 4
 
 # _AM_OUTPUT_DEPENDENCY_COMMANDS
 # ------------------------------
 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[for mf in $CONFIG_FILES; do
+[# Autoconf 2.62 quotes --file arguments for eval, but not when files
+# are listed without --file.  Let's play safe and only enable the eval
+# if we detect the quoting.
+case $CONFIG_FILES in
+*\'*) eval set x "$CONFIG_FILES" ;;
+*)   set x $CONFIG_FILES ;;
+esac
+shift
+for mf
+do
   # Strip MF so we end up with the name of the file.
   mf=`echo "$mf" | sed -e 's/:.*$//'`
   # Check whether this is an Automake generated Makefile or not.
@@ -805,13 +814,13 @@
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
+# serial 4
 
 # _AM_MANGLE_OPTION(NAME)
 # -----------------------
@@ -828,7 +837,7 @@
 # ----------------------------------
 # OPTIONS is a space-separated list of Automake options.
 AC_DEFUN([_AM_SET_OPTIONS],
-[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 # -------------------------------------------

Modified: tuxmath/branches/lan/config.guess
===================================================================
--- tuxmath/branches/lan/config.guess	2009-06-12 08:05:55 UTC (rev 1035)
+++ tuxmath/branches/lan/config.guess	2009-06-12 11:40:18 UTC (rev 1036)
@@ -4,7 +4,7 @@
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
 #   Free Software Foundation, Inc.
 
-timestamp='2008-01-23'
+timestamp='2009-04-27'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -324,6 +324,9 @@
 	case `/usr/bin/uname -p` in
 	    sparc) echo sparc-icl-nx7; exit ;;
 	esac ;;
+    s390x:SunOS:*:*)
+	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
     sun4H:SunOS:5.*:*)
 	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 	exit ;;
@@ -331,7 +334,20 @@
 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 	exit ;;
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
-	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	eval $set_cc_for_build
+	SUN_ARCH="i386"
+	# If there is a compiler, see if it is configured for 64-bit objects.
+	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+	# This test works for both compilers.
+	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		grep IS_64BIT_ARCH >/dev/null
+	    then
+		SUN_ARCH="x86_64"
+	    fi
+	fi
+	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 	exit ;;
     sun4*:SunOS:6*:*)
 	# According to config.sub, this is the proper way to canonicalize
@@ -796,7 +812,7 @@
 	    x86)
 		echo i586-pc-interix${UNAME_RELEASE}
 		exit ;;
-	    EM64T | authenticamd)
+	    EM64T | authenticamd | genuineintel)
 		echo x86_64-unknown-interix${UNAME_RELEASE}
 		exit ;;
 	    IA64)
@@ -935,6 +951,9 @@
 	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
 	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
 	exit ;;
+    padre:Linux:*:*)
+	echo sparc-unknown-linux-gnu
+	exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
 	# Look for CPU level
 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@@ -985,9 +1004,6 @@
 	  a.out-i386-linux)
 		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
 		exit ;;
-	  coff-i386)
-		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-		exit ;;
 	  "")
 		# Either a pre-BFD a.out linker (linux-gnuoldld) or
 		# one that does not give us useful --help.
@@ -1102,8 +1118,11 @@
     pc:*:*:*)
 	# Left here for compatibility:
         # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i386.
-	echo i386-pc-msdosdjgpp
+        # the processor, so we play safe by assuming i586.
+	# Note: whatever this is, it MUST be the same as what config.sub
+	# prints for the "djgpp" host, or else GDB configury will decide that
+	# this is a cross-build.
+	echo i586-pc-msdosdjgpp
         exit ;;
     Intel:Mach:3*:*)
 	echo i386-pc-mach3
@@ -1141,6 +1160,16 @@
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
         /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
           && { echo i486-ncr-sysv4; exit; } ;;
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+	OS_REL='.3'
+	test -r /etc/.relid \
+	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
 	echo m68k-unknown-lynxos${UNAME_RELEASE}
 	exit ;;
@@ -1216,6 +1245,9 @@
     BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
 	echo i586-pc-beos
 	exit ;;
+    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
+	echo i586-pc-haiku
+	exit ;;
     SX-4:SUPER-UX:*:*)
 	echo sx4-nec-superux${UNAME_RELEASE}
 	exit ;;
@@ -1324,6 +1356,9 @@
     i*86:rdos:*:*)
 	echo ${UNAME_MACHINE}-pc-rdos
 	exit ;;
+    i*86:AROS:*:*)
+	echo ${UNAME_MACHINE}-pc-aros
+	exit ;;
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2

Modified: tuxmath/branches/lan/config.sub
===================================================================
--- tuxmath/branches/lan/config.sub	2009-06-12 08:05:55 UTC (rev 1035)
+++ tuxmath/branches/lan/config.sub	2009-06-12 11:40:18 UTC (rev 1036)
@@ -4,7 +4,7 @@
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
 #   Free Software Foundation, Inc.
 
-timestamp='2008-01-16'
+timestamp='2009-04-17'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -122,6 +122,7 @@
 case $maybe_os in
   nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
   uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@@ -249,13 +250,16 @@
 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
 	| i370 | i860 | i960 | ia64 \
 	| ip2k | iq2000 \
+	| lm32 \
 	| m32c | m32r | m32rle | m68000 | m68k | m88k \
-	| maxq | mb | microblaze | mcore | mep \
+	| maxq | mb | microblaze | mcore | mep | metag \
 	| mips | mipsbe | mipseb | mipsel | mipsle \
 	| mips16 \
 	| mips64 | mips64el \
+	| mips64octeon | mips64octeonel \
+	| mips64orion | mips64orionel \
+	| mips64r5900 | mips64r5900el \
 	| mips64vr | mips64vrel \
-	| mips64orion | mips64orionel \
 	| mips64vr4100 | mips64vr4100el \
 	| mips64vr4300 | mips64vr4300el \
 	| mips64vr5000 | mips64vr5000el \
@@ -268,6 +272,7 @@
 	| mipsisa64sr71k | mipsisa64sr71kel \
 	| mipstx39 | mipstx39el \
 	| mn10200 | mn10300 \
+	| moxie \
 	| mt \
 	| msp430 \
 	| nios | nios2 \
@@ -277,7 +282,7 @@
 	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
 	| pyramid \
 	| score \
-	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
 	| sh64 | sh64le \
 	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
 	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
@@ -286,7 +291,7 @@
 	| v850 | v850e \
 	| we32k \
 	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
-	| z8k)
+	| z8k | z80)
 		basic_machine=$basic_machine-unknown
 		;;
 	m6811 | m68hc11 | m6812 | m68hc12)
@@ -329,14 +334,17 @@
 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
 	| i*86-* | i860-* | i960-* | ia64-* \
 	| ip2k-* | iq2000-* \
+	| lm32-* \
 	| m32c-* | m32r-* | m32rle-* \
 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-	| m88110-* | m88k-* | maxq-* | mcore-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
 	| mips16-* \
 	| mips64-* | mips64el-* \
+	| mips64octeon-* | mips64octeonel-* \
+	| mips64orion-* | mips64orionel-* \
+	| mips64r5900-* | mips64r5900el-* \
 	| mips64vr-* | mips64vrel-* \
-	| mips64orion-* | mips64orionel-* \
 	| mips64vr4100-* | mips64vr4100el-* \
 	| mips64vr4300-* | mips64vr4300el-* \
 	| mips64vr5000-* | mips64vr5000el-* \
@@ -358,20 +366,20 @@
 	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
 	| pyramid-* \
 	| romp-* | rs6000-* \
-	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
 	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
 	| sparclite-* \
 	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
 	| tahoe-* | thumb-* \
-	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
 	| tron-* \
 	| v850-* | v850e-* | vax-* \
 	| we32k-* \
 	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
 	| xstormy16-* | xtensa*-* \
 	| ymp-* \
-	| z8k-*)
+	| z8k-* | z80-*)
 		;;
 	# Recognize the basic CPU types without company name, with glob match.
 	xtensa*)
@@ -439,6 +447,10 @@
 		basic_machine=m68k-apollo
 		os=-bsd
 		;;
+	aros)
+		basic_machine=i386-pc
+		os=-aros
+		;;
 	aux)
 		basic_machine=m68k-apple
 		os=-aux
@@ -459,6 +471,10 @@
 		basic_machine=c90-cray
 		os=-unicos
 		;;
+        cegcc)
+		basic_machine=arm-unknown
+		os=-cegcc
+		;;
 	convex-c1)
 		basic_machine=c1-convex
 		os=-bsd
@@ -526,6 +542,10 @@
 		basic_machine=m88k-motorola
 		os=-sysv3
 		;;
+	dicos)
+		basic_machine=i686-pc
+		os=-dicos
+		;;
 	djgpp)
 		basic_machine=i586-pc
 		os=-msdosdjgpp
@@ -1128,6 +1148,10 @@
 		basic_machine=z8k-unknown
 		os=-sim
 		;;
+	z80-*-coff)
+		basic_machine=z80-unknown
+		os=-sim
+		;;
 	none)
 		basic_machine=none-none
 		os=-none
@@ -1166,7 +1190,7 @@
 	we32k)
 		basic_machine=we32k-att
 		;;
-	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
 		basic_machine=sh-unknown
 		;;
 	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
@@ -1238,8 +1262,9 @@
 	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
 	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
 	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+	      | -kopensolaris* \
 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-	      | -aos* \
+	      | -aos* | -aros* \
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
 	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
@@ -1248,7 +1273,7 @@
 	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-	      | -chorusos* | -chorusrdb* \
+	      | -chorusos* | -chorusrdb* | -cegcc* \
 	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
 	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
 	      | -uxpv* | -beos* | -mpeix* | -udk* \
@@ -1388,6 +1413,9 @@
 	-zvmoe)
 		os=-zvmoe
 		;;
+	-dicos*)
+		os=-dicos
+		;;
 	-none)
 		;;
 	*)

Modified: tuxmath/branches/lan/configure.ac
===================================================================
--- tuxmath/branches/lan/configure.ac	2009-06-12 08:05:55 UTC (rev 1035)
+++ tuxmath/branches/lan/configure.ac	2009-06-12 11:40:18 UTC (rev 1036)
@@ -287,6 +287,7 @@
 doc/Makefile
 nsis/tuxmath.nsi
 nsis/tuxmath_with_conf.nsi
+server/Makefile
 src/Makefile
 intl/Makefile
 linebreak/Makefile

Modified: tuxmath/branches/lan/po/Makefile.in.in
===================================================================
--- tuxmath/branches/lan/po/Makefile.in.in	2009-06-12 08:05:55 UTC (rev 1035)
+++ tuxmath/branches/lan/po/Makefile.in.in	2009-06-12 11:40:18 UTC (rev 1036)
@@ -57,7 +57,7 @@
 XGETTEXT_yes = @XGETTEXT_015@
 XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
 MSGMERGE = msgmerge
-MSGMERGE_UPDATE = @MSGMERGE@ --update --previous
+MSGMERGE_UPDATE = @MSGMERGE@ --update
 MSGINIT = msginit
 MSGCONV = msgconv
 MSGFILTER = msgfilter
@@ -395,9 +395,9 @@
 	tmpdir=`pwd`; \
 	echo "$$lang:"; \
 	test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
-	echo "$${cdcmd}$(MSGMERGE) --previous $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
+	echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
 	cd $(srcdir); \
-	if $(MSGMERGE) --previous $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
+	if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
 	  if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
 	    rm -f $$tmpdir/$$lang.new.po; \
 	  else \

Modified: tuxmath/branches/lan/po/nn.gmo
===================================================================
(Binary files differ)

Modified: tuxmath/branches/lan/po/nn.po
===================================================================
--- tuxmath/branches/lan/po/nn.po	2009-06-12 08:05:55 UTC (rev 1035)
+++ tuxmath/branches/lan/po/nn.po	2009-06-12 11:40:18 UTC (rev 1036)
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: nn\n"
 "Report-Msgid-Bugs-To: tuxmath-devel at lists.sourceforge.net\n"
-"POT-Creation-Date: 2009-04-16 18:48+0200\n"
+"POT-Creation-Date: 2009-03-06 06:12-0600\n"
 "PO-Revision-Date: 2009-04-16 18:58+0200\n"
 "Last-Translator: Karl Ove Hufthammer <karl at huftis.org>\n"
 "Language-Team: Norwegian Nynorsk <i18n-nn at lister.ping.uio.no>\n"
@@ -270,107 +270,107 @@
 "eller «Mellomrom» for å dela han. Øydelegg brøkar som ikkje kan forenklast "
 "med eit enkeltskot."
 
-#: src/game.c:715
+#: src/game.c:717
 msgid "Welcome to TuxMath!"
 msgstr "Velkommen til TuxMath!"
 
-#: src/game.c:732
+#: src/game.c:734
 msgid "Your mission is to save your"
 msgstr "Oppdraget ditt er å redda"
 
-#: src/game.c:733
+#: src/game.c:735
 msgid "penguins' igloos from the"
 msgstr "igloane til pingvinane frå"
 
-#: src/game.c:734
+#: src/game.c:736
 msgid "falling comets."
 msgstr "kometar frå verdsrommet."
 
-#: src/game.c:753
+#: src/game.c:755
 msgid "Stop a comet by typing"
 msgstr "Du kan stoppa ein komet ved"
 
-#: src/game.c:754
+#: src/game.c:756
 msgid "the answer to the math problem"
 msgstr "å skriva inn svaret, og så"
 
-#: src/game.c:755
+#: src/game.c:757
 msgid "and hitting 'space' or 'enter'."
 msgstr "«Mellomrom» eller «Enter»."
 
-#: src/game.c:756
+#: src/game.c:758
 msgid "Try it now!"
 msgstr "Prøv det no!"
 
-#: src/game.c:764
+#: src/game.c:766
 msgid "Good shot!"
 msgstr "Bra skot!"
 
-#: src/game.c:774
+#: src/game.c:776
 msgid "If an igloo gets hit by a comet,"
 msgstr "Viss ein iglo vert treft av ein"
 
-#: src/game.c:775
+#: src/game.c:777
 msgid "it melts. But don't worry: the"
 msgstr "komet, smeltar han. Men ta det"
 
-#: src/game.c:776
+#: src/game.c:778
 msgid "penguin is OK!"
 msgstr "med ro: pingvinen klarer seg!"
 
-#: src/game.c:777
+#: src/game.c:779
 msgid "Just watch what happens:"
 msgstr "Berre sjå kva som skjer."
 
-#: src/game.c:778
+#: src/game.c:780
 msgid "(Press a key to start)"
 msgstr "(Trykk ein tast for å sjå.)"
 
-#: src/game.c:791
+#: src/game.c:793
 msgid "Notice the answer"
 msgstr "Legg merke til rett svar."
 
-#: src/game.c:801
+#: src/game.c:803
 msgid "If it gets hit again, the"
 msgstr "Viss igloen vert treft på nytt,"
 
-#: src/game.c:802
+#: src/game.c:804
 msgid "penguin leaves."
 msgstr "vandrar pingvinen vekk."
 
-#: src/game.c:803
+#: src/game.c:805
 msgid "(Press a key when ready)"
 msgstr "(Trykk ein tast når du er klar.)"
 
-#: src/game.c:822
+#: src/game.c:824
 msgid "You can fix the igloos"
 msgstr "Du kan byggja opp att igloane"
 
-#: src/game.c:823
+#: src/game.c:825
 msgid "by stopping bonus comets."
 msgstr "ved å stoppa bonuskometar."
 
-#: src/game.c:832
+#: src/game.c:834
 msgid "Zap it now!"
 msgstr "Skyt kometen no!"
 
-#: src/game.c:836
+#: src/game.c:838
 msgid "Great job!"
 msgstr "Kjempebra!"
 
-#: src/game.c:850
+#: src/game.c:852
 msgid "Quit at any time by pressing"
 msgstr "Du kan når som helst gje deg,"
 
-#: src/game.c:851
+#: src/game.c:853
 msgid "'Esc' or clicking the 'X'"
 msgstr "ved å trykkja «Escape» eller"
 
-#: src/game.c:852
+#: src/game.c:854
 msgid "in the upper right corner."
 msgstr "klikka på X-en oppe til høgre."
 
-#: src/game.c:853
+#: src/game.c:855
 msgid "Do it now, and then play!"
 msgstr "Prøv det no, og start spelet!"
 

Added: tuxmath/branches/lan/server/Makefile.am
===================================================================
--- tuxmath/branches/lan/server/Makefile.am	                        (rev 0)
+++ tuxmath/branches/lan/server/Makefile.am	2009-06-12 11:40:18 UTC (rev 1036)
@@ -0,0 +1,10 @@
+## Makefile.am for tuxmath server:
+## Process with Automake to create Makefile.in
+
+bin_PROGRAMS = tuxmathserver tuxmathtestclient
+
+tuxmathserver_SOURCES = server.c mathcards.c
+tuxmathtestclient_SOURCES = testclient.c
+
+EXTRA_DIST = mathcards.h
+

Modified: tuxmath/branches/lan/server/server.c
===================================================================
--- tuxmath/branches/lan/server/server.c	2009-06-12 08:05:55 UTC (rev 1035)
+++ tuxmath/branches/lan/server/server.c	2009-06-12 11:40:18 UTC (rev 1036)
@@ -1 +1,100 @@
+/*
+*  C Implementation: server.c
+*
+*       Description: Server program for LAN-based play in Tux,of Math Command.
+*
+*
+* Author: Akash Gangil, David Bruce, and the TuxMath team, (C) 2009
+* Developers list: <tuxmath-devel at lists.sourceforge.net>
+*
+* Copyright: See COPYING file that comes with this distribution.  (Briefly, GNU GPL).
+*
+* NOTE: This file was initially based on example code from The Game Programming Wiki
+* (http://gpwiki.org), in a tutorial covered by the GNU Free Documentation License 1.2.
+* No invariant sections were indicated, and no separate license for the example code
+* was listed. The author was also not listed. AFAICT,this scenario allows incorporation of
+* derivative works into a GPLv2+ project like TuxMath - David Bruce 
+*/
 
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+ 
+#include "SDL_net.h"
+ 
+int main(int argc, char **argv)
+{
+        TCPsocket sd, csd; /* Socket descriptor, Client socket descriptor */
+        IPaddress ip, *remoteIP;
+        int quit, quit2;
+        char buffer[512];
+ 
+        if (SDLNet_Init() < 0)
+        {
+                fprintf(stderr, "SDLNet_Init: %s\n", SDLNet_GetError());
+                exit(EXIT_FAILURE);
+        }
+ 
+        /* Resolving the host using NULL make network interface to listen */
+        if (SDLNet_ResolveHost(&ip, NULL, 2000) < 0)
+        {
+                fprintf(stderr, "SDLNet_ResolveHost: %s\n", SDLNet_GetError());
+                exit(EXIT_FAILURE);
+        }
+ 
+        /* Open a connection with the IP provided (listen on the host's port) */
+        if (!(sd = SDLNet_TCP_Open(&ip)))
+        {
+                fprintf(stderr, "SDLNet_TCP_Open: %s\n", SDLNet_GetError());
+                exit(EXIT_FAILURE);
+        }
+ 
+        /* Wait for a connection, send data and term */
+        quit = 0;
+        while (!quit)
+        {
+                /* This check the sd if there is a pending connection.
+                * If there is one, accept that, and open a new socket for communicating */
+                if ((csd = SDLNet_TCP_Accept(sd)))
+                {
+                        /* Now we can communicate with the client using csd socket
+                        * sd will remain opened waiting other connections */
+ 
+                        /* Get the remote address */
+                        if ((remoteIP = SDLNet_TCP_GetPeerAddress(csd)))
+                                /* Print the address, converting in the host format */
+                                printf("Host connected: %x %d\n", SDLNet_Read32(&remoteIP->host), SDLNet_Read16(&remoteIP->port));
+                        else
+                                fprintf(stderr, "SDLNet_TCP_GetPeerAddress: %s\n", SDLNet_GetError());
+                        
+                        quit2 = 0;
+                        while (!quit2)
+                        {
+                                if (SDLNet_TCP_Recv(csd, buffer, 512) > 0)
+                                {
+                                        printf("Client say: %s\n", buffer);
+ 
+                                        if(strcmp(buffer, "exit") == 0) /* Terminate this connection */
+                                        {
+                                                quit2 = 1;
+                                                printf("Terminate connection\n");
+                                        }
+                                        if(strcmp(buffer, "quit") == 0) /* Quit the program */
+                                        {
+                                                quit2 = 1;
+                                                quit = 1;
+                                                printf("Quit program\n");
+                                        }
+                                }
+                        }
+ 
+                        /* Close the client socket */
+                        SDLNet_TCP_Close(csd);
+                }
+        }
+ 
+        SDLNet_TCP_Close(sd);
+        SDLNet_Quit();
+ 
+        return EXIT_SUCCESS;
+}
\ No newline at end of file

Added: tuxmath/branches/lan/server/testclient.c
===================================================================
--- tuxmath/branches/lan/server/testclient.c	                        (rev 0)
+++ tuxmath/branches/lan/server/testclient.c	2009-06-12 11:40:18 UTC (rev 1036)
@@ -0,0 +1,83 @@
+/*
+*  C Implementation: server.c
+*
+*       Description: Test client program for LAN-based play in Tux,of Math Command.
+*
+*
+* Author: Akash Gangil, David Bruce, and the TuxMath team, (C) 2009
+* Developers list: <tuxmath-devel at lists.sourceforge.net>
+*
+* Copyright: See COPYING file that comes with this distribution.  (Briefly, GNU GPL).
+*
+* NOTE: This file was initially based on example code from The Game Programming Wiki
+* (http://gpwiki.org), in a tutorial covered by the GNU Free Documentation License 1.2.
+* No invariant sections were indicated, and no separate license for the example code
+* was listed. The author was also not listed. AFAICT,this scenario allows incorporation of
+* derivative works into a GPLv2+ project like TuxMath - David Bruce 
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+ 
+#include "SDL_net.h"
+ 
+int main(int argc, char **argv)
+{
+        IPaddress ip;           /* Server address */
+        TCPsocket sd;           /* Socket descriptor */
+        int quit, len;
+        char buffer[512];
+ 
+        /* Simple parameter checking */
+        if (argc < 3)
+        {
+                fprintf(stderr, "Usage: %s host port\n", argv[0]);
+                exit(EXIT_FAILURE);
+        }
+ 
+        if (SDLNet_Init() < 0)
+        {
+                fprintf(stderr, "SDLNet_Init: %s\n", SDLNet_GetError());
+                exit(EXIT_FAILURE);
+        }
+ 
+        /* Resolve the host we are connecting to */
+        if (SDLNet_ResolveHost(&ip, argv[1], atoi(argv[2])) < 0)
+        {
+                fprintf(stderr, "SDLNet_ResolveHost: %s\n", SDLNet_GetError());
+                exit(EXIT_FAILURE);
+        }
+ 
+        /* Open a connection with the IP provided (listen on the host's port) */
+        if (!(sd = SDLNet_TCP_Open(&ip)))
+        {
+                fprintf(stderr, "SDLNet_TCP_Open: %s\n", SDLNet_GetError());
+                exit(EXIT_FAILURE);
+        }
+ 
+        /* Send messages */
+        quit = 0;
+        while (!quit)
+        {
+                printf("Write something:\n>");
+                scanf("%s", buffer);
+ 
+                len = strlen(buffer) + 1;
+                if (SDLNet_TCP_Send(sd, (void *)buffer, len) < len)
+                {
+                        fprintf(stderr, "SDLNet_TCP_Send: %s\n", SDLNet_GetError());
+                        exit(EXIT_FAILURE);
+                }
+ 
+                if(strcmp(buffer, "exit") == 0)
+                        quit = 1;
+                if(strcmp(buffer, "quit") == 0)
+                        quit = 1;
+        }
+ 
+        SDLNet_TCP_Close(sd);
+        SDLNet_Quit();
+ 
+        return EXIT_SUCCESS;
+}
\ No newline at end of file




More information about the Tux4kids-commits mailing list