forked from CesarAng28/TDA
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfiles.h
More file actions
58 lines (44 loc) · 990 Bytes
/
files.h
File metadata and controls
58 lines (44 loc) · 990 Bytes
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
48
49
50
51
52
53
54
55
56
57
58
//
// files.h
//
//
// Created by Cesar Angeles on 07/09/2020.
//
#ifndef files_h
#define files_h
#include <stdio.h>
#ifdef files_IMPORT
#define EXTERN
#else
#define EXTERN extern
#endif
/* files.h -- Function prototypes */
/**
* Instanciates a new file pointer identified via its name and mode.
* @param
* name (char *):
* Name of the file
* mode (char *):
* Mode of file to be opened {r, rb, a, ab, w, wb}
*
* @return FILE * opened_file.
*/
EXTERN FILE * file_new(char *name, char *mode);
/**
* Writes a bidimensional buffer array into a file.
* @param
* file (FILE *):
* Storage file
* columns (size_t ):
* length of the buffer array
* buff [ ][columns] (long double):
* RAM matrix
* rows (size_t):
* width of the storage buffer
*
* @return void.
*/
EXTERN void file_num_write(FILE * file, size_t columns, long double buff[] [columns], size_t rows);
#undef files_IMPORT
#undef EXTERN
#endif /* files_h */