crypt_common base64 ipc dccp_send fd user_list \
chunk_queue afs aft mood mp score attribute blob \
playlist sched acl send_common udp_send color fec \
- wma_afh wma_common sideband version lsu \
+ wma_afh wma_common sideband lsu \
)
ifeq ($(CRYPTOLIB),openssl)
server_objs += openssl.o
server_objs += aac_afh.o mp4.o
endif
upgrade_db_objs := $(addsuffix .o, crypt_common exec fd string \
- upgrade_db version base64)
+ upgrade_db base64)
endif
endif
ifneq ($(CRYPTOLIB),)
executables += client audiod
client_objs := $(addsuffix .o, \
client net string fd lsu sched stdin stdout time sideband client_common \
- buffer_tree crypt_common base64 version $(CRYPTOLIB) \
+ buffer_tree crypt_common base64 $(CRYPTOLIB) \
)
ifeq ($(HAVE_READLINE),yes)
client_objs += interactive.o
time grab_client filter_common wav_filter compress_filter amp_filter \
http_recv dccp_recv recv_common fd sched write_common file_write \
audiod_command fecdec_filter client_common udp_recv color fec \
- prebuffer_filter version bitstream imdct wma_common wmadec_filter \
+ prebuffer_filter bitstream imdct wma_common wmadec_filter \
buffer_tree sync_filter lsu $(CRYPTOLIB) \
)
audiod_audio_formats := "wma"
endif
ifneq ($(HAVE_OSS)-$(HAVE_ALSA),no-no)
executables += mixer
- mixer_objs := $(addsuffix .o, mixer exec string fd time lsu version)
+ mixer_objs := $(addsuffix .o, mixer exec string fd time lsu)
ifeq ($(HAVE_OSS),yes)
mixer_objs += oss_mix.o
endif
ifeq ($(HAVE_CURSES),yes)
executables += gui
gui_objs := $(addsuffix .o, exec signal string stat ringbuffer fd \
- gui gui_theme lsu time sched version)
+ gui gui_theme lsu time sched)
endif
filter_objs := $(addsuffix .o, \
filter_common wav_filter compress_filter filter string stdin stdout \
- sched fd amp_filter fecdec_filter fec lsu version prebuffer_filter \
+ sched fd amp_filter fecdec_filter fec lsu prebuffer_filter \
time bitstream imdct wma_common wmadec_filter buffer_tree net \
sync_filter \
)
recv_objs := $(addsuffix .o, \
http_recv recv_common recv time string net dccp_recv fd sched stdout \
udp_recv buffer_tree afh_recv afh_common wma_afh wma_common mp3_afh \
- version \
)
ifeq ($(NEED_OGG_OBJECTS),yes)
recv_objs += ogg_afh_common.o
audio_format_handlers := mp3 wma
afh_objs := $(addsuffix .o, afh string fd mp3_afh afh_common time wma_afh \
- wma_common version)
+ wma_common)
ifeq ($(NEED_OGG_OBJECTS),yes)
afh_objs += ogg_afh_common.o
endif
wma_afh wma_common mp3_afh recv_common udp_recv http_recv dccp_recv \
filter_common fec bitstream imdct wav_filter compress_filter \
amp_filter prebuffer_filter fecdec_filter wmadec_filter write_common \
- file_write version sync_filter lsu interactive \
+ file_write sync_filter lsu interactive \
)
ifeq ($(NEED_OGG_OBJECTS),yes)
play_objs += ogg_afh_common.o
endif
write_objs := $(addsuffix .o, write write_common file_write time fd \
- string sched stdin buffer_tree check_wav version)
+ string sched stdin buffer_tree check_wav)
ifeq ($(NEED_AO_OBJECTS),yes)
write_objs += ao_write.o
endif
write_objs += alsa_write.o
endif
-audioc_objs := $(addsuffix .o, audioc string lsu net fd time version)
+audioc_objs := $(addsuffix .o, audioc string lsu net fd time)
ifeq ($(HAVE_READLINE),yes)
audioc_objs += buffer_tree.o interactive.o sched.o
endif
#include "fd.h"
#include "afh.h"
#include "error.h"
-#include "version.h"
/** Array of error strings. */
DEFINE_PARA_ERRLIST;
#include "net.h"
#include "string.h"
#include "fd.h"
-#include "version.h"
/** Array of error strings. */
DEFINE_PARA_ERRLIST;
#include "fd.h"
#include "write.h"
#include "signal.h"
-#include "version.h"
/** Array of error strings. */
DEFINE_PARA_ERRLIST;
#include "string.h"
#include "write.h"
#include "fd.h"
-#include "version.h"
extern struct sched sched;
extern char *stat_item_values[NUM_STAT_ITEMS];
#include "client.h"
#include "buffer_tree.h"
#include "error.h"
-#include "version.h"
/** Array of error strings. */
DEFINE_PARA_ERRLIST;
#include "string.h"
#include "client.h"
#include "buffer_tree.h"
-#include "version.h"
/** The size of the receiving buffer. */
#define CLIENT_BUFSIZE 4000
#include "server_cmd.lsg.h"
#include "user_list.h"
#include "signal.h"
-#include "version.h"
/** \cond server_cmd_aux_info */
#define SERVER_CMD_AUX_INFO(_arg) _arg,
#include "stdout.h"
#include "error.h"
#include "fd.h"
-#include "version.h"
/** Array of error strings. */
DEFINE_PARA_ERRLIST;
#include "list.h"
#include "sched.h"
#include "signal.h"
-#include "version.h"
/** Array of error strings. */
DEFINE_PARA_ERRLIST;
#include "string.h"
#include "mix.h"
#include "error.h"
-#include "version.h"
/** Array of error strings. */
DEFINE_PARA_ERRLIST;
#include "list.h"
#include "error.h"
#include "buffer_tree.h"
-#include "version.h"
#include "string.h"
#include "sched.h"
#include "filter.h"
#include "string.h"
#include "error.h"
#include "stdout.h"
-#include "version.h"
/** Array of error strings. */
DEFINE_PARA_ERRLIST;
#include "signal.h"
#include "user_list.h"
#include "color.h"
-#include "version.h"
/** Array of error strings. */
DEFINE_PARA_ERRLIST;
#include "string.h"
#include "error.h"
+#include "git-version.h"
/**
* Reallocate an array, abort on failure or bugs.
free(wcs);
return 1;
}
+
+/**
+ * Get the version string for an executable.
+ *
+ * \param pfx The program name (without the leading "para_").
+ *
+ * \return A statically allocated string which contains the program name and
+ * the git version. It must not be freed by the caller.
+ */
+const char *version_single_line(const char *pfx)
+{
+ static char buf[100];
+ snprintf(buf, sizeof(buf) - 1,
+ "para_%s " GIT_VERSION, pfx);
+ return buf;
+}
+
+/**
+ * Get the full version text.
+ *
+ * \param pfx See \ref version_single_line().
+ *
+ * \return A string containing the same text as returned by \ref
+ * version_single_line(), augmented by additional build information, a
+ * copyright text and the email address of the author.
+ *
+ * Like \ref version_single_line(), this string is stored in a statically
+ * allocated buffer and must not be freed.
+ */
+const char *version_text(const char *pfx)
+{
+ static char buf[512];
+
+ snprintf(buf, sizeof(buf) - 1, "%s\n"
+ "Copyright (C) " COPYRIGHT_YEAR " Andre Noll\n"
+ "This is free software with ABSOLUTELY NO WARRANTY."
+ " See COPYING for details.\n"
+ "Report bugs to <maan@tuebingen.mpg.de>.\n"
+ "build date: " BUILD_DATE ",\n"
+ "build system: " UNAME_RS ",\n"
+ "compiler: " CC_VERSION ".\n",
+ version_single_line(pfx)
+ );
+ return buf;
+}
+
+/**
+ * Print the version text and exit successfully.
+ *
+ * \param pfx See \ref version_single_line().
+ * \param flag Whether --version was given.
+ *
+ * If \a flag is false, this function does nothing. Otherwise it prints the
+ * full version text as returned by \ref version_text() and exits successfully.
+ */
+void version_handle_flag(const char *pfx, bool flag)
+{
+ if (!flag)
+ return;
+ printf("%s", version_text(pfx));
+ exit(EXIT_SUCCESS);
+}
__must_check int strwidth(const char *s, size_t *result);
__must_check int sanitize_str(const char *src, size_t max_width,
char **result, size_t *width);
+const char *version_single_line(const char *pfx);
+const char *version_text(const char *pfx);
+void version_handle_flag(const char *pfx, bool flag);
#include "string.h"
#include "fd.h"
#include "crypt.h"
-#include "version.h"
#define CMD_PTR (lls_cmd(0, upgrade_db_suite))
#define OPT_RESULT(_name, _lpr) \
+++ /dev/null
-/* Copyright (C) 2013 Andre Noll <maan@tuebingen.mpg.de>, see file COPYING. */
-
-/** \file version.c Some helpers for printing version and copyright strings. */
-
-#include "para.h"
-#include "version.h"
-#include "git-version.h"
-
-/**
- * Get the version string for an executable.
- *
- * \param pfx The program name (without the leading "para_").
- *
- * \return A statically allocated string which contains the program name and
- * the git version. It must not be freed by the caller.
- */
-const char *version_single_line(const char *pfx)
-{
- static char buf[100];
- snprintf(buf, sizeof(buf) - 1,
- "para_%s " GIT_VERSION, pfx);
- return buf;
-}
-
-/**
- * Get the full version text.
- *
- * \param pfx See \ref version_single_line().
- *
- * \return A string containing the same text as returned by \ref
- * version_single_line(), augmented by additional build information, a
- * copyright text and the email address of the author.
- *
- * Like \ref version_single_line(), this string is stored in a statically
- * allocated buffer and must not be freed.
- */
-const char *version_text(const char *pfx)
-{
- static char buf[512];
-
- snprintf(buf, sizeof(buf) - 1, "%s\n"
- "Copyright (C) " COPYRIGHT_YEAR " Andre Noll\n"
- "This is free software with ABSOLUTELY NO WARRANTY."
- " See COPYING for details.\n"
- "Report bugs to <maan@tuebingen.mpg.de>.\n"
- "build date: " BUILD_DATE ",\n"
- "build system: " UNAME_RS ",\n"
- "compiler: " CC_VERSION ".\n",
- version_single_line(pfx)
- );
- return buf;
-}
-
-/**
- * Print the version text and exit successfully.
- *
- * \param pfx See \ref version_single_line().
- * \param flag Whether --version was given.
- *
- * If \a flag is false, this function does nothing. Otherwise it prints the
- * full version text as returned by \ref version_text() and exits successfully.
- */
-void version_handle_flag(const char *pfx, bool flag)
-{
- if (!flag)
- return;
- printf("%s", version_text(pfx));
- exit(EXIT_SUCCESS);
-}
+++ /dev/null
-/** \file version.h Functions for printing the version string. */
-
-const char *version_single_line(const char *pfx);
-const char *version_text(const char *pfx);
-void version_handle_flag(const char *pfx, bool flag);
#include "write.h"
#include "fd.h"
#include "error.h"
-#include "version.h"
#include "check_wav.h"
/** Array of error strings. */