better way to do dll (fileio module)
Allan CORNET [Thu, 27 Aug 2009 14:48:20 +0000 (16:48 +0200)]
32 files changed:
scilab/modules/core/includes/Os_specific.h
scilab/modules/dynamic_link/includes/addinter.h
scilab/modules/fileio/Makefile.am
scilab/modules/fileio/fileio.vcproj
scilab/modules/fileio/fileio_header.def [deleted file]
scilab/modules/fileio/includes/FileExist.h
scilab/modules/fileio/includes/FindFileExtension.h
scilab/modules/fileio/includes/URIFileToFilename.h
scilab/modules/fileio/includes/addfile.h
scilab/modules/fileio/includes/cluni0.h
scilab/modules/fileio/includes/createdirectory.h
scilab/modules/fileio/includes/delfile.h
scilab/modules/fileio/includes/dynlib_fileio.h [new file with mode: 0644]
scilab/modules/fileio/includes/filesmanagement.h
scilab/modules/fileio/includes/findfiles.h
scilab/modules/fileio/includes/getfiledesc.h
scilab/modules/fileio/includes/getfileinfo.h
scilab/modules/fileio/includes/getfiletype.h
scilab/modules/fileio/includes/getshortpathname.h
scilab/modules/fileio/includes/gw_fileio.h
scilab/modules/fileio/includes/isdir.h
scilab/modules/fileio/includes/mclose.h
scilab/modules/fileio/includes/mget.h
scilab/modules/fileio/includes/mopen.h
scilab/modules/fileio/includes/mput.h
scilab/modules/fileio/includes/mseek.h
scilab/modules/fileio/includes/mtell.h
scilab/modules/fileio/includes/readline.h
scilab/modules/fileio/includes/removedir.h
scilab/modules/fileio/includes/scicurdir.h
scilab/modules/fileio/src/c/mputi.h
scilab/modules/fileio/src/c/mputstr.h

index 3d3f7b5..6fa88ca 100644 (file)
@@ -24,7 +24,6 @@ void C2F(addinter)(int *iflag,int *descla, int *ptrdescla, int *nvla, char *inam
                   int *desc, int *ptrdesc, int *nv, char *c_cpp,
                   int *lib_cpp, int *err);
 
-extern void C2F(userlk)(int *k);
 
 /*  "basin-n.c.X1" */
 
index 12bd474..658efc4 100644 (file)
@@ -14,6 +14,7 @@
 #define  __ADDINTER_H__
 
 #include "dynlib_dynamic_link.h"
+#include "machine.h"
 
 /** 
 * the first dynamic interface is at position 500+1 
index e5da953..cb44aa6 100644 (file)
@@ -157,6 +157,7 @@ includes/mseek.h \
 includes/deleteafile.h \
 includes/readline.h \
 includes/cluni0.h \
+includes/dynlib_fileio.h \
 includes/scicurdir.h
 
 include $(top_srcdir)/Makefile.incl.am
index 6cde0ad..dbd0f42 100644 (file)
@@ -64,7 +64,7 @@
                        <Tool
                                Name="VCPreLinkEventTool"
                                Description="Make dependencies"
-                               CommandLine="lib /DEF:&quot;$(InputDir)LibScilab_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X86 /OUT:&quot;$(InputDir)LibScilab.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;lib /DEF:&quot;$(InputDir)Scilab_windows_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X86 /OUT:&quot;$(InputDir)scilab_windows.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;lib /DEF:&quot;$(InputDir)Localization_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X86 /OUT:&quot;$(InputDir)scilocalization.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;lib /DEF:&quot;$(InputDir)io_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X86 /OUT:&quot;$(InputDir)io.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;cd $(IntDir) &gt;nul&#x0D;&#x0A;for %%f in (*.obj) do  ..\..\..\bin\dumpexts -o %%~nf.def -n fileio.dll %%f &gt;nul&#x0D;&#x0A;copy *.def fileiotmp.def &gt;nul&#x0D;&#x0A;copy ..\fileio_header.def+fileiotmp.def  ..\fileio.def &gt;nul&#x0D;&#x0A;del *.def &gt;nul&#x0D;&#x0A;cd .. &gt;nul&#x0D;&#x0A;"
+                               CommandLine="lib /DEF:&quot;$(InputDir)LibScilab_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X86 /OUT:&quot;$(InputDir)LibScilab.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;lib /DEF:&quot;$(InputDir)Scilab_windows_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X86 /OUT:&quot;$(InputDir)scilab_windows.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;lib /DEF:&quot;$(InputDir)Localization_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X86 /OUT:&quot;$(InputDir)scilocalization.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;lib /DEF:&quot;$(InputDir)io_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X86 /OUT:&quot;$(InputDir)io.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCLinkerTool"
@@ -72,7 +72,7 @@
                                OutputFile="../../bin/$(ProjectName).dll"
                                LinkIncremental="1"
                                IgnoreDefaultLibraryNames=""
-                               ModuleDefinitionFile="fileio.def"
+                               ModuleDefinitionFile=""
                                GenerateDebugInformation="true"
                                SubSystem="2"
                                RandomizedBaseAddress="1"
                        <Tool
                                Name="VCPreLinkEventTool"
                                Description="Make dependencies"
-                               CommandLine="lib /DEF:&quot;$(InputDir)LibScilab_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X64 /OUT:&quot;$(InputDir)LibScilab.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;lib /DEF:&quot;$(InputDir)Scilab_windows_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X64 /OUT:&quot;$(InputDir)scilab_windows.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;lib /DEF:&quot;$(InputDir)Localization_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X64 /OUT:&quot;$(InputDir)scilocalization.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;lib /DEF:&quot;$(InputDir)io_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X64 /OUT:&quot;$(InputDir)io.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;cd $(IntDir) &gt;nul&#x0D;&#x0A;for %%f in (*.obj) do  ..\..\..\bin\dumpexts -o %%~nf.def -n fileio.dll %%f &gt;nul&#x0D;&#x0A;copy *.def fileiotmp.def &gt;nul&#x0D;&#x0A;copy ..\fileio_header.def+fileiotmp.def  ..\fileio.def &gt;nul&#x0D;&#x0A;del *.def &gt;nul&#x0D;&#x0A;cd .. &gt;nul&#x0D;&#x0A;"
+                               CommandLine="lib /DEF:&quot;$(InputDir)LibScilab_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X64 /OUT:&quot;$(InputDir)LibScilab.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;lib /DEF:&quot;$(InputDir)Scilab_windows_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X64 /OUT:&quot;$(InputDir)scilab_windows.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;lib /DEF:&quot;$(InputDir)Localization_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X64 /OUT:&quot;$(InputDir)scilocalization.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;lib /DEF:&quot;$(InputDir)io_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X64 /OUT:&quot;$(InputDir)io.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCLinkerTool"
                                OutputFile="../../bin/$(ProjectName).dll"
                                LinkIncremental="1"
                                IgnoreDefaultLibraryNames=""
-                               ModuleDefinitionFile="fileio.def"
+                               ModuleDefinitionFile=""
                                GenerateDebugInformation="true"
                                SubSystem="2"
                                RandomizedBaseAddress="1"
                        <Tool
                                Name="VCPreLinkEventTool"
                                Description="Make dependencies"
-                               CommandLine="lib /DEF:&quot;$(InputDir)LibScilab_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X86 /OUT:&quot;$(InputDir)LibScilab.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;lib /DEF:&quot;$(InputDir)Scilab_windows_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X86 /OUT:&quot;$(InputDir)scilab_windows.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;lib /DEF:&quot;$(InputDir)Localization_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X86 /OUT:&quot;$(InputDir)scilocalization.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;lib /DEF:&quot;$(InputDir)io_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X86 /OUT:&quot;$(InputDir)io.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;cd $(IntDir) &gt;nul&#x0D;&#x0A;for %%f in (*.obj) do  ..\..\..\bin\dumpexts -o %%~nf.def -n fileio.dll %%f &gt;nul&#x0D;&#x0A;copy *.def fileiotmp.def &gt;nul&#x0D;&#x0A;copy ..\fileio_header.def+fileiotmp.def  ..\fileio.def &gt;nul&#x0D;&#x0A;del *.def &gt;nul&#x0D;&#x0A;cd .. &gt;nul&#x0D;&#x0A;"
+                               CommandLine="lib /DEF:&quot;$(InputDir)LibScilab_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X86 /OUT:&quot;$(InputDir)LibScilab.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;lib /DEF:&quot;$(InputDir)Scilab_windows_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X86 /OUT:&quot;$(InputDir)scilab_windows.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;lib /DEF:&quot;$(InputDir)Localization_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X86 /OUT:&quot;$(InputDir)scilocalization.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;lib /DEF:&quot;$(InputDir)io_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X86 /OUT:&quot;$(InputDir)io.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCLinkerTool"
                                OutputFile="../../bin/$(ProjectName).dll"
                                LinkIncremental="1"
                                IgnoreDefaultLibraryNames=""
-                               ModuleDefinitionFile="fileio.def"
+                               ModuleDefinitionFile=""
                                GenerateDebugInformation="false"
                                SubSystem="2"
                                OptimizeReferences="2"
                        <Tool
                                Name="VCPreLinkEventTool"
                                Description="Make dependencies"
-                               CommandLine="lib /DEF:&quot;$(InputDir)LibScilab_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X64 /OUT:&quot;$(InputDir)LibScilab.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;lib /DEF:&quot;$(InputDir)Scilab_windows_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X64 /OUT:&quot;$(InputDir)scilab_windows.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;lib /DEF:&quot;$(InputDir)Localization_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X64 /OUT:&quot;$(InputDir)scilocalization.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;lib /DEF:&quot;$(InputDir)io_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X64 /OUT:&quot;$(InputDir)io.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;cd $(IntDir) &gt;nul&#x0D;&#x0A;for %%f in (*.obj) do  ..\..\..\bin\dumpexts -o %%~nf.def -n fileio.dll %%f &gt;nul&#x0D;&#x0A;copy *.def fileiotmp.def &gt;nul&#x0D;&#x0A;copy ..\fileio_header.def+fileiotmp.def  ..\fileio.def &gt;nul&#x0D;&#x0A;del *.def &gt;nul&#x0D;&#x0A;cd .. &gt;nul&#x0D;&#x0A;"
+                               CommandLine="lib /DEF:&quot;$(InputDir)LibScilab_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X64 /OUT:&quot;$(InputDir)LibScilab.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;lib /DEF:&quot;$(InputDir)Scilab_windows_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X64 /OUT:&quot;$(InputDir)scilab_windows.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;lib /DEF:&quot;$(InputDir)Localization_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X64 /OUT:&quot;$(InputDir)scilocalization.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;lib /DEF:&quot;$(InputDir)io_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X64 /OUT:&quot;$(InputDir)io.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCLinkerTool"
                                OutputFile="../../bin/$(ProjectName).dll"
                                LinkIncremental="1"
                                IgnoreDefaultLibraryNames=""
-                               ModuleDefinitionFile="fileio.def"
+                               ModuleDefinitionFile=""
                                GenerateDebugInformation="false"
                                SubSystem="2"
                                OptimizeReferences="2"
                                >
                        </File>
                        <File
-                               RelativePath=".\src\c\deleteafile.h"
+                               RelativePath=".\includes\delfile.h"
                                >
                        </File>
                        <File
-                               RelativePath=".\includes\delfile.h"
+                               RelativePath=".\src\c\do_xxscanf.h"
                                >
                        </File>
                        <File
-                               RelativePath=".\src\c\do_xxscanf.h"
+                               RelativePath=".\includes\dynlib_fileio.h"
                                >
                        </File>
                        <File
                                >
                        </File>
                        <File
-                               RelativePath=".\src\c\getshortpathname.h"
-                               >
-                       </File>
-                       <File
                                RelativePath=".\includes\gw_fileio.h"
                                >
                        </File>
                <Filter
                        Name="Libraries Dependencies"
                        >
-                       <File
-                               RelativePath=".\fileio_header.def"
-                               >
-                       </File>
                        <Filter
                                Name="Imports"
                                >
diff --git a/scilab/modules/fileio/fileio_header.def b/scilab/modules/fileio/fileio_header.def
deleted file mode 100644 (file)
index f0ce241..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-LIBRARY    fileio.dll
-
-
-EXPORTS
index 77c381a..1fa200e 100644 (file)
@@ -12,7 +12,7 @@
 /*--------------------------------------------------------------------------*/ 
 #ifndef __FILEEXIST_H__
 #define __FILEEXIST_H__
-
+#include "dynlib_fileio.h"
 #include "BOOL.h" /* BOOL */
 
 /**
@@ -20,6 +20,6 @@
 * @param filename a string 
 * @return TRUE or FALSE
 */
-BOOL FileExist(char *filename);
+FILEIO_IMPEXP BOOL FileExist(char *filename);
 /*--------------------------------------------------------------------------*/ 
 #endif /* __FILEEXIST_H__ */
index 57bf2b2..042112d 100644 (file)
 #ifndef __FINDFILEEXTENSION_H__
 #define __FINDFILEEXTENSION_H__
 
+#include "dynlib_fileio.h"
+
 /**
 * Searches a path for an extension
 * @param[in] pathname
 * @return the address of the "." preceding the extension 
 * NULL character otherwise. 
 */
-char *FindFileExtension(char *filename);
+FILEIO_IMPEXP char *FindFileExtension(char *filename);
 
 #endif /* __FINDFILEEXTENSION_H__ */
 /*--------------------------------------------------------------------------*/
index ee0b55e..fbc06a8 100644 (file)
 /*--------------------------------------------------------------------------*/
 #ifndef __URIFILETOFILENAME_H__
 #define __URIFILETOFILENAME_H__
-
+#include "dynlib_fileio.h"
 #include "BOOL.h"
+
 /**
 * convert URI File (file://path/filename.ext) to standard filename
 * @param[in] uri : a string URI file
 * @return a filename
 */
-char *URIFileToFilename(char *uri);
+FILEIO_IMPEXP char *URIFileToFilename(char *uri);
 
 /**
 * check if it is a URIFile
 * @param [in] uri : a string URI file
 * @return TRUE or FALSE;
 */
-BOOL isURIFile(char *uri);
+FILEIO_IMPEXP BOOL isURIFile(char *uri);
 
 #endif /* __URIFILETOFILENAME_H__ */
 /*--------------------------------------------------------------------------*/
index dcbf4dd..0416aca 100644 (file)
@@ -14,6 +14,7 @@
 #define __ADDFILE_H__
 
 #include <stdio.h>
+#include "dynlib_fileio.h"
 #include "machine.h"
 
 /**
@@ -27,7 +28,7 @@
  * @param filename  
  * @param ierr  
  */
-void C2F(addfile)(int *fd, FILE *fa, int *swap2, int *type, int *mode, char *filename, int *ierr);
+FILEIO_IMPEXP void C2F(addfile)(int *fd, FILE *fa, int *swap2, int *type, int *mode, char *filename, int *ierr);
 
 #endif /*  __ADDFILE_H__ */
 /*--------------------------------------------------------------------------*/
index 092c8d0..181f825 100644 (file)
@@ -11,7 +11,7 @@
  */
 #ifndef __CLUNI0_H__
 #define __CLUNI0_H__
-
+#include "dynlib_fileio.h"
 #include "machine.h"
 /**
  * expand in_name to produce out_name 
@@ -23,6 +23,6 @@
  * @param lout length of out_name
  * @return 0
  */
-int C2F(cluni0)(char *in_name, char *out_name, int *out_n, long int lin, long int lout);
+FILEIO_IMPEXP int C2F(cluni0)(char *in_name, char *out_name, int *out_n, long int lin, long int lout);
 
 #endif /* __CLUNI0_H__ */
index c54a002..359e9a2 100644 (file)
@@ -12,7 +12,7 @@
 /*--------------------------------------------------------------------------*/
 #ifndef __CREATEDIRECTORY_H__
 #define __CREATEDIRECTORY_H__
-
+#include "dynlib_fileio.h"
 #include "BOOL.h" /* BOOL */
 
 /**
@@ -20,7 +20,7 @@
 * @param path the path of the futur directory
 * @return the result of the operation TRUE or FALSE
 */
-BOOL createdirectory(const char *path);
+FILEIO_IMPEXP BOOL createdirectory(const char *path);
 
 #endif /* __CREATEDIRECTORY_H__ */
 /*--------------------------------------------------------------------------*/ 
index 3aa91ef..e5aeae4 100644 (file)
 /*--------------------------------------------------------------------------*/
 #ifndef __DELFILE_H__
 #define __DELFILE_H__
-
+#include "dynlib_fileio.h"
 #include "machine.h"
 
 /**
 * delete a file in the files table
 */
-void C2F(delfile)(int *fd);
+FILEIO_IMPEXP void C2F(delfile)(int *fd);
 
 #endif /* __DELFILE_H__ */
 /*--------------------------------------------------------------------------*/
diff --git a/scilab/modules/fileio/includes/dynlib_fileio.h b/scilab/modules/fileio/includes/dynlib_fileio.h
new file mode 100644 (file)
index 0000000..712899c
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) DIGITEO - 2009 - Allan CORNET
+* 
+* This file must be used under the terms of the CeCILL.
+* This source file is licensed as described in the file COPYING, which
+* you should have received as part of this distribution.  The terms
+* are also available at    
+* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+*
+*/
+
+/*--------------------------------------------------------------------------*/ 
+#ifndef __DYNLIB_FILEIO_H__
+#define __DYNLIB_FILEIO_H__
+
+#ifdef _MSC_VER
+#ifdef FILEIO_EXPORTS
+#define FILEIO_IMPEXP __declspec(dllexport)
+#else
+#define FILEIO_IMPEXP __declspec(dllimport)
+#endif
+#else
+#define FILEIO_IMPEXP
+#endif
+
+#endif /* __DYNLIB_FILEIO_H__ */
+/*--------------------------------------------------------------------------*/ 
+
index 1204b92..d5ffab0 100644 (file)
@@ -14,6 +14,7 @@
 #define __FILESMANAGEMENT_H__
 
 #include <stdio.h>
+#include "dynlib_fileio.h"
 #include "BOOL.h"
 
 /* ID returned if File is not defined */
 * Get max of files opened in scilab
 * @return max of files opened in scilab
 */
-int GetMaximumFileOpenedInScilab(void);
+FILEIO_IMPEXP int GetMaximumFileOpenedInScilab(void);
 
 /**
 * Get the file associated to int Id
 * @param Id
 * @return FILE ptr
 */
-FILE *GetFileOpenedInScilab(int Id);
+FILEIO_IMPEXP FILE *GetFileOpenedInScilab(int Id);
 
 /**
 * Set the file associated to int Id
 * @param FILE ptr
 * @param Id
 */
-void SetFileOpenedInScilab(int Id,FILE *fptr);
+FILEIO_IMPEXP void SetFileOpenedInScilab(int Id,FILE *fptr);
 
 /**
 * Get the current Id (current file)
 * @return Id
 */
-int GetCurrentFileId(void);
+FILEIO_IMPEXP int GetCurrentFileId(void);
 
 /**
 * Get the previous Id (previous file)
 * @return Id
 */
-int GetPreviousFileId(void);
+FILEIO_IMPEXP int GetPreviousFileId(void);
 
 /**
 * Set the current Id (current file)
 * @param Id
 */
-void SetCurrentFileId(int Id);
+FILEIO_IMPEXP void SetCurrentFileId(int Id);
 
 /**
 * Get the swap status of file Id
 * @param Id
 * @return swap status
 */
-int GetSwapStatus(int Id);
+FILEIO_IMPEXP int GetSwapStatus(int Id);
 
 /**
 * Set the swap status of file Id
 * @param Id
 * @param new swap
 */
-void SetSwapStatus(int Id,int newswap);
+FILEIO_IMPEXP void SetSwapStatus(int Id,int newswap);
 
 /**
 * Get the mode of file Id
 * @param Id
 * @return mode
 */
-int GetFileModeOpenedInScilab(int Id);
+FILEIO_IMPEXP int GetFileModeOpenedInScilab(int Id);
 
 /**
 * Set the mode of file Id
 * @param Id
 * @param new mode
 */
-void SetFileModeOpenedInScilab(int Id,int mode);
+FILEIO_IMPEXP void SetFileModeOpenedInScilab(int Id,int mode);
 
 /**
 * Get the type of file Id
 * @param Id
 * @return Type (Fortran,C)
 */
-int GetFileTypeOpenedInScilab(int Id);
+FILEIO_IMPEXP int GetFileTypeOpenedInScilab(int Id);
 
 /**
 * Set the mode of file Id
 * @param Id
 * @param new Type (Fortran,C)
 */
-void SetFileTypeOpenedInScilab(int Id,int Type);
+FILEIO_IMPEXP void SetFileTypeOpenedInScilab(int Id,int Type);
 
 /**
 * Get the name of file Id
 * @param Id
 * @return name
 */
-char* GetFileNameOpenedInScilab(int Id);
+FILEIO_IMPEXP char* GetFileNameOpenedInScilab(int Id);
 
 /**
 * Set the name of file Id
@@ -120,45 +121,46 @@ char* GetFileNameOpenedInScilab(int Id);
 * @param new name
 * @return TRUE or FALSE
 */
-BOOL SetFileNameOpenedInScilab(int Id,char *name);
+FILEIO_IMPEXP BOOL SetFileNameOpenedInScilab(int Id,char *name);
 
 /**
 * Free filename of file Id
 * @param Id
 * @return TRUE or FALSE
 */
-BOOL FreeFileNameOpenedInScilab(int Id);
+FILEIO_IMPEXP BOOL FreeFileNameOpenedInScilab(int Id);
 
 /**
 * Initialize Scilab's file list
 * @return TRUE or FALSE
 */
-BOOL InitializeScilabFilesList(void);
+FILEIO_IMPEXP BOOL InitializeScilabFilesList(void);
 
 /**
 * Terminate Scilab's file list
 * @return TRUE or FALSE
 */
-BOOL TerminateScilabFilesList(void);
+FILEIO_IMPEXP BOOL TerminateScilabFilesList(void);
 
 /**
 * Extend Scilab's file list
 * @return TRUE or FALSE
 */
-BOOL ExtendScilabFilesList(int NewSize);
+FILEIO_IMPEXP BOOL ExtendScilabFilesList(int NewSize);
 
 /**
 * Search if filename is already opened in Scilab
 * @return TRUE or FALSE
 */
-BOOL IsAlreadyOpenedInScilab(char *filename);
+FILEIO_IMPEXP BOOL IsAlreadyOpenedInScilab(char *filename);
 
 /**
 * Get ID of a filename opened in scilab
 * @param[in] filen name
 * @return file ID or FILE_ID_NOT_DEFINED
 */
-int GetIdFromFilename(char *filename);
+FILEIO_IMPEXP int GetIdFromFilename(char *filename);
+
 #endif /* __FILESMANAGEMENT_H__ */
 /*--------------------------------------------------------------------------*/
 
index 983e871..65b521e 100644 (file)
@@ -13,6 +13,8 @@
 #ifndef __FINDFILES_H__
 #define __FINDFILES_H__
 
+#include "dynlib_fileio.h"
+
 /** 
 * Finding all files in a directory with a given filespec
 * @param path example : "c:\"
@@ -21,7 +23,7 @@
 * @return all the files except '.' & '..'
 */
 
-char **findfiles(char *path,char *filespec,int *sizeListReturned);
+FILEIO_IMPEXP char **findfiles(char *path,char *filespec,int *sizeListReturned);
 
 #endif /* __FINDFILES_H__ */
 /*--------------------------------------------------------------------------*/ 
index 72e40f8..7caa550 100644 (file)
@@ -13,6 +13,7 @@
 #ifndef __GETFILEDESC_H__
 #define __GETFILEDESC_H__
 
+#include "dynlib_fileio.h"
 #include "machine.h"
 
 /**
@@ -20,7 +21,7 @@
 * @param fd (id)
 * @param[out] fd (-1 error)
 */
-void C2F(getfiledesc)(int *fd); 
+FILEIO_IMPEXP void C2F(getfiledesc)(int *fd); 
 
 #endif /* __GETFILEDESC_H__ */
 /*--------------------------------------------------------------------------*/
index b8378de..4c63ad8 100644 (file)
 #define __GETFILEINFO_H__
 
 #include <stdio.h>
+#include "dynlib_fileio.h"
 #include "machine.h"
 
 /**
 * get file info in the files table
 */
-void C2F(getfileinfo)(int *fd, FILE *fa, int *swap, int *type, int *mode, char *filename, int *lf, int *ierr);
+FILEIO_IMPEXP void C2F(getfileinfo)(int *fd, FILE *fa, int *swap, int *type, int *mode, char *filename, int *lf, int *ierr);
 
 #endif /* __GETFILEINFO_H__ */
 
index d30e76a..bce24bc 100644 (file)
@@ -13,6 +13,7 @@
 #ifndef __GETFILETYPE_H__
 #define __GETFILETYPE_H__
 
+#include "dynlib_fileio.h"
 #include "machine.h"
 
 /**
@@ -22,7 +23,7 @@
  * @param type  
  * @param ierr  
  */
-void C2F(getfiletype)(int *fd, int *type, int *ierr);
+FILEIO_IMPEXP void C2F(getfiletype)(int *fd, int *type, int *ierr);
 
 #endif /* __GETFILETYPE_H__ */
 /*--------------------------------------------------------------------------*/
index 717eba7..59e5edc 100644 (file)
@@ -13,6 +13,7 @@
 #ifndef __GETSHORTPATHNAME_H__
 #define __GETSHORTPATHNAME_H__
 
+#include "dynlib_fileio.h"
 #include "machine.h" /* C2F */
 #include "BOOL.h" /* BOOL */
 
@@ -24,9 +25,9 @@
 * on Linux returns same path name
 * used for Windows
 */
-char *getshortpathname(char *longpathname, BOOL *convertok);
+FILEIO_IMPEXP char *getshortpathname(char *longpathname, BOOL *convertok);
 
-int C2F(getshortpathname)(char *pathname,int *len);
+FILEIO_IMPEXP int C2F(getshortpathname)(char *pathname,int *len);
 
 #endif /* __GETSHORTPATHNAME_H__ */
 /*--------------------------------------------------------------------------*/
index 1f23ad3..8a16532 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #ifndef __GW_FILEIO_H__
 #define __GW_FILEIO_H__
-
+#include "dynlib_fileio.h"
 #include "api_common.h"
 /*--------------------------------------------------------------------------*/ 
-int gw_fileio(void);
+FILEIO_IMPEXP int gw_fileio(void);
 /*--------------------------------------------------------------------------*/ 
-int sci_meof(char *fname,unsigned long fname_len);
-int sci_mopen(char *fname,unsigned long fname_len);
-int sci_mclose(char *fname,unsigned long fname_len);
-int sci_merror(char *fname,unsigned long fname_len);
-int sci_mputstr(char *fname,unsigned long fname_len);
-int sci_mput(char *fname,unsigned long fname_len);
-int sci_mget(char *fname,unsigned long fname_len);
-int sci_mgetstr(char *fname,unsigned long fname_len);
-int sci_mseek(char *fname,unsigned long fname_len);
-int sci_mtell(char *fname,unsigned long fname_len);
-int sci_mclearerr(char *fname,unsigned long fname_len);
-int sci_fscanfMat(char *fname,unsigned long fname_len);
-int sci_mfprintf(char *fname,unsigned long fname_len);
-int sci_scanf(char *fname,unsigned long fname_len);
-int sci_fprintfMat(char *fname,unsigned long fname_len);
-int sci_sscanf(char *fname,unsigned long fname_len);
-int sci_fscanf(char *fname,unsigned long fname_len);
-int sci_findfiles(char *fname,unsigned long fname_len);
-int sci_maxfiles(char *fname,unsigned long fname_len);
-int sci_getdrives(char *fname,unsigned long fname_len);
-int sci_fullpath(char *fname,unsigned long fname_len);
-int sci_deletefile(char *fname,unsigned long fname_len);
-int sci_pathsep(char *fname,unsigned long fname_len);
-int sci_filesep(char *fname,unsigned long fname_len);
-int sci_getlongpathname(char *fname,unsigned long fname_len);
-int sci_getshortpathname(char *fname,unsigned long fname_len);
-int sci_fileext(char *fname,unsigned long fname_len);
-int sci_isdir(char *fname,unsigned long fname_len);
-int sci_createdir(char *fname,unsigned long fname_len);
-int sci_removedir(char *fname,unsigned long fname_len);
-int sci_chdir(char *fname,unsigned long fname_len);
-int sci_pwd(char *fname,unsigned long fname_len);
-int sci_fileinfo(char *fname,unsigned long fname_len);
-int sci_newest(char *fname,unsigned long fname_len);
-int sci_getrelativefilename(char *fname, unsigned long l);
-int sci_get_absolute_file_path(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_meof(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_mopen(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_mclose(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_merror(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_mputstr(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_mput(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_mget(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_mgetstr(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_mseek(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_mtell(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_mclearerr(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_fscanfMat(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_mfprintf(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_scanf(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_fprintfMat(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_sscanf(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_fscanf(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_findfiles(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_maxfiles(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_getdrives(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_fullpath(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_deletefile(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_pathsep(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_filesep(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_getlongpathname(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_getshortpathname(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_fileext(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_isdir(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_createdir(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_removedir(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_chdir(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_pwd(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_fileinfo(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_newest(char *fname,unsigned long fname_len);
+FILEIO_IMPEXP int sci_getrelativefilename(char *fname, unsigned long l);
+FILEIO_IMPEXP int sci_get_absolute_file_path(char *fname,unsigned long fname_len);
 /*--------------------------------------------------------------------------*/ 
 #endif /* __GW_FILEIO_H__ */
 /*--------------------------------------------------------------------------*/
index 5f7a863..df2dc83 100644 (file)
@@ -12,7 +12,7 @@
 /*--------------------------------------------------------------------------*/ 
 #ifndef __ISDIR_H__
 #define __ISDIR_H__
-
+#include "dynlib_fileio.h"
 #include "BOOL.h" /* BOOL */
 
 /**
@@ -20,7 +20,7 @@
 * @param path the directory
 * @return if the directory exists (TRUE) or not (FALSE)
 */
-BOOL isdir(const char *path);
+FILEIO_IMPEXP BOOL isdir(const char *path);
 
 #endif /* __ISDIR_H__ */
 /*--------------------------------------------------------------------------*/ 
index 1fa95f5..71d45ad 100644 (file)
@@ -12,7 +12,7 @@
 /*--------------------------------------------------------------------------*/
 #ifndef __MCLOSE_H__
 #define __MCLOSE_H__
-
+#include "dynlib_fileio.h"
 #include "machine.h"
 
 /*--------------------------------------------------------------------------*/
@@ -25,7 +25,7 @@
 * the current file if *id = -1 
 * all opened file if *id = -2 
 */
-void C2F(mclose) (int *fd, double *res);
+FILEIO_IMPEXP void C2F(mclose) (int *fd, double *res);
 
 #endif /* __MCLOSE_H__ */
 /*--------------------------------------------------------------------------*/
index 4afc236..2e4f097 100644 (file)
@@ -14,6 +14,7 @@
 #define __MGET_H__
 
 #include <stdio.h>
+#include "dynlib_fileio.h"
 #include "machine.h"
 
 /**
 * or can be used to read in little or big endian 
 * if read fails *ierr contains the number of properly read items 
 */
-void C2F(mget) (int *fd, double *res, int *n, char *type, int *ierr);
+FILEIO_IMPEXP void C2F(mget) (int *fd, double *res, int *n, char *type, int *ierr);
 
-void C2F(mgetnc)(int *fd, void * res, int *n1, char *type, int *ierr);
+FILEIO_IMPEXP void C2F(mgetnc)(int *fd, void * res, int *n1, char *type, int *ierr);
 
-void mget2(FILE *fa, int swap, double *res, int n, char *type, int *ierr);
+FILEIO_IMPEXP void mget2(FILE *fa, int swap, double *res, int n, char *type, int *ierr);
 
 #endif /* __MGET_H__ */
 /*--------------------------------------------------------------------------*/
index eb6b37f..d62639a 100644 (file)
@@ -13,6 +13,7 @@
 #ifndef __MOPEN_H__
 #define __MOPEN_H__
 
+#include "dynlib_fileio.h"
 #include "machine.h"
 
 /**
@@ -25,7 +26,7 @@
 * @param[out] error
 */
 
-void C2F(mopen)(int *fd, char *file, char *status, int *f_swap, double *res, int *error);
+FILEIO_IMPEXP void C2F(mopen)(int *fd, char *file, char *status, int *f_swap, double *res, int *error);
 
 #endif  /* __MOPEN_H__ */
 /*--------------------------------------------------------------------------*/
index eaf26d9..a095114 100644 (file)
@@ -14,6 +14,7 @@
 #define __MPUT_H__
 
 #include <stdio.h>
+#include "dynlib_fileio.h"
 #include "machine.h"
 
 /**
 * independant way (i.e write in little-endian) 
 * or can be used to write in little or big endian 
 */
-void C2F(mput) (int *fd, double *res, int *n, char *type, int *ierr);
+FILEIO_IMPEXP void C2F(mput) (int *fd, double *res, int *n, char *type, int *ierr);
 
-void C2F(mputnc) (int *fd, void * res, int *n1, char *type, int *ierr);
+FILEIO_IMPEXP void C2F(mputnc) (int *fd, void * res, int *n1, char *type, int *ierr);
 
-void mput2 (FILE *fa, int swap2, double *res, int n, char *type, int *ierr);
+FILEIO_IMPEXP void mput2 (FILE *fa, int swap2, double *res, int n, char *type, int *ierr);
 
 #endif /* __MPUT_H__ */
 /*--------------------------------------------------------------------------*/
index 9b0e4cb..279f5bd 100644 (file)
 /*--------------------------------------------------------------------------*/
 #ifndef __MSEEK_H__
 #define __MSEEK_H__
-
+#include "dynlib_fileio.h"
 #include "machine.h"
 
 /**
 * seek function 
 */
-void C2F(mseek) (int *fd, int *offset, char *flag, int *err);
+FILEIO_IMPEXP void C2F(mseek) (int *fd, int *offset, char *flag, int *err);
 
 #endif /* __MSEEK_H__ */
 /*--------------------------------------------------------------------------*/
index 09040da..57b1c7b 100644 (file)
 /*--------------------------------------------------------------------------*/
 #ifndef __MTELL_H__
 #define __MTELL_H__
-
+#include "dynlib_fileio.h"
 #include "machine.h"
 
 /**
 * tell function 
 */
-void C2F(mtell) (int *fd, double *offset, int *err);
+FILEIO_IMPEXP void C2F(mtell) (int *fd, double *offset, int *err);
 
 #endif /* __MTELL_H__ */
 /*--------------------------------------------------------------------------*/
index c85ac3b..30796c2 100644 (file)
 #ifndef __READLINE_H__
 #define __READLINE_H__
 
+#include "dynlib_fileio.h"
 #include "machine.h"
-int LineRead(FILE *fd,char buf[],int n,int *cnt,int *nr);
-void C2F(readnextline)(int *fd,char buf[],int *n,int *count,int *nr,int *ierr);
+
+FILEIO_IMPEXP int LineRead(FILE *fd,char buf[],int n,int *cnt,int *nr);
+FILEIO_IMPEXP void C2F(readnextline)(int *fd,char buf[],int *n,int *count,int *nr,int *ierr);
 
 #endif /* __READLINE_H__ */
index 3929eea..ddb84a7 100644 (file)
@@ -12,7 +12,7 @@
 /*--------------------------------------------------------------------------*/ 
 #ifndef __REMOVEDIR_H__
 #define __REMOVEDIR_H__
-
+#include "dynlib_fileio.h"
 #include "BOOL.h" /* BOOL */
 
 /**
@@ -20,7 +20,7 @@
 * @param path the directory
 * @return the result of the operation
 */
-BOOL removedir(char *path);
+FILEIO_IMPEXP BOOL removedir(char *path);
 
 #endif /* __REMOVEDIR_H__ */
 /*--------------------------------------------------------------------------*/ 
index 34b40b4..fc1f99a 100644 (file)
  */
 #ifndef __SCICURDIR_H__
 #define __SCICURDIR_H__
-#include "machine.h"
+
+#include "dynlib_fileio.h"
 
 /**
  * Changes scilab current directory 
  * @param path : the path where Scilab should go
  * @param[out] err : the error code
  */
-int scichdir(char *path,int *err);
+FILEIO_IMPEXP int scichdir(char *path,int *err);
 
 /**
  * Get scilab current directory 
@@ -26,7 +27,7 @@ int scichdir(char *path,int *err);
  * @param[out] lpath : the length of the char * path
  * @param[out] err : the error code
  */
-int scigetcwd(char **path,int *lpath,int *err);
+FILEIO_IMPEXP int scigetcwd(char **path,int *lpath,int *err);
 
 #endif /* __SCICURDIR_H__ */
 /*--------------------------------------------------------------------------*/
index b00f92a..4cdb904 100644 (file)
@@ -15,6 +15,7 @@
 #ifndef __MPUTI_H__
 #define __MPUTI_H__
 
+#include "dynlib_fileio.h"
 #include "machine.h"
 
 /**
@@ -26,7 +27,7 @@
  * @param char type[]   
  * @param ierr  
  */
-void C2F(mputi) (int *fd,int *res,int *n,char type[],int *ierr);
+FILEIO_IMPEXP void C2F(mputi) (int *fd,int *res,int *n,char type[],int *ierr);
 
 #endif /* __MPUTI_H__ */
 
index be75443..d6f9e11 100644 (file)
 #ifndef __MPUTSTR_H__
 #define __MPUTSTR_H__
 
+#include "dynlib_fileio.h"
 #include "machine.h"
 
 /**
 * write a string 
 */
-void C2F(mputstr) (int *fd, char *str, double *res, int *ierr);
+FILEIO_IMPEXP void C2F(mputstr) (int *fd, char *str, double *res, int *ierr);
 
 #endif /* __MPUTSTR_H__ */
 /*--------------------------------------------------------------------------*/