Odamex
Setting the Standard in Multiplayer Doom
common/cmdlib.h
Go to the documentation of this file.
00001 // Emacs style mode select   -*- C++ -*-
00002 //-----------------------------------------------------------------------------
00003 //
00004 // $Id: cmdlib.h 1788 2010-08-24 04:42:57Z russellrice $
00005 //
00006 // Copyright (C) 1998-2006 by Randy Heit (ZDoom).
00007 // Copyright (C) 2006-2010 by The Odamex Team.
00008 //
00009 // This program is free software; you can redistribute it and/or
00010 // modify it under the terms of the GNU General Public License
00011 // as published by the Free Software Foundation; either version 2
00012 // of the License, or (at your option) any later version.
00013 //
00014 // This program is distributed in the hope that it will be useful,
00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 // GNU General Public License for more details.
00018 //
00019 // DESCRIPTION:
00020 //      Command library (?)
00021 //
00022 //-----------------------------------------------------------------------------
00023 
00024 
00025 #ifndef __CMDLIB__
00026 #define __CMDLIB__
00027 
00028 #include <string>
00029 #include <algorithm>
00030 
00031 #ifdef _MSC_VER
00032 #pragma warning(disable : 4244)     // MIPS
00033 #pragma warning(disable : 4136)     // X86
00034 #pragma warning(disable : 4051)     // ALPHA
00035 
00036 #pragma warning(disable : 4018)     // signed/unsigned mismatch
00037 #pragma warning(disable : 4305)     // truncate from double to float
00038 #endif
00039 
00040 #include "doomtype.h"
00041 
00042 #include <stdio.h>
00043 #include <string.h>
00044 #include <stdlib.h>
00045 #include <errno.h>
00046 #include <ctype.h>
00047 #include <stdarg.h>
00048 
00049 // the dec offsetof macro doesnt work very well...
00050 #define myoffsetof(type,identifier) ((size_t)&((type *)0)->identifier)
00051 
00052 extern std::string progdir, startdir;
00053 
00054 void    FixPathSeparator (std::string &path);
00055 
00056 int             ParseHex (char *str);
00057 int     ParseNum (char *str);
00058 BOOL    IsNum (char *str);              // [RH] added
00059 int             StdStringCompare(std::string string1, std::string string2, bool CaseInsensitive);
00060 char    *COM_Parse (char *data);
00061 
00062 extern  char    com_token[8192];
00063 extern  BOOL    com_eof;
00064 
00065 char    *copystring(const char *s);
00066 
00067 void    CRC_Init(unsigned short *crcvalue);
00068 void    CRC_ProcessByte(unsigned short *crcvalue, byte data);
00069 unsigned short CRC_Value(unsigned short crcvalue);
00070 
00071 
00072 #endif
00073 
00074 
00075 
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends