struct alisp_object * (*func)(struct alisp_instance *instance, struct alisp_object * args);
};
-static struct intrinsic intrinsics[] = {
+static const struct intrinsic intrinsics[] = {
{ "!=", F_numneq },
{ "%", F_mod },
{ "&check-memory", F_check_memory },
int err, mode;
void *handle;
struct alisp_object *p1, *p2;
- static struct flags flags[] = {
+ static const struct flags flags[] = {
{ "nonblock", SND_CTL_NONBLOCK },
{ "async", SND_CTL_ASYNC },
{ "readonly", SND_CTL_READONLY },
* main code
*/
-static struct acall_table acall_table[] = {
+static const struct acall_table acall_table[] = {
{ "card_get_index", &FA_int_str, (void *)snd_card_get_index, NULL },
{ "card_get_longname", &FA_int_int_strp, (void *)snd_card_get_longname, NULL },
{ "card_get_name", &FA_int_int_strp, (void *)snd_card_get_name, NULL },
return &alsa_lisp_t;
}
-static struct intrinsic snd_intrinsics[] = {
+static const struct intrinsic snd_intrinsics[] = {
{ "Acall", F_acall },
{ "Aerror", F_aerror },
{ "Ahandle", F_ahandle },
int snd_config_get_bool_ascii(const char *ascii)
{
unsigned int k;
- static struct {
- const char *str;
+ static const struct {
+ const char str[8];
int val;
} b[] = {
{ "0", 0 },
static int get_compare_weight(const snd_ctl_elem_id_t *id)
{
- static const char *names[] = {
+ static const char *const names[] = {
"Master",
"Hardware Master",
"Headphone",
"IEC958",
NULL
};
- static const char *names1[] = {
+ static const char *const names1[] = {
"Switch",
"Volume",
"Playback",
"-",
NULL
};
- static const char *names2[] = {
+ static const char *const names2[] = {
"Switch",
"Volume",
"Bypass",
typedef int (*next_devices_t)(snd_ctl_t *, int *);
-static next_devices_t next_devices[] = {
+static const next_devices_t next_devices[] = {
IFACE(CARD, NULL),
IFACE(HWDEP, snd_ctl_hwdep_next_device),
IFACE(MIXER, NULL),
*/
const char *snd_mixer_selem_channel_name(snd_mixer_selem_channel_id_t channel)
{
- static const char *array[SND_MIXER_SCHN_LAST + 1] = {
+ static const char *const array[SND_MIXER_SCHN_LAST + 1] = {
[SND_MIXER_SCHN_FRONT_LEFT] = "Front Left",
[SND_MIXER_SCHN_FRONT_RIGHT] = "Front Right",
[SND_MIXER_SCHN_REAR_LEFT] = "Rear Left",
static int get_compare_weight(const char *name, unsigned int idx)
{
- static const char *names[] = {
+ static const char *const names[] = {
"Master",
"Headphone",
"Tone",
"Mix",
NULL
};
- static const char *names1[] = {
+ static const char *const names1[] = {
"-",
NULL,
};
- static const char *names2[] = {
+ static const char *const names2[] = {
"Mono",
"Digital",
"Switch",
}
#ifndef DOC_HIDDEN
-static struct suf {
+static const struct suf {
const char *suffix;
selem_ctl_type_t type;
} suffixes[] = {
/* Return base length or 0 on failure */
static int base_len(const char *name, selem_ctl_type_t *type)
{
- struct suf *p;
+ const struct suf *p;
size_t nlen = strlen(name);
p = suffixes;
while (p->suffix) {
#include "plugin_ops.h"
#undef GETS_LABELS
#undef PUT32_LABELS
- static void *zero_labels[3] = {
+ static void *const zero_labels[3] = {
&&zero_int32, &&zero_int64,
#if SND_PCM_PLUGIN_ROUTE_FLOAT
&&zero_float
#endif
};
/* sum_type att */
- static void *add_labels[3 * 2] = {
+ static void *const add_labels[3 * 2] = {
&&add_int32_noatt, &&add_int32_att,
&&add_int64_noatt, &&add_int64_att,
#if SND_PCM_PLUGIN_ROUTE_FLOAT
#endif
};
/* sum_type att shift */
- static void *norm_labels[3 * 2 * 4] = {
+ static void *const norm_labels[3 * 2 * 4] = {
0,
&&norm_int32_8_noatt,
&&norm_int32_16_noatt,
int snd_rawmidi_conf_generic_id(const char *id)
{
- static const char *ids[] = {
+ static const char ids[][8] = {
"comment",
"type",
"hint",