1
0
Fork 0
forked from len0rd/rockbox

Fix some plugins that use NULL instead of -1 when not using a voice id in struct opt_items. Change as many '#define NULL 0' to '#define NULL ((void*)0)' as grep would find - somewehere the former is still hiding it seems. :\

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15117 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sevakis 2007-10-15 07:59:13 +00:00
parent 887ff33f2e
commit 0b0c23ff13
6 changed files with 87 additions and 87 deletions

View file

@ -140,60 +140,60 @@ LCD_RGBPACK(19,10,26) };
#endif
static const struct opt_items autofire_delay_settings[15] = {
{ "Off", NULL },
{ "50ms", NULL },
{ "100ms", NULL },
{ "200ms", NULL },
{ "300ms", NULL },
{ "400ms", NULL },
{ "500ms", NULL },
{ "600ms", NULL },
{ "700ms", NULL },
{ "800ms", NULL },
{ "900ms", NULL },
{ "1s", NULL },
{ "2s", NULL },
{ "3s", NULL },
{ "4s", NULL }
{ "Off", -1 },
{ "50ms", -1 },
{ "100ms", -1 },
{ "200ms", -1 },
{ "300ms", -1 },
{ "400ms", -1 },
{ "500ms", -1 },
{ "600ms", -1 },
{ "700ms", -1 },
{ "800ms", -1 },
{ "900ms", -1 },
{ "1s", -1 },
{ "2s", -1 },
{ "3s", -1 },
{ "4s", -1 }
};
int autofire_delay_values[15] = {
0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 200, 300, 400 };
static const struct opt_items particle_settings[8] = {
{ "5", NULL },
{ "10", NULL },
{ "15", NULL },
{ "20", NULL },
{ "25", NULL },
{ "30", NULL },
{ "35", NULL },
{ "40", NULL },
{ "5", -1 },
{ "10", -1 },
{ "15", -1 },
{ "20", -1 },
{ "25", -1 },
{ "30", -1 },
{ "35", -1 },
{ "40", -1 },
};
int particle_values[8] = {
5, 10, 15, 20, 25, 30, 35, 40 };
static const struct opt_items particle_life_settings[9] = {
{ "20 cycles", NULL },
{ "30 cycles", NULL },
{ "40 cycles", NULL },
{ "50 cycles", NULL },
{ "60 cycles", NULL },
{ "70 cycles", NULL },
{ "80 cycles", NULL },
{ "90 cycles", NULL },
{ "100 cycles", NULL }
{ "20 cycles", -1 },
{ "30 cycles", -1 },
{ "40 cycles", -1 },
{ "50 cycles", -1 },
{ "60 cycles", -1 },
{ "70 cycles", -1 },
{ "80 cycles", -1 },
{ "90 cycles", -1 },
{ "100 cycles", -1 }
};
int particle_life_values[9] = {
20, 30, 40, 50, 60, 70, 80, 90, 100 };
static const struct opt_items gravity_settings[4] = {
{ "Off", NULL },
{ "Weak", NULL },
{ "Moderate", NULL },
{ "Strong", NULL },
{ "Off", -1 },
{ "Weak", -1 },
{ "Moderate", -1 },
{ "Strong", -1 },
};
int gravity_values[4] = {
@ -202,9 +202,9 @@ int gravity_values[4] = {
#ifdef HAVE_LCD_COLOR
static const struct opt_items rocket_settings[3] = {
{ "No", NULL },
{ "Yes (no trails)", NULL },
{ "Yes (with trails)", NULL },
{ "No", -1 },
{ "Yes (no trails)", -1 },
{ "Yes (with trails)", -1 },
};
int rocket_values[4] = {
2, 1, 0 };
@ -212,8 +212,8 @@ int rocket_values[4] = {
#else
static const struct opt_items rocket_settings[2] = {
{ "No", NULL },
{ "Yes", NULL },
{ "No", -1 },
{ "Yes", -1 },
};
int rocket_values[4] = {
1, 0 };
@ -221,15 +221,15 @@ int rocket_values[4] = {
#endif
static const struct opt_items fps_settings[9] = {
{ "20 FPS", NULL },
{ "25 FPS", NULL },
{ "30 FPS", NULL },
{ "35 FPS", NULL },
{ "40 FPS", NULL },
{ "45 FPS", NULL },
{ "50 FPS", NULL },
{ "55 FPS", NULL },
{ "60 FPS", NULL }
{ "20 FPS", -1 },
{ "25 FPS", -1 },
{ "30 FPS", -1 },
{ "35 FPS", -1 },
{ "40 FPS", -1 },
{ "45 FPS", -1 },
{ "50 FPS", -1 },
{ "55 FPS", -1 },
{ "60 FPS", -1 }
};
int fps_values[9] = {

View file

@ -322,9 +322,9 @@ static void reversi_gui_display_board(void) {
/* Menu entries and the corresponding values for cursor wrap mode */
#define MENU_TEXT_WRAP_MODE "Cursor wrap mode"
static const struct opt_items cursor_wrap_mode_settings[] = {
{ "Flat board", NULL },
{ "Sphere", NULL },
{ "Torus", NULL },
{ "Flat board", -1 },
{ "Sphere", -1 },
{ "Torus", -1 },
};
static const cursor_wrap_mode_t cursor_wrap_mode_values[3] = {
WRAP_FLAT, WRAP_SPHERE, WRAP_TORUS };
@ -335,10 +335,10 @@ static const cursor_wrap_mode_t cursor_wrap_mode_values[3] = {
#define MENU_TEXT_STRAT_BLACK "Strategy for black"
static struct opt_items strategy_settings[] = {
{ "Human", NULL },
{ "Naive robot", NULL },
{ "Simple robot", NULL },
//{ "AB robot", NULL },
{ "Human", -1 },
{ "Naive robot", -1 },
{ "Simple robot", -1 },
//{ "AB robot", -1 },
};
static const game_strategy_t * const strategy_values[] = {
&strategy_human, &strategy_naive, &strategy_simple, /*&strategy_ab*/ };

View file

@ -138,18 +138,18 @@ void play_waveform(void)
{
static struct opt_items names[HW_NUM_FREQ] =
{
HW_HAVE_96_([HW_FREQ_96] = { "96kHz", NULL },)
HW_HAVE_88_([HW_FREQ_88] = { "88.2kHz", NULL },)
HW_HAVE_64_([HW_FREQ_64] = { "64kHz", NULL },)
HW_HAVE_48_([HW_FREQ_48] = { "48kHz", NULL },)
HW_HAVE_44_([HW_FREQ_44] = { "44.1kHz", NULL },)
HW_HAVE_32_([HW_FREQ_32] = { "32kHz", NULL },)
HW_HAVE_24_([HW_FREQ_24] = { "24kHz", NULL },)
HW_HAVE_22_([HW_FREQ_22] = { "22.05kHz", NULL },)
HW_HAVE_16_([HW_FREQ_16] = { "16kHz", NULL },)
HW_HAVE_12_([HW_FREQ_12] = { "12kHz", NULL },)
HW_HAVE_11_([HW_FREQ_11] = { "11.025kHz", NULL },)
HW_HAVE_8_( [HW_FREQ_8 ] = { "8kHz", NULL },)
HW_HAVE_96_([HW_FREQ_96] = { "96kHz", -1 },)
HW_HAVE_88_([HW_FREQ_88] = { "88.2kHz", -1 },)
HW_HAVE_64_([HW_FREQ_64] = { "64kHz", -1 },)
HW_HAVE_48_([HW_FREQ_48] = { "48kHz", -1 },)
HW_HAVE_44_([HW_FREQ_44] = { "44.1kHz", -1 },)
HW_HAVE_32_([HW_FREQ_32] = { "32kHz", -1 },)
HW_HAVE_24_([HW_FREQ_24] = { "24kHz", -1 },)
HW_HAVE_22_([HW_FREQ_22] = { "22.05kHz", -1 },)
HW_HAVE_16_([HW_FREQ_16] = { "16kHz", -1 },)
HW_HAVE_12_([HW_FREQ_12] = { "12kHz", -1 },)
HW_HAVE_11_([HW_FREQ_11] = { "11.025kHz", -1 },)
HW_HAVE_8_( [HW_FREQ_8 ] = { "8kHz", -1 },)
};
/* 50 cycles of wavform */
@ -241,10 +241,10 @@ void set_waveform(void)
{
static struct opt_items names[NUM_WAVEFORMS] =
{
[TONE_SINE] = { "Sine", NULL },
[TONE_TRIANGLE] = { "Triangle", NULL },
[TONE_SAWTOOTH] = { "Sawtooth", NULL },
[TONE_SQUARE] = { "Square", NULL },
[TONE_SINE] = { "Sine", -1 },
[TONE_TRIANGLE] = { "Triangle", -1 },
[TONE_SAWTOOTH] = { "Sawtooth", -1 },
[TONE_SQUARE] = { "Square", -1 },
};
rb->set_option("Waveform", &waveform, INT, names,

View file

@ -237,8 +237,8 @@ static void select_keymap(void){
/* options menu */
static void options_menu(void){
static const struct opt_items no_yes[2] = {
{ "No", NULL },
{ "Yes", NULL },
{ "No", -1 },
{ "Yes", -1 },
};
int m;
int result;
@ -255,16 +255,16 @@ static void options_menu(void){
{ "Custom keymap", NULL },
};
static struct opt_items frameskip_items[] = {
{ "0", NULL },
{ "1", NULL },
{ "2", NULL },
{ "3", NULL },
{ "4", NULL },
{ "5", NULL },
{ "6", NULL },
{ "7", NULL },
{ "8", NULL },
{ "9", NULL },
{ "0", -1 },
{ "1", -1 },
{ "2", -1 },
{ "3", -1 },
{ "4", -1 },
{ "5", -1 },
{ "6", -1 },
{ "7", -1 },
{ "8", -1 },
{ "9", -1 },
};

View file

@ -17,7 +17,7 @@ extern "C" {
#include <stddef.h>
#ifndef NULL
#define NULL 0
#define NULL ((void*)0)
#endif
#define EXIT_FAILURE 1

View file

@ -17,7 +17,7 @@ extern "C" {
#include <stddef.h>
#ifndef NULL
#define NULL 0
#define NULL ((void*)0)
#endif
_PTR _EXFUN(memchr,(const _PTR, int, size_t));