Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

inf.c File Reference

Sorting routines. More...

#include "inf.h"

Go to the source code of this file.

Functions

mu_entquicksort (mu_ent *base, mu_ent *end, mu_config *conf)
 Sorts the list of musical entries.

void set_fctptrs (mu_config *conf)
 Sets sort order function pointers.

int inf_by_rand (mu_ent *first, mu_ent *second)
int inf_by_track (mu_ent *first, mu_ent *second)
int inf_by_posn (mu_ent *first, mu_ent *second)
int inf_by_date (mu_ent *first, mu_ent *second)
int inf_by_length (mu_ent *first, mu_ent *second)
int inf_by_bitrate (mu_ent *first, mu_ent *second)
int inf_by_size (mu_ent *first, mu_ent *second)
int inf_by_artist (mu_ent *first, mu_ent *second)
int inf_by_album (mu_ent *first, mu_ent *second)
int inf_by_title (mu_ent *first, mu_ent *second)
int inf_by_filetype (mu_ent *first, mu_ent *second)
int inf_by_file (mu_ent *first, mu_ent *second)
int inf_by_uri (mu_ent *first, mu_ent *second)
int inf_by_genre (mu_ent *first, mu_ent *second)
int inf_global (mu_ent *first, mu_ent *second, mu_config *conf)


Detailed Description

Sorting routines.

Author:
Regis Boudin
Version:
Revision
1.18
Date:
2003

Todo:
Regis, please document (eventually).

Definition in file inf.c.


Function Documentation

int inf_by_album mu_ent first,
mu_ent second
 

Definition at line 186 of file inf.c.

References mu_ent::album.

Referenced by set_fctptrs().

int inf_by_artist mu_ent first,
mu_ent second
 

Definition at line 173 of file inf.c.

References mu_ent::artist.

Referenced by set_fctptrs().

int inf_by_bitrate mu_ent first,
mu_ent second
 

Definition at line 163 of file inf.c.

References mu_ent::bitrate.

Referenced by set_fctptrs().

int inf_by_date mu_ent first,
mu_ent second
 

Definition at line 153 of file inf.c.

References mu_ent::date.

Referenced by set_fctptrs().

int inf_by_file mu_ent first,
mu_ent second
 

Definition at line 217 of file inf.c.

References mu_ent::file.

Referenced by inf_global(), and set_fctptrs().

int inf_by_filetype mu_ent first,
mu_ent second
 

Definition at line 212 of file inf.c.

References mu_ent::filetype.

Referenced by set_fctptrs().

int inf_by_genre mu_ent first,
mu_ent second
 

Definition at line 227 of file inf.c.

References mu_ent::genre.

Referenced by set_fctptrs().

int inf_by_length mu_ent first,
mu_ent second
 

Definition at line 158 of file inf.c.

References mu_ent::length.

Referenced by set_fctptrs().

int inf_by_posn mu_ent first,
mu_ent second
 

Definition at line 148 of file inf.c.

References mu_ent::posn.

Referenced by set_fctptrs().

int inf_by_rand mu_ent first,
mu_ent second
 

Definition at line 138 of file inf.c.

Referenced by set_fctptrs().

int inf_by_size mu_ent first,
mu_ent second
 

Definition at line 168 of file inf.c.

References mu_ent::size.

Referenced by set_fctptrs().

int inf_by_title mu_ent first,
mu_ent second
 

Definition at line 199 of file inf.c.

References mu_ent::title.

Referenced by set_fctptrs().

int inf_by_track mu_ent first,
mu_ent second
 

Definition at line 143 of file inf.c.

References mu_ent::track.

Referenced by set_fctptrs().

int inf_by_uri mu_ent first,
mu_ent second
 

Definition at line 222 of file inf.c.

References mu_ent::uri.

Referenced by set_fctptrs().

int inf_global mu_ent first,
mu_ent second,
mu_config conf
 

Definition at line 240 of file inf.c.

References ARG_NUMBER, mu_ent::filetype, FT_DIR, inf_by_file(), and mu_config::order_functions.

Referenced by quicksort().

mu_ent* quicksort mu_ent base,
mu_ent end,
mu_config conf
 

Sorts the list of musical entries.

This is a fully home-made quicksort implementation. It places directory entries first, then songs accordingly to the configuration.

Parameters:
base The first entry of the portion to sort
end The last entry of the portion to sort
conf The configuration structure
Returns:
The first entry of the sorted list

Definition at line 42 of file inf.c.

References inf_global(), and mu_ent::next.

Referenced by musicindex_directory(), playlist_directory(), and playlist_selected().

void set_fctptrs mu_config conf  ) 
 

Sets sort order function pointers.

Parameters:
conf MusicIndex configuration paramaters struct.

Definition at line 84 of file inf.c.

References ARG_NUMBER, inf_by_album(), inf_by_artist(), inf_by_bitrate(), inf_by_date(), inf_by_file(), inf_by_filetype(), inf_by_genre(), inf_by_length(), inf_by_posn(), inf_by_rand(), inf_by_size(), inf_by_title(), inf_by_track(), inf_by_uri(), mu_config::order, mu_config::order_functions, SB_ALBUM, SB_ARTIST, SB_BITRATE, SB_DATE, SB_FILENAME, SB_FILETYPE, SB_GENRE, SB_LENGTH, SB_POSN, SB_RANDOM, SB_SIZE, SB_TITLE, SB_TRACK, and SB_URI.

Referenced by create_musicindex_config(), merge_musicindex_configs(), sort_order(), and treat_args().


Generated on Thu Oct 30 13:50:29 2003 for mod_musicindex by doxygen 1.3.4