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:
parent
887ff33f2e
commit
0b0c23ff13
6 changed files with 87 additions and 87 deletions
|
@ -140,60 +140,60 @@ LCD_RGBPACK(19,10,26) };
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const struct opt_items autofire_delay_settings[15] = {
|
static const struct opt_items autofire_delay_settings[15] = {
|
||||||
{ "Off", NULL },
|
{ "Off", -1 },
|
||||||
{ "50ms", NULL },
|
{ "50ms", -1 },
|
||||||
{ "100ms", NULL },
|
{ "100ms", -1 },
|
||||||
{ "200ms", NULL },
|
{ "200ms", -1 },
|
||||||
{ "300ms", NULL },
|
{ "300ms", -1 },
|
||||||
{ "400ms", NULL },
|
{ "400ms", -1 },
|
||||||
{ "500ms", NULL },
|
{ "500ms", -1 },
|
||||||
{ "600ms", NULL },
|
{ "600ms", -1 },
|
||||||
{ "700ms", NULL },
|
{ "700ms", -1 },
|
||||||
{ "800ms", NULL },
|
{ "800ms", -1 },
|
||||||
{ "900ms", NULL },
|
{ "900ms", -1 },
|
||||||
{ "1s", NULL },
|
{ "1s", -1 },
|
||||||
{ "2s", NULL },
|
{ "2s", -1 },
|
||||||
{ "3s", NULL },
|
{ "3s", -1 },
|
||||||
{ "4s", NULL }
|
{ "4s", -1 }
|
||||||
};
|
};
|
||||||
|
|
||||||
int autofire_delay_values[15] = {
|
int autofire_delay_values[15] = {
|
||||||
0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 200, 300, 400 };
|
0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 200, 300, 400 };
|
||||||
|
|
||||||
static const struct opt_items particle_settings[8] = {
|
static const struct opt_items particle_settings[8] = {
|
||||||
{ "5", NULL },
|
{ "5", -1 },
|
||||||
{ "10", NULL },
|
{ "10", -1 },
|
||||||
{ "15", NULL },
|
{ "15", -1 },
|
||||||
{ "20", NULL },
|
{ "20", -1 },
|
||||||
{ "25", NULL },
|
{ "25", -1 },
|
||||||
{ "30", NULL },
|
{ "30", -1 },
|
||||||
{ "35", NULL },
|
{ "35", -1 },
|
||||||
{ "40", NULL },
|
{ "40", -1 },
|
||||||
};
|
};
|
||||||
|
|
||||||
int particle_values[8] = {
|
int particle_values[8] = {
|
||||||
5, 10, 15, 20, 25, 30, 35, 40 };
|
5, 10, 15, 20, 25, 30, 35, 40 };
|
||||||
|
|
||||||
static const struct opt_items particle_life_settings[9] = {
|
static const struct opt_items particle_life_settings[9] = {
|
||||||
{ "20 cycles", NULL },
|
{ "20 cycles", -1 },
|
||||||
{ "30 cycles", NULL },
|
{ "30 cycles", -1 },
|
||||||
{ "40 cycles", NULL },
|
{ "40 cycles", -1 },
|
||||||
{ "50 cycles", NULL },
|
{ "50 cycles", -1 },
|
||||||
{ "60 cycles", NULL },
|
{ "60 cycles", -1 },
|
||||||
{ "70 cycles", NULL },
|
{ "70 cycles", -1 },
|
||||||
{ "80 cycles", NULL },
|
{ "80 cycles", -1 },
|
||||||
{ "90 cycles", NULL },
|
{ "90 cycles", -1 },
|
||||||
{ "100 cycles", NULL }
|
{ "100 cycles", -1 }
|
||||||
};
|
};
|
||||||
|
|
||||||
int particle_life_values[9] = {
|
int particle_life_values[9] = {
|
||||||
20, 30, 40, 50, 60, 70, 80, 90, 100 };
|
20, 30, 40, 50, 60, 70, 80, 90, 100 };
|
||||||
|
|
||||||
static const struct opt_items gravity_settings[4] = {
|
static const struct opt_items gravity_settings[4] = {
|
||||||
{ "Off", NULL },
|
{ "Off", -1 },
|
||||||
{ "Weak", NULL },
|
{ "Weak", -1 },
|
||||||
{ "Moderate", NULL },
|
{ "Moderate", -1 },
|
||||||
{ "Strong", NULL },
|
{ "Strong", -1 },
|
||||||
};
|
};
|
||||||
|
|
||||||
int gravity_values[4] = {
|
int gravity_values[4] = {
|
||||||
|
@ -202,9 +202,9 @@ int gravity_values[4] = {
|
||||||
#ifdef HAVE_LCD_COLOR
|
#ifdef HAVE_LCD_COLOR
|
||||||
|
|
||||||
static const struct opt_items rocket_settings[3] = {
|
static const struct opt_items rocket_settings[3] = {
|
||||||
{ "No", NULL },
|
{ "No", -1 },
|
||||||
{ "Yes (no trails)", NULL },
|
{ "Yes (no trails)", -1 },
|
||||||
{ "Yes (with trails)", NULL },
|
{ "Yes (with trails)", -1 },
|
||||||
};
|
};
|
||||||
int rocket_values[4] = {
|
int rocket_values[4] = {
|
||||||
2, 1, 0 };
|
2, 1, 0 };
|
||||||
|
@ -212,8 +212,8 @@ int rocket_values[4] = {
|
||||||
#else
|
#else
|
||||||
|
|
||||||
static const struct opt_items rocket_settings[2] = {
|
static const struct opt_items rocket_settings[2] = {
|
||||||
{ "No", NULL },
|
{ "No", -1 },
|
||||||
{ "Yes", NULL },
|
{ "Yes", -1 },
|
||||||
};
|
};
|
||||||
int rocket_values[4] = {
|
int rocket_values[4] = {
|
||||||
1, 0 };
|
1, 0 };
|
||||||
|
@ -221,15 +221,15 @@ int rocket_values[4] = {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const struct opt_items fps_settings[9] = {
|
static const struct opt_items fps_settings[9] = {
|
||||||
{ "20 FPS", NULL },
|
{ "20 FPS", -1 },
|
||||||
{ "25 FPS", NULL },
|
{ "25 FPS", -1 },
|
||||||
{ "30 FPS", NULL },
|
{ "30 FPS", -1 },
|
||||||
{ "35 FPS", NULL },
|
{ "35 FPS", -1 },
|
||||||
{ "40 FPS", NULL },
|
{ "40 FPS", -1 },
|
||||||
{ "45 FPS", NULL },
|
{ "45 FPS", -1 },
|
||||||
{ "50 FPS", NULL },
|
{ "50 FPS", -1 },
|
||||||
{ "55 FPS", NULL },
|
{ "55 FPS", -1 },
|
||||||
{ "60 FPS", NULL }
|
{ "60 FPS", -1 }
|
||||||
};
|
};
|
||||||
|
|
||||||
int fps_values[9] = {
|
int fps_values[9] = {
|
||||||
|
|
|
@ -322,9 +322,9 @@ static void reversi_gui_display_board(void) {
|
||||||
/* Menu entries and the corresponding values for cursor wrap mode */
|
/* Menu entries and the corresponding values for cursor wrap mode */
|
||||||
#define MENU_TEXT_WRAP_MODE "Cursor wrap mode"
|
#define MENU_TEXT_WRAP_MODE "Cursor wrap mode"
|
||||||
static const struct opt_items cursor_wrap_mode_settings[] = {
|
static const struct opt_items cursor_wrap_mode_settings[] = {
|
||||||
{ "Flat board", NULL },
|
{ "Flat board", -1 },
|
||||||
{ "Sphere", NULL },
|
{ "Sphere", -1 },
|
||||||
{ "Torus", NULL },
|
{ "Torus", -1 },
|
||||||
};
|
};
|
||||||
static const cursor_wrap_mode_t cursor_wrap_mode_values[3] = {
|
static const cursor_wrap_mode_t cursor_wrap_mode_values[3] = {
|
||||||
WRAP_FLAT, WRAP_SPHERE, WRAP_TORUS };
|
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"
|
#define MENU_TEXT_STRAT_BLACK "Strategy for black"
|
||||||
|
|
||||||
static struct opt_items strategy_settings[] = {
|
static struct opt_items strategy_settings[] = {
|
||||||
{ "Human", NULL },
|
{ "Human", -1 },
|
||||||
{ "Naive robot", NULL },
|
{ "Naive robot", -1 },
|
||||||
{ "Simple robot", NULL },
|
{ "Simple robot", -1 },
|
||||||
//{ "AB robot", NULL },
|
//{ "AB robot", -1 },
|
||||||
};
|
};
|
||||||
static const game_strategy_t * const strategy_values[] = {
|
static const game_strategy_t * const strategy_values[] = {
|
||||||
&strategy_human, &strategy_naive, &strategy_simple, /*&strategy_ab*/ };
|
&strategy_human, &strategy_naive, &strategy_simple, /*&strategy_ab*/ };
|
||||||
|
|
|
@ -138,18 +138,18 @@ void play_waveform(void)
|
||||||
{
|
{
|
||||||
static struct opt_items names[HW_NUM_FREQ] =
|
static struct opt_items names[HW_NUM_FREQ] =
|
||||||
{
|
{
|
||||||
HW_HAVE_96_([HW_FREQ_96] = { "96kHz", NULL },)
|
HW_HAVE_96_([HW_FREQ_96] = { "96kHz", -1 },)
|
||||||
HW_HAVE_88_([HW_FREQ_88] = { "88.2kHz", NULL },)
|
HW_HAVE_88_([HW_FREQ_88] = { "88.2kHz", -1 },)
|
||||||
HW_HAVE_64_([HW_FREQ_64] = { "64kHz", NULL },)
|
HW_HAVE_64_([HW_FREQ_64] = { "64kHz", -1 },)
|
||||||
HW_HAVE_48_([HW_FREQ_48] = { "48kHz", NULL },)
|
HW_HAVE_48_([HW_FREQ_48] = { "48kHz", -1 },)
|
||||||
HW_HAVE_44_([HW_FREQ_44] = { "44.1kHz", NULL },)
|
HW_HAVE_44_([HW_FREQ_44] = { "44.1kHz", -1 },)
|
||||||
HW_HAVE_32_([HW_FREQ_32] = { "32kHz", NULL },)
|
HW_HAVE_32_([HW_FREQ_32] = { "32kHz", -1 },)
|
||||||
HW_HAVE_24_([HW_FREQ_24] = { "24kHz", NULL },)
|
HW_HAVE_24_([HW_FREQ_24] = { "24kHz", -1 },)
|
||||||
HW_HAVE_22_([HW_FREQ_22] = { "22.05kHz", NULL },)
|
HW_HAVE_22_([HW_FREQ_22] = { "22.05kHz", -1 },)
|
||||||
HW_HAVE_16_([HW_FREQ_16] = { "16kHz", NULL },)
|
HW_HAVE_16_([HW_FREQ_16] = { "16kHz", -1 },)
|
||||||
HW_HAVE_12_([HW_FREQ_12] = { "12kHz", NULL },)
|
HW_HAVE_12_([HW_FREQ_12] = { "12kHz", -1 },)
|
||||||
HW_HAVE_11_([HW_FREQ_11] = { "11.025kHz", NULL },)
|
HW_HAVE_11_([HW_FREQ_11] = { "11.025kHz", -1 },)
|
||||||
HW_HAVE_8_( [HW_FREQ_8 ] = { "8kHz", NULL },)
|
HW_HAVE_8_( [HW_FREQ_8 ] = { "8kHz", -1 },)
|
||||||
};
|
};
|
||||||
|
|
||||||
/* 50 cycles of wavform */
|
/* 50 cycles of wavform */
|
||||||
|
@ -241,10 +241,10 @@ void set_waveform(void)
|
||||||
{
|
{
|
||||||
static struct opt_items names[NUM_WAVEFORMS] =
|
static struct opt_items names[NUM_WAVEFORMS] =
|
||||||
{
|
{
|
||||||
[TONE_SINE] = { "Sine", NULL },
|
[TONE_SINE] = { "Sine", -1 },
|
||||||
[TONE_TRIANGLE] = { "Triangle", NULL },
|
[TONE_TRIANGLE] = { "Triangle", -1 },
|
||||||
[TONE_SAWTOOTH] = { "Sawtooth", NULL },
|
[TONE_SAWTOOTH] = { "Sawtooth", -1 },
|
||||||
[TONE_SQUARE] = { "Square", NULL },
|
[TONE_SQUARE] = { "Square", -1 },
|
||||||
};
|
};
|
||||||
|
|
||||||
rb->set_option("Waveform", &waveform, INT, names,
|
rb->set_option("Waveform", &waveform, INT, names,
|
||||||
|
|
|
@ -237,8 +237,8 @@ static void select_keymap(void){
|
||||||
/* options menu */
|
/* options menu */
|
||||||
static void options_menu(void){
|
static void options_menu(void){
|
||||||
static const struct opt_items no_yes[2] = {
|
static const struct opt_items no_yes[2] = {
|
||||||
{ "No", NULL },
|
{ "No", -1 },
|
||||||
{ "Yes", NULL },
|
{ "Yes", -1 },
|
||||||
};
|
};
|
||||||
int m;
|
int m;
|
||||||
int result;
|
int result;
|
||||||
|
@ -255,16 +255,16 @@ static void options_menu(void){
|
||||||
{ "Custom keymap", NULL },
|
{ "Custom keymap", NULL },
|
||||||
};
|
};
|
||||||
static struct opt_items frameskip_items[] = {
|
static struct opt_items frameskip_items[] = {
|
||||||
{ "0", NULL },
|
{ "0", -1 },
|
||||||
{ "1", NULL },
|
{ "1", -1 },
|
||||||
{ "2", NULL },
|
{ "2", -1 },
|
||||||
{ "3", NULL },
|
{ "3", -1 },
|
||||||
{ "4", NULL },
|
{ "4", -1 },
|
||||||
{ "5", NULL },
|
{ "5", -1 },
|
||||||
{ "6", NULL },
|
{ "6", -1 },
|
||||||
{ "7", NULL },
|
{ "7", -1 },
|
||||||
{ "8", NULL },
|
{ "8", -1 },
|
||||||
{ "9", NULL },
|
{ "9", -1 },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ extern "C" {
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
#ifndef NULL
|
#ifndef NULL
|
||||||
#define NULL 0
|
#define NULL ((void*)0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define EXIT_FAILURE 1
|
#define EXIT_FAILURE 1
|
||||||
|
|
|
@ -17,7 +17,7 @@ extern "C" {
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
#ifndef NULL
|
#ifndef NULL
|
||||||
#define NULL 0
|
#define NULL ((void*)0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_PTR _EXFUN(memchr,(const _PTR, int, size_t));
|
_PTR _EXFUN(memchr,(const _PTR, int, size_t));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue