Classes | Macros | Typedefs | Functions | Variables
config.cpp File Reference
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <assert.h>
#include <ctype.h>
#include <stdarg.h>
#include <qfileinfo.h>
#include <qdir.h>
#include <qtextstream.h>
#include <qregexp.h>
#include <qstack.h>
#include <qglobal.h>
#include "config.h"
#include "version.h"
#include "portable.h"
#include "util.h"
#include "message.h"
#include "lang_cfg.h"
#include "configoptions.h"

Go to the source code of this file.

Classes

struct  yy_buffer_state
 
struct  yy_trans_info
 
struct  ConfigFileState
 

Macros

#define YY_INT_ALIGNED   short int
 
#define yy_create_buffer   configYY_create_buffer
 
#define yy_delete_buffer   configYY_delete_buffer
 
#define yy_flex_debug   configYY_flex_debug
 
#define yy_init_buffer   configYY_init_buffer
 
#define yy_flush_buffer   configYY_flush_buffer
 
#define yy_load_buffer_state   configYY_load_buffer_state
 
#define yy_switch_to_buffer   configYY_switch_to_buffer
 
#define yyin   configYYin
 
#define yyleng   configYYleng
 
#define yylex   configYYlex
 
#define yylineno   configYYlineno
 
#define yyout   configYYout
 
#define yyrestart   configYYrestart
 
#define yytext   configYYtext
 
#define yywrap   configYYwrap
 
#define yyalloc   configYYalloc
 
#define yyrealloc   configYYrealloc
 
#define yyfree   configYYfree
 
#define FLEX_SCANNER
 
#define YY_FLEX_MAJOR_VERSION   2
 
#define YY_FLEX_MINOR_VERSION   5
 
#define YY_FLEX_SUBMINOR_VERSION   35
 
#define FLEX_BETA
 
#define FLEXINT_H
 
#define INT8_MIN   (-128)
 
#define INT16_MIN   (-32767-1)
 
#define INT32_MIN   (-2147483647-1)
 
#define INT8_MAX   (127)
 
#define INT16_MAX   (32767)
 
#define INT32_MAX   (2147483647)
 
#define UINT8_MAX   (255U)
 
#define UINT16_MAX   (65535U)
 
#define UINT32_MAX   (4294967295U)
 
#define yyconst
 
#define YY_NULL   0
 
#define YY_SC_TO_UI(c)   ((unsigned int) (unsigned char) c)
 
#define BEGIN   (yy_start) = 1 + 2 *
 
#define YY_START   (((yy_start) - 1) / 2)
 
#define YYSTATE   YY_START
 
#define YY_STATE_EOF(state)   (YY_END_OF_BUFFER + state + 1)
 
#define YY_NEW_FILE   configYYrestart(configYYin )
 
#define YY_END_OF_BUFFER_CHAR   0
 
#define YY_BUF_SIZE   16384
 
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
 
#define YY_TYPEDEF_YY_BUFFER_STATE
 
#define EOB_ACT_CONTINUE_SCAN   0
 
#define EOB_ACT_END_OF_FILE   1
 
#define EOB_ACT_LAST_MATCH   2
 
#define YY_LESS_LINENO(n)
 
#define yyless(n)
 
#define unput(c)   yyunput( c, (yytext_ptr) )
 
#define YY_TYPEDEF_YY_SIZE_T
 
#define YY_STRUCT_YY_BUFFER_STATE
 
#define YY_BUFFER_NEW   0
 
#define YY_BUFFER_NORMAL   1
 
#define YY_BUFFER_EOF_PENDING   2
 
#define YY_CURRENT_BUFFER
 
#define YY_CURRENT_BUFFER_LVALUE   (yy_buffer_stack)[(yy_buffer_stack_top)]
 
#define YY_FLUSH_BUFFER   configYY_flush_buffer(YY_CURRENT_BUFFER )
 
#define yy_new_buffer   configYY_create_buffer
 
#define yy_set_interactive(is_interactive)
 
#define yy_set_bol(at_bol)
 
#define YY_AT_BOL()   (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
 
#define configYYwrap(n)   1
 
#define YY_SKIP_YYWRAP
 
#define yytext_ptr   configYYtext
 
#define YY_DO_BEFORE_ACTION
 
#define YY_NUM_RULES   27
 
#define YY_END_OF_BUFFER   28
 
#define REJECT   reject_used_but_not_detected
 
#define yymore()   yymore_used_but_not_detected
 
#define YY_MORE_ADJ   0
 
#define YY_RESTORE_YY_MORE_OFFSET
 
#define YY_NO_INPUT   1
 
#define YY_NO_UNISTD_H   1
 
#define Config_getString(val)   getString(__FILE__,__LINE__,val)
 
#define Config_getInt(val)    getInt(__FILE__,__LINE__,val)
 
#define Config_getList(val)    getList(__FILE__,__LINE__,val)
 
#define Config_getEnum(val)    getEnum(__FILE__,__LINE__,val)
 
#define Config_getBool(val)    getBool(__FILE__,__LINE__,val)
 
#define MAX_INCLUDE_DEPTH   10
 
#define YY_NEVER_INTERACTIVE   1
 
#define YY_INPUT(buf, result, max_size)   result=yyread(buf,max_size);
 
#define INITIAL   0
 
#define PreStart   1
 
#define Start   2
 
#define SkipComment   3
 
#define SkipInvalid   4
 
#define GetString   5
 
#define GetBool   6
 
#define GetStrList   7
 
#define GetQuotedString   8
 
#define GetEnvVar   9
 
#define Include   10
 
#define YY_EXTRA_TYPE   void *
 
#define YY_READ_BUF_SIZE   8192
 
#define ECHO   do { if (fwrite( configYYtext, configYYleng, 1, configYYout )) {} } while (0)
 
#define yyterminate()   return YY_NULL
 
#define YY_START_STACK_INCR   25
 
#define YY_FATAL_ERROR(msg)   yy_fatal_error( msg )
 
#define YY_DECL_IS_OURS   1
 
#define YY_DECL   int configYYlex (void)
 
#define YY_USER_ACTION
 
#define YY_BREAK   break;
 
#define YY_RULE_SETUP   YY_USER_ACTION
 
#define YY_EXIT_FAILURE   2
 
#define yyless(n)
 
#define YYTABLES_NAME   "yytables"
 

Typedefs

typedef signed char flex_int8_t
 
typedef short int flex_int16_t
 
typedef int flex_int32_t
 
typedef unsigned char flex_uint8_t
 
typedef unsigned short int flex_uint16_t
 
typedef unsigned int flex_uint32_t
 
typedef struct yy_buffer_stateYY_BUFFER_STATE
 
typedef size_t yy_size_t
 
typedef unsigned char YY_CHAR
 
typedef int yy_state_type
 

Functions

void configYYrestart (FILE *input_file)
 
void configYY_switch_to_buffer (YY_BUFFER_STATE new_buffer)
 
YY_BUFFER_STATE configYY_create_buffer (FILE *file, int size)
 
void configYY_delete_buffer (YY_BUFFER_STATE b)
 
void configYY_flush_buffer (YY_BUFFER_STATE b)
 
void configYYpush_buffer_state (YY_BUFFER_STATE new_buffer)
 
void configYYpop_buffer_state (void)
 
static void configYYensure_buffer_stack (void)
 
static void configYY_load_buffer_state (void)
 
static void configYY_init_buffer (YY_BUFFER_STATE b, FILE *file)
 
YY_BUFFER_STATE configYY_scan_buffer (char *base, yy_size_t size)
 
YY_BUFFER_STATE configYY_scan_string (yyconst char *yy_str)
 
YY_BUFFER_STATE configYY_scan_bytes (yyconst char *bytes, int len)
 
void * configYYalloc (yy_size_t)
 
void * configYYrealloc (void *, yy_size_t)
 
void configYYfree (void *)
 
static yy_state_type yy_get_previous_state (void)
 
static yy_state_type yy_try_NUL_trans (yy_state_type current_state)
 
static int yy_get_next_buffer (void)
 
static void yy_fatal_error (yyconst char msg[])
 
void config_err (const char *fmt,...)
 
void config_warn (const char *fmt,...)
 
static QCString configStringRecode (const QCString &str, const char *fromEncoding, const char *toEncoding)
 
static QCString convertToComment (const QCString &s, const QCString &u)
 
static int yyread (char *buf, int max_size)
 
static void checkEncoding ()
 
static FILE * tryPath (const char *path, const char *fileName)
 
static void substEnvVarsInStrList (QStrList &sl)
 
static void substEnvVarsInString (QCString &s)
 
static FILE * findFile (const char *fileName)
 
static void readIncludeFile (const char *incName)
 
static int yy_init_globals (void)
 
int configYYlex_destroy (void)
 
int configYYget_debug (void)
 
void configYYset_debug (int debug_flag)
 
YY_EXTRA_TYPE configYYget_extra (void)
 
void configYYset_extra (YY_EXTRA_TYPE user_defined)
 
FILE * configYYget_in (void)
 
void configYYset_in (FILE *in_str)
 
FILE * configYYget_out (void)
 
void configYYset_out (FILE *out_str)
 
int configYYget_leng (void)
 
char * configYYget_text (void)
 
int configYYget_lineno (void)
 
void configYYset_lineno (int line_number)
 
static void yyunput (int c, char *buf_ptr)
 
int configYYlex (void)
 
 if (!(yy_init))
 
 while (1)
 
static void yyunput (int c, register char *yy_bp)
 
static void yy_fatal_error (yyconst char *msg)
 
static void cleanUpPaths (QStrList &str)
 
static QCString configFileToString (const char *name)
 

Variables

int configYYleng
 
FILE * configYYin = (FILE *) 0
 
FILE * configYYout = (FILE *) 0
 
static size_t yy_buffer_stack_top = 0
 
static size_t yy_buffer_stack_max = 0
 
static YY_BUFFER_STATEyy_buffer_stack = 0
 
static char yy_hold_char
 
static int yy_n_chars
 
static char * yy_c_buf_p = (char *) 0
 
static int yy_init = 0
 
static int yy_start = 0
 
static int yy_did_buffer_switch_on_eof
 
int configYYlineno = 1
 
char * configYYtext
 
static yyconst flex_int16_t yy_accept [114]
 
static yyconst flex_int32_t yy_ec [256]
 
static yyconst flex_int32_t yy_meta [29]
 
static yyconst flex_int16_t yy_base [130]
 
static yyconst flex_int16_t yy_def [130]
 
static yyconst flex_int16_t yy_nxt [471]
 
static yyconst flex_int16_t yy_chk [471]
 
static yy_state_type yy_last_accepting_state
 
static char * yy_last_accepting_cpos
 
int configYY_flex_debug = 0
 
static const char * warning_str = "warning: "
 
static const char * error_str = "error: "
 
static const char * inputString
 
static int inputPosition
 
static int yyLineNr
 
static QCString yyFileName
 
static QCString tmpString
 
static QCStrings =0
 
static boolb =0
 
static QStrListl =0
 
static int lastState
 
static QCString elemStr
 
static QStrList includePathList
 
static QStack< ConfigFileStateincludeStack
 
static int includeDepth
 
static bool config_upd = FALSE
 
static QCString encoding
 
static Configconfig
 
 YY_DECL
 
register char * yy_cp
 
register char * yy_bp
 
register int yy_act
 

Macro Definition Documentation

#define BEGIN   (yy_start) = 1 + 2 *

Definition at line 144 of file config.cpp.

#define Config_getBool (   val)    getBool(__FILE__,__LINE__,val)

Definition at line 664 of file config.cpp.

#define Config_getEnum (   val)    getEnum(__FILE__,__LINE__,val)

Definition at line 663 of file config.cpp.

#define Config_getInt (   val)    getInt(__FILE__,__LINE__,val)

Definition at line 661 of file config.cpp.

#define Config_getList (   val)    getList(__FILE__,__LINE__,val)

Definition at line 662 of file config.cpp.

#define Config_getString (   val)    getString(__FILE__,__LINE__,val)

Definition at line 660 of file config.cpp.

#define configYYwrap (   n)    1

Definition at line 354 of file config.cpp.

#define ECHO   do { if (fwrite( configYYtext, configYYleng, 1, configYYout )) {} } while (0)

Definition at line 1324 of file config.cpp.

#define EOB_ACT_CONTINUE_SCAN   0

Definition at line 179 of file config.cpp.

#define EOB_ACT_END_OF_FILE   1

Definition at line 180 of file config.cpp.

#define EOB_ACT_LAST_MATCH   2

Definition at line 181 of file config.cpp.

#define FLEX_BETA

Definition at line 33 of file config.cpp.

#define FLEX_SCANNER

Definition at line 28 of file config.cpp.

#define FLEXINT_H

Definition at line 49 of file config.cpp.

#define GetBool   6

Definition at line 1233 of file config.cpp.

#define GetEnvVar   9

Definition at line 1236 of file config.cpp.

#define GetQuotedString   8

Definition at line 1235 of file config.cpp.

#define GetString   5

Definition at line 1232 of file config.cpp.

#define GetStrList   7

Definition at line 1234 of file config.cpp.

#define Include   10

Definition at line 1237 of file config.cpp.

#define INITIAL   0

Definition at line 1227 of file config.cpp.

#define INT16_MAX   (32767)

Definition at line 92 of file config.cpp.

#define INT16_MIN   (-32767-1)

Definition at line 83 of file config.cpp.

#define INT32_MAX   (2147483647)

Definition at line 95 of file config.cpp.

#define INT32_MIN   (-2147483647-1)

Definition at line 86 of file config.cpp.

#define INT8_MAX   (127)

Definition at line 89 of file config.cpp.

#define INT8_MIN   (-128)

Definition at line 80 of file config.cpp.

#define MAX_INCLUDE_DEPTH   10

Definition at line 689 of file config.cpp.

#define PreStart   1

Definition at line 1228 of file config.cpp.

#define REJECT   reject_used_but_not_detected

Definition at line 605 of file config.cpp.

#define SkipComment   3

Definition at line 1230 of file config.cpp.

#define SkipInvalid   4

Definition at line 1231 of file config.cpp.

#define Start   2

Definition at line 1229 of file config.cpp.

#define UINT16_MAX   (65535U)

Definition at line 101 of file config.cpp.

#define UINT32_MAX   (4294967295U)

Definition at line 104 of file config.cpp.

#define UINT8_MAX   (255U)

Definition at line 98 of file config.cpp.

#define unput (   c)    yyunput( c, (yytext_ptr) )

Definition at line 199 of file config.cpp.

#define YY_AT_BOL ( )    (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

Definition at line 350 of file config.cpp.

#define YY_BREAK   break;

Definition at line 1403 of file config.cpp.

#define YY_BUF_SIZE   16384

Definition at line 163 of file config.cpp.

#define YY_BUFFER_EOF_PENDING   2

Definition at line 266 of file config.cpp.

#define YY_BUFFER_NEW   0

Definition at line 254 of file config.cpp.

#define YY_BUFFER_NORMAL   1

Definition at line 255 of file config.cpp.

#define yy_create_buffer   configYY_create_buffer

Definition at line 9 of file config.cpp.

#define YY_CURRENT_BUFFER
Value:
: NULL)
static YY_BUFFER_STATE * yy_buffer_stack
Definition: config.cpp:274
static size_t yy_buffer_stack_top
Definition: config.cpp:272

Definition at line 282 of file config.cpp.

#define YY_CURRENT_BUFFER_LVALUE   (yy_buffer_stack)[(yy_buffer_stack_top)]

Definition at line 289 of file config.cpp.

#define YY_DECL   int configYYlex (void)

Definition at line 1391 of file config.cpp.

#define YY_DECL_IS_OURS   1

Definition at line 1387 of file config.cpp.

#define yy_delete_buffer   configYY_delete_buffer

Definition at line 10 of file config.cpp.

#define YY_DO_BEFORE_ACTION
Value:
configYYleng = (size_t) (yy_cp - yy_bp); \
*yy_cp = '\0'; \
static char yy_hold_char
Definition: config.cpp:292
register char * yy_cp
Definition: config.cpp:1414
static char * yy_c_buf_p
Definition: config.cpp:297
int configYYleng
Definition: config.cpp:294
register char * yy_bp
Definition: config.cpp:1414
#define yytext_ptr
Definition: config.cpp:368

Definition at line 378 of file config.cpp.

#define YY_END_OF_BUFFER   28

Definition at line 386 of file config.cpp.

#define YY_END_OF_BUFFER_CHAR   0

Definition at line 159 of file config.cpp.

#define YY_EXIT_FAILURE   2

Definition at line 2650 of file config.cpp.

#define YY_EXTRA_TYPE   void *

Definition at line 1248 of file config.cpp.

#define YY_FATAL_ERROR (   msg)    yy_fatal_error( msg )

Definition at line 1378 of file config.cpp.

#define yy_flex_debug   configYY_flex_debug

Definition at line 11 of file config.cpp.

#define YY_FLEX_MAJOR_VERSION   2

Definition at line 29 of file config.cpp.

#define YY_FLEX_MINOR_VERSION   5

Definition at line 30 of file config.cpp.

#define YY_FLEX_SUBMINOR_VERSION   35

Definition at line 31 of file config.cpp.

#define yy_flush_buffer   configYY_flush_buffer

Definition at line 13 of file config.cpp.

#define YY_FLUSH_BUFFER   configYY_flush_buffer(YY_CURRENT_BUFFER )

Definition at line 318 of file config.cpp.

#define yy_init_buffer   configYY_init_buffer

Definition at line 12 of file config.cpp.

#define YY_INPUT (   buf,
  result,
  max_size 
)    result=yyread(buf,max_size);

Definition at line 1059 of file config.cpp.

#define YY_INT_ALIGNED   short int

Definition at line 5 of file config.cpp.

#define YY_LESS_LINENO (   n)

Definition at line 183 of file config.cpp.

#define yy_load_buffer_state   configYY_load_buffer_state

Definition at line 14 of file config.cpp.

#define YY_MORE_ADJ   0

Definition at line 607 of file config.cpp.

#define YY_NEVER_INTERACTIVE   1

Definition at line 690 of file config.cpp.

#define yy_new_buffer   configYY_create_buffer

Definition at line 328 of file config.cpp.

#define YY_NEW_FILE   configYYrestart(configYYin )

Definition at line 157 of file config.cpp.

#define YY_NO_INPUT   1

Definition at line 656 of file config.cpp.

#define YY_NO_UNISTD_H   1

Definition at line 657 of file config.cpp.

#define YY_NULL   0

Definition at line 131 of file config.cpp.

#define YY_NUM_RULES   27

Definition at line 385 of file config.cpp.

#define YY_READ_BUF_SIZE   8192

Definition at line 1316 of file config.cpp.

#define YY_RESTORE_YY_MORE_OFFSET

Definition at line 608 of file config.cpp.

#define YY_RULE_SETUP   YY_USER_ACTION

Definition at line 1406 of file config.cpp.

#define YY_SC_TO_UI (   c)    ((unsigned int) (unsigned char) c)

Definition at line 138 of file config.cpp.

#define yy_set_bol (   at_bol)
Value:
{ \
configYYensure_buffer_stack (); \
configYY_create_buffer(configYYin,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
#define YY_BUF_SIZE
Definition: config.cpp:163
FILE * configYYin
Definition: config.cpp:359
if(!(yy_init))
Definition: config.cpp:1422
#define YY_CURRENT_BUFFER
Definition: config.cpp:282
#define YY_CURRENT_BUFFER_LVALUE
Definition: config.cpp:289

Definition at line 340 of file config.cpp.

#define yy_set_interactive (   is_interactive)
Value:
{ \
configYYensure_buffer_stack (); \
configYY_create_buffer(configYYin,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
#define YY_BUF_SIZE
Definition: config.cpp:163
FILE * configYYin
Definition: config.cpp:359
if(!(yy_init))
Definition: config.cpp:1422
#define YY_CURRENT_BUFFER
Definition: config.cpp:282
#define YY_CURRENT_BUFFER_LVALUE
Definition: config.cpp:289

Definition at line 330 of file config.cpp.

#define YY_SKIP_YYWRAP

Definition at line 355 of file config.cpp.

#define YY_START   (((yy_start) - 1) / 2)

Definition at line 150 of file config.cpp.

#define YY_START_STACK_INCR   25

Definition at line 1373 of file config.cpp.

#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))

Definition at line 168 of file config.cpp.

#define YY_STATE_EOF (   state)    (YY_END_OF_BUFFER + state + 1)

Definition at line 154 of file config.cpp.

#define YY_STRUCT_YY_BUFFER_STATE

Definition at line 207 of file config.cpp.

#define yy_switch_to_buffer   configYY_switch_to_buffer

Definition at line 15 of file config.cpp.

#define YY_TYPEDEF_YY_BUFFER_STATE

Definition at line 171 of file config.cpp.

#define YY_TYPEDEF_YY_SIZE_T

Definition at line 202 of file config.cpp.

#define YY_USER_ACTION

Definition at line 1398 of file config.cpp.

#define yyalloc   configYYalloc

Definition at line 24 of file config.cpp.

#define yyconst

Definition at line 127 of file config.cpp.

#define yyfree   configYYfree

Definition at line 26 of file config.cpp.

#define yyin   configYYin

Definition at line 16 of file config.cpp.

#define yyleng   configYYleng

Definition at line 17 of file config.cpp.

#define yyless (   n)
Value:
do \
{ \
/* Undo effects of setting up configYYtext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up configYYtext again */ \
} \
while ( 0 )
static char yy_hold_char
Definition: config.cpp:292
register char * yy_cp
Definition: config.cpp:1414
while(1)
Definition: config.cpp:1448
static char * yy_c_buf_p
Definition: config.cpp:297
std::void_t< T > n
#define YY_RESTORE_YY_MORE_OFFSET
Definition: config.cpp:608
#define YY_MORE_ADJ
Definition: config.cpp:607
register char * yy_bp
Definition: config.cpp:1414
#define YY_DO_BEFORE_ACTION
Definition: config.cpp:378

Definition at line 2662 of file config.cpp.

#define yyless (   n)
Value:
do \
{ \
/* Undo effects of setting up configYYtext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
(yy_c_buf_p) = configYYtext + yyless_macro_arg; \
*(yy_c_buf_p) = '\0'; \
configYYleng = yyless_macro_arg; \
} \
while ( 0 )
static char yy_hold_char
Definition: config.cpp:292
while(1)
Definition: config.cpp:1448
static char * yy_c_buf_p
Definition: config.cpp:297
int configYYleng
Definition: config.cpp:294
std::void_t< T > n
char * configYYtext
Definition: config.cpp:609

Definition at line 2662 of file config.cpp.

#define yylex   configYYlex

Definition at line 18 of file config.cpp.

#define yylineno   configYYlineno

Definition at line 19 of file config.cpp.

#define yymore ( )    yymore_used_but_not_detected

Definition at line 606 of file config.cpp.

#define yyout   configYYout

Definition at line 20 of file config.cpp.

#define yyrealloc   configYYrealloc

Definition at line 25 of file config.cpp.

#define yyrestart   configYYrestart

Definition at line 21 of file config.cpp.

#define YYSTATE   YY_START

Definition at line 151 of file config.cpp.

#define YYTABLES_NAME   "yytables"

Definition at line 2852 of file config.cpp.

#define yyterminate ( )    return YY_NULL

Definition at line 1368 of file config.cpp.

#define yytext   configYYtext

Definition at line 22 of file config.cpp.

#define yytext_ptr   configYYtext

Definition at line 368 of file config.cpp.

#define yywrap   configYYwrap

Definition at line 23 of file config.cpp.

Typedef Documentation

typedef short int flex_int16_t

Definition at line 71 of file config.cpp.

typedef int flex_int32_t

Definition at line 72 of file config.cpp.

typedef signed char flex_int8_t

Definition at line 70 of file config.cpp.

typedef unsigned short int flex_uint16_t

Definition at line 74 of file config.cpp.

typedef unsigned int flex_uint32_t

Definition at line 75 of file config.cpp.

typedef unsigned char flex_uint8_t

Definition at line 73 of file config.cpp.

Definition at line 172 of file config.cpp.

typedef unsigned char YY_CHAR

Definition at line 357 of file config.cpp.

typedef size_t yy_size_t

Definition at line 203 of file config.cpp.

typedef int yy_state_type

Definition at line 361 of file config.cpp.

Function Documentation

static void checkEncoding ( )
static

Definition at line 1122 of file config.cpp.

1123 {
1124  ConfigString *option = (ConfigString*)config->get("DOXYFILE_ENCODING");
1125  encoding = *option->valueRef();
1126 }
QCString * valueRef()
Definition: config.h:182
static Config * config
Definition: config.cpp:1054
static QCString encoding
Definition: config.cpp:1052
static void cleanUpPaths ( QStrList str)
static

Definition at line 3037 of file config.cpp.

3038 {
3039  char *sfp = str.first();
3040  while (sfp)
3041  {
3042  register char *p = sfp;
3043  if (p)
3044  {
3045  char c;
3046  while ((c=*p))
3047  {
3048  if (c=='\\') *p='/';
3049  p++;
3050  }
3051  }
3052  QCString path = sfp;
3053  if ((path.at(0)!='/' && (path.length()<=2 || path.at(1)!=':')) ||
3054  path.at(path.length()-1)!='/'
3055  )
3056  {
3057  QFileInfo fi(path);
3058  if (fi.exists() && fi.isDir())
3059  {
3060  int i = str.at();
3061  str.remove();
3062  if (str.at()==i) // did not remove last item
3063  str.insert(i,fi.absFilePath().utf8()+"/");
3064  else
3065  str.append(fi.absFilePath().utf8()+"/");
3066  }
3067  }
3068  sfp = str.next();
3069  }
3070 }
uint length() const
Definition: qcstring.h:195
type * first()
Definition: qinternallist.h:87
char & at(uint i) const
Definition: qcstring.h:326
bool insert(uint i, const type *d)
Definition: qinternallist.h:58
p
Definition: test.py:223
void append(const type *d)
Definition: qinternallist.h:61
type * next()
Definition: qinternallist.h:89
type * at(uint i)
Definition: qinternallist.h:81
The QFileInfo class provides system-independent file information.
Definition: qfileinfo.h:51
bool remove(uint i)
Definition: qinternallist.h:62
void config_err ( const char *  fmt,
  ... 
)

Definition at line 669 of file config.cpp.

670 {
671  va_list args;
672  va_start(args, fmt);
673  vfprintf(stderr, (QCString(error_str) + fmt).data(), args);
674  va_end(args);
675 }
static const char * error_str
Definition: config.cpp:667
static QCString args
Definition: declinfo.cpp:674
void config_warn ( const char *  fmt,
  ... 
)

Definition at line 676 of file config.cpp.

677 {
678  va_list args;
679  va_start(args, fmt);
680  vfprintf(stderr, (QCString(warning_str) + fmt).data(), args);
681  va_end(args);
682 }
static QCString args
Definition: declinfo.cpp:674
static const char * warning_str
Definition: config.cpp:666
static QCString configFileToString ( const char *  name)
static

Definition at line 3648 of file config.cpp.

3649 {
3650  if (name==0 || name[0]==0) return 0;
3651  QFile f;
3652 
3653  bool fileOpened=FALSE;
3654  if (name[0]=='-' && name[1]==0) // read from stdin
3655  {
3656  fileOpened=f.open(IO_ReadOnly,stdin);
3657  if (fileOpened)
3658  {
3659  const int bSize=4096;
3660  QCString contents(bSize);
3661  int totalSize=0;
3662  int size;
3663  while ((size=f.readBlock(contents.rawData()+totalSize,bSize))==bSize)
3664  {
3665  totalSize+=bSize;
3666  contents.resize(totalSize+bSize);
3667  }
3668  totalSize+=size+2;
3669  contents.resize(totalSize);
3670  contents.at(totalSize-2)='\n'; // to help the scanner
3671  contents.at(totalSize-1)='\0';
3672  return contents;
3673  }
3674  }
3675  else // read from file
3676  {
3677  QFileInfo fi(name);
3678  if (!fi.exists() || !fi.isFile())
3679  {
3680  config_err("file `%s' not found\n",name);
3681  return "";
3682  }
3683  f.setName(name);
3684  fileOpened=f.open(IO_ReadOnly);
3685  if (fileOpened)
3686  {
3687  int fsize=f.size();
3688  QCString contents(fsize+2);
3689  f.readBlock(contents.rawData(),fsize);
3690  f.close();
3691  if (fsize==0 || contents[fsize-1]=='\n')
3692  contents[fsize]='\0';
3693  else
3694  contents[fsize]='\n'; // to help the scanner
3695  contents[fsize+1]='\0';
3696  return contents;
3697  }
3698  }
3699  if (!fileOpened)
3700  {
3701  config_err("cannot open file `%s' for reading\n",name);
3702  exit(1);
3703  }
3704  return "";
3705 }
static QCString name
Definition: declinfo.cpp:673
const bool FALSE
Definition: qglobal.h:370
int readBlock(char *data, uint len)
Definition: qfile_unix.cpp:473
void config_err(const char *fmt,...)
Definition: config.cpp:669
void setName(const QString &name)
Definition: qfile.cpp:167
#define IO_ReadOnly
Definition: qiodevice.h:61
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
bool open(int)
Definition: qfile_unix.cpp:134
The QFile class is an I/O device that operates on files.
Definition: qfile.h:50
The QFileInfo class provides system-independent file information.
Definition: qfileinfo.h:51
void close()
Definition: qfile_unix.cpp:614
uint size() const
Definition: qfile_unix.cpp:398
static QCString configStringRecode ( const QCString str,
const char *  fromEncoding,
const char *  toEncoding 
)
static

Definition at line 1083 of file config.cpp.

1087 {
1088  QCString inputEncoding = fromEncoding;
1089  QCString outputEncoding = toEncoding;
1090  if (inputEncoding.isEmpty() || outputEncoding.isEmpty() || inputEncoding==outputEncoding) return str;
1091  int inputSize=str.length();
1092  int outputSize=inputSize*4+1;
1093  QCString output(outputSize);
1094  void *cd = portable_iconv_open(outputEncoding,inputEncoding);
1095  if (cd==(void *)(-1))
1096  {
1097  fprintf(stderr,"Error: unsupported character conversion: '%s'->'%s'\n",
1098  inputEncoding.data(),outputEncoding.data());
1099  exit(1);
1100  }
1101  size_t iLeft=(size_t)inputSize;
1102  size_t oLeft=(size_t)outputSize;
1103  char *inputPtr = str.rawData();
1104  char *outputPtr = output.rawData();
1105  if (!portable_iconv(cd, &inputPtr, &iLeft, &outputPtr, &oLeft))
1106  {
1107  outputSize-=(int)oLeft;
1108  output.resize(outputSize+1);
1109  output.at(outputSize)='\0';
1110  //printf("iconv: input size=%d output size=%d\n[%s]\n",size,newSize,srcBuf.data());
1111  }
1112  else
1113  {
1114  fprintf(stderr,"Error: failed to translate characters from %s to %s: %s\n",
1115  inputEncoding.data(),outputEncoding.data(),strerror(errno));
1116  exit(1);
1117  }
1119  return output;
1120 }
char * rawData() const
Definition: qcstring.h:216
bool isEmpty() const
Definition: qcstring.h:189
uint length() const
Definition: qcstring.h:195
size_t portable_iconv(void *cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
Definition: portable_c.c:24
int errno
Contains the last error code.
Definition: structcmd.h:53
int portable_iconv_close(void *cd)
Definition: portable_c.c:30
const char * data() const
Definition: qcstring.h:207
void * portable_iconv_open(const char *tocode, const char *fromcode)
Definition: portable_c.c:19
YY_BUFFER_STATE configYY_create_buffer ( FILE *  file,
int  size 
)

Allocate and initialize an input buffer state.

Parameters
fileA readable stream.
sizeThe character buffer size in bytes. When in doubt, use YY_BUF_SIZE.
Returns
the allocated buffer state.

Definition at line 2367 of file config.cpp.

2368 {
2370 
2371  b = (YY_BUFFER_STATE) configYYalloc(sizeof( struct yy_buffer_state ) );
2372  if ( ! b )
2373  YY_FATAL_ERROR( "out of dynamic memory in configYY_create_buffer()" );
2374 
2375  b->yy_buf_size = size;
2376 
2377  /* yy_ch_buf has to be 2 characters longer than the size given because
2378  * we need to put in 2 end-of-buffer characters.
2379  */
2380  b->yy_ch_buf = (char *) configYYalloc(b->yy_buf_size + 2 );
2381  if ( ! b->yy_ch_buf )
2382  YY_FATAL_ERROR( "out of dynamic memory in configYY_create_buffer()" );
2383 
2384  b->yy_is_our_buffer = 1;
2385 
2387 
2388  return b;
2389 }
static void configYY_init_buffer(YY_BUFFER_STATE b, FILE *file)
Definition: config.cpp:2414
yy_size_t yy_buf_size
Definition: code.cpp:218
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
#define YY_FATAL_ERROR(msg)
Definition: config.cpp:1378
void * configYYalloc(yy_size_t)
Definition: config.cpp:2830
char * yy_ch_buf
Definition: code.cpp:212
struct yy_buffer_state * YY_BUFFER_STATE
Definition: config.cpp:172
int yy_is_our_buffer
Definition: code.cpp:229
static bool * b
Definition: config.cpp:1043
void configYY_delete_buffer ( YY_BUFFER_STATE  b)

Destroy the buffer.

Parameters
ba buffer created with configYY_create_buffer()

Definition at line 2395 of file config.cpp.

2396 {
2397 
2398  if ( ! b )
2399  return;
2400 
2401  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2403 
2404  if ( b->yy_is_our_buffer )
2405  configYYfree((void *) b->yy_ch_buf );
2406 
2407  configYYfree((void *) b );
2408 }
void configYYfree(void *)
Definition: config.cpp:2847
#define YY_CURRENT_BUFFER
Definition: config.cpp:282
char * yy_ch_buf
Definition: code.cpp:212
struct yy_buffer_state * YY_BUFFER_STATE
Definition: config.cpp:172
int yy_is_our_buffer
Definition: code.cpp:229
#define YY_CURRENT_BUFFER_LVALUE
Definition: config.cpp:289
void configYY_flush_buffer ( YY_BUFFER_STATE  b)

Discard all buffered characters. On the next scan, YY_INPUT will be called.

Parameters
bthe buffer state to be flushed, usually YY_CURRENT_BUFFER.

Definition at line 2442 of file config.cpp.

2443 {
2444  if ( ! b )
2445  return;
2446 
2447  b->yy_n_chars = 0;
2448 
2449  /* We always need two end-of-buffer characters. The first causes
2450  * a transition to the end-of-buffer state. The second causes
2451  * a jam in that state.
2452  */
2455 
2456  b->yy_buf_pos = &b->yy_ch_buf[0];
2457 
2458  b->yy_at_bol = 1;
2460 
2461  if ( b == YY_CURRENT_BUFFER )
2463 }
char * yy_buf_pos
Definition: code.cpp:213
int yy_n_chars
Definition: code.cpp:223
#define YY_END_OF_BUFFER_CHAR
Definition: config.cpp:159
#define YY_CURRENT_BUFFER
Definition: config.cpp:282
#define YY_BUFFER_NEW
Definition: config.cpp:254
char * yy_ch_buf
Definition: code.cpp:212
static void configYY_load_buffer_state(void)
Definition: config.cpp:2353
int yy_buffer_status
Definition: code.cpp:252
static void configYY_init_buffer ( YY_BUFFER_STATE  b,
FILE *  file 
)
static

Definition at line 2414 of file config.cpp.

2416 {
2417  int oerrno = errno;
2418 
2420 
2421  b->yy_input_file = file;
2422  b->yy_fill_buffer = 1;
2423 
2424  /* If b is the current buffer, then configYY_init_buffer was _probably_
2425  * called from configYYrestart() or through yy_get_next_buffer.
2426  * In that case, we don't want to reset the lineno or column.
2427  */
2428  if (b != YY_CURRENT_BUFFER){
2429  b->yy_bs_lineno = 1;
2430  b->yy_bs_column = 0;
2431  }
2432 
2433  b->yy_is_interactive = 0;
2434 
2435  errno = oerrno;
2436 }
FILE * yy_input_file
Definition: code.cpp:210
int yy_fill_buffer
Definition: code.cpp:250
int yy_bs_lineno
Definition: code.cpp:244
int errno
Contains the last error code.
Definition: structcmd.h:53
#define YY_CURRENT_BUFFER
Definition: config.cpp:282
int yy_bs_column
Definition: code.cpp:245
void configYY_flush_buffer(YY_BUFFER_STATE b)
Definition: config.cpp:2442
int yy_is_interactive
Definition: code.cpp:236
static void configYY_load_buffer_state ( void  )
static

Definition at line 2353 of file config.cpp.

2354 {
2355  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2356  (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2357  configYYin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2358  (yy_hold_char) = *(yy_c_buf_p);
2359 }
static char yy_hold_char
Definition: config.cpp:292
static char * yy_c_buf_p
Definition: config.cpp:297
FILE * configYYin
Definition: config.cpp:359
#define YY_CURRENT_BUFFER_LVALUE
Definition: config.cpp:289
static int yy_n_chars
Definition: config.cpp:293
#define yytext_ptr
Definition: config.cpp:368
YY_BUFFER_STATE configYY_scan_buffer ( char *  base,
yy_size_t  size 
)

Setup the input buffer state to scan directly from a user-specified character buffer.

Parameters
basethe character buffer
sizethe size in bytes of the character buffer
Returns
the newly allocated buffer state object.

Definition at line 2569 of file config.cpp.

2570 {
2572 
2573  if ( size < 2 ||
2576  /* They forgot to leave room for the EOB's. */
2577  return 0;
2578 
2579  b = (YY_BUFFER_STATE) configYYalloc(sizeof( struct yy_buffer_state ) );
2580  if ( ! b )
2581  YY_FATAL_ERROR( "out of dynamic memory in configYY_scan_buffer()" );
2582 
2583  b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2584  b->yy_buf_pos = b->yy_ch_buf = base;
2585  b->yy_is_our_buffer = 0;
2586  b->yy_input_file = 0;
2587  b->yy_n_chars = b->yy_buf_size;
2588  b->yy_is_interactive = 0;
2589  b->yy_at_bol = 1;
2590  b->yy_fill_buffer = 0;
2592 
2594 
2595  return b;
2596 }
char * yy_buf_pos
Definition: code.cpp:213
FILE * yy_input_file
Definition: code.cpp:210
int yy_n_chars
Definition: code.cpp:223
int yy_fill_buffer
Definition: code.cpp:250
yy_size_t yy_buf_size
Definition: code.cpp:218
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
#define YY_END_OF_BUFFER_CHAR
Definition: config.cpp:159
#define YY_FATAL_ERROR(msg)
Definition: config.cpp:1378
#define YY_BUFFER_NEW
Definition: config.cpp:254
void * configYYalloc(yy_size_t)
Definition: config.cpp:2830
char * yy_ch_buf
Definition: code.cpp:212
struct yy_buffer_state * YY_BUFFER_STATE
Definition: config.cpp:172
int yy_is_our_buffer
Definition: code.cpp:229
static bool * b
Definition: config.cpp:1043
int yy_is_interactive
Definition: code.cpp:236
int yy_buffer_status
Definition: code.cpp:252
void configYY_switch_to_buffer(YY_BUFFER_STATE new_buffer)
Definition: config.cpp:2322
YY_BUFFER_STATE configYY_scan_bytes ( yyconst char *  yybytes,
int  _yybytes_len 
)

Setup the input buffer state to scan the given bytes. The next call to configYYlex() will scan from a copy of bytes.

Parameters
bytesthe byte buffer to scan
lenthe number of bytes in the buffer pointed to by bytes.
Returns
the newly allocated buffer state object.

Definition at line 2619 of file config.cpp.

2620 {
2622  char *buf;
2623  yy_size_t n;
2624  int i;
2625 
2626  /* Get memory for full buffer, including space for trailing EOB's. */
2627  n = _yybytes_len + 2;
2628  buf = (char *) configYYalloc(n );
2629  if ( ! buf )
2630  YY_FATAL_ERROR( "out of dynamic memory in configYY_scan_bytes()" );
2631 
2632  for ( i = 0; i < _yybytes_len; ++i )
2633  buf[i] = yybytes[i];
2634 
2635  buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2636 
2637  b = configYY_scan_buffer(buf,n );
2638  if ( ! b )
2639  YY_FATAL_ERROR( "bad buffer in configYY_scan_bytes()" );
2640 
2641  /* It's okay to grow etc. this buffer, and we should throw it
2642  * away when we're done.
2643  */
2644  b->yy_is_our_buffer = 1;
2645 
2646  return b;
2647 }
#define YY_END_OF_BUFFER_CHAR
Definition: config.cpp:159
#define YY_FATAL_ERROR(msg)
Definition: config.cpp:1378
std::void_t< T > n
void * configYYalloc(yy_size_t)
Definition: config.cpp:2830
int yy_is_our_buffer
Definition: code.cpp:229
YY_BUFFER_STATE configYY_scan_buffer(char *base, yy_size_t size)
Definition: config.cpp:2569
static bool * b
Definition: config.cpp:1043
size_t yy_size_t
Definition: code.cpp:203
YY_BUFFER_STATE configYY_scan_string ( yyconst char *  yystr)

Setup the input buffer state to scan a string. The next call to configYYlex() will scan from a copy of str.

Parameters
yystra NUL-terminated string to scan
Returns
the newly allocated buffer state object.
Note
If you want to scan bytes that may contain NUL values, then use configYY_scan_bytes() instead.

Definition at line 2606 of file config.cpp.

2607 {
2608 
2609  return configYY_scan_bytes(yystr,strlen(yystr) );
2610 }
YY_BUFFER_STATE configYY_scan_bytes(yyconst char *bytes, int len)
Definition: config.cpp:2619
void configYY_switch_to_buffer ( YY_BUFFER_STATE  new_buffer)

Switch to a different input buffer.

Parameters
new_bufferThe new input buffer.

Definition at line 2322 of file config.cpp.

2323 {
2324 
2325  /* TODO. We should be able to replace this entire function body
2326  * with
2327  * configYYpop_buffer_state();
2328  * configYYpush_buffer_state(new_buffer);
2329  */
2331  if ( YY_CURRENT_BUFFER == new_buffer )
2332  return;
2333 
2334  if ( YY_CURRENT_BUFFER )
2335  {
2336  /* Flush out information for old buffer. */
2337  *(yy_c_buf_p) = (yy_hold_char);
2338  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2339  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2340  }
2341 
2342  YY_CURRENT_BUFFER_LVALUE = new_buffer;
2344 
2345  /* We don't actually know whether we did this switch during
2346  * EOF (configYYwrap()) processing, but the only time this flag
2347  * is looked at is after configYYwrap() is called, so it's safe
2348  * to go ahead and always set it.
2349  */
2351 }
static void configYYensure_buffer_stack(void)
Definition: config.cpp:2520
static char yy_hold_char
Definition: config.cpp:292
static char * yy_c_buf_p
Definition: config.cpp:297
#define YY_CURRENT_BUFFER
Definition: config.cpp:282
static int yy_did_buffer_switch_on_eof
Definition: config.cpp:304
#define YY_CURRENT_BUFFER_LVALUE
Definition: config.cpp:289
static int yy_n_chars
Definition: config.cpp:293
static void configYY_load_buffer_state(void)
Definition: config.cpp:2353
void * configYYalloc ( yy_size_t  size)

Definition at line 2830 of file config.cpp.

2831 {
2832  return (void *) malloc( size );
2833 }
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
static void configYYensure_buffer_stack ( void  )
static

Definition at line 2520 of file config.cpp.

2521 {
2522  int num_to_alloc;
2523 
2524  if (!(yy_buffer_stack)) {
2525 
2526  /* First allocation is just for 2 elements, since we don't know if this
2527  * scanner will even need a stack. We use 2 instead of 1 to avoid an
2528  * immediate realloc on the next call.
2529  */
2530  num_to_alloc = 1;
2532  (num_to_alloc * sizeof(struct yy_buffer_state*)
2533  );
2534  if ( ! (yy_buffer_stack) )
2535  YY_FATAL_ERROR( "out of dynamic memory in configYYensure_buffer_stack()" );
2536 
2537  memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2538 
2539  (yy_buffer_stack_max) = num_to_alloc;
2540  (yy_buffer_stack_top) = 0;
2541  return;
2542  }
2543 
2544  if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2545 
2546  /* Increase the buffer to prepare for a possible push. */
2547  int grow_size = 8 /* arbitrary grow size */;
2548 
2549  num_to_alloc = (yy_buffer_stack_max) + grow_size;
2551  ((yy_buffer_stack),
2552  num_to_alloc * sizeof(struct yy_buffer_state*)
2553  );
2554  if ( ! (yy_buffer_stack) )
2555  YY_FATAL_ERROR( "out of dynamic memory in configYYensure_buffer_stack()" );
2556 
2557  /* zero only the new slots.*/
2558  memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2559  (yy_buffer_stack_max) = num_to_alloc;
2560  }
2561 }
static YY_BUFFER_STATE * yy_buffer_stack
Definition: config.cpp:274
void * configYYrealloc(void *, yy_size_t)
Definition: config.cpp:2835
#define YY_FATAL_ERROR(msg)
Definition: config.cpp:1378
void * configYYalloc(yy_size_t)
Definition: config.cpp:2830
static size_t yy_buffer_stack_max
Definition: config.cpp:273
static size_t yy_buffer_stack_top
Definition: config.cpp:272
void configYYfree ( void *  ptr)

Definition at line 2847 of file config.cpp.

2848 {
2849  free( (char *) ptr ); /* see configYYrealloc() for (char *) cast */
2850 }
int configYYget_debug ( void  )

Definition at line 2746 of file config.cpp.

2747 {
2748  return configYY_flex_debug;
2749 }
int configYY_flex_debug
Definition: config.cpp:600
YY_EXTRA_TYPE configYYget_extra ( void  )
FILE * configYYget_in ( void  )

Get the input stream.

Definition at line 2690 of file config.cpp.

2691 {
2692  return configYYin;
2693 }
FILE * configYYin
Definition: config.cpp:359
int configYYget_leng ( void  )

Get the length of the current token.

Definition at line 2706 of file config.cpp.

2707 {
2708  return configYYleng;
2709 }
int configYYleng
Definition: config.cpp:294
int configYYget_lineno ( void  )

Get the current line number.

Definition at line 2681 of file config.cpp.

2682 {
2683 
2684  return configYYlineno;
2685 }
int configYYlineno
Definition: config.cpp:365
FILE * configYYget_out ( void  )

Get the output stream.

Definition at line 2698 of file config.cpp.

2699 {
2700  return configYYout;
2701 }
FILE * configYYout
Definition: config.cpp:359
char * configYYget_text ( void  )

Get the current token.

Definition at line 2715 of file config.cpp.

2716 {
2717  return configYYtext;
2718 }
char * configYYtext
Definition: config.cpp:609
int configYYlex ( void  )
int configYYlex_destroy ( void  )

Definition at line 2785 of file config.cpp.

2786 {
2787 
2788  /* Pop the buffer stack, destroying each element. */
2789  while(YY_CURRENT_BUFFER){
2791  YY_CURRENT_BUFFER_LVALUE = NULL;
2793  }
2794 
2795  /* Destroy the stack itself. */
2797  (yy_buffer_stack) = NULL;
2798 
2799  /* Reset the globals. This is important in a non-reentrant scanner so the next time
2800  * configYYlex() is called, initialization will occur. */
2801  yy_init_globals( );
2802 
2803  return 0;
2804 }
static YY_BUFFER_STATE * yy_buffer_stack
Definition: config.cpp:274
void configYY_delete_buffer(YY_BUFFER_STATE b)
Definition: config.cpp:2395
void configYYfree(void *)
Definition: config.cpp:2847
#define YY_CURRENT_BUFFER
Definition: config.cpp:282
static int yy_init_globals(void)
Definition: config.cpp:2756
#define YY_CURRENT_BUFFER_LVALUE
Definition: config.cpp:289
void configYYpop_buffer_state(void)
Definition: config.cpp:2501
void configYYpop_buffer_state ( void  )

Removes and deletes the top of the stack, if present. The next element becomes the new top.

Definition at line 2501 of file config.cpp.

2502 {
2503  if (!YY_CURRENT_BUFFER)
2504  return;
2505 
2507  YY_CURRENT_BUFFER_LVALUE = NULL;
2508  if ((yy_buffer_stack_top) > 0)
2509  --(yy_buffer_stack_top);
2510 
2511  if (YY_CURRENT_BUFFER) {
2514  }
2515 }
void configYY_delete_buffer(YY_BUFFER_STATE b)
Definition: config.cpp:2395
#define YY_CURRENT_BUFFER
Definition: config.cpp:282
static int yy_did_buffer_switch_on_eof
Definition: config.cpp:304
#define YY_CURRENT_BUFFER_LVALUE
Definition: config.cpp:289
static void configYY_load_buffer_state(void)
Definition: config.cpp:2353
static size_t yy_buffer_stack_top
Definition: config.cpp:272
void configYYpush_buffer_state ( YY_BUFFER_STATE  new_buffer)

Pushes the new state onto the stack. The new state becomes the current state. This function will allocate the stack if necessary.

Parameters
new_bufferThe new state.

Definition at line 2471 of file config.cpp.

2472 {
2473  if (new_buffer == NULL)
2474  return;
2475 
2477 
2478  /* This block is copied from configYY_switch_to_buffer. */
2479  if ( YY_CURRENT_BUFFER )
2480  {
2481  /* Flush out information for old buffer. */
2482  *(yy_c_buf_p) = (yy_hold_char);
2483  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2484  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2485  }
2486 
2487  /* Only push if top exists. Otherwise, replace top. */
2488  if (YY_CURRENT_BUFFER)
2489  (yy_buffer_stack_top)++;
2490  YY_CURRENT_BUFFER_LVALUE = new_buffer;
2491 
2492  /* copied from configYY_switch_to_buffer. */
2495 }
static void configYYensure_buffer_stack(void)
Definition: config.cpp:2520
static char yy_hold_char
Definition: config.cpp:292
static char * yy_c_buf_p
Definition: config.cpp:297
#define YY_CURRENT_BUFFER
Definition: config.cpp:282
static int yy_did_buffer_switch_on_eof
Definition: config.cpp:304
#define YY_CURRENT_BUFFER_LVALUE
Definition: config.cpp:289
static int yy_n_chars
Definition: config.cpp:293
static void configYY_load_buffer_state(void)
Definition: config.cpp:2353
static size_t yy_buffer_stack_top
Definition: config.cpp:272
void * configYYrealloc ( void *  ptr,
yy_size_t  size 
)

Definition at line 2835 of file config.cpp.

2836 {
2837  /* The cast to (char *) in the following accommodates both
2838  * implementations that use char* generic pointers, and those
2839  * that use void* generic pointers. It works with the latter
2840  * because both ANSI C and C++ allow castless assignment from
2841  * any pointer type to void*, and deal with argument conversions
2842  * as though doing an assignment.
2843  */
2844  return (void *) realloc( (char *) ptr, size );
2845 }
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
void configYYrestart ( FILE *  input_file)

Immediately switch to a different input stream.

Parameters
input_fileA readable stream.
Note
This function does not reset the start condition to INITIAL .

Definition at line 2305 of file config.cpp.

2306 {
2307 
2308  if ( ! YY_CURRENT_BUFFER ){
2312  }
2313 
2316 }
#define YY_BUF_SIZE
Definition: config.cpp:163
static void configYY_init_buffer(YY_BUFFER_STATE b, FILE *file)
Definition: config.cpp:2414
static void configYYensure_buffer_stack(void)
Definition: config.cpp:2520
YY_BUFFER_STATE configYY_create_buffer(FILE *file, int size)
Definition: config.cpp:2367
FILE * configYYin
Definition: config.cpp:359
#define YY_CURRENT_BUFFER
Definition: config.cpp:282
#define YY_CURRENT_BUFFER_LVALUE
Definition: config.cpp:289
static void configYY_load_buffer_state(void)
Definition: config.cpp:2353
void configYYset_debug ( int  debug_flag)

Definition at line 2751 of file config.cpp.

2752 {
2753  configYY_flex_debug = bdebug ;
2754 }
int configYY_flex_debug
Definition: config.cpp:600
void configYYset_extra ( YY_EXTRA_TYPE  user_defined)
void configYYset_in ( FILE *  in_str)

Set the input stream. This does not discard the current input buffer.

Parameters
in_strA readable stream.
See also
configYY_switch_to_buffer

Definition at line 2736 of file config.cpp.

2737 {
2738  configYYin = in_str ;
2739 }
FILE * configYYin
Definition: config.cpp:359
void configYYset_lineno ( int  line_number)

Set the current line number.

Parameters
line_number

Definition at line 2724 of file config.cpp.

2725 {
2726 
2727  configYYlineno = line_number;
2728 }
int configYYlineno
Definition: config.cpp:365
void configYYset_out ( FILE *  out_str)

Definition at line 2741 of file config.cpp.

2742 {
2743  configYYout = out_str ;
2744 }
FILE * configYYout
Definition: config.cpp:359
static QCString convertToComment ( const QCString s,
const QCString u 
)
static

Definition at line 694 of file config.cpp.

695 {
696  //printf("convertToComment(%s)=%s\n",s.data(),u.data());
698  if (!s.isEmpty())
699  {
701  const char *p=tmp.data();
702  char c;
703  result+="#";
704  if (*p && *p!='\n')
705  result+=" ";
706  while ((c=*p++))
707  {
708  if (c=='\n')
709  {
710  result+="\n#";
711  if (*p && *p!='\n')
712  result+=" ";
713  }
714  else result+=c;
715  }
716  result+='\n';
717  }
718  if (!u.isEmpty())
719  {
720  if (!result.isEmpty()) result+='\n';
721  result+= u;
722  }
723  return result;
724 }
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
static QCString result
bool isEmpty() const
Definition: qcstring.h:189
p
Definition: test.py:223
const char * data() const
Definition: qcstring.h:207
string tmp
Definition: languages.py:63
static FILE* findFile ( const char *  fileName)
static

Definition at line 1144 of file config.cpp.

1145 {
1146  if (fileName==0)
1147  {
1148  return 0;
1149  }
1151  {
1152  return tryPath(NULL, fileName);
1153  }
1155  char *s=includePathList.first();
1156  while (s) // try each of the include paths
1157  {
1158  FILE *f = tryPath(s,fileName);
1159  if (f) return f;
1160  s=includePathList.next();
1161  }
1162  // try cwd if includePathList fails
1163  return tryPath(".",fileName);
1164 }
bool portable_isAbsolutePath(const char *fileName)
Definition: portable.cpp:434
static QStrList includePathList
Definition: config.cpp:1047
type * first()
Definition: qinternallist.h:87
fileName
Definition: dumpTree.py:9
static FILE * tryPath(const char *path, const char *fileName)
Definition: config.cpp:1128
type * next()
Definition: qinternallist.h:89
static void substEnvVarsInStrList(QStrList &sl)
Definition: config.cpp:2918
static QCString * s
Definition: config.cpp:1042
if ( yy_init)

Definition at line 1422 of file config.cpp.

1423  {
1424  (yy_init) = 1;
1425 
1426 #ifdef YY_USER_INIT
1427  YY_USER_INIT;
1428 #endif
1429 
1430  if ( ! (yy_start) )
1431  (yy_start) = 1; /* first start state */
1432 
1433  if ( ! configYYin )
1434  configYYin = stdin;
1435 
1436  if ( ! configYYout )
1437  configYYout = stdout;
1438 
1439  if ( ! YY_CURRENT_BUFFER ) {
1443  }
1444 
1446  }
#define YY_BUF_SIZE
Definition: config.cpp:163
static int yy_start
Definition: config.cpp:299
static void configYYensure_buffer_stack(void)
Definition: config.cpp:2520
YY_BUFFER_STATE configYY_create_buffer(FILE *file, int size)
Definition: config.cpp:2367
FILE * configYYin
Definition: config.cpp:359
FILE * configYYout
Definition: config.cpp:359
#define YY_CURRENT_BUFFER
Definition: config.cpp:282
static int yy_init
Definition: config.cpp:298
#define YY_CURRENT_BUFFER_LVALUE
Definition: config.cpp:289
static void configYY_load_buffer_state(void)
Definition: config.cpp:2353
static void readIncludeFile ( const char *  incName)
static

Definition at line 1166 of file config.cpp.

1167 {
1169  config_err("maximum include depth (%d) reached, %s is not included. Aborting...\n",
1170  MAX_INCLUDE_DEPTH,incName);
1171  exit(1);
1172  }
1173 
1174  QCString inc = incName;
1175  substEnvVarsInString(inc);
1176  inc = inc.stripWhiteSpace();
1177  uint incLen = inc.length();
1178  if (incLen>0 && inc.at(0)=='"' && inc.at(incLen-1)=='"') // strip quotes
1179  {
1180  inc=inc.mid(1,incLen-2);
1181  }
1182 
1183  FILE *f;
1184 
1185  if ((f=findFile(inc))) // see if the include file can be found
1186  {
1187  // For debugging
1188 #if SHOW_INCLUDES
1189  for (i=0;i<includeStack.count();i++) msg(" ");
1190  msg("@INCLUDE = %s: parsing...\n",inc.data());
1191 #endif
1192 
1193  // store the state of the old file
1196  fs->lineNr=yyLineNr;
1197  fs->fileName=yyFileName;
1198  fs->filePtr=f;
1199  // push the state on the stack
1200  includeStack.push(fs);
1201  // set the scanner to the include file
1203  fs->newState=YY_CURRENT_BUFFER;
1204  yyFileName=inc;
1205  includeDepth++;
1206  }
1207  else
1208  {
1209  config_err("@INCLUDE = %s: not found!\n",inc.data());
1210  exit(1);
1211  }
1212 }
YY_BUFFER_STATE oldState
Definition: config.cpp:1032
#define YY_BUF_SIZE
Definition: config.cpp:163
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
static int yyLineNr
Definition: config.cpp:1039
void msg(const char *fmt,...)
Definition: message.cpp:107
uint length() const
Definition: qcstring.h:195
char & at(uint i) const
Definition: qcstring.h:326
YY_BUFFER_STATE configYY_create_buffer(FILE *file, int size)
Definition: config.cpp:2367
static constexpr double fs
Definition: Units.h:100
void config_err(const char *fmt,...)
Definition: config.cpp:669
static FILE * findFile(const char *fileName)
Definition: config.cpp:1144
static int includeDepth
Definition: config.cpp:1049
static QStack< ConfigFileState > includeStack
Definition: config.cpp:1048
#define YY_CURRENT_BUFFER
Definition: config.cpp:282
static QCString yyFileName
Definition: config.cpp:1040
const char * data() const
Definition: qcstring.h:207
QCString mid(uint index, uint len=0xffffffff) const
Definition: qcstring.cpp:246
static void substEnvVarsInString(QCString &s)
Definition: config.cpp:2897
unsigned uint
Definition: qglobal.h:351
void configYY_switch_to_buffer(YY_BUFFER_STATE new_buffer)
Definition: config.cpp:2322
#define MAX_INCLUDE_DEPTH
Definition: config.cpp:689
static void substEnvVarsInString ( QCString s)
static

Definition at line 2897 of file config.cpp.

2898 {
2899  static QRegExp re("\\$\\([a-z_A-Z0-9.-]+\\)");
2900  static QRegExp re2("\\$\\([a-z_A-Z0-9.-]+\\([a-z_A-Z0-9.-]+\\)\\)"); // For e.g. PROGRAMFILES(X86)
2901  if (s.isEmpty()) return;
2902  int p=0;
2903  int i,l;
2904  //printf("substEnvVarInString(%s) start\n",s.data());
2905  while ((i=re.match(s,p,&l))!=-1 || (i=re2.match(s,p,&l))!=-1)
2906  {
2907  //printf("Found environment var s.mid(%d,%d)=`%s'\n",i+2,l-3,s.mid(i+2,l-3).data());
2908  QCString env=portable_getenv(s.mid(i+2,l-3));
2909  substEnvVarsInString(env); // recursively expand variables if needed.
2910  s = s.left(i)+env+s.right(s.length()-i-l);
2911  p=i+env.length(); // next time start at the end of the expanded string
2912  }
2913  s=s.stripWhiteSpace(); // to strip the bogus space that was added when an argument
2914  // has quotes
2915  //printf("substEnvVarInString(%s) end\n",s.data());
2916 }
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
bool isEmpty() const
Definition: qcstring.h:189
The QRegExp class provides pattern matching using regular expressions or wildcards.
Definition: qregexp.h:46
uint length() const
Definition: qcstring.h:195
const char * portable_getenv(const char *variable)
Definition: portable.cpp:317
QCString left(uint len) const
Definition: qcstring.cpp:213
static QStrList * l
Definition: config.cpp:1044
QCString right(uint len) const
Definition: qcstring.cpp:231
p
Definition: test.py:223
QCString mid(uint index, uint len=0xffffffff) const
Definition: qcstring.cpp:246
static void substEnvVarsInString(QCString &s)
Definition: config.cpp:2897
static void substEnvVarsInStrList ( QStrList sl)
static

Definition at line 2918 of file config.cpp.

2919 {
2920  char *s = sl.first();
2921  while (s)
2922  {
2923  QCString result(s);
2924  // an argument with quotes will have an extra space at the end, so wasQuoted will be TRUE.
2925  bool wasQuoted = (result.find(' ')!=-1) || (result.find('\t')!=-1);
2926  // here we strip the quote again
2928 
2929  //printf("Result %s was quoted=%d\n",result.data(),wasQuoted);
2930 
2931  if (!wasQuoted) /* as a result of the expansion, a single string
2932  may have expanded into a list, which we'll
2933  add to sl. If the original string already
2934  contained multiple elements no further
2935  splitting is done to allow quoted items with spaces! */
2936  {
2937  int l=result.length();
2938  int i,p=0;
2939  // skip spaces
2940  // search for a "word"
2941  for (i=0;i<l;i++)
2942  {
2943  char c=0;
2944  // skip until start of new word
2945  while (i<l && ((c=result.at(i))==' ' || c=='\t')) i++;
2946  p=i; // p marks the start index of the word
2947  // skip until end of a word
2948  while (i<l && ((c=result.at(i))!=' ' && c!='\t' && c!='"')) i++;
2949  if (i<l) // not at the end of the string
2950  {
2951  if (c=='"') // word within quotes
2952  {
2953  p=i+1;
2954  for (i++;i<l;i++)
2955  {
2956  c=result.at(i);
2957  if (c=='"') // end quote
2958  {
2959  // replace the string in the list and go to the next item.
2960  sl.insert(sl.at(),result.mid(p,i-p)); // insert new item before current item.
2961  sl.next(); // current item is now the old item
2962  p=i+1;
2963  break;
2964  }
2965  else if (c=='\\') // skip escaped stuff
2966  {
2967  i++;
2968  }
2969  }
2970  }
2971  else if (c==' ' || c=='\t') // separator
2972  {
2973  // replace the string in the list and go to the next item.
2974  sl.insert(sl.at(),result.mid(p,i-p)); // insert new item before current item.
2975  sl.next(); // current item is now the old item
2976  p=i+1;
2977  }
2978  }
2979  }
2980  if (p!=l) // add the leftover as a string
2981  {
2982  // replace the string in the list and go to the next item.
2983  sl.insert(sl.at(),result.right(l-p)); // insert new item before current item.
2984  sl.next(); // current item is now the old item
2985  }
2986  }
2987  else // just goto the next element in the list
2988  {
2989  sl.insert(sl.at(),result);
2990  sl.next();
2991  }
2992  // remove the old unexpanded string from the list
2993  int i=sl.at();
2994  sl.remove(); // current item index changes if the last element is removed.
2995  if (sl.at()==i) // not last item
2996  s = sl.current();
2997  else // just removed last item
2998  s = 0;
2999  }
3000 }
static QCString result
uint length() const
Definition: qcstring.h:195
type * first()
Definition: qinternallist.h:87
char & at(uint i) const
Definition: qcstring.h:326
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
static QStrList * l
Definition: config.cpp:1044
type * current() const
Definition: qinternallist.h:83
QCString right(uint len) const
Definition: qcstring.cpp:231
bool insert(uint i, const type *d)
Definition: qinternallist.h:58
p
Definition: test.py:223
type * next()
Definition: qinternallist.h:89
QCString mid(uint index, uint len=0xffffffff) const
Definition: qcstring.cpp:246
static void substEnvVarsInString(QCString &s)
Definition: config.cpp:2897
type * at(uint i)
Definition: qinternallist.h:81
static QCString * s
Definition: config.cpp:1042
bool remove(uint i)
Definition: qinternallist.h:62
static FILE* tryPath ( const char *  path,
const char *  fileName 
)
static

Definition at line 1128 of file config.cpp.

1129 {
1130  QCString absName=(path ? (QCString)path+"/"+fileName : (QCString)fileName);
1131  QFileInfo fi(absName);
1132  if (fi.exists() && fi.isFile())
1133  {
1134  FILE *f=portable_fopen(absName,"r");
1135  if (!f) config_err("could not open file %s for reading\n",absName.data());
1136  return f;
1137  }
1138  return 0;
1139 }
if(!(yy_init))
Definition: config.cpp:1422
void config_err(const char *fmt,...)
Definition: config.cpp:669
bool exists(std::string path)
fileName
Definition: dumpTree.py:9
The QFileInfo class provides system-independent file information.
Definition: qfileinfo.h:51
FILE * portable_fopen(const char *fileName, const char *mode)
Definition: portable.cpp:344
while ( )

Definition at line 1448 of file config.cpp.

1449  {
1450  yy_cp = (yy_c_buf_p);
1451 
1452  /* Support of configYYtext. */
1453  *yy_cp = (yy_hold_char);
1454 
1455  /* yy_bp points to the position in yy_ch_buf of the start of
1456  * the current run.
1457  */
1458  yy_bp = yy_cp;
1459 
1460  yy_current_state = (yy_start);
1461 yy_match:
1462  do
1463  {
1464  register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1465  if ( yy_accept[yy_current_state] )
1466  {
1467  (yy_last_accepting_state) = yy_current_state;
1469  }
1470  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1471  {
1472  yy_current_state = (int) yy_def[yy_current_state];
1473  if ( yy_current_state >= 114 )
1474  yy_c = yy_meta[(unsigned int) yy_c];
1475  }
1476  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1477  ++yy_cp;
1478  }
1479  while ( yy_current_state != 113 );
1481  yy_current_state = (yy_last_accepting_state);
1482 
1483 yy_find_action:
1484  yy_act = yy_accept[yy_current_state];
1485 
1487 
1488 do_action: /* This label is used only to access EOF actions. */
1489 
1490  switch ( yy_act )
1491  { /* beginning of action switch */
1492  case 0: /* must back up */
1493  /* undo the effects of YY_DO_BEFORE_ACTION */
1494  *yy_cp = (yy_hold_char);
1496  yy_current_state = (yy_last_accepting_state);
1497  goto yy_find_action;
1498 
1499 case 1:
1501 #line 623 "config.l"
1502 
1503  YY_BREAK
1504 case 2:
1505 /* rule 2 can match eol */
1507 #line 624 "config.l"
1508 { config->appendStartComment(configYYtext);}
1509  YY_BREAK
1510 case 3:
1512 #line 625 "config.l"
1513 {
1514  BEGIN(Start);
1515  unput(*configYYtext);
1516  }
1517  YY_BREAK
1518 case 4:
1519 /* rule 4 can match eol */
1521 #line 629 "config.l"
1522 { config->appendUserComment(configYYtext);}
1523  YY_BREAK
1524 case 5:
1526 #line 630 "config.l"
1527 { BEGIN(SkipComment); }
1528  YY_BREAK
1529 case 6:
1531 #line 631 "config.l"
1533  cmd=cmd.left(cmd.length()-1).stripWhiteSpace();
1534  ConfigOption *option = config->get(cmd);
1535  if (option==0) // oops not known
1536  {
1537  config_warn("ignoring unsupported tag `%s' at line %d, file %s\n",
1539  BEGIN(SkipInvalid);
1540  }
1541  else // known tag
1542  {
1543  option->setUserComment(config->takeUserComment());
1544  option->setEncoding(encoding);
1545  switch(option->kind())
1546  {
1547  case ConfigOption::O_Info:
1548  // shouldn't get here!
1549  BEGIN(SkipInvalid);
1550  break;
1551  case ConfigOption::O_List:
1552  l = ((ConfigList *)option)->valueRef();
1553  l->clear();
1554  elemStr="";
1555  BEGIN(GetStrList);
1556  break;
1557  case ConfigOption::O_Enum:
1558  s = ((ConfigEnum *)option)->valueRef();
1559  s->resize(0);
1560  BEGIN(GetString);
1561  break;
1563  s = ((ConfigString *)option)->valueRef();
1564  s->resize(0);
1565  BEGIN(GetString);
1566  break;
1567  case ConfigOption::O_Int:
1568  s = ((ConfigInt *)option)->valueStringRef();
1569  s->resize(0);
1570  BEGIN(GetString);
1571  break;
1572  case ConfigOption::O_Bool:
1573  s = ((ConfigBool *)option)->valueStringRef();
1574  s->resize(0);
1575  BEGIN(GetString);
1576  break;
1578  if (config_upd)
1579  {
1580  config_warn("Tag `%s' at line %d of file `%s' has become obsolete.\n"
1581  " This tag has been removed.\n", cmd.data(),yyLineNr,yyFileName.data());
1582  }
1583  else
1584  {
1585  config_warn("Tag `%s' at line %d of file `%s' has become obsolete.\n"
1586  " To avoid this warning please remove this line from your configuration "
1587  "file or upgrade it using \"doxygen -u\"\n", cmd.data(),yyLineNr,yyFileName.data());
1588  }
1589  BEGIN(SkipInvalid);
1590  break;
1592  if (config_upd)
1593  {
1594  config_warn("Tag `%s' at line %d of file `%s' belongs to an option that was not enabled at compile time.\n"
1595  " This tag has been removed.\n", cmd.data(),yyLineNr,yyFileName.data());
1596  }
1597  else
1598  {
1599  config_warn("Tag `%s' at line %d of file `%s' belongs to an option that was not enabled at compile time.\n"
1600  " To avoid this warning please remove this line from your configuration "
1601  "file or upgrade it using \"doxygen -u\", or recompile doxygen with this feature enabled.\n", cmd.data(),yyLineNr,yyFileName.data());
1602  }
1603  BEGIN(SkipInvalid);
1604  break;
1605  }
1606  }
1607  }
1608  YY_BREAK
1609 case 7:
1611 #line 707 "config.l"
1612 { QCString cmd=configYYtext;
1613  cmd=cmd.left(cmd.length()-2).stripWhiteSpace();
1614  ConfigOption *option = config->get(cmd);
1615  if (option==0) // oops not known
1616  {
1617  config_warn("ignoring unsupported tag `%s' at line %d, file %s\n",
1619  BEGIN(SkipInvalid);
1620  }
1621  else // known tag
1622  {
1623  option->setUserComment(config->takeUserComment());
1624  switch(option->kind())
1625  {
1626  case ConfigOption::O_Info:
1627  // shouldn't get here!
1628  BEGIN(SkipInvalid);
1629  break;
1630  case ConfigOption::O_List:
1631  l = ((ConfigList *)option)->valueRef();
1632  elemStr="";
1633  BEGIN(GetStrList);
1634  break;
1635  case ConfigOption::O_Enum:
1637  case ConfigOption::O_Int:
1638  case ConfigOption::O_Bool:
1639  config_warn("operator += not supported for `%s'. Ignoring line at line %d, file %s\n",
1641  BEGIN(SkipInvalid);
1642  break;
1644  config_warn("Tag `%s' at line %d of file %s has become obsolete.\n"
1645  "To avoid this warning please update your configuration "
1646  "file using \"doxygen -u\"\n", cmd.data(),yyLineNr,yyFileName.data());
1647  BEGIN(SkipInvalid);
1648  break;
1650  config_warn("Tag `%s' at line %d of file %s belongs to an option that was not enabled at compile time.\n"
1651  "To avoid this warning please remove this line from your configuration "
1652  "file, upgrade it using \"doxygen -u\", or recompile doxygen with this feature enabled.\n", cmd.data(),yyLineNr,yyFileName.data());
1653  BEGIN(SkipInvalid);
1654  break;
1655  }
1656  }
1657  }
1658  YY_BREAK
1659 case 8:
1661 #line 753 "config.l"
1663  YY_BREAK
1664 /* include a config file */
1665 case 9:
1667 #line 755 "config.l"
1668 { BEGIN(Include);}
1669  YY_BREAK
1670 case 10:
1672 #line 756 "config.l"
1673 {
1675  BEGIN(Start);
1676  }
1677  YY_BREAK
1678 case YY_STATE_EOF(INITIAL):
1679 case YY_STATE_EOF(PreStart):
1680 case YY_STATE_EOF(Start):
1681 case YY_STATE_EOF(SkipComment):
1682 case YY_STATE_EOF(SkipInvalid):
1683 case YY_STATE_EOF(GetString):
1684 case YY_STATE_EOF(GetBool):
1685 case YY_STATE_EOF(GetStrList):
1686 case YY_STATE_EOF(GetQuotedString):
1687 case YY_STATE_EOF(GetEnvVar):
1688 case YY_STATE_EOF(Include):
1689 #line 760 "config.l"
1690 {
1691  //printf("End of include file\n");
1692  //printf("Include stack depth=%d\n",g_includeStack.count());
1693  if (includeStack.isEmpty())
1694  {
1695  //printf("Terminating scanner!\n");
1696  yyterminate();
1697  }
1698  else
1699  {
1701  fclose(fs->filePtr);
1704  configYY_delete_buffer(oldBuf );
1705  yyLineNr=fs->lineNr;
1706  yyFileName=fs->fileName;
1707  delete fs; fs=0;
1708  includeDepth--;
1709  }
1710  }
1711  YY_BREAK
1712 case 11:
1714 #line 782 "config.l"
1715 { config_warn("ignoring unknown tag `%s' at line %d, file %s\n",configYYtext,yyLineNr,yyFileName.data()); }
1716  YY_BREAK
1717 case 12:
1718 /* rule 12 can match eol */
1720 #line 783 "config.l"
1721 { yyLineNr++; BEGIN(Start); }
1722  YY_BREAK
1723 case 13:
1724 /* rule 13 can match eol */
1726 #line 784 "config.l"
1727 {
1728  yyLineNr++;
1729  if (!elemStr.isEmpty())
1730  {
1731  //printf("elemStr1=`%s'\n",elemStr.data());
1732  l->append(elemStr);
1733  }
1734  BEGIN(Start);
1735  }
1736  YY_BREAK
1737 case 14:
1739 #line 793 "config.l"
1740 {
1741  if (!elemStr.isEmpty())
1742  {
1743  //printf("elemStr2=`%s'\n",elemStr.data());
1744  l->append(elemStr);
1745  }
1746  elemStr.resize(0);
1747  }
1748  YY_BREAK
1749 case 15:
1751 #line 801 "config.l"
1752 { (*s)+=configStringRecode(configYYtext,encoding,"UTF-8");
1753  checkEncoding();
1754  }
1755  YY_BREAK
1756 case 16:
1758 #line 804 "config.l"
1761  tmpString.resize(0);
1762  }
1763  YY_BREAK
1764 case 17:
1765 /* rule 17 can match eol */
1767 #line 808 "config.l"
1768 {
1769  // we add a bogus space to signal that the string was quoted. This space will be stripped later on.
1770  tmpString+=" ";
1771  //printf("Quoted String = `%s'\n",tmpString.data());
1772  if (lastState==GetString)
1773  {
1774  (*s)+=configStringRecode(tmpString,encoding,"UTF-8");
1775  checkEncoding();
1776  }
1777  else
1778  {
1780  }
1781  if (*configYYtext=='\n')
1782  {
1783  config_warn("Missing end quote (\") on line %d, file %s\n",yyLineNr,yyFileName.data());
1784  yyLineNr++;
1785  }
1786  BEGIN(lastState);
1787  }
1788  YY_BREAK
1789 case 18:
1791 #line 828 "config.l"
1792 {
1793  tmpString+='"';
1794  }
1795  YY_BREAK
1796 case 19:
1798 #line 831 "config.l"
1799 { tmpString+=*configYYtext; }
1800  YY_BREAK
1801 case 20:
1803 #line 832 "config.l"
1804 {
1805  QCString bs=configYYtext;
1806  bs=bs.upper();
1807  if (bs=="YES" || bs=="1")
1808  *b=TRUE;
1809  else if (bs=="NO" || bs=="0")
1810  *b=FALSE;
1811  else
1812  {
1813  *b=FALSE;
1814  config_warn("Invalid value `%s' for "
1815  "boolean tag in line %d, file %s; use YES or NO\n",
1816  bs.data(),yyLineNr,yyFileName.data());
1817  }
1818  }
1819  YY_BREAK
1820 case 21:
1822 #line 847 "config.l"
1823 {
1825  }
1826  YY_BREAK
1827 case 22:
1828 /* rule 22 can match eol */
1830 #line 850 "config.l"
1831 { yyLineNr++; BEGIN(Start); }
1832  YY_BREAK
1833 case 23:
1834 /* rule 23 can match eol */
1836 #line 851 "config.l"
1837 { yyLineNr++; BEGIN(Start); }
1838  YY_BREAK
1839 case 24:
1840 /* rule 24 can match eol */
1842 #line 852 "config.l"
1843 { yyLineNr++; }
1844  YY_BREAK
1845 case 25:
1847 #line 853 "config.l"
1848 
1849  YY_BREAK
1850 case 26:
1851 /* rule 26 can match eol */
1853 #line 854 "config.l"
1854 { yyLineNr++ ; }
1855  YY_BREAK
1856 case 27:
1858 #line 856 "config.l"
1859 ECHO;
1860  YY_BREAK
1861 #line 1862 "/nova/app/home/novasoft/doxygen/doxygen-1.8.11/build/generated_src/config.cpp"
1862 
1863  case YY_END_OF_BUFFER:
1864  {
1865  /* Amount of text matched not including the EOB char. */
1866  int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1867 
1868  /* Undo the effects of YY_DO_BEFORE_ACTION. */
1869  *yy_cp = (yy_hold_char);
1871 
1872  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1873  {
1874  /* We're scanning a new file or input source. It's
1875  * possible that this happened because the user
1876  * just pointed configYYin at a new source and called
1877  * configYYlex(). If so, then we have to assure
1878  * consistency between YY_CURRENT_BUFFER and our
1879  * globals. Here is the right place to do so, because
1880  * this is the first action (other than possibly a
1881  * back-up) that will match for the new input source.
1882  */
1883  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1884  YY_CURRENT_BUFFER_LVALUE->yy_input_file = configYYin;
1885  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1886  }
1887 
1888  /* Note that here we test for yy_c_buf_p "<=" to the position
1889  * of the first EOB in the buffer, since yy_c_buf_p will
1890  * already have been incremented past the NUL character
1891  * (since all states make transitions on EOB to the
1892  * end-of-buffer state). Contrast this with the test
1893  * in input().
1894  */
1895  if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1896  { /* This was really a NUL. */
1897  yy_state_type yy_next_state;
1898 
1899  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1900 
1901  yy_current_state = yy_get_previous_state( );
1902 
1903  /* Okay, we're now positioned to make the NUL
1904  * transition. We couldn't have
1905  * yy_get_previous_state() go ahead and do it
1906  * for us because it doesn't know how to deal
1907  * with the possibility of jamming (and we don't
1908  * want to build jamming into it because then it
1909  * will run more slowly).
1910  */
1911 
1912  yy_next_state = yy_try_NUL_trans( yy_current_state );
1913 
1915 
1916  if ( yy_next_state )
1917  {
1918  /* Consume the NUL. */
1919  yy_cp = ++(yy_c_buf_p);
1920  yy_current_state = yy_next_state;
1921  goto yy_match;
1922  }
1923 
1924  else
1925  {
1927  yy_current_state = (yy_last_accepting_state);
1928  goto yy_find_action;
1929  }
1930  }
1931 
1932  else switch ( yy_get_next_buffer( ) )
1933  {
1934  case EOB_ACT_END_OF_FILE:
1935  {
1937 
1938  if ( configYYwrap( ) )
1939  {
1940  /* Note: because we've taken care in
1941  * yy_get_next_buffer() to have set up
1942  * configYYtext, we can now set up
1943  * yy_c_buf_p so that if some total
1944  * hoser (like flex itself) wants to
1945  * call the scanner after we return the
1946  * YY_NULL, it'll still work - another
1947  * YY_NULL will get returned.
1948  */
1950 
1952  goto do_action;
1953  }
1954 
1955  else
1956  {
1957  if ( ! (yy_did_buffer_switch_on_eof) )
1958  YY_NEW_FILE;
1959  }
1960  break;
1961  }
1962 
1963  case EOB_ACT_CONTINUE_SCAN:
1964  (yy_c_buf_p) =
1965  (yytext_ptr) + yy_amount_of_matched_text;
1966 
1967  yy_current_state = yy_get_previous_state( );
1968 
1969  yy_cp = (yy_c_buf_p);
1971  goto yy_match;
1972 
1973  case EOB_ACT_LAST_MATCH:
1974  (yy_c_buf_p) =
1975  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1976 
1977  yy_current_state = yy_get_previous_state( );
1978 
1979  yy_cp = (yy_c_buf_p);
1981  goto yy_find_action;
1982  }
1983  break;
1984  }
1985 
1986  default:
1988  "fatal flex scanner internal error--no action found" );
1989  } /* end of action switch */
1990  } /* end of scanning one token */
static int lastState
Definition: config.cpp:1045
YY_BUFFER_STATE oldState
Definition: config.cpp:1032
bool resize(uint newlen)
Definition: qcstring.h:225
register int yy_act
Definition: config.cpp:1415
#define configYYwrap(n)
Definition: config.cpp:354
#define GetQuotedString
Definition: config.cpp:1235
#define YY_START
Definition: config.cpp:150
void setEncoding(const QCString &e)
Definition: config.h:71
static QStrList includePathList
Definition: config.cpp:1047
static yyconst flex_int32_t yy_ec[256]
Definition: config.cpp:411
static int yyLineNr
Definition: config.cpp:1039
static int yy_start
Definition: config.cpp:299
static char yy_hold_char
Definition: config.cpp:292
bool isEmpty() const
Definition: qcstring.h:189
register char * yy_cp
Definition: config.cpp:1414
#define GetBool
Definition: config.cpp:1233
#define GetString
Definition: config.cpp:1232
static QCString configStringRecode(const QCString &str, const char *fromEncoding, const char *toEncoding)
Definition: config.cpp:1083
uint length() const
Definition: qcstring.h:195
static yyconst flex_int16_t yy_accept[114]
Definition: config.cpp:394
static char * yy_c_buf_p
Definition: config.cpp:297
#define YY_BUFFER_NORMAL
Definition: config.cpp:255
const bool FALSE
Definition: qglobal.h:370
static constexpr double fs
Definition: Units.h:100
static yyconst flex_int16_t yy_nxt[471]
Definition: config.cpp:486
QCString left(uint len) const
Definition: qcstring.cpp:213
FILE * configYYin
Definition: config.cpp:359
#define YY_BREAK
Definition: config.cpp:1403
OptionType kind() const
Definition: config.h:65
static QStrList * l
Definition: config.cpp:1044
int yy_state_type
Definition: code.cpp:361
void configYY_delete_buffer(YY_BUFFER_STATE b)
Definition: config.cpp:2395
static yyconst flex_int16_t yy_def[130]
Definition: config.cpp:468
static int includeDepth
Definition: config.cpp:1049
#define EOB_ACT_END_OF_FILE
Definition: config.cpp:180
static QStack< ConfigFileState > includeStack
Definition: config.cpp:1048
#define YY_END_OF_BUFFER
Definition: config.cpp:386
QCString upper() const
Definition: qcstring.cpp:279
#define YY_CURRENT_BUFFER
Definition: config.cpp:282
#define YY_FATAL_ERROR(msg)
Definition: config.cpp:1378
static bool config_upd
Definition: config.cpp:1050
FILE * filePtr
Definition: config.cpp:1031
#define YY_NEW_FILE
Definition: config.cpp:157
static Config * config
Definition: config.cpp:1054
#define YY_BUFFER_NEW
Definition: config.cpp:254
static yy_state_type yy_last_accepting_state
Definition: config.cpp:596
#define PreStart
Definition: config.cpp:1228
static QCString elemStr
Definition: config.cpp:1046
static QCString yyFileName
Definition: config.cpp:1040
void append(const type *d)
Definition: qinternallist.h:61
#define YY_RULE_SETUP
Definition: config.cpp:1406
const char * data() const
Definition: qcstring.h:207
#define YY_RESTORE_YY_MORE_OFFSET
Definition: config.cpp:608
#define INITIAL
Definition: config.cpp:1227
static yyconst flex_int32_t yy_meta[29]
Definition: config.cpp:443
static char * yy_last_accepting_cpos
Definition: config.cpp:597
unsigned char YY_CHAR
Definition: code.cpp:357
#define unput(c)
Definition: config.cpp:199
#define EOB_ACT_CONTINUE_SCAN
Definition: config.cpp:179
static yy_state_type yy_try_NUL_trans(yy_state_type current_state)
Definition: config.cpp:2166
#define Include
Definition: config.cpp:1237
#define YY_SC_TO_UI(c)
Definition: config.cpp:138
#define YY_STATE_EOF(state)
Definition: config.cpp:154
static int yy_did_buffer_switch_on_eof
Definition: config.cpp:304
#define YY_MORE_ADJ
Definition: config.cpp:607
#define yyterminate()
Definition: config.cpp:1368
#define YY_CURRENT_BUFFER_LVALUE
Definition: config.cpp:289
static yyconst flex_int16_t yy_base[130]
Definition: config.cpp:450
char * configYYtext
Definition: config.cpp:609
static QCString encoding
Definition: config.cpp:1052
static QCString tmpString
Definition: config.cpp:1041
static int yy_get_next_buffer(void)
Definition: config.cpp:2000
#define BEGIN
Definition: config.cpp:144
#define SkipInvalid
Definition: config.cpp:1231
static yyconst flex_int16_t yy_chk[471]
Definition: config.cpp:541
void line(double t, double *p, double &x, double &y, double &z)
void config_warn(const char *fmt,...)
Definition: config.cpp:676
#define EOB_ACT_LAST_MATCH
Definition: config.cpp:181
static bool * b
Definition: config.cpp:1043
QCString fileName
Definition: config.cpp:1034
register char * yy_bp
Definition: config.cpp:1414
#define GetStrList
Definition: config.cpp:1234
static int yy_n_chars
Definition: config.cpp:293
list cmd
Definition: getreco.py:22
#define yytext_ptr
Definition: config.cpp:368
#define ECHO
Definition: config.cpp:1324
static yy_state_type yy_get_previous_state(void)
Definition: config.cpp:2134
void configYY_switch_to_buffer(YY_BUFFER_STATE new_buffer)
Definition: config.cpp:2322
static QCString * s
Definition: config.cpp:1042
#define GetEnvVar
Definition: config.cpp:1236
static void checkEncoding()
Definition: config.cpp:1122
const bool TRUE
Definition: qglobal.h:371
static void readIncludeFile(const char *incName)
Definition: config.cpp:1166
#define Start
Definition: config.cpp:1229
void setUserComment(const QCString &u)
Definition: config.h:72
#define YY_DO_BEFORE_ACTION
Definition: config.cpp:378
#define SkipComment
Definition: config.cpp:1230
static void yy_fatal_error ( yyconst char  msg[])
static
static void yy_fatal_error ( yyconst char *  msg)
static

Definition at line 2653 of file config.cpp.

2654 {
2655  (void) fprintf( stderr, "%s\n", msg );
2656  exit( YY_EXIT_FAILURE );
2657 }
void msg(const char *fmt,...)
Definition: message.cpp:107
#define YY_EXIT_FAILURE
Definition: config.cpp:2650
static int yy_get_next_buffer ( void  )
static

Definition at line 2000 of file config.cpp.

2001 {
2002  register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2003  register char *source = (yytext_ptr);
2004  register int number_to_move, i;
2005  int ret_val;
2006 
2007  if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
2009  "fatal flex scanner internal error--end of buffer missed" );
2010 
2011  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2012  { /* Don't try to fill the buffer, so this is an EOF. */
2013  if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
2014  {
2015  /* We matched a single character, the EOB, so
2016  * treat this as a final EOF.
2017  */
2018  return EOB_ACT_END_OF_FILE;
2019  }
2020 
2021  else
2022  {
2023  /* We matched some text prior to the EOB, first
2024  * process it.
2025  */
2026  return EOB_ACT_LAST_MATCH;
2027  }
2028  }
2029 
2030  /* Try to read more data. */
2031 
2032  /* First move last chars to start of buffer. */
2033  number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
2034 
2035  for ( i = 0; i < number_to_move; ++i )
2036  *(dest++) = *(source++);
2037 
2038  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2039  /* don't do the read, it's not guaranteed to return an EOF,
2040  * just force an EOF
2041  */
2042  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
2043 
2044  else
2045  {
2046  int num_to_read =
2047  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2048 
2049  while ( num_to_read <= 0 )
2050  { /* Not enough room in the buffer - grow it. */
2051 
2052  /* just a shorter name for the current buffer */
2054 
2055  int yy_c_buf_p_offset =
2056  (int) ((yy_c_buf_p) - b->yy_ch_buf);
2057 
2058  if ( b->yy_is_our_buffer )
2059  {
2060  int new_size = b->yy_buf_size * 2;
2061 
2062  if ( new_size <= 0 )
2063  b->yy_buf_size += b->yy_buf_size / 8;
2064  else
2065  b->yy_buf_size *= 2;
2066 
2067  b->yy_ch_buf = (char *)
2068  /* Include room in for 2 EOB chars. */
2069  configYYrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
2070  }
2071  else
2072  /* Can't grow it, we don't own it. */
2073  b->yy_ch_buf = 0;
2074 
2075  if ( ! b->yy_ch_buf )
2077  "fatal error - scanner input buffer overflow" );
2078 
2079  (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
2080 
2081  num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2082  number_to_move - 1;
2083 
2084  }
2085 
2086  if ( num_to_read > YY_READ_BUF_SIZE )
2087  num_to_read = YY_READ_BUF_SIZE;
2088 
2089  /* Read in more data. */
2090  YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2091  (yy_n_chars), (size_t) num_to_read );
2092 
2093  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2094  }
2095 
2096  if ( (yy_n_chars) == 0 )
2097  {
2098  if ( number_to_move == YY_MORE_ADJ )
2099  {
2100  ret_val = EOB_ACT_END_OF_FILE;
2102  }
2103 
2104  else
2105  {
2106  ret_val = EOB_ACT_LAST_MATCH;
2107  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2109  }
2110  }
2111 
2112  else
2113  ret_val = EOB_ACT_CONTINUE_SCAN;
2114 
2115  if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2116  /* Extend the array by 50%, plus the number we really need. */
2117  yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
2118  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) configYYrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
2119  if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2120  YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2121  }
2122 
2123  (yy_n_chars) += number_to_move;
2126 
2127  (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2128 
2129  return ret_val;
2130 }
#define YY_READ_BUF_SIZE
Definition: config.cpp:1316
static char * yy_c_buf_p
Definition: config.cpp:297
FILE * configYYin
Definition: config.cpp:359
yy_size_t yy_buf_size
Definition: code.cpp:218
#define YY_INPUT(buf, result, max_size)
Definition: config.cpp:1059
#define EOB_ACT_END_OF_FILE
Definition: config.cpp:180
void * configYYrealloc(void *, yy_size_t)
Definition: config.cpp:2835
#define YY_END_OF_BUFFER_CHAR
Definition: config.cpp:159
#define YY_CURRENT_BUFFER
Definition: config.cpp:282
#define YY_FATAL_ERROR(msg)
Definition: config.cpp:1378
void configYYrestart(FILE *input_file)
Definition: config.cpp:2305
char * yy_ch_buf
Definition: code.cpp:212
#define EOB_ACT_CONTINUE_SCAN
Definition: config.cpp:179
int yy_is_our_buffer
Definition: code.cpp:229
#define YY_MORE_ADJ
Definition: config.cpp:607
#define YY_CURRENT_BUFFER_LVALUE
Definition: config.cpp:289
#define EOB_ACT_LAST_MATCH
Definition: config.cpp:181
static bool * b
Definition: config.cpp:1043
#define YY_BUFFER_EOF_PENDING
Definition: config.cpp:266
static int yy_n_chars
Definition: config.cpp:293
#define yytext_ptr
Definition: config.cpp:368
size_t yy_size_t
Definition: code.cpp:203
static yy_state_type yy_get_previous_state ( void  )
static

Definition at line 2134 of file config.cpp.

2135 {
2136  register yy_state_type yy_current_state;
2137  register char *yy_cp;
2138 
2139  yy_current_state = (yy_start);
2140 
2141  for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2142  {
2143  register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 28);
2144  if ( yy_accept[yy_current_state] )
2145  {
2146  (yy_last_accepting_state) = yy_current_state;
2147  (yy_last_accepting_cpos) = yy_cp;
2148  }
2149  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2150  {
2151  yy_current_state = (int) yy_def[yy_current_state];
2152  if ( yy_current_state >= 114 )
2153  yy_c = yy_meta[(unsigned int) yy_c];
2154  }
2155  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2156  }
2157 
2158  return yy_current_state;
2159 }
static yyconst flex_int32_t yy_ec[256]
Definition: config.cpp:411
static int yy_start
Definition: config.cpp:299
register char * yy_cp
Definition: config.cpp:1414
static yyconst flex_int16_t yy_accept[114]
Definition: config.cpp:394
static char * yy_c_buf_p
Definition: config.cpp:297
static yyconst flex_int16_t yy_nxt[471]
Definition: config.cpp:486
int yy_state_type
Definition: code.cpp:361
static yyconst flex_int16_t yy_def[130]
Definition: config.cpp:468
static yy_state_type yy_last_accepting_state
Definition: config.cpp:596
static yyconst flex_int32_t yy_meta[29]
Definition: config.cpp:443
static char * yy_last_accepting_cpos
Definition: config.cpp:597
unsigned char YY_CHAR
Definition: code.cpp:357
#define YY_SC_TO_UI(c)
Definition: config.cpp:138
#define YY_MORE_ADJ
Definition: config.cpp:607
static yyconst flex_int16_t yy_base[130]
Definition: config.cpp:450
static yyconst flex_int16_t yy_chk[471]
Definition: config.cpp:541
#define yytext_ptr
Definition: config.cpp:368
static int yy_init_globals ( void  )
static

Definition at line 2756 of file config.cpp.

2757 {
2758  /* Initialization is the same as for the non-reentrant scanner.
2759  * This function is called from configYYlex_destroy(), so don't allocate here.
2760  */
2761 
2762  (yy_buffer_stack) = 0;
2763  (yy_buffer_stack_top) = 0;
2764  (yy_buffer_stack_max) = 0;
2765  (yy_c_buf_p) = (char *) 0;
2766  (yy_init) = 0;
2767  (yy_start) = 0;
2768 
2769 /* Defined in main.c */
2770 #ifdef YY_STDINIT
2771  configYYin = stdin;
2772  configYYout = stdout;
2773 #else
2774  configYYin = (FILE *) 0;
2775  configYYout = (FILE *) 0;
2776 #endif
2777 
2778  /* For future reference: Set errno on error, since we are called by
2779  * configYYlex_init()
2780  */
2781  return 0;
2782 }
static int yy_start
Definition: config.cpp:299
static YY_BUFFER_STATE * yy_buffer_stack
Definition: config.cpp:274
static char * yy_c_buf_p
Definition: config.cpp:297
FILE * configYYin
Definition: config.cpp:359
FILE * configYYout
Definition: config.cpp:359
static int yy_init
Definition: config.cpp:298
static size_t yy_buffer_stack_max
Definition: config.cpp:273
static size_t yy_buffer_stack_top
Definition: config.cpp:272
static yy_state_type yy_try_NUL_trans ( yy_state_type  current_state)
static

Definition at line 2166 of file config.cpp.

2167 {
2168  register int yy_is_jam;
2169  register char *yy_cp = (yy_c_buf_p);
2170 
2171  register YY_CHAR yy_c = 28;
2172  if ( yy_accept[yy_current_state] )
2173  {
2174  (yy_last_accepting_state) = yy_current_state;
2175  (yy_last_accepting_cpos) = yy_cp;
2176  }
2177  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2178  {
2179  yy_current_state = (int) yy_def[yy_current_state];
2180  if ( yy_current_state >= 114 )
2181  yy_c = yy_meta[(unsigned int) yy_c];
2182  }
2183  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2184  yy_is_jam = (yy_current_state == 113);
2185 
2186  return yy_is_jam ? 0 : yy_current_state;
2187 }
register char * yy_cp
Definition: config.cpp:1414
static yyconst flex_int16_t yy_accept[114]
Definition: config.cpp:394
static char * yy_c_buf_p
Definition: config.cpp:297
static yyconst flex_int16_t yy_nxt[471]
Definition: config.cpp:486
static yyconst flex_int16_t yy_def[130]
Definition: config.cpp:468
static yy_state_type yy_last_accepting_state
Definition: config.cpp:596
static yyconst flex_int32_t yy_meta[29]
Definition: config.cpp:443
static char * yy_last_accepting_cpos
Definition: config.cpp:597
unsigned char YY_CHAR
Definition: code.cpp:357
static yyconst flex_int16_t yy_base[130]
Definition: config.cpp:450
static yyconst flex_int16_t yy_chk[471]
Definition: config.cpp:541
static int yyread ( char *  buf,
int  max_size 
)
static

Definition at line 1061 of file config.cpp.

1062 {
1063  // no file included
1064  if (includeStack.isEmpty())
1065  {
1066  int c=0;
1067  if (inputString==0) return c;
1068  while( c < max_size && inputString[inputPosition] )
1069  {
1070  *buf = inputString[inputPosition++] ;
1071  c++; buf++;
1072  }
1073  return c;
1074  }
1075  else
1076  {
1077  //assert(includeStack.current()->newState==YY_CURRENT_BUFFER);
1078  return (int)fread(buf,1,max_size,includeStack.current()->filePtr);
1079  }
1080 }
static int inputPosition
Definition: config.cpp:1038
static const char * inputString
Definition: config.cpp:1037
static QStack< ConfigFileState > includeStack
Definition: config.cpp:1048
static void yyunput ( int  c,
char *  buf_ptr 
)
static
static void yyunput ( int  c,
register char *  yy_bp 
)
static

Definition at line 2189 of file config.cpp.

2190 {
2191  register char *yy_cp;
2192 
2193  yy_cp = (yy_c_buf_p);
2194 
2195  /* undo effects of setting up configYYtext */
2196  *yy_cp = (yy_hold_char);
2197 
2198  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2199  { /* need to shift things up to make room */
2200  /* +2 for EOB chars. */
2201  register int number_to_move = (yy_n_chars) + 2;
2202  register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2203  YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
2204  register char *source =
2205  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
2206 
2207  while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2208  *--dest = *--source;
2209 
2210  yy_cp += (int) (dest - source);
2211  yy_bp += (int) (dest - source);
2212  YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2213  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
2214 
2215  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2216  YY_FATAL_ERROR( "flex scanner push-back overflow" );
2217  }
2218 
2219  *--yy_cp = (char) c;
2220 
2221  (yytext_ptr) = yy_bp;
2222  (yy_hold_char) = *yy_cp;
2223  (yy_c_buf_p) = yy_cp;
2224 }
static char yy_hold_char
Definition: config.cpp:292
register char * yy_cp
Definition: config.cpp:1414
static char * yy_c_buf_p
Definition: config.cpp:297
if(!(yy_init))
Definition: config.cpp:1422
#define YY_FATAL_ERROR(msg)
Definition: config.cpp:1378
#define YY_CURRENT_BUFFER_LVALUE
Definition: config.cpp:289
register char * yy_bp
Definition: config.cpp:1414
static int yy_n_chars
Definition: config.cpp:293
#define yytext_ptr
Definition: config.cpp:368

Variable Documentation

bool* b =0
static

Definition at line 1043 of file config.cpp.

Config* config
static

Definition at line 1054 of file config.cpp.

bool config_upd = FALSE
static

Definition at line 1050 of file config.cpp.

int configYY_flex_debug = 0

Definition at line 600 of file config.cpp.

FILE * configYYin = (FILE *) 0

Definition at line 359 of file config.cpp.

int configYYleng

Definition at line 294 of file config.cpp.

int configYYlineno = 1

Definition at line 365 of file config.cpp.

FILE * configYYout = (FILE *) 0

Definition at line 359 of file config.cpp.

char * configYYtext

Definition at line 609 of file config.cpp.

QCString elemStr
static

Definition at line 1046 of file config.cpp.

QCString encoding
static

Definition at line 1052 of file config.cpp.

const char* error_str = "error: "
static

Definition at line 667 of file config.cpp.

int includeDepth
static

Definition at line 1049 of file config.cpp.

QStrList includePathList
static

Definition at line 1047 of file config.cpp.

QStack<ConfigFileState> includeStack
static

Definition at line 1048 of file config.cpp.

int inputPosition
static

Definition at line 1038 of file config.cpp.

const char* inputString
static

Definition at line 1037 of file config.cpp.

QStrList* l =0
static

Definition at line 1044 of file config.cpp.

int lastState
static

Definition at line 1045 of file config.cpp.

QCString* s =0
static

Definition at line 1042 of file config.cpp.

QCString tmpString
static

Definition at line 1041 of file config.cpp.

const char* warning_str = "warning: "
static

Definition at line 666 of file config.cpp.

yyconst flex_int16_t yy_accept[114]
static
Initial value:
=
{ 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 28, 25, 26, 25, 25, 3, 3, 3,
3, 5, 11, 25, 11, 22, 25, 12, 16, 15,
5, 15, 15, 20, 21, 14, 13, 21, 21, 19,
17, 17, 19, 19, 10, 25, 10, 10, 0, 24,
0, 0, 0, 11, 0, 0, 0, 11, 6, 0,
23, 15, 15, 15, 20, 21, 14, 21, 18, 10,
0, 10, 0, 0, 2, 0, 4, 0, 7, 15,
15, 21, 10, 10, 1, 0, 1, 1, 1, 0,
0, 0, 0, 0, 9, 0, 0, 0, 0, 0,
0, 8, 0
}

Definition at line 394 of file config.cpp.

register int yy_act

Definition at line 1415 of file config.cpp.

yyconst flex_int16_t yy_base[130]
static
Initial value:
=
{ 0,
0, 1, 2, 3, 31, 0, 57, 58, 84, 110,
137, 164, 192, 0, 219, 246, 60, 67, 68, 70,
273, 300, 179, 442, 442, 8, 151, 442, 171, 11,
149, 169, 0, 156, 67, 442, 14, 442, 442, 0,
167, 17, 145, 0, 0, 169, 442, 64, 137, 442,
442, 442, 97, 136, 0, 0, 76, 135, 101, 442,
152, 155, 154, 0, 136, 104, 145, 115, 442, 116,
442, 0, 124, 145, 0, 0, 150, 143, 442, 0,
145, 141, 122, 144, 442, 132, 442, 110, 442, 128,
97, 95, 442, 84, 442, 90, 0, 0, 0, 84,
82, 77, 134, 73, 442, 55, 52, 40, 6, 135,
144, 442, 442, 328, 336, 344, 352, 360, 368, 370,
377, 385, 14, 393, 401, 409, 417, 425, 433
}

Definition at line 450 of file config.cpp.

register char * yy_bp

Definition at line 1414 of file config.cpp.

YY_BUFFER_STATE* yy_buffer_stack = 0
static

Stack as an array.

Definition at line 274 of file config.cpp.

size_t yy_buffer_stack_max = 0
static

capacity of stack.

Definition at line 273 of file config.cpp.

size_t yy_buffer_stack_top = 0
static

index of top of stack.

Definition at line 272 of file config.cpp.

char* yy_c_buf_p = (char *) 0
static

Definition at line 297 of file config.cpp.

yyconst flex_int16_t yy_chk[471]
static

Definition at line 541 of file config.cpp.

register char* yy_cp

Definition at line 1414 of file config.cpp.

YY_DECL
Initial value:
{
register yy_state_type yy_current_state
int yy_state_type
Definition: code.cpp:361

The main scanner function which does all the work.

Definition at line 1412 of file config.cpp.

yyconst flex_int16_t yy_def[130]
static
Initial value:
=
{ 0,
114, 114, 115, 115, 113, 5, 114, 114, 114, 114,
116, 116, 113, 13, 117, 117, 118, 118, 114, 114,
119, 119, 113, 113, 113, 113, 113, 113, 113, 113,
113, 113, 120, 113, 121, 113, 113, 113, 113, 122,
122, 122, 122, 123, 124, 113, 113, 124, 124, 113,
113, 113, 113, 113, 125, 126, 125, 125, 113, 113,
113, 127, 128, 120, 113, 113, 113, 121, 113, 113,
113, 122, 129, 122, 123, 124, 113, 124, 113, 125,
126, 125, 113, 127, 113, 128, 113, 113, 113, 129,
122, 124, 113, 125, 113, 113, 122, 124, 125, 113,
113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
113, 113, 0, 113, 113, 113, 113, 113, 113, 113,
113, 113, 113, 113, 113, 113, 113, 113, 113
}

Definition at line 468 of file config.cpp.

int yy_did_buffer_switch_on_eof
static

Definition at line 304 of file config.cpp.

yyconst flex_int32_t yy_ec[256]
static

Definition at line 411 of file config.cpp.

char yy_hold_char
static

Definition at line 292 of file config.cpp.

int yy_init = 0
static

Definition at line 298 of file config.cpp.

char* yy_last_accepting_cpos
static

Definition at line 597 of file config.cpp.

yy_state_type yy_last_accepting_state
static

Definition at line 596 of file config.cpp.

yyconst flex_int32_t yy_meta[29]
static
Initial value:
=
{ 0,
1, 2, 3, 4, 3, 5, 6, 7, 7, 6,
1, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 1, 7, 8, 8, 1
}

Definition at line 443 of file config.cpp.

int yy_n_chars
static

Definition at line 293 of file config.cpp.

yyconst flex_int16_t yy_nxt[471]
static

Definition at line 486 of file config.cpp.

int yy_start = 0
static

Definition at line 299 of file config.cpp.

QCString yyFileName
static

Definition at line 1040 of file config.cpp.

int yyLineNr
static

Definition at line 1039 of file config.cpp.