diff options
author | Simon Josefsson <simon@josefsson.org> | 2006-11-16 09:04:54 +0000 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2006-11-16 09:04:54 +0000 |
commit | 7fb4b71c5c3f55e7686209d9993726dfaa219b27 (patch) | |
tree | 7511d256eb7c9560bbdb92f9604176e02e24d27c /gl/read-file.h | |
parent | 6cfa79db487699e3ba7116f56df26223cc798f30 (diff) | |
download | libtasn1-7fb4b71c5c3f55e7686209d9993726dfaa219b27.tar.gz |
Use read_binary_file to read data, for Windows. Add self-test to test regressions.
Diffstat (limited to 'gl/read-file.h')
-rw-r--r-- | gl/read-file.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/gl/read-file.h b/gl/read-file.h new file mode 100644 index 0000000..f8c712e --- /dev/null +++ b/gl/read-file.h @@ -0,0 +1,34 @@ +/* read-file.h -- read file contents into a string + Copyright (C) 2006 Free Software Foundation, Inc. + Written by Simon Josefsson. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef READ_FILE_H +#define READ_FILE_H + +/* Get size_t. */ +#include <stddef.h> + +/* Get FILE. */ +#include <stdio.h> + +extern char *fread_file (FILE * stream, size_t * length); + +extern char *read_file (const char *filename, size_t * length); + +extern char *read_binary_file (const char *filename, size_t * length); + +#endif /* READ_FILE_H */ |