X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=glib%2Fgscanner.h;h=704c2cbb84fcb918c5547f46e34c756d2ccac171;hb=ea4f9ce8a060d53cbc299e4c384089f6cc926caa;hp=3b7ad6fab0cce8871323423eb47e5c78225afe41;hpb=631d0c3534661e549f7df18fbb9832bdf19c5eaf;p=platform%2Fupstream%2Fglib.git
diff --git a/glib/gscanner.h b/glib/gscanner.h
index 3b7ad6f..704c2cb 100644
--- a/glib/gscanner.h
+++ b/glib/gscanner.h
@@ -12,9 +12,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library; if not, see .
*/
/*
@@ -24,13 +22,13 @@
* GLib at ftp://ftp.gtk.org/pub/gtk/.
*/
-#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
-#error "Only can be included directly."
-#endif
-
#ifndef __G_SCANNER_H__
#define __G_SCANNER_H__
+#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
+#error "Only can be included directly."
+#endif
+
#include
#include
@@ -105,6 +103,8 @@ typedef enum
G_TOKEN_COMMENT_SINGLE,
G_TOKEN_COMMENT_MULTI,
+
+ /*< private >*/
G_TOKEN_LAST
} GTokenType;
@@ -150,8 +150,8 @@ struct _GScannerConfig
guint scan_binary : 1;
guint scan_octal : 1;
guint scan_float : 1;
- guint scan_hex : 1; /* `0x0ff0' */
- guint scan_hex_dollar : 1; /* `$0ff0' */
+ guint scan_hex : 1; /* '0x0ff0' */
+ guint scan_hex_dollar : 1; /* '$0ff0' */
guint scan_string_sq : 1; /* string: 'anything' */
guint scan_string_dq : 1; /* string: "\\-escapes!\n" */
guint numbers_2_int : 1; /* bin, octal, hex => int */
@@ -161,6 +161,8 @@ struct _GScannerConfig
guint symbol_2_token : 1;
guint scope_0_fallback : 1; /* try scope 0 on lookups? */
guint store_int64 : 1; /* use value.v_int64 rather than v_int */
+
+ /*< private >*/
guint padding_dummy;
};
@@ -193,7 +195,8 @@ struct _GScanner
GTokenValue next_value;
guint next_line;
guint next_position;
-
+
+ /*< private >*/
/* to be considered private */
GHashTable *symbol_table;
gint input_fd;
@@ -201,44 +204,64 @@ struct _GScanner
const gchar *text_end;
gchar *buffer;
guint scope_id;
-
+
+ /*< public >*/
/* handler function for _warn and _error */
GScannerMsgFunc msg_handler;
};
+GLIB_AVAILABLE_IN_ALL
GScanner* g_scanner_new (const GScannerConfig *config_templ);
+GLIB_AVAILABLE_IN_ALL
void g_scanner_destroy (GScanner *scanner);
+GLIB_AVAILABLE_IN_ALL
void g_scanner_input_file (GScanner *scanner,
gint input_fd);
+GLIB_AVAILABLE_IN_ALL
void g_scanner_sync_file_offset (GScanner *scanner);
+GLIB_AVAILABLE_IN_ALL
void g_scanner_input_text (GScanner *scanner,
const gchar *text,
guint text_len);
+GLIB_AVAILABLE_IN_ALL
GTokenType g_scanner_get_next_token (GScanner *scanner);
+GLIB_AVAILABLE_IN_ALL
GTokenType g_scanner_peek_next_token (GScanner *scanner);
+GLIB_AVAILABLE_IN_ALL
GTokenType g_scanner_cur_token (GScanner *scanner);
+GLIB_AVAILABLE_IN_ALL
GTokenValue g_scanner_cur_value (GScanner *scanner);
+GLIB_AVAILABLE_IN_ALL
guint g_scanner_cur_line (GScanner *scanner);
+GLIB_AVAILABLE_IN_ALL
guint g_scanner_cur_position (GScanner *scanner);
+GLIB_AVAILABLE_IN_ALL
gboolean g_scanner_eof (GScanner *scanner);
+GLIB_AVAILABLE_IN_ALL
guint g_scanner_set_scope (GScanner *scanner,
guint scope_id);
+GLIB_AVAILABLE_IN_ALL
void g_scanner_scope_add_symbol (GScanner *scanner,
guint scope_id,
const gchar *symbol,
gpointer value);
+GLIB_AVAILABLE_IN_ALL
void g_scanner_scope_remove_symbol (GScanner *scanner,
guint scope_id,
const gchar *symbol);
+GLIB_AVAILABLE_IN_ALL
gpointer g_scanner_scope_lookup_symbol (GScanner *scanner,
guint scope_id,
const gchar *symbol);
+GLIB_AVAILABLE_IN_ALL
void g_scanner_scope_foreach_symbol (GScanner *scanner,
guint scope_id,
GHFunc func,
gpointer user_data);
+GLIB_AVAILABLE_IN_ALL
gpointer g_scanner_lookup_symbol (GScanner *scanner,
const gchar *symbol);
+GLIB_AVAILABLE_IN_ALL
void g_scanner_unexp_token (GScanner *scanner,
GTokenType expected_token,
const gchar *identifier_spec,
@@ -246,9 +269,11 @@ void g_scanner_unexp_token (GScanner *scanner,
const gchar *symbol_name,
const gchar *message,
gint is_error);
+GLIB_AVAILABLE_IN_ALL
void g_scanner_error (GScanner *scanner,
const gchar *format,
...) G_GNUC_PRINTF (2,3);
+GLIB_AVAILABLE_IN_ALL
void g_scanner_warn (GScanner *scanner,
const gchar *format,
...) G_GNUC_PRINTF (2,3);