Remove unnecessary config.h includes in C++ code.
authorTeemu Murtola <teemu.murtola@gmail.com>
Wed, 17 Oct 2012 18:05:56 +0000 (21:05 +0300)
committerTeemu Murtola <teemu.murtola@gmail.com>
Thu, 8 Nov 2012 19:15:35 +0000 (21:15 +0200)
Removed
  #include <config.h>
from C++ source files that did not actually use any defines from it, and
replaced the remaining ones with
  #include "config.h"
Also left a few of these in the trajectory analysis runner, in files
where MPI support most likely will need them.

Reduces rebuild times when changing something in config.h (or would, if
simple.h would not pull in config.h everywhere), and makes it more
obvious where actual platform or configuration option specific code is
located.

Regenerated the selection tokenizer with Flex 2.5.37, as this is what I
currently have available.

Change-Id: I393ced98160c4c5631c5ff950533c4d2aa6e2ecf

29 files changed:
src/gromacs/analysisdata/modules/displacement.cpp
src/gromacs/analysisdata/modules/plot.cpp
src/gromacs/selection/centerofmass.cpp
src/gromacs/selection/compiler.cpp
src/gromacs/selection/evaluate.cpp
src/gromacs/selection/indexutil.cpp
src/gromacs/selection/mempool.cpp
src/gromacs/selection/nbsearch.cpp
src/gromacs/selection/parsetree.cpp
src/gromacs/selection/poscalc.cpp
src/gromacs/selection/position.cpp
src/gromacs/selection/scanner.cpp
src/gromacs/selection/scanner.l
src/gromacs/selection/scanner_flex.h
src/gromacs/selection/scanner_internal.cpp
src/gromacs/selection/selectioncollection.cpp
src/gromacs/selection/selmethod.cpp
src/gromacs/selection/selvalue.cpp
src/gromacs/selection/sm_compare.cpp
src/gromacs/selection/sm_distance.cpp
src/gromacs/selection/sm_insolidangle.cpp
src/gromacs/selection/sm_merge.cpp
src/gromacs/selection/sm_permute.cpp
src/gromacs/selection/sm_position.cpp
src/gromacs/selection/sm_simple.cpp
src/gromacs/trajectoryanalysis/analysissettings.cpp
src/gromacs/trajectoryanalysis/cmdlinerunner.cpp
src/gromacs/trajectoryanalysis/modules/distance.cpp
src/gromacs/trajectoryanalysis/runnercommon.cpp

index a4673d60fe6728468b7367f1bb862472afd01a73..a27ecbde1bb81978b87fa6385bb0c1fb4a79a6de 100644 (file)
  */
 #include "gromacs/analysisdata/modules/displacement.h"
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "gromacs/legacyheaders/smalloc.h"
 #include "gromacs/legacyheaders/maths.h"
 
index 4af0d1a001bcb634d7f8f8a7d4030695c95301ca..17290ccac1c64eaf9e946d3a6a5ec96c601a8af8 100644 (file)
  */
 #include "gromacs/analysisdata/modules/plot.h"
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include <string>
 #include <vector>
 
index 79dbdd666aa714869d1f437478b9c0fa7d4fd454..01d54f69e391e040761d1286e42063561929c345 100644 (file)
  * \author Teemu Murtola <teemu.murtola@cbr.su.se>
  * \ingroup module_selection
  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include <typedefs.h>
 #include <pbc.h>
 #include <vec.h>
index 8e118fce1029b132972bb7c7c150eba1efb5d35b..f9ea197dc5736930ff571076cbeaf770be50e1bb 100644 (file)
  */
 #include "compiler.h"
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include <algorithm>
 
 #include <math.h>
index 7b6d932ae24e64c2797b9cf8d2113a38405d4efa..260a630814eed5476b5f1aa9d156648f9f4c9350 100644 (file)
  * \author Teemu Murtola <teemu.murtola@cbr.su.se>
  * \ingroup module_selection
  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include <string.h>
 
 #include "gromacs/legacyheaders/maths.h"
index c43f150ea790839cf3d3140956ead788e557e9b6..7973e445c37cad009c42e9952cd9c5dd0726a3c1 100644 (file)
  * \author Teemu Murtola <teemu.murtola@cbr.su.se>
  * \ingroup module_selection
  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "gromacs/legacyheaders/index.h"
 #include "gromacs/legacyheaders/gmx_fatal.h"
 #include "gromacs/legacyheaders/smalloc.h"
index 18a30f2385598aae485b0bc7c6fe624857511824..fefa58168bc109d30eabcd371b15c6fc9702e32b 100644 (file)
  * \author Teemu Murtola <teemu.murtola@cbr.su.se>
  * \ingroup module_selection
  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include <stdlib.h>
 
 #include <new>
index eafa51a536c1e4ccc1a1cb3caca9831d8828f32c..8a78b0ded053dc467c39e7b3974284191f3194a9 100644 (file)
@@ -67,7 +67,7 @@
  * \ingroup module_selection
  */
 #ifdef HAVE_CONFIG_H
-#include <config.h>
+#include "config.h"
 #endif
 
 #include <math.h>
index 5d6858904aebab0c8d0336f15595877b2ddc3c4f..1a01d5da8864356ab02e4f1e67211146400fd88b 100644 (file)
  * Each element has exactly two children (one for unary negation elements),
  * which are in the order given in the input.
  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include <stdio.h>
 #include <stdarg.h>
 
index 6ff036342c77f6fbcd2a6f7356b2ad81a7dd7dba..d8d9eeb6b63e658fcc8da628c7e571737ff3ef85 100644 (file)
  * \author Teemu Murtola <teemu.murtola@cbr.su.se>
  * \ingroup module_selection
  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include <string.h>
 
 #include "smalloc.h"
index 6814f337c2fc5c8c90246f6e9cf635dbd573232d..e1cdb6be9cf572fd0eb82ad1ee08085af1238650 100644 (file)
  * \author Teemu Murtola <teemu.murtola@cbr.su.se>
  * \ingroup module_selection
  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include <string.h>
 
 #include "smalloc.h"
index 1c1bc10dc27ae47219d89a5baf83f6c80ce7eb75..2829ecc569d168c0bc2e23d2f8f97f7841b1b554 100644 (file)
@@ -9,7 +9,7 @@
 #define FLEX_SCANNER
 #define YY_FLEX_MAJOR_VERSION 2
 #define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
+#define YY_FLEX_SUBMINOR_VERSION 37
 #if YY_FLEX_SUBMINOR_VERSION > 0
 #define FLEX_BETA
 #endif
@@ -54,7 +54,6 @@ typedef int flex_int32_t;
 typedef unsigned char flex_uint8_t; 
 typedef unsigned short int flex_uint16_t;
 typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
 
 /* Limits of integral types. */
 #ifndef INT8_MIN
@@ -85,6 +84,8 @@ typedef unsigned int flex_uint32_t;
 #define UINT32_MAX             (4294967295U)
 #endif
 
+#endif /* ! C99 */
+
 #endif /* ! FLEXINT_H */
 
 #ifdef __cplusplus
@@ -170,6 +171,11 @@ typedef void* yyscan_t;
 typedef struct yy_buffer_state *YY_BUFFER_STATE;
 #endif
 
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
 #define EOB_ACT_CONTINUE_SCAN 0
 #define EOB_ACT_END_OF_FILE 1
 #define EOB_ACT_LAST_MATCH 2
@@ -192,11 +198,6 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
 
 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
 
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
 #ifndef YY_STRUCT_YY_BUFFER_STATE
 #define YY_STRUCT_YY_BUFFER_STATE
 struct yy_buffer_state
@@ -214,7 +215,7 @@ struct yy_buffer_state
        /* Number of characters read into yy_ch_buf, not including EOB
         * characters.
         */
-       int yy_n_chars;
+       yy_size_t yy_n_chars;
 
        /* Whether we "own" the buffer - i.e., we know we created it,
         * and can realloc() it to grow it, and should free() it to
@@ -293,7 +294,7 @@ static void _gmx_sel_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yysc
 
 YY_BUFFER_STATE _gmx_sel_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
 YY_BUFFER_STATE _gmx_sel_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE _gmx_sel_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
+YY_BUFFER_STATE _gmx_sel_yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
 
 void *_gmx_sel_yyalloc (yy_size_t ,yyscan_t yyscanner );
 void *_gmx_sel_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
@@ -323,7 +324,7 @@ void _gmx_sel_yyfree (void * ,yyscan_t yyscanner );
 
 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
 
-#define _gmx_sel_yywrap(n) 1
+#define _gmx_sel_yywrap(yyscanner) 1
 #define YY_SKIP_YYWRAP
 
 typedef unsigned char YY_CHAR;
@@ -540,10 +541,6 @@ static yyconst flex_int16_t yy_chk[191] =
  * \ingroup module_selection
  */
 #line 46 "scanner.l"
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include <string2.h>
 
 #include "parser.h"
@@ -559,7 +556,7 @@ static yyconst flex_int16_t yy_chk[191] =
 
 
 
-#line 563 "scanner.cpp"
+#line 560 "scanner.cpp"
 
 #define INITIAL 0
 #define matchof 1
@@ -592,8 +589,8 @@ struct yyguts_t
     size_t yy_buffer_stack_max; /**< capacity of stack. */
     YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
     char yy_hold_char;
-    int yy_n_chars;
-    int yyleng_r;
+    yy_size_t yy_n_chars;
+    yy_size_t yyleng_r;
     char *yy_c_buf_p;
     int yy_init;
     int yy_start;
@@ -640,7 +637,7 @@ FILE *_gmx_sel_yyget_out (yyscan_t yyscanner );
 
 void _gmx_sel_yyset_out  (FILE * out_str ,yyscan_t yyscanner );
 
-int _gmx_sel_yyget_leng (yyscan_t yyscanner );
+yy_size_t _gmx_sel_yyget_leng (yyscan_t yyscanner );
 
 char *_gmx_sel_yyget_text (yyscan_t yyscanner );
 
@@ -648,6 +645,10 @@ int _gmx_sel_yyget_lineno (yyscan_t yyscanner );
 
 void _gmx_sel_yyset_lineno (int line_number ,yyscan_t yyscanner );
 
+int _gmx_sel_yyget_column  (yyscan_t yyscanner );
+
+void _gmx_sel_yyset_column (int column_no ,yyscan_t yyscanner );
+
 /* Macros after this point can all be overridden by user definitions in
  * section 1.
  */
@@ -690,7 +691,7 @@ static int input (yyscan_t yyscanner );
 /* This used to be an fputs(), but since the string might contain NUL's,
  * we now use fwrite().
  */
-#define ECHO fwrite( yytext, yyleng, 1, yyout )
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
 #endif
 
 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
@@ -784,7 +785,7 @@ YY_DECL
        register int yy_act;
     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
 
-#line 85 "scanner.l"
+#line 81 "scanner.l"
 
 
 
@@ -818,7 +819,7 @@ YY_DECL
     }
 
 
-#line 822 "scanner.cpp"
+#line 823 "scanner.cpp"
 
        if ( !yyg->yy_init )
                {
@@ -899,34 +900,34 @@ do_action:        /* This label is used only to access EOF actions. */
 
 case 1:
 YY_RULE_SETUP
-#line 118 "scanner.l"
+#line 114 "scanner.l"
 
        YY_BREAK
 case 2:
 YY_RULE_SETUP
-#line 119 "scanner.l"
+#line 115 "scanner.l"
 { yylval->i   = strtol(yytext, NULL, 10);    ADD_TOKEN; return TOK_INT; }
        YY_BREAK
 case 3:
 YY_RULE_SETUP
-#line 120 "scanner.l"
+#line 116 "scanner.l"
 { yylval->r   = strtod(yytext, NULL);        ADD_TOKEN; return TOK_REAL; }
        YY_BREAK
 case 4:
 YY_RULE_SETUP
-#line 121 "scanner.l"
+#line 117 "scanner.l"
 { yylval->str = gmx_strndup(yytext+1, yyleng-2); ADD_TOKEN; return STR;  }
        YY_BREAK
 case 5:
 /* rule 5 can match eol */
 YY_RULE_SETUP
-#line 123 "scanner.l"
+#line 119 "scanner.l"
 { _gmx_sel_lexer_add_token(" ", 1, state); }
        YY_BREAK
 case 6:
 /* rule 6 can match eol */
 YY_RULE_SETUP
-#line 124 "scanner.l"
+#line 120 "scanner.l"
 {
                     if (yytext[0] == ';' || state->bInteractive)
                     {
@@ -941,122 +942,122 @@ YY_RULE_SETUP
                 }
        YY_BREAK
 case YY_STATE_EOF(cmdstart):
-#line 137 "scanner.l"
+#line 133 "scanner.l"
 { state->bCmdStart = true; yyterminate(); }
        YY_BREAK
 case YY_STATE_EOF(INITIAL):
 case YY_STATE_EOF(matchof):
 case YY_STATE_EOF(matchbool):
 case YY_STATE_EOF(help):
-#line 138 "scanner.l"
+#line 134 "scanner.l"
 { state->bCmdStart = true; return CMD_SEP; }
        YY_BREAK
 case 7:
 YY_RULE_SETUP
-#line 140 "scanner.l"
+#line 136 "scanner.l"
 { if (YYSTATE == cmdstart) { BEGIN(help); } return HELP; }
        YY_BREAK
 
 case 8:
 YY_RULE_SETUP
-#line 142 "scanner.l"
+#line 138 "scanner.l"
 
        YY_BREAK
 case 9:
 YY_RULE_SETUP
-#line 143 "scanner.l"
+#line 139 "scanner.l"
 { yylval->str = gmx_strndup(yytext, yyleng); return HELP_TOPIC; }
        YY_BREAK
 case 10:
 /* rule 10 can match eol */
 YY_RULE_SETUP
-#line 144 "scanner.l"
+#line 140 "scanner.l"
 { state->bCmdStart = true; return CMD_SEP; }
        YY_BREAK
 case 11:
 YY_RULE_SETUP
-#line 145 "scanner.l"
+#line 141 "scanner.l"
 { return INVALID; }
        YY_BREAK
 
 
 case 12:
 YY_RULE_SETUP
-#line 149 "scanner.l"
+#line 145 "scanner.l"
 { ADD_TOKEN; yylval->i = 1; return TOK_INT; }
        YY_BREAK
 case 13:
 YY_RULE_SETUP
-#line 150 "scanner.l"
+#line 146 "scanner.l"
 { ADD_TOKEN; yylval->i = 0; return TOK_INT; }
        YY_BREAK
 
 case 14:
 YY_RULE_SETUP
-#line 152 "scanner.l"
+#line 148 "scanner.l"
 { ADD_TOKEN; return GROUP; }
        YY_BREAK
 case 15:
 YY_RULE_SETUP
-#line 153 "scanner.l"
+#line 149 "scanner.l"
 { ADD_TOKEN; return TO; }
        YY_BREAK
 case 16:
 YY_RULE_SETUP
-#line 154 "scanner.l"
+#line 150 "scanner.l"
 { ADD_TOKEN; BEGIN(0); return OF; }
        YY_BREAK
 case 17:
 YY_RULE_SETUP
-#line 155 "scanner.l"
+#line 151 "scanner.l"
 { ADD_TOKEN; return AND; }
        YY_BREAK
 case 18:
 YY_RULE_SETUP
-#line 156 "scanner.l"
+#line 152 "scanner.l"
 { ADD_TOKEN; return OR; }
        YY_BREAK
 case 19:
 YY_RULE_SETUP
-#line 157 "scanner.l"
+#line 153 "scanner.l"
 { ADD_TOKEN; return XOR; }
        YY_BREAK
 case 20:
 YY_RULE_SETUP
-#line 158 "scanner.l"
+#line 154 "scanner.l"
 { ADD_TOKEN; return NOT; }
        YY_BREAK
 case 21:
 YY_RULE_SETUP
-#line 159 "scanner.l"
+#line 155 "scanner.l"
 { yylval->str = gmx_strndup(yytext, yyleng); ADD_TOKEN; return CMP_OP; }
        YY_BREAK
 case 22:
 YY_RULE_SETUP
-#line 161 "scanner.l"
+#line 157 "scanner.l"
 { return _gmx_sel_lexer_process_identifier(yylval, yytext, yyleng, state); }
        YY_BREAK
 case 23:
 YY_RULE_SETUP
-#line 163 "scanner.l"
+#line 159 "scanner.l"
 { _gmx_sel_lexer_add_token(" ", 1, state); }
        YY_BREAK
 case 24:
 YY_RULE_SETUP
-#line 164 "scanner.l"
+#line 160 "scanner.l"
 { yylval->str = gmx_strndup(yytext, yyleng); ADD_TOKEN; return STR; }
        YY_BREAK
 case 25:
 YY_RULE_SETUP
-#line 165 "scanner.l"
+#line 161 "scanner.l"
 { ADD_TOKEN; return yytext[0]; }
        YY_BREAK
 case 26:
 YY_RULE_SETUP
-#line 166 "scanner.l"
+#line 162 "scanner.l"
 YY_FATAL_ERROR( "flex scanner jammed" );
        YY_BREAK
-#line 1060 "scanner.cpp"
+#line 1061 "scanner.cpp"
 
        case YY_END_OF_BUFFER:
                {
@@ -1242,21 +1243,21 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
 
        else
                {
-                       int num_to_read =
+                       yy_size_t num_to_read =
                        YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
 
                while ( num_to_read <= 0 )
                        { /* Not enough room in the buffer - grow it. */
 
                        /* just a shorter name for the current buffer */
-                       YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
+                       YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
 
                        int yy_c_buf_p_offset =
                                (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
 
                        if ( b->yy_is_our_buffer )
                                {
-                               int new_size = b->yy_buf_size * 2;
+                               yy_size_t new_size = b->yy_buf_size * 2;
 
                                if ( new_size <= 0 )
                                        b->yy_buf_size += b->yy_buf_size / 8;
@@ -1287,7 +1288,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
 
                /* Read in more data. */
                YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
-                       yyg->yy_n_chars, (size_t) num_to_read );
+                       yyg->yy_n_chars, num_to_read );
 
                YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
                }
@@ -1384,6 +1385,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
        yy_is_jam = (yy_current_state == 88);
 
+       (void)yyg;
        return yy_is_jam ? 0 : yy_current_state;
 }
 
@@ -1400,7 +1402,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
        if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
                { /* need to shift things up to make room */
                /* +2 for EOB chars. */
-               register int number_to_move = yyg->yy_n_chars + 2;
+               register yy_size_t number_to_move = yyg->yy_n_chars + 2;
                register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
                                        YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
                register char *source =
@@ -1450,7 +1452,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
 
                else
                        { /* need more input */
-                       int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
+                       yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
                        ++yyg->yy_c_buf_p;
 
                        switch ( yy_get_next_buffer( yyscanner ) )
@@ -1730,7 +1732,7 @@ void _gmx_sel_yypop_buffer_state (yyscan_t yyscanner)
  */
 static void _gmx_sel_yyensure_buffer_stack (yyscan_t yyscanner)
 {
-       int num_to_alloc;
+       yy_size_t num_to_alloc;
     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
 
        if (!yyg->yy_buffer_stack) {
@@ -1823,17 +1825,17 @@ YY_BUFFER_STATE _gmx_sel_yy_scan_string (yyconst char * yystr , yyscan_t yyscann
 
 /** Setup the input buffer state to scan the given bytes. The next call to _gmx_sel_yylex() will
  * scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
  * @param yyscanner The scanner object.
  * @return the newly allocated buffer state object.
  */
-YY_BUFFER_STATE _gmx_sel_yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len , yyscan_t yyscanner)
+YY_BUFFER_STATE _gmx_sel_yy_scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len , yyscan_t yyscanner)
 {
        YY_BUFFER_STATE b;
        char *buf;
        yy_size_t n;
-       int i;
+       yy_size_t i;
     
        /* Get memory for full buffer, including space for trailing EOB's. */
        n = _yybytes_len + 2;
@@ -1943,7 +1945,7 @@ FILE *_gmx_sel_yyget_out  (yyscan_t yyscanner)
 /** Get the length of the current token.
  * @param yyscanner The scanner object.
  */
-int _gmx_sel_yyget_leng  (yyscan_t yyscanner)
+yy_size_t _gmx_sel_yyget_leng  (yyscan_t yyscanner)
 {
     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
     return yyleng;
@@ -1979,7 +1981,7 @@ void _gmx_sel_yyset_lineno (int  line_number , yyscan_t yyscanner)
 
         /* lineno is only valid if an input buffer exists. */
         if (! YY_CURRENT_BUFFER )
-           yy_fatal_error( "_gmx_sel_yyset_lineno called with no buffer" , yyscanner); 
+           YY_FATAL_ERROR( "_gmx_sel_yyset_lineno called with no buffer" );
     
     yylineno = line_number;
 }
@@ -1994,7 +1996,7 @@ void _gmx_sel_yyset_column (int  column_no , yyscan_t yyscanner)
 
         /* column is only valid if an input buffer exists. */
         if (! YY_CURRENT_BUFFER )
-           yy_fatal_error( "_gmx_sel_yyset_column called with no buffer" , yyscanner); 
+           YY_FATAL_ERROR( "_gmx_sel_yyset_column called with no buffer" );
     
     yycolumn = column_no;
 }
@@ -2206,4 +2208,4 @@ void _gmx_sel_yyfree (void * ptr , yyscan_t yyscanner)
 
 #define YYTABLES_NAME "yytables"
 
-#line 166 "scanner.l"
+#line 162 "scanner.l"
index 1039f1c7b8f694f4bd9508a84f21fa1e9d11bbef..ea2fd937224538d0787e168d54f90ff2fcdc6c47 100644 (file)
  * \ingroup module_selection
  */
 %{
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include <string2.h>
 
 #include "parser.h"
index 4d8fe17cc11e28a280bccf40e5edbc7dd14a2ba2..85b521ab6984a582bede6596b57ef1433514702a 100644 (file)
@@ -13,7 +13,7 @@
 #define FLEX_SCANNER
 #define YY_FLEX_MAJOR_VERSION 2
 #define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
+#define YY_FLEX_SUBMINOR_VERSION 37
 #if YY_FLEX_SUBMINOR_VERSION > 0
 #define FLEX_BETA
 #endif
@@ -58,7 +58,6 @@ typedef int flex_int32_t;
 typedef unsigned char flex_uint8_t; 
 typedef unsigned short int flex_uint16_t;
 typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
 
 /* Limits of integral types. */
 #ifndef INT8_MIN
@@ -89,6 +88,8 @@ typedef unsigned int flex_uint32_t;
 #define UINT32_MAX             (4294967295U)
 #endif
 
+#endif /* ! C99 */
+
 #endif /* ! FLEXINT_H */
 
 #ifdef __cplusplus
@@ -161,7 +162,7 @@ struct yy_buffer_state
        /* Number of characters read into yy_ch_buf, not including EOB
         * characters.
         */
-       int yy_n_chars;
+       yy_size_t yy_n_chars;
 
        /* Whether we "own" the buffer - i.e., we know we created it,
         * and can realloc() it to grow it, and should free() it to
@@ -205,13 +206,13 @@ void _gmx_sel_yypop_buffer_state (yyscan_t yyscanner );
 
 YY_BUFFER_STATE _gmx_sel_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
 YY_BUFFER_STATE _gmx_sel_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE _gmx_sel_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
+YY_BUFFER_STATE _gmx_sel_yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
 
 void *_gmx_sel_yyalloc (yy_size_t ,yyscan_t yyscanner );
 void *_gmx_sel_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
 void _gmx_sel_yyfree (void * ,yyscan_t yyscanner );
 
-#define _gmx_sel_yywrap(n) 1
+#define _gmx_sel_yywrap(yyscanner) 1
 #define YY_SKIP_YYWRAP
 
 #define yytext_ptr yytext_r
@@ -262,7 +263,7 @@ FILE *_gmx_sel_yyget_out (yyscan_t yyscanner );
 
 void _gmx_sel_yyset_out  (FILE * out_str ,yyscan_t yyscanner );
 
-int _gmx_sel_yyget_leng (yyscan_t yyscanner );
+yy_size_t _gmx_sel_yyget_leng (yyscan_t yyscanner );
 
 char *_gmx_sel_yyget_text (yyscan_t yyscanner );
 
@@ -270,6 +271,10 @@ int _gmx_sel_yyget_lineno (yyscan_t yyscanner );
 
 void _gmx_sel_yyset_lineno (int line_number ,yyscan_t yyscanner );
 
+int _gmx_sel_yyget_column  (yyscan_t yyscanner );
+
+void _gmx_sel_yyset_column (int column_no ,yyscan_t yyscanner );
+
 /* Macros after this point can all be overridden by user definitions in
  * section 1.
  */
@@ -329,8 +334,8 @@ extern int _gmx_sel_yylex (yyscan_t yyscanner);
 #undef YY_DECL
 #endif
 
-#line 166 "scanner.l"
+#line 162 "scanner.l"
 
-#line 335 "scanner_flex.h"
+#line 340 "scanner_flex.h"
 #undef _gmx_sel_yyIN_HEADER
 #endif /* _gmx_sel_yyHEADER_H */
index 1371fd6328bb7f3b0d65190c87967a9fe101eb33..1c5067186303a604649ce710f4f5dc27c821c813 100644 (file)
  * \ingroup module_selection
  * \endcond
  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include <stdlib.h>
 #include <string.h>
 
index b7dbfdd01224ebf341b3859e64adb85e752884f3..535d50d97123f77de7ca6aeda4d931872a5a68b4 100644 (file)
@@ -35,9 +35,7 @@
  * \author Teemu Murtola <teemu.murtola@cbr.su.se>
  * \ingroup module_selection
  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "selectioncollection.h"
 
 #include <cstdio>
 
@@ -50,7 +48,6 @@
 #include "gromacs/options/basicoptions.h"
 #include "gromacs/options/options.h"
 #include "gromacs/selection/selection.h"
-#include "gromacs/selection/selectioncollection.h"
 #include "gromacs/utility/exceptions.h"
 #include "gromacs/utility/file.h"
 #include "gromacs/utility/gmxassert.h"
index 9e01450c432d79dec7bfe699f533c7e9c80c7be6..748b4ac556cfb0cb08f579dcf7063303408e8fce 100644 (file)
  * \author Teemu Murtola <teemu.murtola@cbr.su.se>
  * \ingroup module_selection
  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include <ctype.h>
 #include <stdarg.h>
 
index 5c455cacbb750f0d8d41fdd5a9bded1cf40d87f7..f4b8fdd0a2449a1335eae0a7d0a5d17fa1610f25 100644 (file)
  * \author Teemu Murtola <teemu.murtola@cbr.su.se>
  * \ingroup module_selection
  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include <smalloc.h>
 
 #include "gromacs/selection/indexutil.h"
index 970f24576028ba971098cf852bce8e3168831dbb..a0d66f373795f2649139e7d4b70d30e253df0545 100644 (file)
  * \author Teemu Murtola <teemu.murtola@cbr.su.se>
  * \ingroup module_selection
  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "maths.h"
 #include "macros.h"
 #include "smalloc.h"
index 7390b9f8c2e824637ee9e997ba188be7c35cf7e5..d5831dea7ff7ca03b953b3347a30634d4b7bfe5c 100644 (file)
  * \author Teemu Murtola <teemu.murtola@cbr.su.se>
  * \ingroup module_selection
  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "macros.h"
 #include "pbc.h"
 #include "smalloc.h"
index 0ad26e98d5021c7bf11ce8075b1b484d90122d98..870f6790d8a7f4cf337c80d1e9e2377e5bfd6abb 100644 (file)
  * \author Teemu Murtola <teemu.murtola@cbr.su.se>
  * \ingroup module_selection
  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include <algorithm>
 
 #include <math.h>
index c2ecf33a1b83ac316986cdd61f925704f5bf1eb0..5ee8a2b921d38bdb9c57fdd79e0b33ab23601324 100644 (file)
  * \author Teemu Murtola <teemu.murtola@cbr.su.se>
  * \ingroup module_selection
  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "macros.h"
 #include "smalloc.h"
 #include "vec.h"
index 388d6c3dc1ed4d7dc4094f15ae60a03f6fbbcdbb..a14250dc4a610649fc8eae46d949ff152eb31ff7 100644 (file)
  * \author Teemu Murtola <teemu.murtola@cbr.su.se>
  * \ingroup module_selection
  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "macros.h"
 #include "smalloc.h"
 #include "vec.h"
index 2f15ec4ecd9a3611c3dc051231d37a5598e4c5a6..38d5c4e5ad4c6d67edf58b10a0bc64106aebfa4a 100644 (file)
  * \author Teemu Murtola <teemu.murtola@cbr.su.se>
  * \ingroup module_selection
  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include <macros.h>
 #include <smalloc.h>
 #include <string2.h>
index d30003082a872a14211c746c8ddb77aa45038aa5..df08e4d17519290d174ac39fd38660207ecba504 100644 (file)
  * \author Teemu Murtola <teemu.murtola@cbr.su.se>
  * \ingroup module_selection
  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include <cctype>
 
 #include "gromacs/legacyheaders/macros.h"
index d2161f0c865ca9fa9604606707c7962e781ea122..ad36074ceb236ff8361aa70892a6272be7ea97ec 100644 (file)
  * \author Teemu Murtola <teemu.murtola@cbr.su.se>
  * \ingroup module_trajectoryanalysis
  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "smalloc.h"
 #include "statutil.h"
 #include "vec.h"
index bc68302588718395109239c90af70bf16d235f19..fd5288ffb861d1ec6c6e5a617b2485769675a452 100644 (file)
@@ -36,7 +36,7 @@
  * \ingroup module_trajectoryanalysis
  */
 #ifdef HAVE_CONFIG_H
-#include <config.h>
+#include "config.h"
 #endif
 
 #include "copyrite.h"
index 7f662f60b86b2ede77e7025be060acb8788e9cbe..511ed6b5b7157e54174598b8a6bc6ed5e0ceef0c 100644 (file)
  */
 #include "distance.h"
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "pbc.h"
 #include "vec.h"
 
index e33b4adca07394ce5f8fa9041b706f7d9e3847b3..32a17ab8b24846309083fd56567484cbf41f8fd2 100644 (file)
@@ -36,7 +36,7 @@
  * \ingroup module_trajectoryanalysis
  */
 #ifdef HAVE_CONFIG_H
-#include <config.h>
+#include "config.h"
 #endif
 
 #include <string.h>