adonthell-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Adonthell-commits] CVS: adonthell/src lex.prefs.cc,1.7,1.8 prefs.cc,1.1


From: Kai Sterker <address@hidden>
Subject: [Adonthell-commits] CVS: adonthell/src lex.prefs.cc,1.7,1.8 prefs.cc,1.16,1.17 prefs.h,1.12,1.13 prefs.l,1.7,1.8
Date: Wed, 24 Apr 2002 10:15:38 -0400

Update of /cvsroot/adonthell/adonthell/src
In directory subversions:/tmp/cvs-serv21408/src

Modified Files:
        lex.prefs.cc prefs.cc prefs.h prefs.l 
Log Message:
FIXED building of RPM package
UPDATES to INSTALL and NEWS file
ADDED version info to adonthellrc


Index: lex.prefs.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/lex.prefs.cc,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** lex.prefs.cc        13 Apr 2002 16:54:08 -0000      1.7
--- lex.prefs.cc        24 Apr 2002 14:15:36 -0000      1.8
***************
*** 28,32 ****
  
  #include <stdio.h>
! 
  
  /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
--- 28,32 ----
  
  #include <stdio.h>
! #include <errno.h>
  
  /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
***************
*** 41,45 ****
--- 41,53 ----
  
  #include <stdlib.h>
+ #ifndef _WIN32
  #include <unistd.h>
+ #else
+ #ifndef YY_ALWAYS_INTERACTIVE
+ #ifndef YY_NEVER_INTERACTIVE
+ extern int isatty YY_PROTO(( int ));
+ #endif
+ #endif
+ #endif
  
  /* Use prototypes in function declarations. */
***************
*** 304,319 ****
        yy_c_buf_p = yy_cp;
  
! #define YY_NUM_RULES 14
! #define YY_END_OF_BUFFER 15
! static yyconst short int yy_accept[80] =
      {   0,
!         0,    0,    0,    0,   15,   13,   12,   12,    1,   11,
!        13,   13,   13,    8,   10,    9,   12,    1,    1,   11,
!         0,    0,    0,   10,    0,    0,    0,    0,    0,    0,
          0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
!         0,    0,    0,    0,    0,    0,    3,    0,    0,    0,
!         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
!         0,    0,    2,    0,    0,    0,    7,    0,    0,    0,
!         4,    0,    0,    0,    0,    5,    0,    6,    0
      } ;
  
--- 312,328 ----
        yy_c_buf_p = yy_cp;
  
! #define YY_NUM_RULES 15
! #define YY_END_OF_BUFFER 16
! static yyconst short int yy_accept[87] =
      {   0,
!         0,    0,    0,    0,   16,   14,   13,   13,    1,   12,
!        14,   14,   14,   14,    9,   11,   10,   13,    1,    1,
!        12,    0,    0,    0,    0,   11,    0,    0,    0,    0,
          0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
!         0,    0,    0,    0,    0,    0,    0,    0,    8,    0,
!         0,    0,    0,    3,    0,    0,    0,    0,    0,    0,
!         0,    0,    0,    0,    0,    0,    0,    0,    0,    2,
!         0,    0,    0,    7,    0,    0,    0,    4,    0,    0,
!         0,    0,    5,    0,    6,    0
      } ;
  
***************
*** 328,336 ****
          1,    1,    1,    1,    7,    1,    1,    1,    1,    1,
          1,    1,    1,    1,    1,    8,    1,    1,    1,    1,
!         1,    1,    9,    1,    1,    1,    1,    1,    1,    1,
!        10,    1,   11,    1,    1,    1,   12,    1,   13,   14,
  
!        15,    1,   16,   17,   18,    1,    1,   19,   20,   21,
!        22,   23,    1,   24,   25,   26,   27,   28,    1,    1,
          1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
          1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
--- 337,345 ----
          1,    1,    1,    1,    7,    1,    1,    1,    1,    1,
          1,    1,    1,    1,    1,    8,    1,    1,    1,    1,
!         1,    1,    9,    1,    1,   10,    1,    1,    1,    1,
!        11,    1,   12,    1,    1,    1,   13,    1,   14,   15,
  
!        16,    1,   17,   18,   19,    1,    1,   20,   21,   22,
!        23,   24,    1,   25,   26,   27,   28,   29,    1,    1,
          1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
          1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
***************
*** 350,420 ****
      } ;
  
! static yyconst int yy_meta[29] =
      {   0,
          1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
!         2,    1,    1,    1,    1,    1,    1,    1,    1,    1,
!         1,    1,    1,    1,    1,    1,    1,    1
      } ;
  
! static yyconst short int yy_base[84] =
      {   0,
!         0,    9,   84,   83,   93,   96,   18,   20,   89,   85,
!        63,   77,   75,   96,    0,   96,   22,   84,   96,   80,
!        71,   63,   59,    0,   64,   65,   65,   57,   51,   62,
!        71,   63,   53,   13,   57,   67,   54,   55,   57,   46,
!        52,   46,   53,   39,   43,   43,   96,   39,   39,   37,
!        35,   30,   42,   34,   35,   34,   32,   36,   35,   22,
!        33,   25,   96,   20,   10,   30,   96,    9,   15,    8,
!        96,    9,   18,    8,    2,   96,   12,   96,   96,   41,
!        43,   45,    0
      } ;
  
! static yyconst short int yy_def[84] =
      {   0,
!        80,   80,   81,   81,   79,   79,   79,   79,   82,   79,
!        79,   79,   79,   79,   83,   79,   79,   82,   79,   79,
!        79,   79,   79,   83,   79,   79,   79,   79,   79,   79,
!        79,   79,   79,   79,   79,   79,   79,   79,   79,   79,
!        79,   79,   79,   79,   79,   79,   79,   79,   79,   79,
!        79,   79,   79,   79,   79,   79,   79,   79,   79,   79,
!        79,   79,   79,   79,   79,   79,   79,   79,   79,   79,
!        79,   79,   79,   79,   79,   79,   79,   79,    0,   79,
!        79,   79,   79
      } ;
  
! static yyconst short int yy_nxt[125] =
      {   0,
!        24,    7,    8,    9,   79,   10,   11,   12,   13,   14,
!         7,    8,    9,   79,   10,   11,   12,   13,   14,   17,
!        17,   17,   17,   17,   17,   37,   78,   77,   76,   75,
!        74,   73,   72,   71,   70,   69,   38,   39,   68,   67,
!        40,    6,    6,   15,   15,   18,   18,   66,   65,   64,
!        63,   62,   61,   60,   59,   58,   57,   56,   55,   54,
!        53,   52,   51,   50,   49,   48,   47,   46,   45,   44,
!        43,   42,   41,   36,   35,   34,   33,   32,   31,   30,
!        29,   28,   27,   26,   25,   20,   19,   23,   22,   21,
!        20,   19,   79,   16,   16,    5,   79,   79,   79,   79,
! 
!        79,   79,   79,   79,   79,   79,   79,   79,   79,   79,
!        79,   79,   79,   79,   79,   79,   79,   79,   79,   79,
!        79,   79,   79,   79
      } ;
  
! static yyconst short int yy_chk[125] =
      {   0,
!        83,    1,    1,    1,    0,    1,    1,    1,    1,    1,
!         2,    2,    2,    0,    2,    2,    2,    2,    2,    7,
!         7,    8,    8,   17,   17,   34,   77,   75,   74,   73,
!        72,   70,   69,   68,   66,   65,   34,   34,   64,   62,
!        34,   80,   80,   81,   81,   82,   82,   61,   60,   59,
!        58,   57,   56,   55,   54,   53,   52,   51,   50,   49,
!        48,   46,   45,   44,   43,   42,   41,   40,   39,   38,
!        37,   36,   35,   33,   32,   31,   30,   29,   28,   27,
!        26,   25,   23,   22,   21,   20,   18,   13,   12,   11,
!        10,    9,    5,    4,    3,   79,   79,   79,   79,   79,
! 
!        79,   79,   79,   79,   79,   79,   79,   79,   79,   79,
!        79,   79,   79,   79,   79,   79,   79,   79,   79,   79,
!        79,   79,   79,   79
      } ;
  
--- 359,431 ----
      } ;
  
! static yyconst int yy_meta[30] =
      {   0,
          1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
!         1,    2,    1,    1,    1,    1,    1,    1,    1,    1,
!         1,    1,    1,    1,    1,    1,    1,    1,    1
      } ;
  
! static yyconst short int yy_base[91] =
      {   0,
!         0,   10,   91,   90,  101,  104,   20,   22,   97,   93,
!        70,   84,   82,   79,  104,    0,  104,   24,   91,  104,
!        87,   77,   69,   65,   64,    0,   69,   70,   70,   59,
!        61,   55,   66,   62,   75,   66,   56,   54,   14,   59,
!        70,   52,   55,   56,   58,   47,   53,   47,  104,   54,
!        40,   44,   44,  104,   40,   40,   38,   36,   31,   43,
!        35,   36,   35,   33,   37,   36,   23,   34,   26,  104,
!        21,   11,   32,  104,   10,   16,    9,  104,   10,   19,
!         9,    3,  104,   13,  104,  104,   43,   45,   47,    0
      } ;
  
! static yyconst short int yy_def[91] =
      {   0,
!        87,   87,   88,   88,   86,   86,   86,   86,   89,   86,
!        86,   86,   86,   86,   86,   90,   86,   86,   89,   86,
!        86,   86,   86,   86,   86,   90,   86,   86,   86,   86,
!        86,   86,   86,   86,   86,   86,   86,   86,   86,   86,
!        86,   86,   86,   86,   86,   86,   86,   86,   86,   86,
!        86,   86,   86,   86,   86,   86,   86,   86,   86,   86,
!        86,   86,   86,   86,   86,   86,   86,   86,   86,   86,
!        86,   86,   86,   86,   86,   86,   86,   86,   86,   86,
!        86,   86,   86,   86,   86,    0,   86,   86,   86,   86
      } ;
  
! static yyconst short int yy_nxt[134] =
      {   0,
!        26,    7,    8,    9,   86,   10,   11,   12,   13,   14,
!        15,    7,    8,    9,   86,   10,   11,   12,   13,   14,
!        15,   18,   18,   18,   18,   18,   18,   43,   85,   84,
!        83,   82,   81,   80,   79,   78,   77,   76,   44,   45,
!        75,   74,   46,    6,    6,   16,   16,   19,   19,   73,
!        72,   71,   70,   69,   68,   67,   66,   65,   64,   63,
!        62,   61,   60,   59,   58,   57,   56,   55,   54,   53,
!        52,   51,   50,   49,   48,   47,   42,   41,   40,   39,
!        38,   37,   36,   35,   34,   33,   32,   31,   30,   29,
!        28,   27,   21,   20,   25,   24,   23,   22,   21,   20,
! 
!        86,   17,   17,    5,   86,   86,   86,   86,   86,   86,
!        86,   86,   86,   86,   86,   86,   86,   86,   86,   86,
!        86,   86,   86,   86,   86,   86,   86,   86,   86,   86,
!        86,   86,   86
      } ;
  
! static yyconst short int yy_chk[134] =
      {   0,
!        90,    1,    1,    1,    0,    1,    1,    1,    1,    1,
!         1,    2,    2,    2,    0,    2,    2,    2,    2,    2,
!         2,    7,    7,    8,    8,   18,   18,   39,   84,   82,
!        81,   80,   79,   77,   76,   75,   73,   72,   39,   39,
!        71,   69,   39,   87,   87,   88,   88,   89,   89,   68,
!        67,   66,   65,   64,   63,   62,   61,   60,   59,   58,
!        57,   56,   55,   53,   52,   51,   50,   48,   47,   46,
!        45,   44,   43,   42,   41,   40,   38,   37,   36,   35,
!        34,   33,   32,   31,   30,   29,   28,   27,   25,   24,
!        23,   22,   21,   19,   14,   13,   12,   11,   10,    9,
! 
!         5,    4,    3,   86,   86,   86,   86,   86,   86,   86,
!        86,   86,   86,   86,   86,   86,   86,   86,   86,   86,
!        86,   86,   86,   86,   86,   86,   86,   86,   86,   86,
!        86,   86,   86
      } ;
  
***************
*** 456,460 ****
  #define YY_NO_UNPUT 1
  #define YY_NEVER_INTERACTIVE 1
! #line 459 "lex.prefs.cc"
  
  /* Macros after this point can all be overridden by user definitions in
--- 467,471 ----
  #define YY_NO_UNPUT 1
  #define YY_NEVER_INTERACTIVE 1
! #line 470 "lex.prefs.cc"
  
  /* Macros after this point can all be overridden by user definitions in
***************
*** 556,562 ****
                result = n; \
                } \
!       else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
!                 && ferror( yyin ) ) \
!               YY_FATAL_ERROR( "input in flex scanner failed" );
  #endif
  
--- 567,584 ----
                result = n; \
                } \
!       else \
!               { \
!               errno=0; \
!               while ( (result = fread(buf, 1, max_size, yyin))==0 && 
ferror(yyin)) \
!                       { \
!                       if( errno != EINTR) \
!                               { \
!                               YY_FATAL_ERROR( "input in flex scanner failed" 
); \
!                               break; \
!                               } \
!                       errno=0; \
!                       clearerr(yyin); \
!                       } \
!               }
  #endif
  
***************
*** 610,614 ****
  
  
! #line 613 "lex.prefs.cc"
  
        if ( yy_init )
--- 632,636 ----
  
  
! #line 635 "lex.prefs.cc"
  
        if ( yy_init )
***************
*** 661,665 ****
                                {
                                yy_current_state = (int) 
yy_def[yy_current_state];
!                               if ( yy_current_state >= 80 )
                                        yy_c = yy_meta[(unsigned int) yy_c];
                                }
--- 683,687 ----
                                {
                                yy_current_state = (int) 
yy_def[yy_current_state];
!                               if ( yy_current_state >= 87 )
                                        yy_c = yy_meta[(unsigned int) yy_c];
                                }
***************
*** 667,671 ****
                        ++yy_cp;
                        }
!               while ( yy_base[yy_current_state] != 96 );
  
  yy_find_action:
--- 689,693 ----
                        ++yy_cp;
                        }
!               while ( yy_base[yy_current_state] != 104 );
  
  yy_find_action:
***************
*** 730,767 ****
  case 8:
  YY_RULE_SETUP
! #line 40 "prefs.l"
! mytext = ""; BEGIN(text);
        YY_BREAK
  case 9:
  YY_RULE_SETUP
  #line 41 "prefs.l"
! BEGIN(INITIAL); return PREFS_STR;
        YY_BREAK
  case 10:
  YY_RULE_SETUP
  #line 42 "prefs.l"
! mytext += yytext;
        YY_BREAK
  case 11:
  YY_RULE_SETUP
! #line 44 "prefs.l"
! mynum = atoi (yytext); return PREFS_NUM;
        YY_BREAK
  case 12:
  YY_RULE_SETUP
! #line 46 "prefs.l"
! ;
        YY_BREAK
  case 13:
  YY_RULE_SETUP
  #line 47 "prefs.l"
! return PREFS_UNKNOWN;
        YY_BREAK
  case 14:
  YY_RULE_SETUP
  #line 48 "prefs.l"
  ECHO;
        YY_BREAK
! #line 766 "lex.prefs.cc"
  case YY_STATE_EOF(INITIAL):
  case YY_STATE_EOF(text):
--- 752,794 ----
  case 8:
  YY_RULE_SETUP
! #line 39 "prefs.l"
! return PREFS_VERSION;
        YY_BREAK
  case 9:
  YY_RULE_SETUP
  #line 41 "prefs.l"
! mytext = ""; BEGIN(text);
        YY_BREAK
  case 10:
  YY_RULE_SETUP
  #line 42 "prefs.l"
! BEGIN(INITIAL); return PREFS_STR;
        YY_BREAK
  case 11:
  YY_RULE_SETUP
! #line 43 "prefs.l"
! mytext += yytext;
        YY_BREAK
  case 12:
  YY_RULE_SETUP
! #line 45 "prefs.l"
! mynum = atoi (yytext); return PREFS_NUM;
        YY_BREAK
  case 13:
  YY_RULE_SETUP
  #line 47 "prefs.l"
! ;
        YY_BREAK
  case 14:
  YY_RULE_SETUP
  #line 48 "prefs.l"
+ return PREFS_UNKNOWN;
+       YY_BREAK
+ case 15:
+ YY_RULE_SETUP
+ #line 49 "prefs.l"
  ECHO;
        YY_BREAK
! #line 793 "lex.prefs.cc"
  case YY_STATE_EOF(INITIAL):
  case YY_STATE_EOF(text):
***************
*** 1056,1060 ****
                        {
                        yy_current_state = (int) yy_def[yy_current_state];
!                       if ( yy_current_state >= 80 )
                                yy_c = yy_meta[(unsigned int) yy_c];
                        }
--- 1083,1087 ----
                        {
                        yy_current_state = (int) yy_def[yy_current_state];
!                       if ( yy_current_state >= 87 )
                                yy_c = yy_meta[(unsigned int) yy_c];
                        }
***************
*** 1091,1099 ****
                {
                yy_current_state = (int) yy_def[yy_current_state];
!               if ( yy_current_state >= 80 )
                        yy_c = yy_meta[(unsigned int) yy_c];
                }
        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) 
yy_c];
!       yy_is_jam = (yy_current_state == 79);
  
        return yy_is_jam ? 0 : yy_current_state;
--- 1118,1126 ----
                {
                yy_current_state = (int) yy_def[yy_current_state];
!               if ( yy_current_state >= 87 )
                        yy_c = yy_meta[(unsigned int) yy_c];
                }
        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) 
yy_c];
!       yy_is_jam = (yy_current_state == 86);
  
        return yy_is_jam ? 0 : yy_current_state;
***************
*** 1328,1331 ****
--- 1355,1361 ----
  
  
+ #ifndef _WIN32
+ #include <unistd.h>
+ #else
  #ifndef YY_ALWAYS_INTERACTIVE
  #ifndef YY_NEVER_INTERACTIVE
***************
*** 1333,1336 ****
--- 1363,1367 ----
  #endif
  #endif
+ #endif
  
  #ifdef YY_USE_PROTOS
***************
*** 1650,1652 ****
        }
  #endif
! #line 48 "prefs.l"
--- 1681,1683 ----
        }
  #endif
! #line 49 "prefs.l"

Index: prefs.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/prefs.cc,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** prefs.cc    13 Apr 2002 20:38:54 -0000      1.16
--- prefs.cc    24 Apr 2002 14:15:36 -0000      1.17
***************
*** 50,54 ****
      audio_volume = 100;             // 0 - 100%
      language = "";                  // Let the user's environment decide
!     
      // set the path to the adonthellrc file:
      adonthellrc = string (getenv ("HOME")) + "/.adonthell";
--- 50,54 ----
      audio_volume = 100;             // 0 - 100%
      language = "";                  // Let the user's environment decide
! 
      // set the path to the adonthellrc file:
      adonthellrc = string (getenv ("HOME")) + "/.adonthell";
***************
*** 267,271 ****
         << "    Audio-sample-rate " << (int) audio_sample_rate << "\n\n"
         << "# Audio-volume num\n#   0 - 100 %\n"
!        << "    Audio-volume " << (int) audio_volume << "\n\n"; 
  
      rc.close ();
--- 267,272 ----
         << "    Audio-sample-rate " << (int) audio_sample_rate << "\n\n"
         << "# Audio-volume num\n#   0 - 100 %\n"
!        << "    Audio-volume " << (int) audio_volume << "\n\n"
!        << "# Version of this file. Don't Edit\n    Version [" << VERSION << 
"]\n";
  
      rc.close ();
***************
*** 275,279 ****
  {
      int n, i = 1;
!     string s, fname = adonthellrc + "/adonthellrc";
  
      // try to create that directory in case it dosn't exist
--- 276,280 ----
  {
      int n, i = 1;
!     string s, fname = adonthellrc + "/adonthellrc", version = "0";
  
      // try to create that directory in case it dosn't exist
***************
*** 340,343 ****
--- 341,349 ----
              }
  
+             case PREFS_VERSION:
+             {
+                 if (parse_adonthellrc (n, s) == PREFS_STR) version = s;
+                 break;
+             }
              default: break;
          }
***************
*** 345,349 ****
  
      fclose (prefsin);
!          
      return true;
  }
--- 351,362 ----
  
      fclose (prefsin);
! 
!     // compare version of config file and engine
!     if (version < VERSION)
!     {
!         // update config file
!         write_adonthellrc ();
!     }
! 
      return true;
  }

Index: prefs.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/prefs.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** prefs.h     13 Apr 2002 11:05:10 -0000      1.12
--- prefs.h     24 Apr 2002 14:15:36 -0000      1.13
***************
*** 55,60 ****
      PREFS_AUDIO_SAMPLE_RATE = 5,
      PREFS_AUDIO_VOLUME = 6,
!     PREFS_NUM = 7,
!     PREFS_STR = 8,
  };
  
--- 55,61 ----
      PREFS_AUDIO_SAMPLE_RATE = 5,
      PREFS_AUDIO_VOLUME = 6,
!     PREFS_VERSION = 7,
!     PREFS_NUM = 8,
!     PREFS_STR = 9,
  };
  

Index: prefs.l
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/prefs.l,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** prefs.l     13 Apr 2002 11:05:10 -0000      1.7
--- prefs.l     24 Apr 2002 14:15:36 -0000      1.8
***************
*** 37,40 ****
--- 37,41 ----
  Audio-sample-rate   return PREFS_AUDIO_SAMPLE_RATE;
  Audio-volume        return PREFS_AUDIO_VOLUME;
+ Version             return PREFS_VERSION;
  
  \[                  mytext = ""; BEGIN(text);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]