Skip to content

Commit

Permalink
Remove (undefined) HAVE_DIRENT_H to fix loading a random example, change
Browse files Browse the repository at this point in the history
version to 4.0pre2
  • Loading branch information
kovzol committed Dec 26, 2019
1 parent e26cbe3 commit fc2fea7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
2 changes: 1 addition & 1 deletion src/include/config.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef CONFIG_H
#define CONFIG_H

#define XaoS_VERSION "4.0"
#define XaoS_VERSION "4.0pre2"
#define HELP_URL "https://github.com/xaos-project/XaoS/wiki"
#define WEB_URL "http://xaos.sourceforge.net/"

Expand Down
11 changes: 0 additions & 11 deletions src/util/xstdio.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#include <config.h>
#include <string.h>
#ifdef HAVE_DIRENT_H
#include <dirent.h>
#endif
#include <sys/stat.h>
#include <stdlib.h>
#ifdef HAVE_UNISTD_H
Expand Down Expand Up @@ -39,7 +37,6 @@ xio_fixpath (const char *c)
int
xio_getfiles (xio_constpath path1, char ***names, char ***dirs, int *nnames2, int *ndirs2)
{
#ifdef HAVE_DIRENT_H
char *path = xio_fixpath (path1);
int maxnames = 200, maxdirs = 200;
int nnames = 0, ndirs = 0;
Expand Down Expand Up @@ -91,10 +88,6 @@ xio_getfiles (xio_constpath path1, char ***names, char ***dirs, int *nnames2, in
*ndirs2 = ndirs;
closedir (dir);
return 1;
#else
*nnames2 = *ndirs2 = 0;
return 0;
#endif
}

xio_path
Expand Down Expand Up @@ -130,7 +123,6 @@ xio_getfilename (const char *basename, const char *extension)
xio_file
xio_getrandomexample (xio_path name)
{
#ifdef HAVE_DIRENT_H
static const char *const paths[] = { /*Where examples should be located? */
EXAMPLESPATH, /*Data path when XaoS is propertly installed */
"\01" XIO_PATHSEPSTR "examples",
Expand Down Expand Up @@ -215,9 +207,6 @@ xio_getrandomexample (xio_path name)
f = xio_ropen (name);
free (realpath);
return (f);
#else
return NULL;
#endif
}

xio_file
Expand Down

0 comments on commit fc2fea7

Please sign in to comment.