mirror of https://github.com/stella-emu/stella.git
Fixed some minor warnings under gcc 4.2.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1387 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
989c21b58a
commit
ffbc2a18f8
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: Snapshot.cxx,v 1.16 2007-01-01 18:04:40 stephena Exp $
|
// $Id: Snapshot.cxx,v 1.17 2007-10-08 01:59:20 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <zlib.h>
|
#include <zlib.h>
|
||||||
|
@ -117,7 +117,8 @@ void Snapshot::savePNG(FrameBuffer& framebuffer, const Properties& props,
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void Snapshot::writePNGChunk(ofstream& out, char* type, uInt8* data, int size)
|
void Snapshot::writePNGChunk(ofstream& out, const char* type,
|
||||||
|
uInt8* data, int size)
|
||||||
{
|
{
|
||||||
// Stuff the length/type into the buffer
|
// Stuff the length/type into the buffer
|
||||||
uInt8 temp[8];
|
uInt8 temp[8];
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: Snapshot.hxx,v 1.11 2007-01-01 18:04:40 stephena Exp $
|
// $Id: Snapshot.hxx,v 1.12 2007-10-08 01:59:20 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#ifndef SNAPSHOT_HXX
|
#ifndef SNAPSHOT_HXX
|
||||||
|
@ -39,7 +39,7 @@ class Snapshot
|
||||||
const string& filename);
|
const string& filename);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static void writePNGChunk(ofstream& out, char* type, uInt8* data, int size);
|
static void writePNGChunk(ofstream& out, const char* type, uInt8* data, int size);
|
||||||
static void writePNGText(ofstream& out, const string& key, const string& text);
|
static void writePNGText(ofstream& out, const string& key, const string& text);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: mainSDL.cxx,v 1.77 2007-09-17 22:41:44 stephena Exp $
|
// $Id: mainSDL.cxx,v 1.78 2007-10-08 01:59:20 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
|
@ -137,7 +137,7 @@ int main(int argc, char* argv[])
|
||||||
|
|
||||||
// Request that the SDL window be centered, if possible
|
// Request that the SDL window be centered, if possible
|
||||||
if(theOSystem->settings().getBool("center"))
|
if(theOSystem->settings().getBool("center"))
|
||||||
putenv("SDL_VIDEO_CENTERED=1");
|
putenv((char*)"SDL_VIDEO_CENTERED=1");
|
||||||
|
|
||||||
#ifdef BSPF_UNIX
|
#ifdef BSPF_UNIX
|
||||||
// Nvidia cards under UNIX don't currently support SDL_GL_SWAP_CONTROL
|
// Nvidia cards under UNIX don't currently support SDL_GL_SWAP_CONTROL
|
||||||
|
@ -145,7 +145,7 @@ int main(int argc, char* argv[])
|
||||||
// This also means the setting can only be changed by restarting Stella
|
// This also means the setting can only be changed by restarting Stella
|
||||||
// This functionality should really be integrated into SDL directly
|
// This functionality should really be integrated into SDL directly
|
||||||
if(theOSystem->settings().getBool("gl_vsync"))
|
if(theOSystem->settings().getBool("gl_vsync"))
|
||||||
putenv("__GL_SYNC_TO_VBLANK=1");
|
putenv((char*)"__GL_SYNC_TO_VBLANK=1");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//// Main loop ////
|
//// Main loop ////
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* XPM */
|
/* XPM */
|
||||||
static char * stella_icon[] = {
|
static const char * stella_icon[] = {
|
||||||
"32 32 3 1",
|
"32 32 3 1",
|
||||||
" c None",
|
" c None",
|
||||||
". c #000000",
|
". c #000000",
|
||||||
|
|
|
@ -12,7 +12,7 @@ Expression* lastExp = 0;
|
||||||
int yylex();
|
int yylex();
|
||||||
char *yytext;
|
char *yytext;
|
||||||
|
|
||||||
void yyerror(char *e) {
|
void yyerror(const char *e) {
|
||||||
//if(DEBUG_EXP) fprintf(stderr, "%s at token \"%s\"\n", e, yytext);
|
//if(DEBUG_EXP) fprintf(stderr, "%s at token \"%s\"\n", e, yytext);
|
||||||
if(DEBUG_EXP) fprintf(stderr, "%s\n", e);
|
if(DEBUG_EXP) fprintf(stderr, "%s\n", e);
|
||||||
errMsg = e;
|
errMsg = e;
|
||||||
|
@ -97,6 +97,6 @@ expression: expression '+' expression { if(DEBUG_EXP) fprintf(stderr, " +"); $$
|
||||||
| CPU_METHOD { if(DEBUG_EXP) fprintf(stderr, " (CpuMethod)"); $$ = new CpuMethodExpression($1); lastExp = $$; }
|
| CPU_METHOD { if(DEBUG_EXP) fprintf(stderr, " (CpuMethod)"); $$ = new CpuMethodExpression($1); lastExp = $$; }
|
||||||
| TIA_METHOD { if(DEBUG_EXP) fprintf(stderr, " (TiaMethod)"); $$ = new TiaMethodExpression($1); lastExp = $$; }
|
| TIA_METHOD { if(DEBUG_EXP) fprintf(stderr, " (TiaMethod)"); $$ = new TiaMethodExpression($1); lastExp = $$; }
|
||||||
| FUNCTION { if(DEBUG_EXP) fprintf(stderr, " (function)"); $$ = new FunctionExpression($1); lastExp = $$; }
|
| FUNCTION { if(DEBUG_EXP) fprintf(stderr, " (function)"); $$ = new FunctionExpression($1); lastExp = $$; }
|
||||||
| ERR { if(DEBUG_EXP) fprintf(stderr, " ERR"); yyerror("Invalid label or constant"); return 1; }
|
| ERR { if(DEBUG_EXP) fprintf(stderr, " ERR"); yyerror((char*)"Invalid label or constant"); return 1; }
|
||||||
;
|
;
|
||||||
%%
|
%%
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,37 +1,103 @@
|
||||||
#ifndef BISON_Y_TAB_H
|
/* A Bison parser, made by GNU Bison 2.3. */
|
||||||
# define BISON_Y_TAB_H
|
|
||||||
|
|
||||||
#ifndef YYSTYPE
|
/* Skeleton interface for Bison's Yacc-like parsers in C
|
||||||
typedef union {
|
|
||||||
|
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||||
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
|
/* As a special exception, you may create a larger work that contains
|
||||||
|
part or all of the Bison parser skeleton and distribute that work
|
||||||
|
under terms of your choice, so long as that work isn't itself a
|
||||||
|
parser generator using the skeleton or a modified version thereof
|
||||||
|
as a parser skeleton. Alternatively, if you modify or redistribute
|
||||||
|
the parser skeleton itself, you may (at your option) remove this
|
||||||
|
special exception, which will cause the skeleton and the resulting
|
||||||
|
Bison output files to be licensed under the GNU General Public
|
||||||
|
License without this special exception.
|
||||||
|
|
||||||
|
This special exception was added by the Free Software Foundation in
|
||||||
|
version 2.2 of Bison. */
|
||||||
|
|
||||||
|
/* Tokens. */
|
||||||
|
#ifndef YYTOKENTYPE
|
||||||
|
# define YYTOKENTYPE
|
||||||
|
/* Put the tokens into the symbol table, so that GDB and other debuggers
|
||||||
|
know about them. */
|
||||||
|
enum yytokentype {
|
||||||
|
NUMBER = 258,
|
||||||
|
ERR = 259,
|
||||||
|
EQUATE = 260,
|
||||||
|
CPU_METHOD = 261,
|
||||||
|
TIA_METHOD = 262,
|
||||||
|
FUNCTION = 263,
|
||||||
|
LOG_OR = 264,
|
||||||
|
LOG_AND = 265,
|
||||||
|
LOG_NOT = 266,
|
||||||
|
SHL = 267,
|
||||||
|
SHR = 268,
|
||||||
|
EQ = 269,
|
||||||
|
NE = 270,
|
||||||
|
LTE = 271,
|
||||||
|
GTE = 272,
|
||||||
|
DEREF = 273,
|
||||||
|
UMINUS = 274
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
/* Tokens. */
|
||||||
|
#define NUMBER 258
|
||||||
|
#define ERR 259
|
||||||
|
#define EQUATE 260
|
||||||
|
#define CPU_METHOD 261
|
||||||
|
#define TIA_METHOD 262
|
||||||
|
#define FUNCTION 263
|
||||||
|
#define LOG_OR 264
|
||||||
|
#define LOG_AND 265
|
||||||
|
#define LOG_NOT 266
|
||||||
|
#define SHL 267
|
||||||
|
#define SHR 268
|
||||||
|
#define EQ 269
|
||||||
|
#define NE 270
|
||||||
|
#define LTE 271
|
||||||
|
#define GTE 272
|
||||||
|
#define DEREF 273
|
||||||
|
#define UMINUS 274
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||||
|
typedef union YYSTYPE
|
||||||
|
#line 29 "stella.y"
|
||||||
|
{
|
||||||
int val;
|
int val;
|
||||||
char *equate;
|
char *equate;
|
||||||
CPUDEBUG_INT_METHOD cpuMethod;
|
CPUDEBUG_INT_METHOD cpuMethod;
|
||||||
TIADEBUG_INT_METHOD tiaMethod;
|
TIADEBUG_INT_METHOD tiaMethod;
|
||||||
Expression *exp;
|
Expression *exp;
|
||||||
char *function;
|
char *function;
|
||||||
} yystype;
|
}
|
||||||
# define YYSTYPE yystype
|
/* Line 1489 of yacc.c. */
|
||||||
|
#line 96 "y.tab.h"
|
||||||
|
YYSTYPE;
|
||||||
|
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||||
|
# define YYSTYPE_IS_DECLARED 1
|
||||||
# define YYSTYPE_IS_TRIVIAL 1
|
# define YYSTYPE_IS_TRIVIAL 1
|
||||||
#endif
|
#endif
|
||||||
# define NUMBER 257
|
|
||||||
# define ERR 258
|
|
||||||
# define EQUATE 259
|
|
||||||
# define CPU_METHOD 260
|
|
||||||
# define TIA_METHOD 261
|
|
||||||
# define FUNCTION 262
|
|
||||||
# define LOG_OR 263
|
|
||||||
# define LOG_AND 264
|
|
||||||
# define LOG_NOT 265
|
|
||||||
# define SHR 266
|
|
||||||
# define SHL 267
|
|
||||||
# define GTE 268
|
|
||||||
# define LTE 269
|
|
||||||
# define NE 270
|
|
||||||
# define EQ 271
|
|
||||||
# define DEREF 272
|
|
||||||
# define UMINUS 273
|
|
||||||
|
|
||||||
|
|
||||||
extern YYSTYPE yylval;
|
extern YYSTYPE yylval;
|
||||||
|
|
||||||
#endif /* not BISON_Y_TAB_H */
|
|
||||||
|
|
Loading…
Reference in New Issue