]> OCCT Git - occt-wok.git/commitdiff
No comments
authorcas <cas@opencascade.com>
Tue, 31 Jul 2001 17:44:49 +0000 (17:44 +0000)
committercas <cas@opencascade.com>
Tue, 31 Jul 2001 17:44:49 +0000 (17:44 +0000)
src/EDL/EDL.cxx
src/EDL/EDL.lex
src/EDL/EDL_Interpretor.cxx
src/EDL/EDL_Library.cxx
src/EDL/edl_rule.h

index 598f266b99652a8666e9f5c9805cd024d08c2438..43bc5eaa3ca3d7a64a1f905c97c4597d4d536217 100755 (executable)
@@ -4,12 +4,11 @@
 #include <stdio.h>
 
 #ifndef WNT
-  extern int EDLlineno;
-  extern TCollection_AsciiString  EDL_CurrentFile;
+extern int EDLlineno;
 #else
-  extern "C" int EDLlineno;
-  extern TCollection_AsciiString EDL_CurrentFile;
+extern "C" int EDLlineno;
 #endif  // WNT
+extern TCollection_AsciiString EDL_CurrentFile;
 
 
 static void (*EDL_ErrorMsgHandler) (Standard_CString aMsg) = NULL;
index fd6eb611a79eb1a12262d79d5359bb27e20d06f6..9a94aba558ae12892783f0064d74bc5dedfa483a 100755 (executable)
@@ -1,6 +1,18 @@
 
 %{
-#include <string.h>
+#if STDC_HEADERS
+# include <string.h>
+#else
+# ifndef HAVE_STRCHR
+#  define strchr index
+#  define strrchr rindex
+# endif
+  char *strchr (), *strrchr ();
+# ifndef HAVE_MEMCPY
+#  define memcpy(d, s, n) bcopy ((s), (d), (n))
+#  define memmove(d, s, n) bcopy ((s), (d), (n))
+# endif
+#endif  /* STDC_HEADERS */
 #include <stdio.h>
 #ifdef WNT
 # include <io.h>
index 0ccdf12777377d3b12f693ef00f2a76d238d5ef8..6474f60c18690d2282a08648163944a69cc46065 100755 (executable)
 
 #include <stdio.h>
 
-extern "C" {
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <edl_rule.h>
-}
 
 #include <EDL.tab.h>
 
 #ifdef WNT
-#include <windows.h>
-#else
-#include <unistd.h>
+# include <windows.h>
 #endif
 
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
 
 extern "C" {int EDLparse();}
 extern "C" {int EDLlex();}
@@ -819,10 +822,6 @@ void EDL_Interpretor::AddToArgList(const Standard_CString aVariable, const Stand
 // Implementation
 // --------------
 
-#ifdef HPUX
-#define const
-#endif
-
 // add an includes directory to the table
 //
 void edl_add_include_directory(const edlstring adirectory)
@@ -1722,13 +1721,7 @@ void edl_uses(const edlstring filename)
     while (!IsFound && DirCount <= IncludeDirectory->Length()) {
       static char tmpName[1024];
 
-#ifdef HPUX
-#undef const
-#endif
       const TCollection_AsciiString& adir = IncludeDirectory->Value(DirCount);
-#ifdef HPUX
-#define const
-#endif
       memcpy(tmpName, adir.ToCString(), adir.Length());
       tmpName[adir.Length()] = '/';
       strcpy(&(tmpName[adir.Length()+1]),filename.str); 
@@ -1807,6 +1800,3 @@ void edlstring_free(const edlstring buf)
   if(buf.str) Standard::Free((void*&)buf.str, buf.length+1);
 }
 
-#ifdef HPUX
-#undef const
-#endif
index baa03adec35d9609c9e1e6727758b53d3a937e00..6461d34db7e2c45f055f44f35718f7490355f65e 100755 (executable)
@@ -1,22 +1,21 @@
 #include <EDL_Library.ixx>
 
-#ifdef HPUX
-#define LIBLEN  3
-#define TAILLEN 3
-#define TAILWORD ".sl"
-#define HEADWORD "lib"
+#ifdef WNT
+# define TAILWORD ".dll"
+# define HEADWORD ""
+# define LIBLEN  0
+# define TAILLEN 4
 #else
-#if WNT
-#define TAILWORD ".dll"
-#define HEADWORD ""
-#define LIBLEN  0
-#define TAILLEN 4
-#else
-#define LIBLEN  3
-#define TAILLEN 3
-#define TAILWORD ".so"
-#define HEADWORD "lib"
-#endif
+# define LIBLEN  3
+# define TAILLEN 3
+# define LIBLEN  3
+# define TAILLEN 3
+# define HEADWORD "lib"
+# ifdef __hpux
+#  define TAILWORD ".sl"
+# else
+#  define TAILWORD ".so"
+# endif
 #endif
 
 
index 23bb69220651b0d8f206d5ca58058ff43ca352fb..f4b7293416b7e32355d069a964a33e00dd4e8145 100755 (executable)
@@ -1,13 +1,14 @@
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 typedef struct _edlstring {
        char *str;
        int  length;
 } edlstring;
 
-#ifdef HPUX
-#define const
-#endif
-
 void edl_set_var(const edlstring,const edlstring);
 void edl_set_varvar(const edlstring,const edlstring);
 void edl_set_varevalvar(const edlstring,const edlstring);
@@ -70,6 +71,6 @@ edlstring edl_strdup(const char *, const int );
 edlstring edl_string(const char *, const int );
 void edlstring_free(const edlstring );
 
-#ifdef HPUX
-#undef const
+#ifdef __cplusplus
+}
 #endif