libsdfio 1.0.0
Reader and writer for ISO 25178-71 SDF surface data files in C
Loading...
Searching...
No Matches
file.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2026 Thomas Ascher <thomas.ascher@gmx.at>
3 *
4 * SPDX-License-Identifier: MIT
5 */
6
12
13#ifndef SDFIO_FILE_H
14#define SDFIO_FILE_H
15
16#include <sdfio/reader.h>
17#include <sdfio/sdfio_export.h>
18#include <sdfio/types.h>
19#include <sdfio/writer.h>
20
21#include <stdio.h>
22#include <wchar.h>
23
24#ifdef __cplusplus
25extern "C"
26{
27#endif
28
42SDFIO_API void sdfio_stdio_stream(sdfio_stream *stream, FILE *file);
43
55SDFIO_API sdfio_status sdfio_open_file(sdfio_reader *reader, const char *path);
56
72SDFIO_API sdfio_status sdfio_create_file(sdfio_writer *writer, const char *path,
73 const sdfio_header *header);
74
75#if defined(_WIN32)
83 const wchar_t *path);
84
93 const wchar_t *path,
94 const sdfio_header *header);
95#endif
96
97#ifdef __cplusplus
98}
99#endif
100
101#endif
sdfio_status sdfio_create_wfile(sdfio_writer *writer, const wchar_t *path, const sdfio_header *header)
Variant of sdfio_create_file() with a path of wide characters.
void sdfio_stdio_stream(sdfio_stream *stream, FILE *file)
Creates a stream over a C file.
sdfio_status sdfio_open_file(sdfio_reader *reader, const char *path)
Opens the file at a path as the source and reads its header, as sdfio_open_stream() does for a stream...
sdfio_status sdfio_open_wfile(sdfio_reader *reader, const wchar_t *path)
Variant of sdfio_open_file() with a path of wide characters.
sdfio_status sdfio_create_file(sdfio_writer *writer, const char *path, const sdfio_header *header)
Creates the file at a path and starts it as sdfio_create_stream() does.
struct sdfio_header sdfio_header
Header of a file, with the field names of the standard.
Definition header.h:42
Reader of a file, memory or a stream.
struct sdfio_reader sdfio_reader
Opaque handle of a reader.
Definition reader.h:58
Callbacks that provide or accept the bytes of a file.
Definition types.h:213
Status codes, enumerations, constants, and the structures for allocator, stream and time zone.
sdfio_status
Result of a function call.
Definition types.h:31
Writer of a file or a stream.
struct sdfio_writer sdfio_writer
Opaque handle of a writer.
Definition writer.h:69