2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
25 * $XConsortium: abio.h /main/5 1995/11/06 18:50:10 rswiston $
27 * @(#)abio.h 1.21 11 Feb 1994 cde_app_builder/src/libAButil
29 * RESTRICTED CONFIDENTIAL INFORMATION:
31 * The information in this document is subject to special
32 * restrictions in a confidential disclosure agreement between
33 * HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
34 * document outside HP, IBM, Sun, USL, SCO, or Univel without
35 * Sun's specific written approval. This document and all copies
36 * and derivative works thereof must be returned or destroyed at
39 * Copyright 1993 Sun Microsystems, Inc. All rights reserved.
46 * GUIDE Intermediate Language (GIL) file input / output interface.
53 #define _POSIX_SOURCE 1 /* we want to be POSIX-compliant */
57 #include <ab_private/AB.h>
58 #include <ab_private/istr.h>
59 #include <ab/util_types.h>
69 int abio_indent(FILE *text_file);
70 int abio_outdent(FILE *text_file);
71 int abio_set_indent(FILE *text_file, int level);
72 int abio_get_indent(FILE *text_file);
73 int abio_set_indent_char(FILE *text_file, int indent_char);
74 int abio_get_indent_char(FILE *text_file);
75 int abio_set_indent_chars_per_level(FILE *text_file, int chars_per_level);
76 int abio_get_indent_chars_per_level(FILE *text_file);
79 int abio_close_input(FILE *outFile);
81 int abio_close_output(FILE *outFile);
89 STRING abio_comment_string(void);
91 STRING abio_module_string(void);
93 STRING abio_project_string(void);
95 int abio_get_eof(FILE *inFile);
97 int abio_get_file_begin(FILE *inFile);
99 int abio_get_file_end(FILE *inFile);
101 int abio_get_handler(
106 int abio_get_integer(
111 int abio_get_keyword(
121 int abio_get_list_begin(FILE *inFile);
123 int abio_get_list_end(FILE *inFile);
125 int abio_gil_get_full_name(
127 ISTRING *interfaceOut,
133 int abio_gil_get_object_begin(FILE *inFile);
135 int abio_gil_get_object_end(FILE *inFile);
142 int abio_get_string_begin(FILE *inFile);
144 int abio_get_string_end(FILE *inFile);
146 STRING abio_integer_string(
150 STRING abio_keyword_string(
154 STRING abio_list_begin_string(void);
156 STRING abio_list_end_string(void);
158 STRING abio_name_string(
162 STRING abio_gil_object_begin_string(void);
164 STRING abio_gil_object_end_string(void);
166 STRING abio_open_output(
171 STRING abio_open_gil_input(
176 STRING abio_open_gil_output(
181 int abio_open_bil_output(
187 STRING abio_open_proj_input(
192 STRING abio_open_proj_output(
197 STRING abio_open_resfile_input(
229 int abio_put_integer(
234 int abio_put_keyword(
236 AB_OBJECT_TYPE abo_type
239 int abio_put_keyword_name(
243 int abio_put_handler(
248 int abio_put_full_name(
255 int abio_put_proj_full_name(
268 int abio_put_string_to_file(
273 int abio_put_string_to_buffer(
279 STRING abio_string_begin_string(void);
281 STRING abio_string_end_string(void);
283 STRING abio_string_string(
287 int abio_open_block(FILE *outFile);
289 int abio_close_block(FILE *outFile);
291 int abio_expand_path(
295 int abio_expand_file(
303 int abio_expand_bil_proj_path(
307 int abio_expand_bil_module_path(
311 int abio_expand_bil_encapsulated_path(
315 STRING abio_open_bil_input(
321 float abio_get_bil_version(
326 STRING abio_bil_object_begin_string(void);
328 STRING abio_bil_object_end_string(void);
330 STRING abio_bil_boolean_string(
334 STRING abio_bil_true_string(void);
336 STRING abio_bil_false_string(void);
338 int abio_bil_get_boolean(
343 int abio_bil_put_boolean(
348 STRING abio_check_bil_version(
358 int abio_is_gil_path(
362 int abio_gil_expand_path(
366 int abio_gil_expand_proj_path(
370 int abio_is_gil_proj_path(
374 int abio_gil_put_name(
379 int abio_gil_get_name(
384 STRING abio_gil_boolean_string(
388 STRING abio_gil_true_string(void);
390 STRING abio_gil_false_string(void);
392 int abio_gil_get_boolean(
397 int abio_gil_put_boolean(
403 /*****************************************************************
405 ** Inline implementation **
407 *****************************************************************/
410 #define abio_close_input(fp) (abio_close_input_impl(&(fp)))
411 int abio_close_input_impl(FILE **pFp);
413 #define abio_close_output(fp) (abio_close_output_impl(&(fp)))
414 int abio_close_output_impl(FILE **pFp);