X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=mm.c;h=d6f3573ce438564f0edbc4c0aafa1a9642470f3d;hp=ead20681f781427f1c1d27aec015bc64f79ff9e0;hb=33e57c3a92e4c105504832b4bb106273ffcdc2a7;hpb=b3d637602e6a730a7bc91384c4ef970eeeb3d44c diff --git a/mm.c b/mm.c index ead20681..d6f3573c 100644 --- a/mm.c +++ b/mm.c @@ -1,12 +1,11 @@ /* - * Copyright (C) 2007-2009 Andre Noll + * Copyright (C) 2007 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ /** \file mm.c Paraslash's mood methods. */ -#include #include #include #include @@ -18,6 +17,7 @@ #include "afs.h" #include "mm.h" +/** The comparators for numeric mood methods (year, bitrate, ...). */ #define MOOD_COMPARATORS \ MC(LESS, <) \ MC(LESS_OR_EQUAL, <=) \ @@ -28,11 +28,15 @@ MC(GREATER, >) \ MC(GREATER_OR_EQUAL, >=) \ +/** Prefix mood comparator name with "_MC", example: MC_LESS. */ #define MC(a, b) MC_ ## a, +/** Each mood comparator is identified by an integer of this type. */ enum mood_comparator_id {MOOD_COMPARATORS NUM_MOOD_COMPARATORS}; #undef MC +/** Stringfied mood comparator, example: "<". */ #define MC(a, b) # b, -static const char const *mood_comparators[] = {MOOD_COMPARATORS}; +/** Array of mood comparators represented as C strings ("<", "<=", ...). */ +static const char *mood_comparators[] = {MOOD_COMPARATORS}; #undef MC static int parse_mood_comparator(const char *word) @@ -204,7 +208,7 @@ struct mm_year_data { static int mm_year_parser(int argc, char **argv, void **private) { - int ret = -E_MOOD_SYNTAX; + int ret; struct mm_year_data *mmyd = para_malloc(sizeof(*mmyd)); time_t current_time; struct tm *gmt;