Generify source code

Previously we would fail in some parts of the code if we did not have a
premade configuration, now we use any code that was marked as Linux, BSD and
Solaris as our basis in order to support building unknown Unix systems.
This commit is contained in:
Chase
2022-08-03 23:15:45 -05:00
committed by Jon Trulson
parent 06863e826e
commit 45cee195bd
70 changed files with 46 additions and 1250 deletions

View File

@@ -41,22 +41,6 @@
#include "dtscreen.h"
#if !defined(_AIX) && !defined(__linux__) && !defined(sun) && !defined(CSRG_BASED)
int
usleep(unsigned long usec)
{
#ifdef SYSV
poll((struct poll *) 0, (size_t) 0, usec / 1000); /* ms resolution */
#else
struct timeval timeout;
timeout.tv_usec = usec % (unsigned long) 1000000;
timeout.tv_sec = usec / (unsigned long) 1000000;
select(0, (void *) 0, (void *) 0, (void *) 0, &timeout);
#endif
return 0;
}
#endif /* !_AIX && */
/*
* returns the number of seconds since 01-Jan-70.
* This is used to control rate and timeout in many of the animations.

View File

@@ -88,15 +88,6 @@ typedef struct {
int size[MAXCOLORS];
} wormstruct;
#if !defined(CSRG_BASED) && !defined(sun) && !defined(__linux__)
int
round(float x)
{
return ((int) floor((double) x));
}
#endif
void
worm_doit(perwindow *pwin, wormstruct *wp, int which, unsigned long color)
{