Remove obsolete EMX (DOS, OS/2 extender) support.

This commit changes all files except src/Fl_File_Chooser2.cxx.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11590 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Albrecht Schlosser 2016-04-12 17:53:18 +00:00
parent f3e7251871
commit 7e04657ce7
6 changed files with 14 additions and 39 deletions

View File

@ -3,7 +3,7 @@
//
// Math header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
// Copyright 1998-2016 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@ -29,11 +29,6 @@
# include <math.h>
# undef fl_math_h_cyclic_include
# ifdef __EMX__
# include <float.h>
# endif
# ifndef M_PI
# define M_PI 3.14159265358979323846
# define M_PI_2 1.57079632679489661923

View File

@ -3,7 +3,7 @@
//
// FLUID main entry for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
// Copyright 1998-2016 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@ -66,9 +66,6 @@
#else
# include <unistd.h>
#endif
#ifdef __EMX__
# include <X11/Xlibint.h>
#endif
#include "about_panel.h"
#include "undo.h"
@ -202,10 +199,10 @@ void save_cb(Fl_Widget *, void *v) {
const char *basename;
if ((basename = strrchr(c, '/')) != NULL)
basename ++;
#if defined(WIN32) || defined(__EMX__)
#if defined(WIN32)
if ((basename = strrchr(c, '\\')) != NULL)
basename ++;
#endif // WIN32 || __EMX__
#endif // WIN32
else
basename = c;
@ -851,17 +848,7 @@ void show_help(const char *name) {
if (!help_dialog) help_dialog = new Fl_Help_Dialog();
if ((docdir = getenv("FLTK_DOCDIR")) == NULL) {
#ifdef __EMX__
// Doesn't make sense to have a hardcoded fallback
static char fltk_docdir[FL_PATH_MAX];
strlcpy(fltk_docdir, __XOS2RedirRoot("/XFree86/lib/X11/fltk/doc"),
sizeof(fltk_docdir));
docdir = fltk_docdir;
#else
docdir = FLTK_DOCDIR;
#endif // __EMX__
}
snprintf(helpname, sizeof(helpname), "%s/%s", docdir, name);
@ -1639,9 +1626,9 @@ void set_modflag(int mf) {
if (main_window) {
if (!filename) basename = "Untitled.fl";
else if ((basename = strrchr(filename, '/')) != NULL) basename ++;
#if defined(WIN32) || defined(__EMX__)
#if defined(WIN32)
else if ((basename = strrchr(filename, '\\')) != NULL) basename ++;
#endif // WIN32 || __EMX__
#endif // WIN32
else basename = filename;
if (modflag) {

View File

@ -50,9 +50,6 @@
# define strdup _strdup
# /* define unlink _unlink */
# endif /* !__WATCOMC__ */
# elif defined(__EMX__)
# define strcasecmp(s,t) stricmp((s), (t))
# define strncasecmp(s,t,n) strnicmp((s), (t), (n))
# endif /* WIN32 */
# ifdef __cplusplus

View File

@ -147,15 +147,11 @@ static int load_browser(char *fname)
RGBdb *db = rgbdb, *dbs = db + MAX_RGB;
int r, g, b, lr = -1 , lg = -1, lb = -1;
char name[256], buf[256];
#ifdef __EMX__
if (!(fp = fl_fopen(__XOS2RedirRoot(fname), "r")))
#else
if (!(fp = fl_fopen(fname, "r")))
#endif
{
fl_alert("%s\n%s\n%s","Load", fname, "Can't open");
return 0;
}
if (!(fp = fl_fopen(fname, "r"))) {
fl_alert("%s\n%s\n%s","Load", fname, "Can't open");
return 0;
}
/* read the items */

View File

@ -67,7 +67,7 @@ int main(int, char**) {
#include "fracviewer.h"
#if defined(WIN32) || defined(__EMX__)
#if defined(WIN32)
# define drand48() (((float) rand())/((float) RAND_MAX))
# define srand48(x) (srand((x)))
#elif defined __APPLE__

View File

@ -23,9 +23,9 @@
# include <math.h>
# include <sys/types.h>
# include <time.h>
# if !defined(WIN32) && !defined(__EMX__)
# if !defined(WIN32)
# include <sys/time.h>
# endif // !WIN32 && !__EMX__
# endif // !WIN32
# include "fracviewer.h"