Some fixes which silence warnings emitted by the microsoft compiler. Adapted
authorthurston <thurston@052ea7fc-9027-0410-9066-f65837a77df0>
Sun, 25 Mar 2007 22:46:35 +0000 (22:46 +0000)
committerthurston <thurston@052ea7fc-9027-0410-9066-f65837a77df0>
Sun, 25 Mar 2007 22:46:35 +0000 (22:46 +0000)
from patch by Josef Goettgens.

git-svn-id: http://svn.complang.org/ragel/trunk@151 052ea7fc-9027-0410-9066-f65837a77df0

common/common.cpp
common/config.h.in
ragel/fsmgraph.h
ragel/ragel.h
ragel/xmlcodegen.cpp
redfsm/gendata.h
redfsm/redfsm.h
rlgen-cd/rlgen-cd.h
rlgen-dot/rlgen-dot.h

index 2faaef5..8a39727 100644 (file)
@@ -253,7 +253,7 @@ char *findFileExtension( char *stemFile )
  * replaces it with a new one. Returns a newed up string. */
 char *fileNameFromStem( char *stemFile, char *suffix )
 {
-       int len = strlen( stemFile );
+       long len = strlen( stemFile );
        assert( len > 0 );
 
        /* Get the extension. */
index 813d0fa..0990bfc 100644 (file)
 #undef TXL
 #undef RUBY
 
-#ifdef WIN32
+#ifdef _MSC_VER
 #define strcasecmp _stricmp
+#define strtoll _strtoi64
+#pragma warning( disable: 4244 4250 4355 4800 )
 #endif
 
 #endif /* _CONFIG_H */
index 3c58644..e59acc1 100644 (file)
@@ -22,6 +22,7 @@
 #ifndef _FSMGRAPH_H
 #define _FSMGRAPH_H
 
+#include "config.h"
 #include <assert.h>
 #include <iostream>
 #include "common.h"
index 7264135..d7f652a 100644 (file)
@@ -69,6 +69,6 @@ std::ostream &warning( const InputLoc &loc );
 
 void terminateAllParsers( );
 void writeMachines( std::ostream &out, std::string hostData, char *inputFileName );
-void xmlEscapeHost( std::ostream &out, char *data, int len );
+void xmlEscapeHost( std::ostream &out, char *data, long len );
 
 #endif /* _RAGEL_H */
index 021c97e..28cf5e0 100644 (file)
@@ -475,7 +475,7 @@ void XMLCodeGen::writeAction( Action *action )
        out << "</action>\n";
 }
 
-void xmlEscapeHost( std::ostream &out, char *data, int len )
+void xmlEscapeHost( std::ostream &out, char *data, long len )
 {
        char *end = data + len;
        while ( data != end ) {
index 855e071..4a6565d 100644 (file)
@@ -23,6 +23,7 @@
 #define _GENDATA_H
 
 #include <iostream>
+#include "config.h"
 #include "redfsm.h"
 #include "common.h"
 
@@ -33,7 +34,6 @@ typedef DList<Action> ActionList;
 
 typedef unsigned long ulong;
 
-struct FsmCodeGen;
 struct CodeGenData;
 
 typedef AvlMap<char *, CodeGenData*, CmpStr> CodeGenMap;
index 515b1b6..f4e5792 100644 (file)
@@ -25,6 +25,7 @@
 #include <assert.h>
 #include <string.h>
 #include <string>
+#include "config.h"
 #include "common.h"
 #include "vector.h"
 #include "dlist.h"
index 93acd99..30fe11f 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <stdio.h>
 #include <iostream>
+#include "config.h"
 #include "avltree.h"
 #include "vector.h"
 #include "config.h"
index 83152a5..258d4b4 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <stdio.h>
 #include <iostream>
+#include "config.h"
 #include "avltree.h"
 #include "vector.h"
 #include "config.h"