NetBurner 3.5.0
PDF Version
 
effs_utils.h
1/*NB_REVISION*/
2
3/*NB_COPYRIGHT*/
4
5/*-------------------------------------------------------------------
6 EFFS, Embedded FAT File System Utilities
7 -------------------------------------------------------------------*/
8
9#ifndef _EFFS_UTILS_H_
10#define _EFFS_UTILS_H_
11
12#include <effs_fat/fat.h>
13
14#ifdef __cplusplus
15extern "C"
16{
17#endif
18
19 /*-------------------------------------------------------------------
20 fgets()
21
22 Description
23 Reads at most len-1 characters from fp until a newline is found.
24 The characters including the newline (0x0A) are stored in buf.
25 The buffer is terminated with a NULL.
26
27 Returns
28 fgets returns the buffer passed to it, with the data filled in.
29 If end of file occurs with some data already accumulated, the
30 data is returned with no other indication. If no data are read,
31 NULL is returned instead.
32
33 Note that fgets returns all of the data, while gets removes the
34 trailing newline (with no indication that it has done so.)
35 ------------------------------------------------------------------*/
36 extern char *f_fgets(char *buf, int len, F_FILE *fp);
37
38 /*-------------------------------------------------------------------
39 int fputs(const char *s, FILE *fp);
40
41 Description:
42 fputs writes the string at s (but without the trailing null) to
43 the specified file, fp.
44
45 Returns:
46 If successful, the result is 0; otherwise, the result is EOF.
47
48 Portability
49 ANSII C requires fputs, but does not specify that the result
50 on success must be 0; any non-negative value is permitted.
51 ------------------------------------------------------------------*/
52 extern int f_fputs(const char *s, F_FILE *fp);
53
54 /*-------------------------------------------------------------------
55 EFFS fprintf implementation
56 -------------------------------------------------------------------*/
57 extern int f_fprintf(F_FILE *fp, const char *format, ...);
58
59#ifdef __cplusplus
60}
61#endif
62
63#endif /* _EFFS_UTILS_H_ */