From 38a677945c78c7285bcd67e3a8dc083088e8a72c Mon Sep 17 00:00:00 2001 From: cas Date: Tue, 31 Jul 2001 17:44:49 +0000 Subject: [PATCH] No comments --- src/EDL/EDL.cxx | 7 +++---- src/EDL/EDL.lex | 14 +++++++++++++- src/EDL/EDL_Interpretor.cxx | 26 ++++++++------------------ src/EDL/EDL_Library.cxx | 31 +++++++++++++++---------------- src/EDL/edl_rule.h | 13 +++++++------ 5 files changed, 46 insertions(+), 45 deletions(-) diff --git a/src/EDL/EDL.cxx b/src/EDL/EDL.cxx index 598f266..43bc5ea 100755 --- a/src/EDL/EDL.cxx +++ b/src/EDL/EDL.cxx @@ -4,12 +4,11 @@ #include #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; diff --git a/src/EDL/EDL.lex b/src/EDL/EDL.lex index fd6eb61..9a94aba 100755 --- a/src/EDL/EDL.lex +++ b/src/EDL/EDL.lex @@ -1,6 +1,18 @@ %{ -#include +#if STDC_HEADERS +# include +#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 #ifdef WNT # include diff --git a/src/EDL/EDL_Interpretor.cxx b/src/EDL/EDL_Interpretor.cxx index 0ccdf12..6474f60 100755 --- a/src/EDL/EDL_Interpretor.cxx +++ b/src/EDL/EDL_Interpretor.cxx @@ -11,18 +11,21 @@ #include -extern "C" { +#ifdef HAVE_CONFIG_H +# include +#endif + #include -} #include #ifdef WNT -#include -#else -#include +# include #endif +#ifdef HAVE_UNISTD_H +# include +#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 diff --git a/src/EDL/EDL_Library.cxx b/src/EDL/EDL_Library.cxx index baa03ad..6461d34 100755 --- a/src/EDL/EDL_Library.cxx +++ b/src/EDL/EDL_Library.cxx @@ -1,22 +1,21 @@ #include -#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 diff --git a/src/EDL/edl_rule.h b/src/EDL/edl_rule.h index 23bb692..f4b7293 100755 --- a/src/EDL/edl_rule.h +++ b/src/EDL/edl_rule.h @@ -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 -- 2.39.5