{
int i;
- for (i=0; i<line_length; i++)
+ for (i = 0; i < line_length; i++)
fprintf(stream, "%s", line_string);
fprintf(stream, "\n");
fprintf_line(stdout, line_string, line_length);
}
+
/* int2str() returns a number converted to a string;
the used memory is static, but will be overwritten by later calls,
so if you want to save the result, copy it to a private string buffer;
}
+/* something similar to "int2str()" above, but allocates its own memory
+ and has a different interface; we cannot use "itoa()", because this
+ seems to be already defined when cross-compiling to the win32 target */
+
+char *i_to_a(unsigned int i)
+{
+ static char *a = NULL;
+
+ checked_free(a);
+
+ if (i > 2147483647) /* yes, this is a kludge */
+ i = 2147483647;
+
+ a = checked_malloc(10 + 1);
+
+ sprintf(a, "%d", i);
+
+ return a;
+}
+
+
+/* calculate base-2 logarithm of argument (rounded down to integer;
+ this function returns the number of the highest bit set in argument) */
+
+int log_2(unsigned int x)
+{
+ int e = 0;
+
+ while ((1 << e) < x)
+ {
+ x -= (1 << e); /* for rounding down (rounding up: remove this line) */
+ e++;
+ }
+
+ return e;
+}
+
+
/* ------------------------------------------------------------------------- */
/* counter functions */
/* ------------------------------------------------------------------------- */
{
unsigned long actual_counter;
- while(1)
+ while (1)
{
actual_counter = Counter();
/* random generator functions */
/* ------------------------------------------------------------------------- */
-#if 0
-unsigned int SimpleRND(unsigned int max)
-{
- return (random_linux_libc(RND_FREE) % max);
-}
-
-unsigned int InitSimpleRND(long seed)
-{
- if (seed == NEW_RANDOMIZE)
- {
- struct timeval current_time;
-
- gettimeofday(¤t_time, NULL);
- seed = (long)current_time.tv_usec;
- }
-
- srandom_linux_libc(RND_FREE, (unsigned int) seed);
-
- return (unsigned int) seed;
-}
-
-unsigned int RND(unsigned int max)
-{
- return (random_linux_libc(RND_GAME) % max);
-}
-
-unsigned int InitRND(long seed)
-{
- if (seed == NEW_RANDOMIZE)
- {
- struct timeval current_time;
-
- gettimeofday(¤t_time, NULL);
- seed = (long)current_time.tv_usec;
- }
-
- srandom_linux_libc(RND_GAME, (unsigned int) seed);
-
- return (unsigned int) seed;
-}
-#endif
-
unsigned int init_random_number(int nr, long seed)
{
if (seed == NEW_RANDOMIZE)
return (unsigned int) seed;
}
-unsigned int get_random_number(int nr, unsigned int max)
+unsigned int get_random_number(int nr, int max)
{
return (max > 0 ? random_linux_libc(nr) % max : 0);
}
void setString(char **old_value, char *new_value)
{
- if (*old_value != NULL)
- free(*old_value);
+ checked_free(*old_value);
*old_value = getStringCopy(new_value);
}
/* command line option handling functions */
/* ------------------------------------------------------------------------- */
-static void printUsage()
-{
- printf("\n"
- "Usage: %s [OPTION]... [HOSTNAME [PORT]]\n"
- "\n"
- "Options:\n"
- " -d, --display HOSTNAME[:SCREEN] specify X server display\n"
- " -b, --basepath DIRECTORY alternative base DIRECTORY\n"
- " -l, --level DIRECTORY alternative level DIRECTORY\n"
- " -g, --graphics DIRECTORY alternative graphics DIRECTORY\n"
- " -s, --sounds DIRECTORY alternative sounds DIRECTORY\n"
- " -m, --music DIRECTORY alternative music DIRECTORY\n"
- " -n, --network network multiplayer game\n"
- " --serveronly only start network server\n"
- " -v, --verbose verbose mode\n"
- " --debug display debugging information\n"
- " -e, --execute COMMAND execute batch COMMAND:\n"
- "\n"
- "Valid commands for '--execute' option:\n"
- " \"print graphicsinfo.conf\" print default graphics config\n"
- " \"print soundsinfo.conf\" print default sounds config\n"
- " \"print musicinfo.conf\" print default music config\n"
- " \"dump level FILE\" dump level data from FILE\n"
- " \"dump tape FILE\" dump tape data from FILE\n"
- " \"autoplay LEVELDIR\" play level tapes for LEVELDIR\n"
- "\n",
- program.command_basename);
-}
-
-void GetOptions(char *argv[])
+void GetOptions(char *argv[], void (*print_usage_function)(void))
{
char **options_left = &argv[1];
Error(ERR_EXIT_HELP, "unrecognized option '%s'", option);
else if (strncmp(option, "-help", option_len) == 0)
{
- printUsage();
+ print_usage_function();
exit(0);
}
options.execute_command = option_arg;
if (option_arg == next_option)
options_left++;
+
+#if 1
+ /* when doing batch processing, always enable verbose mode (warnings) */
+ options.verbose = TRUE;
+#endif
}
else if (*option == '-')
{
/* ------------------------------------------------------------------------- */
-/* memory allocation functions */
+/* checked memory allocation and freeing functions */
/* ------------------------------------------------------------------------- */
void *checked_malloc(unsigned long size)
return ptr;
}
+void checked_free(void *ptr)
+{
+ if (ptr != NULL) /* this check should be done by free() anyway */
+ free(ptr);
+}
+
/* ------------------------------------------------------------------------- */
/* various helper functions */
*y2 = help_y;
}
-short getFile16BitInteger(FILE *file, int byte_order)
+int getFile16BitInteger(FILE *file, int byte_order)
{
if (byte_order == BYTE_ORDER_BIG_ENDIAN)
- return ((fgetc(file) << 8) |
- (fgetc(file) << 0));
+ return ((fgetc(file) << 8) |
+ (fgetc(file) << 0));
else /* BYTE_ORDER_LITTLE_ENDIAN */
- return ((fgetc(file) << 0) |
- (fgetc(file) << 8));
+ return ((fgetc(file) << 0) |
+ (fgetc(file) << 8));
}
-void putFile16BitInteger(FILE *file, short value, int byte_order)
+void putFile16BitInteger(FILE *file, int value, int byte_order)
{
if (byte_order == BYTE_ORDER_BIG_ENDIAN)
{
- fputc((value >> 8) & 0xff, file);
- fputc((value >> 0) & 0xff, file);
+ fputc((value >> 8) & 0xff, file);
+ fputc((value >> 0) & 0xff, file);
}
else /* BYTE_ORDER_LITTLE_ENDIAN */
{
- fputc((value >> 0) & 0xff, file);
- fputc((value >> 8) & 0xff, file);
+ fputc((value >> 0) & 0xff, file);
+ fputc((value >> 8) & 0xff, file);
}
}
int getFileVersion(FILE *file)
{
- int version_major, version_minor, version_patch, version_release;
-
- version_major = fgetc(file);
- version_minor = fgetc(file);
- version_patch = fgetc(file);
- version_release = fgetc(file);
+ int version_major = fgetc(file);
+ int version_minor = fgetc(file);
+ int version_patch = fgetc(file);
+ int version_build = fgetc(file);
- return RELEASE_IDENT(version_major, version_minor, version_patch,
- version_release);
+ return VERSION_IDENT(version_major, version_minor, version_patch,
+ version_build);
}
void putFileVersion(FILE *file, int version)
{
- int version_major = VERSION_MAJOR(version);
- int version_minor = VERSION_MINOR(version);
- int version_patch = VERSION_PATCH(version);
- int version_release = VERSION_RELEASE(version);
+ int version_major = VERSION_MAJOR(version);
+ int version_minor = VERSION_MINOR(version);
+ int version_patch = VERSION_PATCH(version);
+ int version_build = VERSION_BUILD(version);
- fputc(version_major, file);
- fputc(version_minor, file);
- fputc(version_patch, file);
- fputc(version_release, file);
+ fputc(version_major, file);
+ fputc(version_minor, file);
+ fputc(version_patch, file);
+ fputc(version_build, file);
}
void ReadUnusedBytesFromFile(FILE *file, unsigned long bytes)
char c = name_ptr[6];
if (c >= '0' && c <= '9')
- key = KSYM_0 + (Key)(c - '0');
+ key = KSYM_KP_0 + (Key)(c - '0');
}
else if (strncmp(name_ptr, "XK_F", 4) == 0 && strlen(name_ptr) <= 6)
{
{
static char *number_text[][3] =
{
- { "0", "zero", "null", },
- { "1", "one", "first" },
- { "2", "two", "second" },
- { "3", "three", "third" },
- { "4", "four", "fourth" },
- { "5", "five", "fifth" },
- { "6", "six", "sixth" },
- { "7", "seven", "seventh" },
- { "8", "eight", "eighth" },
- { "9", "nine", "ninth" },
- { "10", "ten", "tenth" },
- { "11", "eleven", "eleventh" },
- { "12", "twelve", "twelfth" },
+ { "0", "zero", "null", },
+ { "1", "one", "first" },
+ { "2", "two", "second" },
+ { "3", "three", "third" },
+ { "4", "four", "fourth" },
+ { "5", "five", "fifth" },
+ { "6", "six", "sixth" },
+ { "7", "seven", "seventh" },
+ { "8", "eight", "eighth" },
+ { "9", "nine", "ninth" },
+ { "10", "ten", "tenth" },
+ { "11", "eleven", "eleventh" },
+ { "12", "twelve", "twelfth" },
+
+ { NULL, NULL, NULL },
};
int i, j;
char *s_lower = getStringToLower(s);
int result = -1;
- for (i=0; i<13; i++)
- for (j=0; j<3; j++)
+ for (i = 0; number_text[i][0] != NULL; i++)
+ for (j = 0; j < 3; j++)
if (strcmp(s_lower, number_text[i][j]) == 0)
result = i;
if (result == -1)
- result = atoi(s);
+ {
+ if (strcmp(s_lower, "false") == 0)
+ result = 0;
+ else if (strcmp(s_lower, "true") == 0)
+ result = 1;
+ else
+ result = atoi(s);
+ }
free(s_lower);
static char *basename_lower = NULL;
int basename_length, prefix_length;
- if (basename_lower != NULL)
- free(basename_lower);
+ checked_free(basename_lower);
if (basename == NULL || prefix == NULL)
return FALSE;
static char *basename_lower = NULL;
int basename_length, suffix_length;
- if (basename_lower != NULL)
- free(basename_lower);
+ checked_free(basename_lower);
if (basename == NULL || suffix == NULL)
return FALSE;
return FALSE;
}
-boolean FileIsGraphic(char *basename)
+boolean FileIsGraphic(char *filename)
{
+ char *basename = strrchr(filename, '/');
+
+ basename = (basename != NULL ? basename + 1 : filename);
+
return fileHasSuffix(basename, "pcx");
}
-boolean FileIsSound(char *basename)
+boolean FileIsSound(char *filename)
{
+ char *basename = strrchr(filename, '/');
+
+ basename = (basename != NULL ? basename + 1 : filename);
+
return fileHasSuffix(basename, "wav");
}
-boolean FileIsMusic(char *basename)
+boolean FileIsMusic(char *filename)
{
+ char *basename = strrchr(filename, '/');
+
+ basename = (basename != NULL ? basename + 1 : filename);
+
if (FileIsSound(basename))
return TRUE;
return string_has_parameter(substring, s_contained);
}
-int get_parameter_value(char *token, char *value_raw, int type)
+int get_parameter_value(char *suffix, char *value_raw, int type)
{
char *value = getStringToLower(value_raw);
int result = 0; /* probably a save default value */
- if (strcmp(token, ".direction") == 0)
+ if (strcmp(suffix, ".direction") == 0)
{
result = (strcmp(value, "left") == 0 ? MV_LEFT :
strcmp(value, "right") == 0 ? MV_RIGHT :
strcmp(value, "up") == 0 ? MV_UP :
strcmp(value, "down") == 0 ? MV_DOWN : MV_NO_MOVING);
}
- else if (strcmp(token, ".anim_mode") == 0)
- {
- result = (string_has_parameter(value, "loop") ? ANIM_LOOP :
- string_has_parameter(value, "linear") ? ANIM_LINEAR :
- string_has_parameter(value, "pingpong") ? ANIM_PINGPONG :
- string_has_parameter(value, "pingpong2") ? ANIM_PINGPONG2 :
- string_has_parameter(value, "random") ? ANIM_RANDOM :
- string_has_parameter(value, "none") ? ANIM_NONE :
- ANIM_LOOP);
+ else if (strcmp(suffix, ".anim_mode") == 0)
+ {
+ result = (string_has_parameter(value, "none") ? ANIM_NONE :
+ string_has_parameter(value, "loop") ? ANIM_LOOP :
+ string_has_parameter(value, "linear") ? ANIM_LINEAR :
+ string_has_parameter(value, "pingpong") ? ANIM_PINGPONG :
+ string_has_parameter(value, "pingpong2") ? ANIM_PINGPONG2 :
+ string_has_parameter(value, "random") ? ANIM_RANDOM :
+ string_has_parameter(value, "horizontal") ? ANIM_HORIZONTAL :
+ string_has_parameter(value, "vertical") ? ANIM_VERTICAL :
+ ANIM_DEFAULT);
if (string_has_parameter(value, "reverse"))
result |= ANIM_REVERSE;
return result;
}
+int get_auto_parameter_value(char *token, char *value_raw)
+{
+ char *suffix;
+
+ if (token == NULL || value_raw == NULL)
+ return ARG_UNDEFINED_VALUE;
+
+ suffix = strrchr(token, '.');
+ if (suffix == NULL)
+ suffix = token;
+
+ return get_parameter_value(suffix, value_raw, TYPE_INTEGER);
+}
+
static void FreeCustomArtworkList(struct ArtworkListInfo *,
struct ListNodeInfo ***, int *);
file_list = checked_calloc(num_file_list_entries * sizeof(struct FileInfo));
- for (i=0; suffix_list[i].token != NULL; i++)
+ for (i = 0; suffix_list[i].token != NULL; i++)
num_suffix_list_entries++;
/* always start with reliable default values */
- for (i=0; i<num_file_list_entries; i++)
+ for (i = 0; i < num_file_list_entries; i++)
{
file_list[i].token = NULL;
file_list[i].default_parameter = checked_calloc(parameter_array_size);
file_list[i].parameter = checked_calloc(parameter_array_size);
- for (j=0; j<num_suffix_list_entries; j++)
+ for (j = 0; j < num_suffix_list_entries; j++)
{
setString(&file_list[i].default_parameter[j], suffix_list[j].value);
setString(&file_list[i].parameter[j], suffix_list[j].value);
}
list_pos = 0;
- for (i=0; config_list[i].token != NULL; i++)
+ for (i = 0; config_list[i].token != NULL; i++)
{
int len_config_token = strlen(config_list[i].token);
int len_config_value = strlen(config_list[i].value);
boolean is_file_entry = TRUE;
- for (j=0; suffix_list[j].token != NULL; j++)
+ for (j = 0; suffix_list[j].token != NULL; j++)
{
int len_suffix = strlen(suffix_list[j].token);
}
/* the following tokens are no file definitions, but other config tokens */
- for (j=0; ignore_tokens[j] != NULL; j++)
+ for (j = 0; ignore_tokens[j] != NULL; j++)
if (strcmp(config_list[i].token, ignore_tokens[j]) == 0)
is_file_entry = FALSE;
return FALSE;
}
-#define KNOWN_TOKEN_VALUE "[KNOWN_TOKEN]"
+#define KNOWN_TOKEN_VALUE "[KNOWN_TOKEN_VALUE]"
static void read_token_parameters(SetupFileHash *setup_file_hash,
struct ConfigInfo *suffix_list,
setString(&file_list_entry->filename, filename);
/* when file definition found, set all parameters to default values */
- for (i=0; suffix_list[i].token != NULL; i++)
+ for (i = 0; suffix_list[i].token != NULL; i++)
setString(&file_list_entry->parameter[i], suffix_list[i].value);
file_list_entry->redefined = TRUE;
#endif
/* check for config tokens that can be build by base token and suffixes */
- for (i=0; suffix_list[i].token != NULL; i++)
+ for (i = 0; suffix_list[i].token != NULL; i++)
{
char *token = getStringCat2(file_list_entry->token, suffix_list[i].token);
char *value = getHashEntry(setup_file_hash, token);
new_list_entry = &(*list)[*num_list_entries - 1];
new_list_entry->token = getStringCopy(token);
+ new_list_entry->default_filename = NULL;
new_list_entry->filename = NULL;
new_list_entry->parameter = checked_calloc(parameter_array_size);
int num_ext2_suffixes = artwork_info->num_ext2_suffixes;
int num_ext3_suffixes = artwork_info->num_ext3_suffixes;
int num_ignore_tokens = artwork_info->num_ignore_tokens;
- SetupFileHash *setup_file_hash, *extra_file_hash;
+ SetupFileHash *setup_file_hash, *valid_file_hash;
+ SetupFileHash *extra_file_hash, *empty_file_hash;
char *known_token_value = KNOWN_TOKEN_VALUE;
int i, j, k, l;
if ((setup_file_hash = loadSetupFileHash(filename)) == NULL)
return;
+ /* separate valid (defined) from empty (undefined) config token values */
+ valid_file_hash = newSetupFileHash();
+ empty_file_hash = newSetupFileHash();
+ BEGIN_HASH_ITERATION(setup_file_hash, itr)
+ {
+ char *value = HASH_ITERATION_VALUE(itr);
+
+ setHashEntry(*value ? valid_file_hash : empty_file_hash,
+ HASH_ITERATION_TOKEN(itr), value);
+ }
+ END_HASH_ITERATION(setup_file_hash, itr)
+
+ /* at this point, we do not need the setup file hash anymore -- free it */
+ freeSetupFileHash(setup_file_hash);
+
/* read parameters for all known config file tokens */
- for (i=0; i<num_file_list_entries; i++)
- read_token_parameters(setup_file_hash, suffix_list, &file_list[i]);
+ for (i = 0; i < num_file_list_entries; i++)
+ read_token_parameters(valid_file_hash, suffix_list, &file_list[i]);
/* set all tokens that can be ignored here to "known" keyword */
- for (i=0; i < num_ignore_tokens; i++)
- setHashEntry(setup_file_hash, ignore_tokens[i], known_token_value);
+ for (i = 0; i < num_ignore_tokens; i++)
+ setHashEntry(valid_file_hash, ignore_tokens[i], known_token_value);
- /* copy all unknown config file tokens to extra config list */
+ /* copy all unknown config file tokens to extra config hash */
extra_file_hash = newSetupFileHash();
- BEGIN_HASH_ITERATION(setup_file_hash, itr)
+ BEGIN_HASH_ITERATION(valid_file_hash, itr)
{
- if (strcmp(HASH_ITERATION_VALUE(itr), known_token_value) != 0)
- setHashEntry(extra_file_hash,
- HASH_ITERATION_TOKEN(itr), HASH_ITERATION_VALUE(itr));
+ char *value = HASH_ITERATION_VALUE(itr);
+
+ if (strcmp(value, known_token_value) != 0)
+ setHashEntry(extra_file_hash, HASH_ITERATION_TOKEN(itr), value);
}
- END_HASH_ITERATION(setup_file_hash, itr)
+ END_HASH_ITERATION(valid_file_hash, itr)
- /* at this point, we do not need the config file hash anymore -- free it */
- freeSetupFileHash(setup_file_hash);
+ /* at this point, we do not need the valid file hash anymore -- free it */
+ freeSetupFileHash(valid_file_hash);
/* now try to determine valid, dynamically defined config tokens */
boolean parameter_suffix_found = FALSE;
/* skip all parameter definitions (handled by read_token_parameters()) */
- for (i=0; i < num_suffix_list_entries && !parameter_suffix_found; i++)
+ for (i = 0; i < num_suffix_list_entries && !parameter_suffix_found; i++)
{
int len_suffix = strlen(suffix_list[i].token);
/* ---------- step 0: search for matching base prefix ---------- */
start_pos = 0;
- for (i=0; i<num_base_prefixes && !base_prefix_found; i++)
+ for (i = 0; i < num_base_prefixes && !base_prefix_found; i++)
{
char *base_prefix = base_prefixes[i];
int len_base_prefix = strlen(base_prefix);
/* ---------- step 1: search for matching first suffix ---------- */
start_pos += len_base_prefix;
- for (j=0; j<num_ext1_suffixes && !ext1_suffix_found; j++)
+ for (j = 0; j < num_ext1_suffixes && !ext1_suffix_found; j++)
{
char *ext1_suffix = ext1_suffixes[j];
int len_ext1_suffix = strlen(ext1_suffix);
/* ---------- step 2: search for matching second suffix ---------- */
- for (k=0; k<num_ext2_suffixes && !ext2_suffix_found; k++)
+ for (k = 0; k < num_ext2_suffixes && !ext2_suffix_found; k++)
{
char *ext2_suffix = ext2_suffixes[k];
int len_ext2_suffix = strlen(ext2_suffix);
- ext2_suffix_found = token_suffix_match(token, ext2_suffix,start_pos);
+ ext2_suffix_found = token_suffix_match(token, ext2_suffix, start_pos);
if (!ext2_suffix_found)
continue;
/* ---------- step 3: search for matching third suffix ---------- */
- for (l=0; l<num_ext3_suffixes && !ext3_suffix_found; l++)
+ for (l = 0; l < num_ext3_suffixes && !ext3_suffix_found; l++)
{
char *ext3_suffix = ext3_suffixes[l];
int len_ext3_suffix = strlen(ext3_suffix);
- ext3_suffix_found =token_suffix_match(token,ext3_suffix,start_pos);
+ ext3_suffix_found = token_suffix_match(token, ext3_suffix, start_pos);
if (!ext3_suffix_found)
continue;
artwork_info->sizeof_artwork_list_entry);
}
- if (extra_file_hash != NULL && options.verbose && IS_PARENT_PROCESS())
+ if (options.verbose && IS_PARENT_PROCESS())
{
SetupFileList *setup_file_list, *list;
boolean dynamic_tokens_found = FALSE;
boolean unknown_tokens_found = FALSE;
+ boolean undefined_values_found = (hashtable_count(empty_file_hash) != 0);
if ((setup_file_list = loadSetupFileList(filename)) == NULL)
Error(ERR_EXIT, "loadSetupFileHash works, but loadSetupFileList fails");
Error(ERR_RETURN_LINE, "-");
}
+ if (undefined_values_found)
+ {
+ Error(ERR_RETURN_LINE, "-");
+ Error(ERR_RETURN, "warning: undefined values found in config file:");
+ Error(ERR_RETURN, "- config file: '%s'", filename);
+
+ for (list = setup_file_list; list != NULL; list = list->next)
+ {
+ char *value = getHashEntry(empty_file_hash, list->token);
+
+ if (value != NULL)
+ Error(ERR_RETURN, "- undefined value for token: '%s'", list->token);
+ }
+
+ Error(ERR_RETURN_LINE, "-");
+ }
+
freeSetupFileList(setup_file_list);
}
freeSetupFileHash(extra_file_hash);
+ freeSetupFileHash(empty_file_hash);
#if 0
- for (i=0; i<num_file_list_entries; i++)
+ for (i = 0; i < num_file_list_entries; i++)
{
printf("'%s' ", file_list[i].token);
if (file_list[i].filename)
printf("GOT CUSTOM ARTWORK CONFIG FILE '%s'\n", filename);
#endif
+ DrawInitText("Loading artwork config:", 120, FC_GREEN);
+ DrawInitText(ARTWORKINFO_FILENAME(artwork_info->type), 150, FC_YELLOW);
+
/* always start with reliable default values */
- for (i=0; i<num_file_list_entries; i++)
+ for (i = 0; i < num_file_list_entries; i++)
{
setString(&file_list[i].filename, file_list[i].default_filename);
- for (j=0; j<num_suffix_list_entries; j++)
+ for (j = 0; j < num_suffix_list_entries; j++)
setString(&file_list[i].parameter[j], file_list[i].default_parameter[j]);
file_list[i].redefined = FALSE;
/* free previous dynamic artwork file array */
if (artwork_info->dynamic_file_list != NULL)
{
- for (i=0; i<artwork_info->num_dynamic_file_list_entries; i++)
+ for (i = 0; i < artwork_info->num_dynamic_file_list_entries; i++)
{
free(artwork_info->dynamic_file_list[i].token);
free(artwork_info->dynamic_file_list[i].filename);
num_file_list_entries);
#endif
- for(i=0; i<num_file_list_entries; i++)
+ for (i = 0; i < num_file_list_entries; i++)
{
#if 0
if (strcmp(file_list[i].token, "background") == 0)
num_dynamic_file_list_entries);
#endif
- for(i=0; i<num_dynamic_file_list_entries; i++)
+ for (i = 0; i < num_dynamic_file_list_entries; i++)
+ {
LoadArtworkToList(artwork_info, &artwork_info->dynamic_artwork_list[i],
dynamic_file_list[i].filename, i);
+#if 0
+ printf("::: '%s', '0x%08x'\n",
+ dynamic_file_list[i].filename,
+ dynamic_file_list[i].default_filename);
+#endif
+ }
+
#if 0
dumpList(artwork_info->content_list);
#endif
if (*list == NULL)
return;
- for(i=0; i<*num_list_entries; i++)
+ for (i = 0; i < *num_list_entries; i++)
deleteArtworkListEntry(artwork_info, &(*list)[i]);
free(*list);