#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;
%{
-#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>
#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();}
// Implementation
// --------------
-#ifdef HPUX
-#define const
-#endif
-
// add an includes directory to the table
//
void edl_add_include_directory(const edlstring adirectory)
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);
if(buf.str) Standard::Free((void*&)buf.str, buf.length+1);
}
-#ifdef HPUX
-#undef const
-#endif
#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
+#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);
edlstring edl_string(const char *, const int );
void edlstring_free(const edlstring );
-#ifdef HPUX
-#undef const
+#ifdef __cplusplus
+}
#endif