summaryrefslogtreecommitdiff
path: root/src/c/Files/includes/files.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/c/Files/includes/files.h')
-rw-r--r--src/c/Files/includes/files.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/c/Files/includes/files.h b/src/c/Files/includes/files.h
new file mode 100644
index 0000000..4491e7e
--- /dev/null
+++ b/src/c/Files/includes/files.h
@@ -0,0 +1,47 @@
+ /* Copyright (C) 2016 - IIT Bombay - FOSSEE
+
+ 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
+ Author: Siddhesh Wani
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+ */
+#ifndef __FILES_H__
+#define __FILES_H__
+
+#include <stdio.h>
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+FILE *mopen (char *path, char *mode);
+
+int mclose(FILE *fptr);
+
+/*For writing single/scalar values*/
+int dmputs (FILE *fptr, double data);
+int smputs (FILE *fptr, float data);
+int u8mputs (FILE *fptr, uint8 data);
+int i8mputs (FILE *fptr, int8 data);
+int u16mputs (FILE *fptr, uint16 data);
+int i16mputs (FILE *fptr, int16 data);
+
+/*For writing array/matrix values*/
+int dmputa (FILE *fptr, double *data, int row, int col);
+int smputa (FILE *fptr, float *data, int row, int col);
+int u8mputa (FILE *fptr, uint8 *data, int row, int col);
+int i8mputa (FILE *fptr, int8 *data, int row, int col);
+int u16mputa (FILE *fptr, uint16 *data, int row, int col);
+int i16mputa (FILE *fptr, int16 *data, int row, int col);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /*__FILES_H__*/