Bugfixes of ASTERIX I034
[metze/wireshark/wip.git] / wiretap / file_wrappers.h
index ca02fbbab51cab9b0aed9129c2da4d03917a4ea3..40fe9c9788c45fe6261d6e61ca3648252e9dd331 100644 (file)
@@ -1,85 +1,48 @@
 /* file_wrappers.h
- *
- * $Id$
  *
  * Wiretap Library
  * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
  *
- * 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
- * of the License, 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.
+ * SPDX-License-Identifier: GPL-2.0-or-later
  */
 
-#ifndef __FILE_H__
-#define __FILE_H__
+#ifndef __WTAP_FILE_WRAPPERS_H__
+#define __WTAP_FILE_WRAPPERS_H__
 
 #include <glib.h>
-#include <wtap.h>
+#include "wtap.h"
 #include <wsutil/file_util.h>
 #include "ws_symbol_export.h"
 
-WS_DLL_LOCAL
 extern FILE_T file_open(const char *path);
-WS_DLL_LOCAL
 extern FILE_T file_fdopen(int fildes);
-WS_DLL_LOCAL
 extern void file_set_random_access(FILE_T stream, gboolean random_flag, GPtrArray *seek);
-WS_DLL_PUBLIC
-extern gint64 file_seek(FILE_T stream, gint64 offset, int whence, int *err);
-WS_DLL_LOCAL
-extern gint64 file_skip(FILE_T file, gint64 delta, int *err);
-WS_DLL_PUBLIC
-extern gint64 file_tell(FILE_T stream);
-WS_DLL_LOCAL
+WS_DLL_PUBLIC gint64 file_seek(FILE_T stream, gint64 offset, int whence, int *err);
+WS_DLL_PUBLIC gint64 file_tell(FILE_T stream);
 extern gint64 file_tell_raw(FILE_T stream);
-WS_DLL_LOCAL
 extern int file_fstat(FILE_T stream, ws_statb64 *statb, int *err);
-WS_DLL_LOCAL
-extern gboolean file_iscompressed(FILE_T stream);
-WS_DLL_PUBLIC
-extern int file_read(void *buf, unsigned int count, FILE_T file);
-WS_DLL_PUBLIC
-extern int file_getc(FILE_T stream);
-WS_DLL_PUBLIC
-extern char *file_gets(char *buf, int len, FILE_T stream);
-WS_DLL_PUBLIC
-extern int file_eof(FILE_T stream);
-WS_DLL_PUBLIC
-extern int file_error(FILE_T fh, gchar **err_info);
-WS_DLL_LOCAL
+WS_DLL_PUBLIC gboolean file_iscompressed(FILE_T stream);
+WS_DLL_PUBLIC int file_read(void *buf, unsigned int count, FILE_T file);
+WS_DLL_PUBLIC int file_peekc(FILE_T stream);
+WS_DLL_PUBLIC int file_getc(FILE_T stream);
+WS_DLL_PUBLIC char *file_gets(char *buf, int len, FILE_T stream);
+WS_DLL_PUBLIC char *file_getsp(char *buf, int len, FILE_T stream);
+WS_DLL_PUBLIC int file_eof(FILE_T stream);
+WS_DLL_PUBLIC int file_error(FILE_T fh, gchar **err_info);
 extern void file_clearerr(FILE_T stream);
-WS_DLL_LOCAL
 extern void file_fdclose(FILE_T file);
-WS_DLL_LOCAL
 extern int file_fdreopen(FILE_T file, const char *path);
-WS_DLL_LOCAL
 extern void file_close(FILE_T file);
 
-#ifdef HAVE_LIBZ
+#ifdef HAVE_ZLIB
 typedef struct wtap_writer *GZWFILE_T;
 
-WS_DLL_LOCAL
 extern GZWFILE_T gzwfile_open(const char *path);
-WS_DLL_LOCAL
 extern GZWFILE_T gzwfile_fdopen(int fd);
-WS_DLL_LOCAL
 extern guint gzwfile_write(GZWFILE_T state, const void *buf, guint len);
-WS_DLL_LOCAL
 extern int gzwfile_flush(GZWFILE_T state);
-WS_DLL_LOCAL
 extern int gzwfile_close(GZWFILE_T state);
-WS_DLL_LOCAL
 extern int gzwfile_geterr(GZWFILE_T state);
-#endif /* HAVE_LIBZ */
+#endif /* HAVE_ZLIB */
 
 #endif /* __FILE_H__ */