Changes for ABSOLUTE.C by Andreas Scherer, March 26, 1995.

Absolute and explicit relative file names are slightly more complicated on
the Amiga than they were covered by the original code by Karl Berry.

   Absolute file names contain a <device> name, separated from the rest
   by a DEV_SEP, i.e., a colon.  <device> may even be empty to start
   `on top' of the current device.

   Explicit relative file names with standard AmigaOS start with a
   DIR_SEP, i.e., a slash (one or more to move upwards).

   The UNIX syntax has to be taken into account because of possible
   patch programs like `UnixDirsII' by Martin Scott that allow `.'
   and `..' notation.

For this reason, I _try_ to write complete Amiga support, but I'm not
sure not to miss something.  Docs are very poor in this respect.

@x l.32
boolean
kpse_absolute_p P1C(string, filename)
{
#ifdef VMS
#include <string.h>
  return strcspn (filename, "]>:") != strlen (filename);
#else /* not VMS */
  boolean absolute = IS_DIR_SEP (*filename)
#ifdef DOS
                      || ISALPHA (*filename) && filename[1] == ':'
#endif /* DOS */
		      ;
  boolean explicit_relative
    = (*filename == '.'
       && (IS_DIR_SEP (filename[1])
           || (filename[1] == '.' && IS_DIR_SEP (filename[2]))));

  return absolute || explicit_relative;
#endif /* not VMS */
}
@y
boolean
kpse_absolute_p P1C(string, filename)
{
#ifdef VMS
#include <string.h>
  return strcspn (filename, "]>:") != strlen (filename);
#else /* not VMS */
#ifdef _AMIGA
  boolean absolute, explicit_relative;

#include <string.h>

  absolute = strcspn (filename, DEV_SEP_STRING) != strlen (filename);
  explicit_relative =
    IS_DIR_SEP (filename[0]) ||
    (filename[0] == '.' &&
      (IS_DIR_SEP (filename[1]) ||
      (filename[1] == '.' && IS_DIR_SEP (filename[2]))));

  return absolute || explicit_relative;
#else /* not _AMIGA */
  boolean absolute = IS_DIR_SEP (*filename)
#ifdef DOS
                      || ISALPHA (*filename) && filename[1] == ':'
#endif /* DOS */
		      ;
  boolean explicit_relative
    = (*filename == '.'
       && (IS_DIR_SEP (filename[1])
           || (filename[1] == '.' && IS_DIR_SEP (filename[2]))));

  return absolute || explicit_relative;
#endif /* not _AMIGA */
#endif /* not VMS */
}
@z
