From: <eg...@us...> - 2006-10-28 19:04:35
|
Revision: 201 http://svn.sourceforge.net/opengate/?rev=201&view=rev Author: egore Date: 2006-10-28 12:04:19 -0700 (Sat, 28 Oct 2006) Log Message: ----------- try to get client up and running again Modified Paths: -------------- ChangeLog data/Makefile.am data/opengate.dtd src/common/equipment/engine.cpp src/common/faction.cpp src/opengate_client.cpp Added Paths: ----------- data/Faction/ data/Faction/Makefile.am data/Faction/Makefile.in data/Faction/solrain.xml Modified: ChangeLog =================================================================== --- ChangeLog 2006-10-27 22:27:40 UTC (rev 200) +++ ChangeLog 2006-10-28 19:04:19 UTC (rev 201) @@ -1,3 +1,8 @@ +2006-10-28 Christoph Brill <eg...@us...> + + * data/Faction/solrain.xml: add XML for factions, update dtd + accordingly + 2006-10-26 Christoph Brill <eg...@us...> * doc/coding-style: add information about the coding style of opengate Added: data/Faction/Makefile.am =================================================================== --- data/Faction/Makefile.am (rev 0) +++ data/Faction/Makefile.am 2006-10-28 19:04:19 UTC (rev 201) @@ -0,0 +1,3 @@ +pkgdatadir = $(datadir)/games/@PACKAGE@ + +pkgdata_DATA = solrain.xml Property changes on: data/Faction/Makefile.am ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: data/Faction/Makefile.in =================================================================== --- data/Faction/Makefile.in (rev 0) +++ data/Faction/Makefile.in 2006-10-28 19:04:19 UTC (rev 201) @@ -0,0 +1,361 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = ../.. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = data/Faction +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(pkgdatadir)" +pkgdataDATA_INSTALL = $(INSTALL_DATA) +DATA = $(pkgdata_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +pkgdatadir = $(datadir)/games/@PACKAGE@ +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AM_CXXFLAGS = @AM_CXXFLAGS@ +AM_LDFLAGS = @AM_LDFLAGS@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CEGUI_CFLAGS = @CEGUI_CFLAGS@ +CEGUI_LIBS = @CEGUI_LIBS@ +CEGUI_OGRE_CFLAGS = @CEGUI_OGRE_CFLAGS@ +CEGUI_OGRE_LIBS = @CEGUI_OGRE_LIBS@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GRAPPLE_CFLAGS = @GRAPPLE_CFLAGS@ +GRAPPLE_LIBS = @GRAPPLE_LIBS@ +GREP = @GREP@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ +LIBCURL_LIBS = @LIBCURL_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +OBJEXT = @OBJEXT@ +OGRE_CFLAGS = @OGRE_CFLAGS@ +OGRE_LIBS = @OGRE_LIBS@ +OIS_CFLAGS = @OIS_CFLAGS@ +OIS_LIBS = @OIS_LIBS@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +pkgdata_DATA = solrain.xml +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu data/Faction/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu data/Faction/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +install-pkgdataDATA: $(pkgdata_DATA) + @$(NORMAL_INSTALL) + test -z "$(pkgdatadir)" || $(mkdir_p) "$(DESTDIR)$(pkgdatadir)" + @list='$(pkgdata_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \ + $(pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \ + done + +uninstall-pkgdataDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgdata_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \ + done +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(pkgdatadir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-pkgdataDATA + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am uninstall-pkgdataDATA + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-exec install-exec-am \ + install-info install-info-am install-man install-pkgdataDATA \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-am uninstall-info-am uninstall-pkgdataDATA + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: Property changes on: data/Faction/Makefile.in ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: data/Faction/solrain.xml =================================================================== (Binary files differ) Property changes on: data/Faction/solrain.xml ___________________________________________________________________ Name: svn:mime-type + application/xml Modified: data/Makefile.am =================================================================== --- data/Makefile.am 2006-10-27 22:27:40 UTC (rev 200) +++ data/Makefile.am 2006-10-28 19:04:19 UTC (rev 201) @@ -1,4 +1,4 @@ -SUBDIRS = Ships Rankings +SUBDIRS = Ships Rankings Faction pkgdatadir = $(datadir)/games/@PACKAGE@ Modified: data/opengate.dtd =================================================================== (Binary files differ) Modified: src/common/equipment/engine.cpp =================================================================== --- src/common/equipment/engine.cpp 2006-10-27 22:27:40 UTC (rev 200) +++ src/common/equipment/engine.cpp 2006-10-28 19:04:19 UTC (rev 201) @@ -44,8 +44,9 @@ } void Engine::initialize() { - + std::cout << "1" << std::endl; Equipment::initialize(); + std::cout << "2" << std::endl; Loader* loader = Loader::get_instance(); Modified: src/common/faction.cpp =================================================================== --- src/common/faction.cpp 2006-10-27 22:27:40 UTC (rev 200) +++ src/common/faction.cpp 2006-10-28 19:04:19 UTC (rev 201) @@ -25,8 +25,12 @@ #include "faction.h" #include "loader.h" -Faction::Faction(std::string filename) { - _filename = filename; +#include <cctype> + +Faction::Faction(std::string faction_name) { + _filename = faction_name; + transform(_filename.begin(), _filename.end(), _filename.begin(), tolower); + _filename = "../../data/Faction/" + _filename + ".xml"; initialize(); } @@ -36,11 +40,12 @@ void Faction::initialize() { Loader* loader = Loader::get_instance(); + loader->parse_file(_filename); // Naming - _name = loader->get_option("/faction/name"); - _description = loader->get_option("/faction/description"); + _name = loader->get_option("/realfaction/name"); + _description = loader->get_option("/realfaction/description"); } Modified: src/opengate_client.cpp =================================================================== --- src/opengate_client.cpp 2006-10-27 22:27:40 UTC (rev 200) +++ src/opengate_client.cpp 2006-10-28 19:04:19 UTC (rev 201) @@ -74,8 +74,8 @@ cout << "Statring up" << std::endl; cout << "-----------" << std::endl; - std::string username = "Dummy"; - std::string password = "Dummy"; + std::string username = "DummyUser"; + std::string password = "DummyPass"; for (int i = 1; i < argc; i++) { std::string argument = argv[i]; @@ -107,8 +107,6 @@ } } - std::cout << username << password << std::endl; - Network* nw = new Network(); nw->login(username, password); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qr...@us...> - 2006-11-29 14:12:23
|
Revision: 221 http://svn.sourceforge.net/opengate/?rev=221&view=rev Author: qrstuvw Date: 2006-11-29 06:12:21 -0800 (Wed, 29 Nov 2006) Log Message: ----------- - Threading for Win32 and Posix - TODO: Implement this stuff into the META-server source (50% done) Added Paths: ----------- src/common/Mutex.h src/common/Posix/ src/common/Posix/Mutex.h src/common/Posix/Semaphore.h src/common/Posix/Thread.h src/common/Semaphore.h src/common/Thread.h src/common/Win32/ src/common/Win32/Mutex.h src/common/Win32/Semaphore.h src/common/Win32/Thread.h src/common/Win32/Win32.h Added: src/common/Mutex.h =================================================================== --- src/common/Mutex.h (rev 0) +++ src/common/Mutex.h 2006-11-29 14:12:21 UTC (rev 221) @@ -0,0 +1,12 @@ +#ifndef _Mutex_ +#define _Mutex_ + +#include <errno.h> + +#ifdef WIN32 + #include "Win32/Mutex.h" +#else + #include "Posix/Mutex.h" +#endif + +#endif // !_Mutex_ Property changes on: src/common/Mutex.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: src/common/Posix/Mutex.h =================================================================== --- src/common/Posix/Mutex.h (rev 0) +++ src/common/Posix/Mutex.h 2006-11-29 14:12:21 UTC (rev 221) @@ -0,0 +1,45 @@ +///////////////////////////////////////////////////////////////////// +// Written by Phillip Sitbon +// Copyright 2003 +// +// Posix/Mutex.h +// - Resource locking mechanism using Posix mutexes +// +///////////////////////////////////////////////////////////////////// + +#ifndef _Mutex_Posix_ +#define _Mutex_Posix_ + +#include <pthread.h> + +class Mutex +{ + mutable pthread_mutex_t M; + void operator=(Mutex &M) {} + Mutex( const Mutex &M ) {} + + public: + + Mutex() + { + pthread_mutexattr_t attr; + pthread_mutexattr_init(&attr); + pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE); + pthread_mutex_init(&M,&attr); + pthread_mutexattr_destroy(&attr); + } + + virtual ~Mutex() + { pthread_mutex_unlock(&M); pthread_mutex_destroy(&M); } + + int Lock() const + { return pthread_mutex_lock(&M); } + + int Lock_Try() const + { return pthread_mutex_trylock(&M); } + + int Unlock() const + { return pthread_mutex_unlock(&M); } +}; + +#endif // !_Mutex_Posix_ Property changes on: src/common/Posix/Mutex.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: src/common/Posix/Semaphore.h =================================================================== --- src/common/Posix/Semaphore.h (rev 0) +++ src/common/Posix/Semaphore.h 2006-11-29 14:12:21 UTC (rev 221) @@ -0,0 +1,42 @@ +///////////////////////////////////////////////////////////////////// +// Written by Phillip Sitbon +// Copyright 2003 +// +// Posix/Semaphore.h +// - Resource counting mechanism +// +///////////////////////////////////////////////////////////////////// + +#ifndef _Semaphore_Posix_ +#define _Semaphore_Posix_ + +#include <semaphore.h> + +class Semaphore +{ + sem_t S; + + public: + Semaphore( int init = 0 ) + { sem_init(&S,0,init); } + + virtual ~Semaphore() + { sem_destroy(&S); } + + void Wait() const + { sem_wait((sem_t *)&S); } + + int Wait_Try() const + { return (sem_trywait((sem_t *)&S)?errno:0); } + + int Post() const + { return (sem_post((sem_t *)&S)?errno:0); } + + int Value() const + { int V = -1; sem_getvalue((sem_t *)&S,&V); return V; } + + void Reset( int init = 0 ) + { sem_destroy(&S); sem_init(&S,0,init); } +}; + +#endif // !_Semaphore_Posix_ Property changes on: src/common/Posix/Semaphore.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: src/common/Posix/Thread.h =================================================================== --- src/common/Posix/Thread.h (rev 0) +++ src/common/Posix/Thread.h 2006-11-29 14:12:21 UTC (rev 221) @@ -0,0 +1,312 @@ +///////////////////////////////////////////////////////////////////// +// Written by Phillip Sitbon +// Copyright 2003 +// +// Posix/Thread.h +// - Posix thread +// +///////////////////////////////////////////////////////////////////// + +#ifndef _Thread_Posix_ +#define _Thread_Posix_ + +#include "Semaphore.h" +#include "Mutex.h" + +#include <pthread.h> + +#define InvalidHandle 0 + +template +< + typename Thread_T +> +class Thread +{ + private: + typedef struct Instance; + + public: + typedef Thread_T & Thread_R; + typedef const Thread_T & Thread_C_R; + + typedef pthread_t Handle; + typedef void ( *Handler)( Thread_R ); + + + protected: + Thread() {} + + virtual void ThreadMain( Thread_R ) = 0; + + static void Exit() + { pthread_exit(0); } + + static void TestCancel() + { pthread_testcancel(); } + + static Handle Self() + { return (Handle)pthread_self(); } + + public: + + static int Create( + const Handler & Function, + Thread_C_R Param, + Handle * const & H = 0, + const bool & CreateDetached = false, + const unsigned int & StackSize = 0, + const bool & CancelEnable = false, + const bool & CancelAsync = false + ) + { + M_Create().Lock(); + pthread_attr_t attr; + pthread_attr_init(&attr); + + if ( CreateDetached ) + pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED); + + if ( StackSize ) + pthread_attr_setstacksize(&attr,StackSize); + + Instance I(Param,0,Function,CancelEnable,CancelAsync); + + int R = pthread_create((pthread_t *)H,&attr,ThreadMainHandler,(void *)&I); + pthread_attr_destroy(&attr); + + if ( !R ) S_Create().Wait(); + else if ( H ) *H = InvalidHandle; + + M_Create().Unlock(); + return errno; + } + + int Create( + Thread_C_R Param, + Handle * const & H = 0, + const bool & CreateDetached = false, + const unsigned int & StackSize = 0, + const bool & CancelEnable = false, + const bool & CancelAsync = false + ) const + { + M_Create().Lock(); + pthread_attr_t attr; + pthread_attr_init(&attr); + + if ( CreateDetached ) + pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED); + + if ( StackSize ) + pthread_attr_setstacksize(&attr,StackSize); + + Instance I(Param,const_cast<Thread *>(this),0,CancelEnable,CancelAsync); + + int R = pthread_create((pthread_t *)H,&attr,ThreadMainHandler,(void *)&I); + pthread_attr_destroy(&attr); + + if ( !R ) S_Create().Wait(); + else if ( H ) *H = InvalidHandle; + + M_Create().Unlock(); + return errno; + } + + static int Join( Handle H ) + { return pthread_join(H,0); } + + static int Kill( Handle H ) + { return pthread_cancel(H); } + + static int Detach( Handle H ) + { return pthread_detach(H); } + + private: + + static const Mutex &M_Create() { static Mutex M; return M; } + static const Semaphore &S_Create() { static Semaphore S; return S; } + + static void *ThreadMainHandler( Instance *Param ) + { + Instance I(*Param); + Thread_T Data(I.Data); + S_Create().Post(); + + if ( I.Flags & 1 /*CancelEnable*/ ) + { + pthread_setcancelstate(PTHREAD_CANCEL_ENABLE,NULL); + + if ( I.Flags & 2 /*CancelAsync*/ ) + pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS,NULL); + else + pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED,NULL); + } + else + { + pthread_setcancelstate(PTHREAD_CANCEL_DISABLE,NULL); + } + + if ( I.Owner ) + I.Owner->ThreadMain(Data); + else + I.pFN(Data); + + return 0; + } + + struct Instance + { + Instance( Thread_C_R P, Thread<Thread_T> *const &O, const Thread<Thread_T>::Handler &pH = 0, const bool &CE=false, const bool &CA=false ) + : pFN(pH), Data(P), Owner(O), Flags(0) { if ( CE ) Flags|=1; if ( CA ) Flags|=2; } + + Thread<Thread_T>::Thread_C_R Data; + Thread<Thread_T> * Owner; + Thread<Thread_T>::Handler pFN; + unsigned char Flags; + }; +}; + +///////////////////////////////////////////////////////////////////// +// Explicit specialization, no thread parameters +// + +class Thread<void> +{ + private: + typedef struct Instance; + + public: + typedef pthread_t Handle; + typedef void ( *Handler)(); + + protected: + Thread<void>() {} + + virtual void ThreadMain() = 0; + + static void Exit() + { pthread_exit(0); } + + static void TestCancel() + { pthread_testcancel(); } + + static Handle Self() + { return (Handle)pthread_self(); } + + public: + + static int Create( + const Handler & Function, + Handle * const & H = 0, + const bool & CreateDetached = false, + const unsigned int & StackSize = 0, + const bool & CancelEnable = false, + const bool & CancelAsync = false + ) + { + M_Create().Lock(); + pthread_attr_t attr; + pthread_attr_init(&attr); + + if ( CreateDetached ) + pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED); + + if ( StackSize ) + pthread_attr_setstacksize(&attr,StackSize); + + Instance I(0,Function,CancelEnable,CancelAsync); + + int R = pthread_create((pthread_t *)H,&attr,ThreadMainHandler,(void *)&I); + pthread_attr_destroy(&attr); + + if ( !R ) S_Create().Wait(); + else if ( H ) *H = InvalidHandle; + + M_Create().Unlock(); + return errno; + } + + int Create( + Handle * const & H = 0, + const bool & CreateDetached = false, + const unsigned int & StackSize = 0, + const bool & CancelEnable = false, + const bool & CancelAsync = false + ) const + { + M_Create().Lock(); + pthread_attr_t attr; + pthread_attr_init(&attr); + + if ( CreateDetached ) + pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED); + + if ( StackSize ) + pthread_attr_setstacksize(&attr,StackSize); + + Instance I(const_cast<Thread *>(this),0,CancelEnable,CancelAsync); + + int R = pthread_create((pthread_t *)H,&attr,ThreadMainHandler,(void *)&I); + pthread_attr_destroy(&attr); + + if ( !R ) S_Create().Wait(); + else if ( H ) *H = InvalidHandle; + + M_Create().Unlock(); + return errno; + } + + static int Join( Handle H ) + { return pthread_join(H,0); } + + static int Kill( Handle H ) + { return pthread_cancel(H); } + + static int Detach( Handle H ) + { return pthread_detach(H); } + + private: + + static const Mutex &M_Create() { static Mutex M; return M; } + static const Semaphore &S_Create() { static Semaphore S; return S; } + + static void *ThreadMainHandler( Instance *Param ) + { + Instance I(*Param); + S_Create().Post(); + + if ( I.Flags & 1 /*CancelEnable*/ ) + { + pthread_setcancelstate(PTHREAD_CANCEL_ENABLE,NULL); + + if ( I.Flags & 2 /*CancelAsync*/ ) + pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS,NULL); + else + pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED,NULL); + } + else + { + pthread_setcancelstate(PTHREAD_CANCEL_DISABLE,NULL); + } + + if ( I.Owner ) + I.Owner->ThreadMain(); + else + I.pFN(); + + return 0; + } + + struct Instance + { + Instance( Thread<void> *const &O, const Thread<void>::Handler &pH = 0, const bool &CE=false, const bool &CA=false ) + : pFN(pH), Owner(O), Flags(0) { if ( CE ) Flags|=1; if ( CA ) Flags|=2; } + + Thread<void> * Owner; + Thread<void>::Handler pFN; + unsigned char Flags; + }; +}; + +#endif // !_Thread_Posix_ Property changes on: src/common/Posix/Thread.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: src/common/Semaphore.h =================================================================== --- src/common/Semaphore.h (rev 0) +++ src/common/Semaphore.h 2006-11-29 14:12:21 UTC (rev 221) @@ -0,0 +1,12 @@ +#ifndef _Semaphore_ +#define _Semaphore_ + +#include <errno.h> + +#ifdef WIN32 + #include "Win32/Semaphore.h" +#else + #include "Posix/Semaphore.h" +#endif + +#endif // !_Semaphore_ Property changes on: src/common/Semaphore.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: src/common/Thread.h =================================================================== --- src/common/Thread.h (rev 0) +++ src/common/Thread.h 2006-11-29 14:12:21 UTC (rev 221) @@ -0,0 +1,12 @@ +#ifndef _Thread_ +#define _Thread_ + +#include <errno.h> + +#ifdef WIN32 + #include "Win32/Thread.h" +#else + #include "Posix/Thread.h" +#endif + +#endif // !_Thread_ Property changes on: src/common/Thread.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: src/common/Win32/Mutex.h =================================================================== --- src/common/Win32/Mutex.h (rev 0) +++ src/common/Win32/Mutex.h 2006-11-29 14:12:21 UTC (rev 221) @@ -0,0 +1,41 @@ +///////////////////////////////////////////////////////////////////// +// Written by Phillip Sitbon +// Copyright 2003 +// +// Win32/Mutex.h +// - Resource locking mechanism using Critical Sections +// +///////////////////////////////////////////////////////////////////// + +#ifndef _Mutex_Win32_ +#define _Mutex_Win32_ + +#include "Win32.h" + +class Mutex +{ + mutable CRITICAL_SECTION C; + void operator=(Mutex &M) {} + Mutex( const Mutex &M ) {} + + public: + + Mutex() + { InitializeCriticalSection(&C); } + + virtual ~Mutex() + { DeleteCriticalSection(&C); } + + int Lock() const + { EnterCriticalSection(&C); return 0; } + +#if(_WIN32_WINNT >= 0x0400) + int Lock_Try() const + { return (TryEnterCriticalSection(&C)?0:EBUSY); } +#endif + + int Unlock() const + { LeaveCriticalSection(&C); return 0; } +}; + +#endif // !_Mutex_Win32_ Property changes on: src/common/Win32/Mutex.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: src/common/Win32/Semaphore.h =================================================================== --- src/common/Win32/Semaphore.h (rev 0) +++ src/common/Win32/Semaphore.h 2006-11-29 14:12:21 UTC (rev 221) @@ -0,0 +1,48 @@ +///////////////////////////////////////////////////////////////////// +// Written by Phillip Sitbon +// Copyright 2003 +// +// Win32/Semaphore.h +// - Resource counting mechanism +// +///////////////////////////////////////////////////////////////////// +#ifndef _Semaphore_Win32_ +#define _Semaphore_Win32_ + +#include "Win32.h" + +#define SEM_VALUE_MAX ((int) ((~0u) >> 1)) + +class Semaphore +{ + HANDLE S; + void operator=(const Semaphore &S){} + Semaphore(const Semaphore &S){} + + public: + Semaphore( int init = 0 ) + { S = CreateSemaphore(0,init,SEM_VALUE_MAX,0); } + + virtual ~Semaphore() + { CloseHandle(S); } + + void Wait() const + { WaitForSingleObject((HANDLE)S,INFINITE); } + + int Wait_Try() const + { return ((WaitForSingleObject((HANDLE)S,INFINITE)==WAIT_OBJECT_0)?0:EAGAIN); } + + int Post() const + { return (ReleaseSemaphore((HANDLE)S,1,0)?0:ERANGE); } + + int Value() const + { LONG V = -1; ReleaseSemaphore((HANDLE)S,0,&V); return V; } + + void Reset( int init = 0 ) + { + CloseHandle(S); + S = CreateSemaphore(0,init,SEM_VALUE_MAX,0); + } +}; + +#endif // !_Semaphore_Win32_ Property changes on: src/common/Win32/Semaphore.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: src/common/Win32/Thread.h =================================================================== --- src/common/Win32/Thread.h (rev 0) +++ src/common/Win32/Thread.h 2006-11-29 14:12:21 UTC (rev 221) @@ -0,0 +1,339 @@ +///////////////////////////////////////////////////////////////////// +// Written by Phillip Sitbon +// Copyright 2003 +// +// Win32/Thread.h +// - Windows thread +// +// - From CreateThread Platform SDK Documentation: +// +// "A thread that uses functions from the static C run-time +// libraries should use the beginthread and endthread C run-time +// functions for thread management rather than CreateThread and +// ExitThread. Failure to do so results in small memory leaks +// when ExitThread is called. Note that this is not a problem +// with the C run-time in a DLL." +// +// With regards to this, I have decided to use the CreateThread +// API, unless you define _CRT_ in which case there are two +// possibilities: +// +// 1. Define _USE_BEGINTHREAD: Uses _beginthread/_endthread +// (said to be *unreliable* in the SDK docs) +// +// 2. Don't - Uses _beginthreaded/_endthreadex +// +// A note about _endthread: +// +// It will call CloseHandle() on exit, and if it was already +// closed then you will get an exception. To prevent this, I +// removed the CloseHandle() functionality - this means that +// a Join() WILL wait on a Detach()'ed thread. +// +///////////////////////////////////////////////////////////////////// +#ifndef _Thread_Win32_ +#define _Thread_Win32_ + +#include "Win32.h" +#include "Semaphore.h" +#include "Mutex.h" + +#ifdef _CRT_ +# include <process.h> +# ifdef _USE_BEGINTHREAD +# define THREAD_CALL __cdecl +# define THREAD_HANDLE uintptr_t +# define THREAD_RET_T void +# define CREATE_THREAD_FAILED (-1L) +# define CREATE_THREAD_ERROR (errno) +# define CREATE_THREAD(_S,_F,_P) ((Handle)_beginthread((void (__cdecl *)(void *))_F,_S,(void *)_P)) +# define EXIT_THREAD _endthread() +# define CLOSE_HANDLE(x) 1 +# define THREAD_RETURN(x) return +# else +# define THREAD_CALL WINAPI +# define THREAD_HANDLE HANDLE +# define THREAD_RET_T UINT +# define CREATE_THREAD_FAILED (0L) +# define CREATE_THREAD_ERROR (errno) +# define CREATE_THREAD(_S,_F,_P) ((Handle)_beginthreadex(0,_S,(UINT (WINAPI *)(void *))_F,(void *)_P,0,0)) +# define EXIT_THREAD _endthreadex(0) +# define CLOSE_HANDLE(x) CloseHandle(x) +# define THREAD_RETURN(x) return(x) +# endif +#else +# define THREAD_CALL WINAPI +# define THREAD_HANDLE HANDLE +# define THREAD_RET_T DWORD +# define CREATE_THREAD_FAILED (0L) +# define CREATE_THREAD_ERROR GetLastError() +# define CREATE_THREAD(_S,_F,_P) ((Handle)CreateThread(0,_S,(DWORD (WINAPI *)(void *))_F,(void *)_P,0,0)) +# define EXIT_THREAD ExitThread(0) +# define CLOSE_HANDLE(x) CloseHandle(x) +# define THREAD_RETURN(x) return(x) +#endif + +#define InvalidHandle 0 + +template +< + typename Thread_T +> +class Thread +{ + private: + typedef struct Instance; + + public: + typedef Thread_T & Thread_R; + typedef const Thread_T & Thread_C_R; + + typedef THREAD_HANDLE Handle; + typedef void (* Handler)( Thread_R ); + + protected: + Thread() {} + + virtual void ThreadMain( Thread_R ) = 0; + + static void Exit() + { EXIT_THREAD; } + + static void TestCancel() + { Sleep(0); } + + static Handle Self() + { + //Handle Hnd = InvalidHandle; + //DuplicateHandle(GetCurrentProcess(),GetCurrentThread(),GetCurrentProcess(),(LPHANDLE)&Hnd,NULL,0,NULL); + //return Hnd; + + // only a pseudo-handle! + return (Handle)GetCurrentThread(); + } + + public: + + static int Create( + const Handler & Function, + Thread_C_R Param, + Handle * const & H = 0, + const bool & CreateDetached = false, + const unsigned int & StackSize = 0, + const bool & CancelEnable = false, // UNUSED + const bool & CancelAsync = false // UNUSED + ) + { + M_Create().Lock(); + + Instance I(Param,0,Function); + + Handle Hnd(CREATE_THREAD(StackSize,ThreadMainHandler,&I)); + + if ( Hnd == CREATE_THREAD_FAILED ) + { + if ( H ) *H = InvalidHandle; + M_Create().Unlock(); + return CREATE_THREAD_ERROR; + } + + if ( H ) *H = Hnd; + + S_Create().Wait(); + M_Create().Unlock(); + + if ( CreateDetached ) CLOSE_HANDLE(Hnd); + return 0; + } + + int Create( + Thread_C_R Param, + Handle * const & H = 0, + const bool & CreateDetached = false, + const unsigned int & StackSize = 0, + const bool & CancelEnable = false, // UNUSED + const bool & CancelAsync = false // UNUSED + ) const + { + M_Create().Lock(); + + Instance I(Param,const_cast<Thread *>(this)); + + Handle Hnd(CREATE_THREAD(StackSize,ThreadMainHandler,&I)); + + if ( Hnd == CREATE_THREAD_FAILED ) + { + if ( H ) *H = InvalidHandle; + M_Create().Unlock(); + return CREATE_THREAD_ERROR; + } + + if ( H ) *H = Hnd; + + S_Create().Wait(); + M_Create().Unlock(); + + if ( CreateDetached ) CLOSE_HANDLE(Hnd); + return 0; + } + + static int Join( const Handle &H ) + { + DWORD R = WaitForSingleObject((HANDLE)H,INFINITE); + + if ( (R == WAIT_OBJECT_0) || (R == WAIT_ABANDONED) ) + { + CLOSE_HANDLE(H); + return 0; + } + + if ( R == WAIT_TIMEOUT ) return EAGAIN; + return EINVAL; + } + + static int Kill( const Handle &H ) + { return TerminateThread((HANDLE)H,0) ? 0 : EINVAL; } + + static int Detach( const Handle &H ) + { return (CLOSE_HANDLE(H)?0:EINVAL); } + + private: + + static const Mutex &M_Create() { static Mutex M; return M; } + static const Semaphore &S_Create() { static Semaphore S; return S; } + + static THREAD_RET_T THREAD_CALL ThreadMainHandler( Instance *Param ) + { + Instance I(*Param); + Thread_T Data(I.Data); + S_Create().Post(); + + if ( I.Owner ) + I.Owner->ThreadMain(Data); + else + I.pFN(Data); + + Exit(); + THREAD_RETURN(0); + } + + struct Instance + { + Instance( Thread_C_R P, Thread<Thread_T> *const &O, const Thread<Thread_T>::Handler &pH = 0 ) + : pFN(pH), Data(P), Owner(O) {} + + Thread<Thread_T>::Thread_C_R Data; + Thread<Thread_T> * Owner; + Thread<Thread_T>::Handler pFN; + }; +}; + +///////////////////////////////////////////////////////////////////// +// Explicit Specialization of void +// +class Thread<void> +{ + private: + typedef struct Instance; + + public: + typedef THREAD_HANDLE Handle; + typedef void ( *Handler)(); + + protected: + Thread<void>() {} + + virtual void ThreadMain() = 0; + + static void Exit() + { EXIT_THREAD; } + + static void TestCancel() + { Sleep(0); } + + static Handle Self() + { return (Handle)GetCurrentThread(); } + + public: + + static int Create( + const Handler & Function, + Handle * const & H = 0, + const bool & CreateDetached = false, + const unsigned int & StackSize = 0, + const bool & CancelEnable = false, // UNUSED + const bool & CancelAsync = false // UNUSED + ) + { + Handle Hnd(CREATE_THREAD(StackSize,ThreadMainHandler_S,Function)); + + if ( Hnd == CREATE_THREAD_FAILED ) + { + if ( H ) *H = InvalidHandle; + return CREATE_THREAD_ERROR; + } + + if ( H ) *H = Hnd; + if ( CreateDetached ) CLOSE_HANDLE(Hnd); + return 0; + } + + int Create( + Handle * const & H = 0, + const bool & CreateDetached = false, + const unsigned int & StackSize = 0, + const bool & CancelEnable = false, // UNUSED + const bool & CancelAsync = false // UNUSED + ) const + { + Handle Hnd(CREATE_THREAD(StackSize,ThreadMainHandler,this)); + + if ( Hnd == CREATE_THREAD_FAILED ) + { + if ( H ) *H = InvalidHandle; + return CREATE_THREAD_ERROR; + } + + if ( H ) *H = Hnd; + if ( CreateDetached ) CLOSE_HANDLE(Hnd); + return 0; + } + + static int Join( const Handle &H ) + { + DWORD R = WaitForSingleObject((HANDLE)H,INFINITE); + + if ( (R == WAIT_OBJECT_0) || (R == WAIT_ABANDONED) ) + { + CLOSE_HANDLE(H); + return 0; + } + + if ( R == WAIT_TIMEOUT ) return EAGAIN; + return EINVAL; + } + + static int Kill( const Handle &H ) + { return TerminateThread((HANDLE)H,0) ? 0 : EINVAL; } + + static int Detach( const Handle &H ) + { return (CLOSE_HANDLE(H)?0:EINVAL); } + + private: + + static THREAD_RET_T THREAD_CALL ThreadMainHandler( Thread<void> *Param ) + { + Param->ThreadMain(); + Exit(); + THREAD_RETURN(0); + } + + static THREAD_RET_T THREAD_CALL ThreadMainHandler_S( Handler Param ) + { + Param(); + Exit(); + THREAD_RETURN(0); + } +}; + +#endif // !_Thread_Win32_ Property changes on: src/common/Win32/Thread.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: src/common/Win32/Win32.h =================================================================== --- src/common/Win32/Win32.h (rev 0) +++ src/common/Win32/Win32.h 2006-11-29 14:12:21 UTC (rev 221) @@ -0,0 +1,62 @@ +///////////////////////////////////////////////////////////////////// +// Written by Phillip Sitbon +// Copyright 2003 +// +// Win32.h +// - Windows includes +// +///////////////////////////////////////////////////////////////////// +#ifndef _Win32_ +#define _Win32_ + + #if !defined(_WINDOWS_) + // WIN32 Excludes + #ifdef WIN32_LEAN_AND_MEAN + # define VC_EXTRALEAN + # define WIN32_LEAN_AND_MEAN + # define _PRSHT_H_ + # define NOGDICAPMASKS // CC_*, LC_*, PC_*, CP_*, TC_*, RC_ + # define NOVIRTUALKEYCODES // VK_* + # define NOWINMESSAGES // WM_*, EM_*, LB_*, CB_* + # define NOWINSTYLES // WS_*, CS_*, ES_*, LBS_*, SBS_*, CBS_* + # define NOSYSMETRICS // SM_* + # define NOMENUS // MF_* + # define NOICONS // IDI_* + # define NOKEYSTATES // MK_* + # define NOSYSCOMMANDS // SC_* + # define NORASTEROPS // Binary and Tertiary raster ops + # define NOSHOWWINDOW // SW_* + # define OEMRESOURCE // OEM Resource values + # define NOATOM // Atom Manager routines + # define NOCLIPBOARD // Clipboard routines + # define NOCOLOR // Screen colors + # define NOCTLMGR // Control and Dialog routines + # define NODRAWTEXT // DrawText() and DT_* + # define NOGDI // All GDI defines and routines + # define NOKERNEL // All KERNEL defines and routines + # define NOUSER // All USER defines and routines + # define NONLS // All NLS defines and routines + # define NOMB // MB_* and MessageBox() + # define NOMEMMGR // GMEM_*, LMEM_*, GHND, LHND, associated routines + # define NOMETAFILE // typedef METAFILEPICT + # define NOMINMAX // Macros min(a,b) and max(a,b) + # define NOMSG // typedef MSG and associated routines + # define NOOPENFILE // OpenFile(), OemToAnsi, AnsiToOem, and OF_* + # define NOSCROLL // SB_* and scrolling routines + # define NOSERVICE // All Service Controller routines, SERVICE_ equates, etc. + # define NOSOUND // Sound driver routines + # define NOTEXTMETRIC // typedef TEXTMETRIC and associated routines + # define NOWH // SetWindowsHook and WH_* + # define NOWINOFFSETS // GWL_*, GCL_*, associated routines + # define NOCOMM // COMM driver routines + # define NOKANJI // Kanji support stuff. + # define NOHELP // Help engine interface. + # define NOPROFILER // Profiler interface. + # define NODEFERWINDOWPOS // DeferWindowPos routines + # define NOMCX // Modem Configuration Extensions + #endif // WIN32_LEAN_AND_MEAN + // + # include <windows.h> + #endif + +#endif // !_Win32_ \ No newline at end of file Property changes on: src/common/Win32/Win32.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |