Revision: 8404 http://playerstage.svn.sourceforge.net/playerstage/?rev=8404&view=rev Author: thjc Date: 2009-11-15 12:48:46 +0000 (Sun, 15 Nov 2009)
Log Message: ----------- applied patch 2891142: Player SVN trunk: gripcmd WIN32 compat Modified Paths: -------------- code/player/trunk/server/drivers/shell/gripcmd.cc Modified: code/player/trunk/server/drivers/shell/gripcmd.cc =================================================================== --- code/player/trunk/server/drivers/shell/gripcmd.cc 2009-11-14 17:07:51 UTC (rev 8403) +++ code/player/trunk/server/drivers/shell/gripcmd.cc 2009-11-15 12:48:46 UTC (rev 8404) @@ -77,6 +77,9 @@ #include <stddef.h> // for NULL and size_t #include <string.h> // for memset() +#if !defined (WIN32) +#include <strings.h> // for strcasecmp() +#endif #include <pthread.h> #include <libplayercore/playercore.h> @@ -145,16 +148,24 @@ return; } this->cmd = 0; +#if defined (WIN32) + if (!(_strnicmp(_cmd, "open", strlen(_cmd)))) this->cmd = PLAYER_GRIPPER_CMD_OPEN; + else if (!(_strnicmp(_cmd, "close", strlen(_cmd)))) this->cmd = PLAYER_GRIPPER_CMD_CLOSE; + else if (!(_strnicmp(_cmd, "stop", strlen(_cmd)))) this->cmd = PLAYER_GRIPPER_CMD_STOP; + else if (!(_strnicmp(_cmd, "store", strlen(_cmd)))) this->cmd = PLAYER_GRIPPER_CMD_STORE; + else if (!(_strnicmp(_cmd, "retrieve", strlen(_cmd)))) this->cmd = PLAYER_GRIPPER_CMD_RETRIEVE; +#else if (!(strcasecmp(_cmd, "open"))) this->cmd = PLAYER_GRIPPER_CMD_OPEN; else if (!(strcasecmp(_cmd, "close"))) this->cmd = PLAYER_GRIPPER_CMD_CLOSE; else if (!(strcasecmp(_cmd, "stop"))) this->cmd = PLAYER_GRIPPER_CMD_STOP; else if (!(strcasecmp(_cmd, "store"))) this->cmd = PLAYER_GRIPPER_CMD_STORE; else if (!(strcasecmp(_cmd, "retrieve"))) this->cmd = PLAYER_GRIPPER_CMD_RETRIEVE; +#endif else { PLAYER_ERROR("Invalid command"); this->SetError(-1); - return; + return; } this->sleep_nsec = cf->ReadInt(section, "sleep_nsec", 100000000); if ((this->sleep_nsec) <= 0) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Playerstage-commit mailing list Playerstage-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/playerstage-commit