Upadted comments, reformatted.
FossilOrigin-Name: e040796769d7b529f079874260580ae88eef67c2fa97c8516984fdc19bb42116
This commit is contained in:
parent
039553f32e
commit
5a3890f7b3
@ -1,5 +1,4 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdint.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -11,15 +10,17 @@
|
|||||||
* @param filename name of file to load
|
* @param filename name of file to load
|
||||||
* @param size variable which receives the size of the file in bytes
|
* @param size variable which receives the size of the file in bytes
|
||||||
* @return a pointer to the memory where the file was loaded in \n
|
* @return a pointer to the memory where the file was loaded in \n
|
||||||
* The memory must be freed using free.
|
* The memory allocated returned in data must be freed using free.
|
||||||
*
|
*
|
||||||
* Eexample:
|
* Eexample:
|
||||||
* \code
|
* \code
|
||||||
#include "capwap/file.h"
|
#include "capwap/file.h"
|
||||||
size_t bytes;
|
size_t bytes;
|
||||||
char * data = cw_load_file("file.txt",&bytes);
|
char * data = cw_load_file("file.txt",&bytes);
|
||||||
if (data)
|
if (data){
|
||||||
|
// Do something with data ...
|
||||||
free (data);
|
free (data);
|
||||||
|
}
|
||||||
\endcode
|
\endcode
|
||||||
*/
|
*/
|
||||||
char *cw_load_file(const char *filename, size_t * size)
|
char *cw_load_file(const char *filename, size_t * size)
|
||||||
|
Loading…
Reference in New Issue
Block a user