1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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__*/
|