invent and use a XMP_AMIGA macro.

master
Ozkan Sezer 4 years ago committed by Ozkan Sezer
parent bc31a02764
commit c2be98c23e
  1. 5
      src/commands.c
  2. 5
      src/common.h
  3. 2
      src/main.c
  4. 4
      src/read_config.c
  5. 6
      src/terminal.c

@ -10,7 +10,7 @@
#if defined(_WIN32) || defined(__OS2__) || defined(__DJGPP__) || defined(_DOS)
#include <conio.h>
#endif
#if defined(AMIGA) || defined(__AMIGA__) || defined(__AROS__)
#if defined(XMP_AMIGA)
#ifdef __amigaos4__
#define __USE_INLINE__
#endif
@ -22,7 +22,6 @@
#ifdef __CYGWIN__
#include <sys/select.h>
/*
* from daniel åkerud <daniel.akerud@gmail.com>
* date Tue, Jul 28, 2009 at 9:59 AM
@ -72,7 +71,7 @@ static int read_key(void)
key = getch();
ret = 1;
}
#elif defined(AMIGA) || defined(__AMIGA__) || defined(__AROS__)
#elif defined(XMP_AMIGA)
/* Amiga CLI */
{
BPTR in = Input();

@ -11,6 +11,11 @@
#define getch _getch
#endif
#if defined(__MORPHOS__) || defined(__AROS__) || defined(__AMIGA__) \
|| defined(__amigaos__) || defined(__amigaos4__) || defined(AMIGA)
#define XMP_AMIGA 1
#endif
#define NUM_MODES 13
#define MAX_DRV_PARM 20

@ -105,7 +105,7 @@ static void sigcont_handler(int sig)
}
#else
foreground_in = foreground_out = 1;
#if defined(AMIGA) || defined(__AMIGA__) || defined(__AROS__)
#if defined(XMP_AMIGA)
set_tty(); /* amiga version -- sets stdin to raw mode. */
#endif
#endif

@ -54,7 +54,7 @@ int read_config(struct options *o)
return -1;
}
}
#elif defined(AMIGA) || defined(__AMIGA__) || defined(__AROS__)
#elif defined(XMP_AMIGA)
strncpy(myrc, "PROGDIR:xmp.conf", PATH_MAX);
if ((rc = fopen(myrc, "r")) == NULL)
@ -291,7 +291,7 @@ void read_modconf(struct options *o, const unsigned char *md5)
snprintf(myrc, PATH_MAX, "%s\\modules.conf", home);
parse_modconf(o, "xmp-modules.conf", md5);
parse_modconf(o, myrc, md5);
#elif defined(AMIGA) || defined(__AMIGA__) || defined(__AROS__)
#elif defined(XMP_AMIGA)
parse_modconf(o, "PROGDIR:modules.conf", md5);
#elif defined _WIN32
char myrc[PATH_MAX];

@ -10,7 +10,7 @@
#include <xmp.h>
#include "common.h"
#if defined(AMIGA) || defined(__AMIGA__) || defined(__AROS__)
#if defined(XMP_AMIGA)
#ifdef __amigaos4__
#define __USE_INLINE__
#endif
@ -29,7 +29,7 @@ static struct termios term;
int set_tty(void)
{
#if defined(AMIGA) || defined(__AMIGA__) || defined(__AROS__)
#if defined(XMP_AMIGA)
SetMode(Input(), MODE_RAW);
#elif defined HAVE_TERMIOS_H
@ -53,7 +53,7 @@ int set_tty(void)
int reset_tty(void)
{
#if defined(AMIGA) || defined(__AMIGA__) || defined(__AROS__)
#if defined(XMP_AMIGA)
SetMode(Input(), MODE_NORMAL);
#elif defined HAVE_TERMIOS_H

Loading…
Cancel
Save