Mercurial > trustbridge
comparison common/listutil.h @ 769:44257ecdae6d
Make Read File public
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Thu, 10 Jul 2014 19:11:09 +0200 |
parents | bf54c9fc0d63 |
children | 78798d3af8f0 |
comparison
equal
deleted
inserted
replaced
768:3f290ea49d45 | 769:44257ecdae6d |
---|---|
79 * @returns a newly allocated array of strings containing the encoded | 79 * @returns a newly allocated array of strings containing the encoded |
80 * certificates or NULL on error. | 80 * certificates or NULL on error. |
81 * */ | 81 * */ |
82 char **get_certs_from_list (char *data, const size_t size); | 82 char **get_certs_from_list (char *data, const size_t size); |
83 | 83 |
84 /** | |
85 * @brief Read a file into memory. | |
86 * | |
87 * The caller needs to free data | |
88 * | |
89 * @param[in] fileName Name of the file. | |
90 * @param[out] data the file content | |
91 * @param[out] size size in bytes of the file content. | |
92 * @param[in] max_size the maximum amount of bytes to read. | |
93 * | |
94 * @return 0 on success an error code otherwise. | |
95 */ | |
96 int read_file(const char *file_name, char **data, size_t *size, | |
97 const size_t max_size); | |
84 #ifdef __cplusplus | 98 #ifdef __cplusplus |
85 } | 99 } |
86 #endif | 100 #endif |
87 #endif | 101 #endif |