1dirfile_parser_callback(3) GETDATA dirfile_parser_callback(3)
2
3
4
6 dirfile_parser_callback — set the syntax error callback handler for a
7 dirfile
8
10 #include <getdata.h>
11
12 void dirfile_parser_callback(DIRFILE *dirfile, gd_parser_callback_t
13 sehandler, void *extra);
14
16 The dirfile_parser_callback() updates the syntax error callback func‐
17 tion of the DIRFILE object dirfile to be sehandler, and the caller sup‐
18 plied extra pointer passed to the handler to be extra, discarding any
19 syntax error handler and extra pointer which were previously registered
20 for this DIRFILE. If sehandler is NULL, the existing handler will be
21 removed and the default behaviour (abort on error) restored. See
22 dirfile_cbopen(3) for a discussion on the requirements for the syntax
23 handler.
24
25 Since parsing of an existing format file occurs when the DIRFILE object
26 is created, before this function can be called, this function is only
27 useful to set or modify a callback function or its caller data before
28 calling dirfile_include(3), which will invoke the callback function if
29 syntax errors are found in the included fragment.
30
31 This function always succeeds, and has no return value.
32
33
35 dirfile_cbopen(3), dirfile_include(3), dirfile(5)
36
37
38
39Version 0.6.0 6 October 2009 dirfile_parser_callback(3)