add missing config.h includes
authorMatthias Braun <matze@braunis.de>
Sat, 11 Oct 2008 18:21:26 +0000 (18:21 +0000)
committerMatthias Braun <matze@braunis.de>
Sat, 11 Oct 2008 18:21:26 +0000 (18:21 +0000)
[r22703]

ir/libcore/lc_appendable.c
ir/libcore/lc_config_lexer.c
ir/libcore/lc_config_lexer.l
ir/libcore/lc_config_parser.c
ir/libcore/lc_config_parser.y
ir/libcore/lc_opts.c
ir/libcore/lc_opts_enum.c
ir/libcore/lc_printf.c
ir/libcore/lc_type.c

index 7656375..2fa8936 100644 (file)
@@ -16,6 +16,9 @@
   License along with this library; if not, write to the Free Software
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include <stdlib.h>
 #include <stdio.h>
index a87a8e3..217117c 100644 (file)
@@ -6,10 +6,29 @@
 
 /* A lexical scanner generated by flex */
 
+#define yy_create_buffer _lc_opt__create_buffer
+#define yy_delete_buffer _lc_opt__delete_buffer
+#define yy_flex_debug _lc_opt__flex_debug
+#define yy_init_buffer _lc_opt__init_buffer
+#define yy_flush_buffer _lc_opt__flush_buffer
+#define yy_load_buffer_state _lc_opt__load_buffer_state
+#define yy_switch_to_buffer _lc_opt__switch_to_buffer
+#define yyin _lc_opt_in
+#define yyleng _lc_opt_leng
+#define yylex _lc_opt_lex
+#define yylineno _lc_opt_lineno
+#define yyout _lc_opt_out
+#define yyrestart _lc_opt_restart
+#define yytext _lc_opt_text
+#define yywrap _lc_opt_wrap
+#define yyalloc _lc_opt_alloc
+#define yyrealloc _lc_opt_realloc
+#define yyfree _lc_opt_free
+
 #define FLEX_SCANNER
 #define YY_FLEX_MAJOR_VERSION 2
 #define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 33
+#define YY_FLEX_SUBMINOR_VERSION 35
 #if YY_FLEX_SUBMINOR_VERSION > 0
 #define FLEX_BETA
 #endif
@@ -31,7 +50,7 @@
 
 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
 
-#if __STDC_VERSION__ >= 199901L
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
 
 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
  * if you want the limit (max/min) macros for int types.
@@ -54,7 +73,6 @@ typedef int flex_int32_t;
 typedef unsigned char flex_uint8_t;
 typedef unsigned short int flex_uint16_t;
 typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
 
 /* Limits of integral types. */
 #ifndef INT8_MIN
@@ -85,6 +103,8 @@ typedef unsigned int flex_uint32_t;
 #define UINT32_MAX             (4294967295U)
 #endif
 
+#endif /* ! C99 */
+
 #endif /* ! FLEXINT_H */
 
 #ifdef __cplusplus
@@ -94,11 +114,12 @@ typedef unsigned int flex_uint32_t;
 
 #else  /* ! __cplusplus */
 
-#if __STDC__
+/* C99 requires __STDC__ to be defined as 1. */
+#if defined (__STDC__)
 
 #define YY_USE_CONST
 
-#endif /* __STDC__ */
+#endif /* defined (__STDC__) */
 #endif /* ! __cplusplus */
 
 #ifdef YY_USE_CONST
@@ -178,14 +199,9 @@ extern FILE *_lc_opt_in, *_lc_opt_out;
 
 #define unput(c) yyunput( c, (yytext_ptr)  )
 
-/* The following is because we cannot portably get our hands on size_t
- * (without autoconf's help, which isn't available because we want
- * flex-generated scanners to compile on their own).
- */
-
 #ifndef YY_TYPEDEF_YY_SIZE_T
 #define YY_TYPEDEF_YY_SIZE_T
-typedef unsigned int yy_size_t;
+typedef size_t yy_size_t;
 #endif
 
 #ifndef YY_STRUCT_YY_BUFFER_STATE
@@ -501,7 +517,9 @@ char *_lc_opt_text;
   License along with this library; if not, write to the Free Software
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
-
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include <stdio.h>
 
@@ -518,7 +536,7 @@ static int _lc_opt_wrap(void)
 
 
 
-#line 522 "lc_config_lexer.c"
+#line 540 "lc_config_lexer.c"
 
 #define INITIAL 0
 #define LINE_COMMENT 1
@@ -541,6 +559,35 @@ static int _lc_opt_wrap(void)
 
 static int yy_init_globals (void );
 
+/* Accessor methods to globals.
+   These are made visible to non-reentrant scanners for convenience. */
+
+int _lc_opt_lex_destroy (void );
+
+int _lc_opt_get_debug (void );
+
+void _lc_opt_set_debug (int debug_flag  );
+
+YY_EXTRA_TYPE _lc_opt_get_extra (void );
+
+void _lc_opt_set_extra (YY_EXTRA_TYPE user_defined  );
+
+FILE *_lc_opt_get_in (void );
+
+void _lc_opt_set_in  (FILE * in_str  );
+
+FILE *_lc_opt_get_out (void );
+
+void _lc_opt_set_out  (FILE * out_str  );
+
+int _lc_opt_get_leng (void );
+
+char *_lc_opt_get_text (void );
+
+int _lc_opt_get_lineno (void );
+
+void _lc_opt_set_lineno (int line_number  );
+
 /* Macros after this point can all be overridden by user definitions in
  * section 1.
  */
@@ -583,7 +630,7 @@ static int input (void );
 /* This used to be an fputs(), but since the string might contain NUL's,
  * we now use fwrite().
  */
-#define ECHO (void) fwrite( _lc_opt_text, _lc_opt_leng, 1, _lc_opt_out )
+#define ECHO fwrite( _lc_opt_text, _lc_opt_leng, 1, _lc_opt_out )
 #endif
 
 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
@@ -676,10 +723,10 @@ YY_DECL
        register char *yy_cp, *yy_bp;
        register int yy_act;
 
-#line 53 "lc_config_lexer.l"
+#line 55 "lc_config_lexer.l"
 
 
-#line 683 "lc_config_lexer.c"
+#line 730 "lc_config_lexer.c"
 
        if ( !(yy_init) )
                {
@@ -764,65 +811,65 @@ do_action:        /* This label is used only to access EOF actions. */
 
 case 1:
 YY_RULE_SETUP
-#line 55 "lc_config_lexer.l"
+#line 57 "lc_config_lexer.l"
 { BEGIN(BIG_COMMENT); }
        YY_BREAK
 case 2:
 YY_RULE_SETUP
-#line 56 "lc_config_lexer.l"
+#line 58 "lc_config_lexer.l"
 { BEGIN(INITIAL); }
        YY_BREAK
 case 3:
 /* rule 3 can match eol */
 YY_RULE_SETUP
-#line 57 "lc_config_lexer.l"
+#line 59 "lc_config_lexer.l"
 PMANGLE(linenr)++;
        YY_BREAK
 case 4:
 YY_RULE_SETUP
-#line 58 "lc_config_lexer.l"
+#line 60 "lc_config_lexer.l"
 ;
        YY_BREAK
 case 5:
 YY_RULE_SETUP
-#line 60 "lc_config_lexer.l"
+#line 62 "lc_config_lexer.l"
 { BEGIN(LINE_COMMENT); }
        YY_BREAK
 case 6:
 /* rule 6 can match eol */
 YY_RULE_SETUP
-#line 61 "lc_config_lexer.l"
+#line 63 "lc_config_lexer.l"
 { BEGIN(INITIAL); PMANGLE(linenr)++; }
        YY_BREAK
 case 7:
 YY_RULE_SETUP
-#line 62 "lc_config_lexer.l"
+#line 64 "lc_config_lexer.l"
 ;
        YY_BREAK
 case 8:
 YY_RULE_SETUP
-#line 65 "lc_config_lexer.l"
+#line 67 "lc_config_lexer.l"
 { BEGIN(DAT); }
        YY_BREAK
 case 9:
 YY_RULE_SETUP
-#line 66 "lc_config_lexer.l"
+#line 68 "lc_config_lexer.l"
 { BEGIN(STR); }
        YY_BREAK
 case 10:
 YY_RULE_SETUP
-#line 67 "lc_config_lexer.l"
+#line 69 "lc_config_lexer.l"
 { BEGIN(DAT_CONT); }
        YY_BREAK
 case 11:
 YY_RULE_SETUP
-#line 68 "lc_config_lexer.l"
+#line 70 "lc_config_lexer.l"
 { _lc_opt_add_to_data_char(PMANGLE(text)[0]); }
        YY_BREAK
 case 12:
 /* rule 12 can match eol */
 YY_RULE_SETUP
-#line 69 "lc_config_lexer.l"
+#line 71 "lc_config_lexer.l"
 {
                                                BEGIN(INITIAL);
                                                PMANGLE(linenr)++;
@@ -833,17 +880,17 @@ YY_RULE_SETUP
 case 13:
 /* rule 13 can match eol */
 YY_RULE_SETUP
-#line 75 "lc_config_lexer.l"
+#line 77 "lc_config_lexer.l"
 { BEGIN(DAT); PMANGLE(linenr)++; }
        YY_BREAK
 case 14:
 YY_RULE_SETUP
-#line 76 "lc_config_lexer.l"
+#line 78 "lc_config_lexer.l"
 ;
        YY_BREAK
 case 15:
 YY_RULE_SETUP
-#line 79 "lc_config_lexer.l"
+#line 81 "lc_config_lexer.l"
 {
                                                BEGIN(INITIAL);
                                                _lc_opt_add_to_data_char('\0');
@@ -852,43 +899,43 @@ YY_RULE_SETUP
        YY_BREAK
 case 16:
 YY_RULE_SETUP
-#line 85 "lc_config_lexer.l"
+#line 87 "lc_config_lexer.l"
 _lc_opt_add_to_data_char('\n');
        YY_BREAK
 case 17:
 YY_RULE_SETUP
-#line 86 "lc_config_lexer.l"
+#line 88 "lc_config_lexer.l"
 _lc_opt_add_to_data_char('\r');
        YY_BREAK
 case 18:
 YY_RULE_SETUP
-#line 87 "lc_config_lexer.l"
+#line 89 "lc_config_lexer.l"
 _lc_opt_add_to_data_char('\t');
        YY_BREAK
 case 19:
 YY_RULE_SETUP
-#line 88 "lc_config_lexer.l"
+#line 90 "lc_config_lexer.l"
 _lc_opt_add_to_data_char('\b');
        YY_BREAK
 case 20:
 YY_RULE_SETUP
-#line 89 "lc_config_lexer.l"
+#line 91 "lc_config_lexer.l"
 _lc_opt_add_to_data_char('\f');
        YY_BREAK
 case 21:
 YY_RULE_SETUP
-#line 90 "lc_config_lexer.l"
+#line 92 "lc_config_lexer.l"
 _lc_opt_add_to_data_char(_lc_opt_text[1]);
        YY_BREAK
 case 22:
 /* rule 22 can match eol */
 YY_RULE_SETUP
-#line 91 "lc_config_lexer.l"
+#line 93 "lc_config_lexer.l"
 _lc_opt_add_to_data_char(_lc_opt_text[0]);
        YY_BREAK
 case 23:
 YY_RULE_SETUP
-#line 93 "lc_config_lexer.l"
+#line 95 "lc_config_lexer.l"
 {
                                                PMANGLE(lval).text.str = PMANGLE(text);
                                                PMANGLE(lval).text.len = PMANGLE(leng);
@@ -897,31 +944,31 @@ YY_RULE_SETUP
        YY_BREAK
 case 24:
 YY_RULE_SETUP
-#line 98 "lc_config_lexer.l"
+#line 100 "lc_config_lexer.l"
 { return SEP; }
        YY_BREAK
 case 25:
 YY_RULE_SETUP
-#line 100 "lc_config_lexer.l"
+#line 102 "lc_config_lexer.l"
 ;
        YY_BREAK
 case 26:
 /* rule 26 can match eol */
 YY_RULE_SETUP
-#line 101 "lc_config_lexer.l"
+#line 103 "lc_config_lexer.l"
 PMANGLE(linenr)++;
        YY_BREAK
 case 27:
 YY_RULE_SETUP
-#line 103 "lc_config_lexer.l"
+#line 105 "lc_config_lexer.l"
 return _lc_opt_text[0];
        YY_BREAK
 case 28:
 YY_RULE_SETUP
-#line 105 "lc_config_lexer.l"
+#line 107 "lc_config_lexer.l"
 ECHO;
        YY_BREAK
-#line 925 "lc_config_lexer.c"
+#line 972 "lc_config_lexer.c"
 case YY_STATE_EOF(INITIAL):
 case YY_STATE_EOF(LINE_COMMENT):
 case YY_STATE_EOF(BIG_COMMENT):
@@ -1181,6 +1228,14 @@ static int yy_get_next_buffer (void)
        else
                ret_val = EOB_ACT_CONTINUE_SCAN;
 
+       if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+               /* Extend the array by 50%, plus the number we really need. */
+               yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+               YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) _lc_opt_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
+               if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+                       YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+       }
+
        (yy_n_chars) += number_to_move;
        YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
        YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
@@ -1596,6 +1651,8 @@ static void _lc_opt_ensure_buffer_stack (void)
                (yy_buffer_stack) = (struct yy_buffer_state**)_lc_opt_alloc
                                                                (num_to_alloc * sizeof(struct yy_buffer_state*)
                                                                );
+               if ( ! (yy_buffer_stack) )
+                       YY_FATAL_ERROR( "out of dynamic memory in _lc_opt_ensure_buffer_stack()" );
 
                memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
 
@@ -1614,6 +1671,8 @@ static void _lc_opt_ensure_buffer_stack (void)
                                                                ((yy_buffer_stack),
                                                                num_to_alloc * sizeof(struct yy_buffer_state*)
                                                                );
+               if ( ! (yy_buffer_stack) )
+                       YY_FATAL_ERROR( "out of dynamic memory in _lc_opt_ensure_buffer_stack()" );
 
                /* zero only the new slots.*/
                memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
@@ -1912,4 +1971,4 @@ void _lc_opt_free (void * ptr )
 
 #define YYTABLES_NAME "yytables"
 
-#line 105 "lc_config_lexer.l"
+#line 107 "lc_config_lexer.l"
index 9acedd9..ec48dce 100644 (file)
@@ -21,7 +21,9 @@
   License along with this library; if not, write to the Free Software
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
-
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include <stdio.h>
 
index 0a458cd..73fd56a 100644 (file)
   License along with this library; if not, write to the Free Software
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include <string.h>
 
@@ -450,8 +453,8 @@ static const yytype_int8 yyrhs[] =
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint8 yyrline[] =
 {
-       0,    50,    50,    52,    53,    56,    57,    60,    60,    62,
-      62,    64,    66,    67
+       0,    53,    53,    55,    56,    59,    60,    63,    63,    65,
+      65,    67,    69,    70
 };
 #endif
 
index 93e4ecd..16e6c22 100644 (file)
@@ -21,6 +21,9 @@
   License along with this library; if not, write to the Free Software
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include <string.h>
 
index 8d0868d..08ba076 100644 (file)
@@ -16,6 +16,9 @@
   License along with this library; if not, write to the Free Software
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include <stdio.h>
 #include <stdarg.h>
index 4451806..57322e6 100644 (file)
@@ -8,6 +8,9 @@
  *
  * Enum callback and dump implementation.
  */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include <stdlib.h>
 #include <stdarg.h>
index f623d09..650c42a 100644 (file)
@@ -23,6 +23,9 @@
  * @author Sebastian Hack
  * @date 4.12.2005
  */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include <stdlib.h>
 #include <stdio.h>
index 30eaf6b..370c58f 100644 (file)
@@ -16,8 +16,9 @@
   License along with this library; if not, write to the Free Software
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
-
-
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include <ctype.h>
 #include "lc_opts_t.h"