write_u32(buf + CHUNK_TV_TV_SEC_OFFSET, afhi->chunk_tv.tv_sec);
write_u32(buf + CHUNK_TV_TV_USEC_OFFSET, afhi->chunk_tv.tv_usec);
p = buf + AFHI_INFO_STRING_OFFSET;
write_u32(buf + CHUNK_TV_TV_SEC_OFFSET, afhi->chunk_tv.tv_sec);
write_u32(buf + CHUNK_TV_TV_USEC_OFFSET, afhi->chunk_tv.tv_usec);
p = buf + AFHI_INFO_STRING_OFFSET;
p += sprintf(p, "%s", afhi->techinfo) + 1;
p += sprintf(p, "%s", afhi->tags.artist) + 1;
p += sprintf(p, "%s", afhi->tags.title) + 1;
p += sprintf(p, "%s", afhi->techinfo) + 1;
p += sprintf(p, "%s", afhi->tags.artist) + 1;
p += sprintf(p, "%s", afhi->tags.title) + 1;
struct osl_object path_obj;
int ret = osl(osl_get_object(audio_file_table, row, AFTCOL_PATH,
&path_obj));
struct osl_object path_obj;
int ret = osl(osl_get_object(audio_file_table, row, AFTCOL_PATH,
&path_obj));
* After the call the members of the afhi structure point to mapped memory
* which is owned by the osl table, Hence the caller must not attempt to free
* this memory by calling \ref clear_afhi().
* After the call the members of the afhi structure point to mapped memory
* which is owned by the osl table, Hence the caller must not attempt to free
* this memory by calling \ref clear_afhi().
WRITE_STATUS_ITEM(pb, SI_file_size, "%ld\n", statbuf.st_size / 1024);
}
WRITE_STATUS_ITEM(pb, SI_file_size, "%ld\n", statbuf.st_size / 1024);
}
ret = lls_parse(ARRAY_SIZE(argv), argv, cmd, &opts.lpr, NULL);
assert(ret >= 0);
time(¤t_time);
ret = lls_parse(ARRAY_SIZE(argv), argv, cmd, &opts.lpr, NULL);
assert(ret >= 0);
time(¤t_time);
status_items = pb.buf;
memset(&pb, 0, sizeof(pb));
pb.max_size = shm_get_shmmax() - 1;
pb.flags = PBF_SIZE_PREFIX;
ret = print_list_item(&status_item_ls_data, &opts, &pb, current_time);
status_items = pb.buf;
memset(&pb, 0, sizeof(pb));
pb.max_size = shm_get_shmmax() - 1;
pb.flags = PBF_SIZE_PREFIX;
ret = print_list_item(&status_item_ls_data, &opts, &pb, current_time);
+static int ls_hash_compare(const void *a, const void *b)
+{
+ struct ls_data *d1 = *(struct ls_data **)a, *d2 = *(struct ls_data **)b;
+ return memcmp(d1->hash, d2->hash, HASH_SIZE);
+}
+
static int ls_audio_format_compare(const void *a, const void *b)
{
struct ls_data *d1 = *(struct ls_data **)a, *d2 = *(struct ls_data **)b;
static int ls_audio_format_compare(const void *a, const void *b)
{
struct ls_data *d1 = *(struct ls_data **)a, *d2 = *(struct ls_data **)b;
compar = ls_duration_compare; break;
case LS_SORT_BY_AUDIO_FORMAT:
compar = ls_audio_format_compare; break;
compar = ls_duration_compare; break;
case LS_SORT_BY_AUDIO_FORMAT:
compar = ls_audio_format_compare; break;
static int com_ls(struct command_context *cc, struct lls_parse_result *lpr)
{
const struct lls_command *cmd = SERVER_CMD_CMD_PTR(LS);
static int com_ls(struct command_context *cc, struct lls_parse_result *lpr)
{
const struct lls_command *cmd = SERVER_CMD_CMD_PTR(LS);
opts->sorting = LS_SORT_BY_DURATION;
else if (!strcmp(val, "a") || !strcmp(val, "audio-format"))
opts->sorting = LS_SORT_BY_AUDIO_FORMAT;
opts->sorting = LS_SORT_BY_DURATION;
else if (!strcmp(val, "a") || !strcmp(val, "audio-format"))
opts->sorting = LS_SORT_BY_AUDIO_FORMAT;
enum touch_flags {
/** Whether the \p FNM_PATHNAME flag should be passed to fnmatch(). */
TOUCH_FLAG_FNM_PATHNAME = 1,
enum touch_flags {
/** Whether the \p FNM_PATHNAME flag should be passed to fnmatch(). */
TOUCH_FLAG_FNM_PATHNAME = 1,
* \param aca Only ->pbout is used for diagnostics.
*
* \return Standard. Inconsistencies are reported but not regarded as an error.
* \param aca Only ->pbout is used for diagnostics.
*
* \return Standard. Inconsistencies are reported but not regarded as an error.