DEBUG_CPPFLAGS += -Wredundant-decls
# produces false positives
# DEBUG_CPPFLAGS += -Wunreachable-code
-#CPPFLAGS += -Wwrite-strings
+# DEBUG_CPPFLAGS += -Wwrite-strings
# invalid option for gcc-3.3.5
-# CPPFLAGS += -Wextra
+# DEBUG_CPPFLAGS += -Wextra
CPPFLAGS += -Os
CPPFLAGS += -Wall
aac_afh.o: aac_afh.c
$(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) @faad_cppflags@ $<
-para_recv: @recv_objs@
- $(CC) @recv_objs@ -o $@ @recv_ldflags@
-
slider.o: slider.c
$(CC) -c -Wall -o $@ -g @GLIB_CFLAGS@ @GTK_CFLAGS@ $<
$(CC) -Wall -O -g -fPIC @GTK_CFLAGS@ -c -o $@ krell.c
mysql_selector.o: mysql_selector.c
- $(CC) -Wall -O -g @mysql_cppflags@ -c -o $@ $<
+ $(CC) -c $(DEBUG_CPPFLAGS) -Wall -O -g @mysql_cppflags@ $<
%.cmdline.o: %.cmdline.c
$(CC) -c $(CPPFLAGS) $<
%.o: %.c
$(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) $<
+para_recv: @recv_objs@
+ $(CC) @recv_objs@ -o $@ @recv_ldflags@
+
para_filter: @filter_objs@
$(CC) @filter_objs@ -o $@ @filter_ldflags@
free(pad);
}
-__malloc void *alsa_parse_config(char *options)
+__malloc static void *alsa_parse_config(const char *options)
{
struct alsa_write_args_info *conf
= para_calloc(sizeof(struct alsa_write_args_info));
/*
- * Copyright (C) 2005-2006 Andre Noll <noll@mathematik.tu-darmstadt.de>
+ * Copyright (C) 2005-2007 Andre Noll <maan@systemlinux.org>
*
* 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
/*
- * Copyright (C) 2005-2007 Andre Noll <noll@mathematik.tu-darmstadt.de>
+ * Copyright (C) 2005-2007 Andre Noll <maan@systemlinux.org>
*
* 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
/*
- * Copyright (C) 2006 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2006-2007 Andre Noll <maan@systemlinux.org>
*
* 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
free(pfwd);
}
-__malloc void *file_write_parse_config(char *options)
+__malloc static void *file_write_parse_config(const char *options)
{
PARA_INFO_LOG("options: %s\n", options);
struct file_write_args_info *conf
*/
static char *get_selector_info(char *name)
{
- char *meta = NULL, *atts = NULL, *info, *dir = NULL, *query, *stream = NULL;
+ char *meta, *atts, *info, *dir, *query, *stream;
void *result = NULL;
MYSQL_ROW row = NULL;
stream, meta,
(result && row && row[0])? row[0] : "(no score)",
atts);
- if (dir)
- free(dir);
- if (meta)
- free(meta);
- if (atts)
- free(atts);
- if (stream)
- free(stream);
+ free(dir);
+ free(meta);
+ free(atts);
+ free(stream);
if (result)
mysql_free_result(result);
return info;
/**
* the init function of the mysql-based audio file selector
*
- * Check the command line options and initialize all function pointers of \a db.
- * Connect to the mysql server and initialize the info string.
+ * \param db pointer to the struct to initialize
+ *
+ * Check the command line options and initialize all function pointers of \a
+ * db. Connect to the mysql server and initialize the info string.
+ *
+ * \return This function returns success even if it could not connect
+ * to the mysql server. This is because the connect is expected to fail
+ * if there the paraslash database is not yet created. This gives the
+ * user a chance to send the "cdb" to create the database.
*
* \sa struct audio_file_selector, misc_meta_data::selector_info,
* random_selector.c
/*
- * Copyright (C) 2006 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2006-2007 Andre Noll <maan@systemlinux.org>
*
* 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
return ret;
}
-__malloc void *osx_write_parse_config(char *options)
+__malloc static void *osx_write_parse_config(const char *options)
{
struct osx_write_args_info *conf
= para_calloc(sizeof(struct osx_write_args_info));
line options, but before parsing the
configuration file. In this case,
real/effective/saved UID are all set to the
-UID of 'username'. As the configuration file
+UID of 'name'. As the configuration file
is read afterwards, those options that have a
default value depending on the UID (e.g. the
directory for the configuration file) are
-computed by using the uid of 'username'.
+computed by using the uid of 'name'.
This option has no effect if para_server is
started as a non-root user (i.e. EUID != 0)"
set-group ID are all set to the GID given by
'group'. Must not be given in the config file."
- string typestr="groupname"
+ string typestr="group"
optional
/*
- * Copyright (C) 2006 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2006-2007 Andre Noll <maan@systemlinux.org>
*
* 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
* more than once with different values of \a options.
*
*/
- void * (*parse_config)(char *options);
+ void * (*parse_config)(const char *options);
/**
*
* open one instance of this writer
/*
- * Copyright (C) 2006 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2006-2007 Andre Noll <maan@systemlinux.org>
*
* 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
writers[i].init(&writers[i]);
}
-void *check_writer_arg(char *wa, int *writer_num)
+void *check_writer_arg(const char *wa, int *writer_num)
{
int i;