stdio.h File Reference

#include <stdio.h>
#include <isc/lang.h>
#include <isc/result.h>

Go to the source code of this file.

Defines

#define ISC_STDIO_H   1

Functions

ISC_LANG_BEGINDECLS isc_result_t isc_stdio_open (const char *filename, const char *mode, FILE **fp)
 These functions are wrappers around the corresponding stdio functions.
isc_result_t isc_stdio_close (FILE *f)
 Close.
isc_result_t isc_stdio_seek (FILE *f, off_t offset, int whence)
 Seek.
isc_result_t isc_stdio_tell (FILE *f, off_t *offsetp)
 Tell.
isc_result_t isc_stdio_read (void *ptr, size_t size, size_t nmemb, FILE *f, size_t *nret)
 Read.
isc_result_t isc_stdio_write (const void *ptr, size_t size, size_t nmemb, FILE *f, size_t *nret)
 Write.
isc_result_t isc_stdio_flush (FILE *f)
 Flush.
isc_result_t isc_stdio_sync (FILE *f)
 Invoke fsync() on the file descriptor underlying an stdio stream, or an equivalent system-dependent operation. Note that this function has no direct counterpart in the stdio library.


Detailed Description

Definition in file stdio.h.


Define Documentation

#define ISC_STDIO_H   1

Definition at line 21 of file stdio.h.


Function Documentation

ISC_LANG_BEGINDECLS isc_result_t isc_stdio_open ( const char *  filename,
const char *  mode,
FILE **  fp 
)

These functions are wrappers around the corresponding stdio functions.

They return a detailed error code in the form of an an isc_result_t. ANSI C does not guarantee that stdio functions set errno, hence these functions must use platform dependent methods (e.g., the POSIX errno) to construct the error code.

Open

Definition at line 32 of file stdio.c.

References isc__errno2result, and ISC_R_SUCCESS.

Referenced by channel_fromconf(), dns_master_dumpnode(), dns_view_saventa(), do_addzone(), do_modzone(), dump_zone(), isc_lex_openfile(), isc_log_open(), journal_file_create(), journal_open(), main(), ns_server_dumpdb(), ns_server_dumprecursing(), ns_server_dumpsecroots(), ns_server_dumpstats(), nzf_remove(), openfile_map(), openfile_raw(), parse_args(), pk11_parse_uri(), and pk11_rand_seed_fromfile().

isc_result_t isc_stdio_close ( FILE *  f  ) 

Close.

Definition at line 43 of file stdio.c.

References isc__errno2result, ISC_R_SUCCESS, and r.

Referenced by channel_fromconf(), closeandrename(), dns_journal_destroy(), dns_master_dumpinc3(), dns_master_dumpnode(), dns_view_saventa(), do_addzone(), do_modzone(), dump_zone(), dumpcontext_destroy(), generate_session_key(), journal_file_create(), journal_open(), loadctx_destroy(), main(), ns_server_dumprecursing(), ns_server_dumpsecroots(), ns_server_dumpstats(), nzf_remove(), pk11_parse_uri(), and pk11_rand_seed_fromfile().

isc_result_t isc_stdio_seek ( FILE *  f,
off_t  offset,
int  whence 
)

Seek.

Definition at line 54 of file stdio.c.

References isc__errno2result, ISC_R_SUCCESS, and r.

Referenced by dns_rbt_serialize_tree(), journal_seek(), nzf_append(), serialize(), serialize_node(), serialize_nodes(), and write_header().

isc_result_t isc_stdio_tell ( FILE *  f,
off_t *  offsetp 
)

Tell.

Definition at line 69 of file stdio.c.

References isc__errno2result, ISC_R_SUCCESS, r, and REQUIRE.

Referenced by dns_rbt_serialize_tree(), nzf_append(), rbt_datawriter(), serialize(), serialize_node(), serialize_nodes(), write_data(), and write_header().

isc_result_t isc_stdio_read ( void *  ptr,
size_t  size,
size_t  nmemb,
FILE *  f,
size_t *  nret 
)

Read.

Definition at line 87 of file stdio.c.

References isc__errno2result, ISC_R_EOF, ISC_R_SUCCESS, and r.

Referenced by journal_read(), load_header(), load_raw(), nzf_remove(), pk11_parse_uri(), pk11_rand_seed_fromfile(), and read_and_check().

isc_result_t isc_stdio_write ( const void *  ptr,
size_t  size,
size_t  nmemb,
FILE *  f,
size_t *  nret 
)

Write.

Definition at line 105 of file stdio.c.

References isc__errno2result, ISC_R_SUCCESS, and r.

Referenced by add_comment(), dns_rbt_zero_header(), dump_rdataset(), dumpnode(), dumpzone(), journal_file_create(), journal_write(), nzf_append(), nzf_remove(), rbt_datawriter(), rbtdb_write_header(), rbtdb_zero_header(), serialize_node(), write_header(), and writeheader().

isc_result_t isc_stdio_flush ( FILE *  f  ) 

Flush.

Definition at line 121 of file stdio.c.

References isc__errno2result, ISC_R_SUCCESS, and r.

Referenced by dumpdone(), flushandsync(), generate_session_key(), and journal_fsync().

isc_result_t isc_stdio_sync ( FILE *  f  ) 

Invoke fsync() on the file descriptor underlying an stdio stream, or an equivalent system-dependent operation. Note that this function has no direct counterpart in the stdio library.

Definition at line 139 of file stdio.c.

References isc__errno2result, ISC_R_SUCCESS, and r.

Referenced by flushandsync(), and journal_fsync().


Generated on Tue Apr 28 17:41:16 2015 by Doxygen 1.5.4 for BIND9 Internals 9.11.0pre-alpha