Moved non-configure-script environment configurations into separate files.

git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@136 c5d04d22-be80-434c-894e-aa346cc9e8e8
This commit is contained in:
darren 2002-03-08 22:35:19 +00:00
parent acc68283da
commit 23e5c69ed3
14 changed files with 366 additions and 176 deletions

View File

@ -16,6 +16,7 @@ For non-Unix platforms, simple makefiles are provided:
mk_mvc.mak For Win32 using Microsoft Visual C++
mk_os2.mak For OS/2 using GCC (EMX)
mk_qdos.mak For QDOS using C68
mk_riscos.mak For RISC OS using the GCC SDK <http://hard-mofo.dsvr.net>
mk_sas.mak For Amiga using SAS/C
@ -37,7 +38,7 @@ Win32:
Macintosh with MPW:
-------------------
To build CTags on MPW you will have to have the Metrowerks compilers
To build Ctags on MPW you will have to have the Metrowerks compilers
or you will have to edit the makefiles yourself.
Since the makefile for MPW is called mk_mpw.mak you will have to give
@ -48,9 +49,9 @@ Macintosh with MPW:
If the build process goes wrong make sure the line endings for the
makefile are set to MacOS (CR instead of LF).
This version of CTags only accepts and emits unix style paths. This was
This version of Ctags only accepts and emits unix style paths. This was
done since it was easier to implement (few changes in main source files)
and since I ported CTags to MPW to use with Pepper which also works with
and since I ported Ctags to MPW to use with Pepper which also works with
unix style paths internally. Besides, since we're now moving to MacOS X
anyway, Mac programmers are getting used to unix style paths anyway.
@ -65,3 +66,13 @@ Macintosh with MPW:
put quotes around the full unix style path since / has a special meaning
in MPW.
RISC OS:
--------
Regex support on RISC OS is available when compiled to use the RISC OS port
of the GNU regex library, which can be obtained from:
<http://www.sbellon.de/software.html>
Using 'Set RexEx$Path <Obey$Dir>.' in the regex-0/12 directory will ensure
it can be found.

6
README
View File

@ -31,9 +31,9 @@ Exuberant Ctags offers the following features:
5. User-defined languages, using Posix regular expressions.
6. Supports UNIX, MSDOS, Windows 95/98/NT, OS/2, QNX, Amiga, QDOS, VMS,
Macintosh, and Cray. Some pre-compiled binaries are available on the web
site.
6. Supports UNIX, MSDOS, Windows 95/98/NT, OS/2, QNX, Amiga, QDOS, RISC OS,
VMS, Macintosh, and Cray. Some pre-compiled binaries are available on
the web site.
Visit the Exuberant Ctags web site:

View File

@ -12,7 +12,7 @@ Maintained-by: dhiebert@users.sourceforge.net (Darren Hiebert)
Primary-site: http://prdownloads.sourceforge.net/ctags
218K ctags-@@VERSION@@.tar.gz
Original-site: http://ctags.sourceforge.net
Platforms: UNIX, MSDOS, Windows 95/98/NT, OS/2, QNX, Amiga, QDOS, VMS,
Macintosh, MacOS X, Cray
Platforms: UNIX, MSDOS, Windows 95/98/NT, OS/2, QNX, Amiga, QDOS, RISC OS,
VMS, Macintosh, MacOS X, Cray
Copying-policy: Gnu General Public License (GPL)
End

24
e_amiga.h Normal file
View File

@ -0,0 +1,24 @@
/*
* $Id$
*
* Copyright (c) 2002, Darren Hiebert
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
*
* Configures ctags for Amiga environment.
*/
#ifndef E_AMIGA_H
#define E_AMIGA_H
#define HAVE_STDLIB_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_TIME_H 1
#define HAVE_CLOCK 1
#define HAVE_FGETPOS 1
#define HAVE_STRERROR 1
#define HAVE_STRICMP 1
#define HAVE_STRNICMP 1
#endif

17
e_cygwin.h Normal file
View File

@ -0,0 +1,17 @@
/*
* $Id$
*
* Copyright (c) 2002, Darren Hiebert
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
*
* Configures ctags for Cygwin environment.
*/
#ifndef E_CYGWIN_H
#define E_CYGWIN_H
#define UNIX_PATH_SEPARATOR 1
#define MSDOS_STYLE_PATH 1
#endif

24
e_djgpp.h Normal file
View File

@ -0,0 +1,24 @@
/*
* $Id$
*
* Copyright (c) 2002, Darren Hiebert
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
*
* Configures ctags for DJGPP environment.
*/
#ifndef E_DJGPP_H
#define E_DJGPP_H
#define CASE_INSENSITIVE_FILENAMES
#define MSDOS_STYLE_PATH
#define HAVE_DIR_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_UNISTD_H 1
#define HAVE_FGETPOS 1
#define HAVE_FINDFIRST 1
#define HAVE_TRUNCATE 1
#endif

View File

@ -10,10 +10,10 @@
* GNU General Public License. It is provided on an as-is basis and no
* responsibility is accepted for its failure to perform as expected.
*
* This module defines capbilities for Exuberant Ctags on Macintosh.
* Configures ctags for Macintosh environment.
*/
#ifndef MAC_H
#define MAC_H
#ifndef E_MAC_H
#define E_MAC_H
#define BUILD_MPW_TOOL 1

57
e_msoft.h Normal file
View File

@ -0,0 +1,57 @@
/*
* $Id$
*
* Copyright (c) 2002, Darren Hiebert
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
*
* Configures ctags for Microsoft environment.
*/
#ifndef E_MSOFT_H
#define E_MSOFT_H
/* MS-DOS/Windows doesn't allow manipulation of standard error,
* so we send it to stdout instead.
*/
#define errout stdout
#define CASE_INSENSITIVE_FILENAMES 1
#define MSDOS_STYLE_PATH 1
#define HAVE_DOS_H 1
#define HAVE_FCNTL_H 1
#define HAVE_IO_H 1
#define HAVE_STDLIB_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_TIME_H 1
#define HAVE_CLOCK 1
#define HAVE_CHSIZE 1
#define HAVE_FGETPOS 1
#define HAVE_STRICMP 1
#define HAVE_STRNICMP 1
#define HAVE_STRSTR 1
#define HAVE_STRERROR 1
#define HAVE_FINDNEXT 1
#ifdef __BORLANDC__
# define HAVE_DIR_H 1
# define HAVE_DIRENT_H 1
# define HAVE_FINDFIRST 1
#elif defined (_MSC_VER)
# define HAVE__FINDFIRST 1
# define HAVE_DIRECT_H 1
#elif defined (__MINGW32__)
# if defined (__MSVCRT__)
/* Work-around for broken implementation of fgetpos()/fsetpos() on Mingw32 */
# undef HAVE_FGETPOS
# define NEED_PROTO_FGETPOS 1
# endif
# define HAVE_DIR_H 1
# define HAVE_DIRENT_H 1
# define HAVE__FINDFIRST 1
# define ffblk _finddata_t
# define FA_DIREC _A_SUBDIR
# define ff_name name
#endif
#endif

37
e_os2.h Normal file
View File

@ -0,0 +1,37 @@
/*
* $Id$
*
* Copyright (c) 2002, Darren Hiebert
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
*
* Configures ctags for OS/2 environment.
*/
#ifndef E_OS2_H
#define E_OS2_H
#define UNIX_PATH_SEPARATOR 1
#define CASE_INSENSITIVE_FILENAMES 1
#define HAVE_DIRENT_H 1
#define HAVE_FCNTL_H 1
#define HAVE_IO_H 1
#define HAVE_STDLIB_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_TIME_H 1
#define HAVE_UNISTD_H 1
#define HAVE_CLOCK 1
#define HAVE_CHSIZE 1
#define HAVE_FGETPOS 1
#define HAVE_FTRUNCATE 1
#define HAVE_OPENDIR 1
#define HAVE_REGCOMP 1
#define HAVE_REMOVE 1
#define HAVE_STRERROR 1
#define HAVE_STRICMP 1
#define HAVE_STRNICMP 1
#define HAVE_STRSTR 1
#define HAVE_TRUNCATE 1
#endif

34
e_qdos.h Normal file
View File

@ -0,0 +1,34 @@
/*
* $Id$
*
* Copyright (c) 2002, Darren Hiebert
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
*
* Configures ctags for QDOS environment.
*/
#ifndef E_QDOS_H
#define E_QDOS_H
#define HAVE_DIRENT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TIMES_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_TIME_H 1
#define HAVE_UNISTD_H 1
#define STDC_HEADERS 1
#define HAVE_CLOCK 1
#define HAVE_FGETPOS 1
#define HAVE_FTRUNCATE 1
#define HAVE_OPENDIR 1
#define HAVE_PUTENV 1
#define HAVE_REMOVE 1
#define HAVE_STRERROR 1
#define HAVE_STRSTR 1
#define HAVE_TIMES 1
#define HAVE_TRUNCATE 1
#define NON_CONST_PUTENV_PROTOTYPE 1
#endif

58
e_riscos.h Normal file
View File

@ -0,0 +1,58 @@
/*
* $Id$
*
* Copyright (c) 2002, Andrew Wingate
*
* Author: Andrew Wingate <andy@sparse.net>
*
* This source code is released for free distribution under the terms of the
* GNU General Public License. It is provided on an as-is basis and no
* responsibility is accepted for its failure to perform as expected.
*
* Configures ctags for RISC OS environment.
*
* We currently use UnixLib. This file is subject to change if
* we move to using SharedCLibrary and libGNU.
*/
#ifndef E_RISCOS_H
#define E_RISCOS_H
#define MACROS_USE_PATTERNS 1
#define DEFAULT_FILE_FORMAT 2
#define INTERNAL_SORT 1 /* Not all systems will have installed sort(1) */
#define TMPDIR "<Wimp$ScrapDir>"
/* Various definitions for UnixLib */
#define STDC_HEADERS 1
#define HAVE_CHMOD 1
#define HAVE_CHSIZE 1
#define HAVE_CLOCK 1
#define HAVE_FGETPOS 1
#define HAVE_FNMATCH 1
#define HAVE_FTRUNCATE 1
#define HAVE_MKSTEMP 1
#define HAVE_OPENDIR 1
#define HAVE_PUTENV 1
#define HAVE_REGCOMP 1 /* Requires RegEx library */
#define HAVE_REMOVE 1
#define HAVE_SETENV 1
#define HAVE_STRERROR 1
#define HAVE_STRICMP 1
#define HAVE_STRNICMP 1
#define HAVE_STRSTR 1
#define HAVE_TIMES 1
#define HAVE_TRUNCATE 1
#define HAVE_DIRENT_H 1
#define HAVE_FCNTL_H 1
#define HAVE_FNMATCH_H 1
#define HAVE_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_SYS_DIR_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TIMES_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_TIME_H 1
#define HAVE_UNISTD_H 1
#endif

31
e_vms.h Normal file
View File

@ -0,0 +1,31 @@
/*
* $Id$
*
* Copyright (c) 2002, Darren Hiebert
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
*
* Configures ctags for VMS environment.
*/
#ifndef E_VMS_H
#define E_VMS_H
#define CASE_INSENSITIVE_FILENAMES 1
#define HAVE_STDLIB_H 1
#define HAVE_TIME_H 1
#ifdef VAXC
# define HAVE_STAT_H 1
# define HAVE_TYPES_H 1
#else
# define HAVE_FCNTL_H 1
# define HAVE_SYS_STAT_H 1
# define HAVE_SYS_TYPES_H 1
#endif
#define HAVE_CLOCK 1
#define HAVE_FGETPOS 1
#define HAVE_STRERROR 1
#define HAVE_STRSTR 1
#define HAVE_UNISTD_H 1
#endif

218
general.h
View File

@ -17,174 +17,59 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifdef macintosh
# include "mac.h"
/* Include correct file for compilation environment */
#ifdef AMIGA
# include "e_amiga.h"
#endif
#ifdef __CYGWIN__
# include "e_cygwin.h"
#endif
#ifdef DJGPP
# include "e_djgpp.h"
#endif
#ifdef macintosh
# include "e_mac.h"
#endif
#if defined (MSDOS) || defined (WIN32)
# include "e_msoft.h"
#endif
#ifdef OS2
# include "e_os2.h"
#endif
#ifdef QDOS
# include "e_qdos.h"
#endif
#ifdef RISCOS
# include "e_riscos.h"
#endif
#if defined (__vms) && ! defined (VMS)
# define VMS 1
#endif
#ifdef VMS
# include "e_vms.h"
#endif
/*
* MACROS
*/
/* This is a helpful internal feature of later versions (> 2.7) of GCC
* to prevent warnings about unused variables.
/* Define standard error destination
*/
#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)) && !(defined (__APPLE_CC__) || defined (__GNUG__))
# define __unused__ __attribute__((unused))
# define __printf__(s,f) __attribute__((format (printf, s, f)))
#else
# define __unused__
# define __printf__(s,f)
#endif
/* MS-DOS doesn't allow manipulation of standard error, so we send it to
* stdout instead.
*/
#if defined (MSDOS) || defined (WIN32)
# define errout stdout
#else
#ifndef errout
# define errout stderr
#endif
#if defined (__CYGWIN__)
# define UNIX_PATH_SEPARATOR 1
# define MSDOS_STYLE_PATH
#endif
#if defined (MSDOS) || defined (WIN32)
# define CASE_INSENSITIVE_FILENAMES
# define MSDOS_STYLE_PATH
# define HAVE_DOS_H 1
# define HAVE_FCNTL_H 1
# define HAVE_IO_H 1
# define HAVE_STDLIB_H 1
# define HAVE_SYS_STAT_H 1
# define HAVE_SYS_TYPES_H 1
# define HAVE_TIME_H 1
# define HAVE_CLOCK 1
# define HAVE_CHSIZE 1
# define HAVE_FGETPOS 1
# define HAVE_STRICMP 1
# define HAVE_STRNICMP 1
# define HAVE_STRSTR 1
# define HAVE_STRERROR 1
# define HAVE_FINDNEXT 1
# ifdef __BORLANDC__
# define HAVE_DIR_H 1
# define HAVE_DIRENT_H 1
# define HAVE_FINDFIRST 1
# elif defined (_MSC_VER)
# define HAVE__FINDFIRST 1
# define HAVE_DIRECT_H 1
# elif defined (__MINGW32__)
# define HAVE_DIR_H 1
# define HAVE_DIRENT_H 1
# define HAVE__FINDFIRST 1
# define ffblk _finddata_t
# define FA_DIREC _A_SUBDIR
# define ff_name name
# endif
#endif
#ifdef DJGPP
# define CASE_INSENSITIVE_FILENAMES
# define MSDOS_STYLE_PATH
# define HAVE_DIR_H 1
# define HAVE_SYS_STAT_H 1
# define HAVE_SYS_TYPES_H 1
# define HAVE_UNISTD_H 1
# define HAVE_FGETPOS 1
# define HAVE_FINDFIRST 1
# define HAVE_TRUNCATE 1
#endif
#ifdef OS2
# define UNIX_PATH_SEPARATOR 1
# define CASE_INSENSITIVE_FILENAMES
# define HAVE_DIRENT_H 1
# define HAVE_FCNTL_H 1
# define HAVE_IO_H 1
# define HAVE_STDLIB_H 1
# define HAVE_SYS_STAT_H 1
# define HAVE_SYS_TYPES_H 1
# define HAVE_TIME_H 1
# define HAVE_UNISTD_H 1
# define HAVE_CLOCK 1
# define HAVE_CHSIZE 1
# define HAVE_FGETPOS 1
# define HAVE_FTRUNCATE 1
# define HAVE_OPENDIR 1
# define HAVE_REGCOMP 1
# define HAVE_REMOVE 1
# define HAVE_STRERROR 1
# define HAVE_STRICMP 1
# define HAVE_STRNICMP 1
# define HAVE_STRSTR 1
# define HAVE_TRUNCATE 1
#endif
#ifdef AMIGA
# define HAVE_STDLIB_H 1
# define HAVE_SYS_STAT_H 1
# define HAVE_SYS_TYPES_H 1
# define HAVE_TIME_H 1
# define HAVE_CLOCK 1
# define HAVE_FGETPOS 1
# define HAVE_STRERROR 1
# define HAVE_STRICMP 1
# define HAVE_STRNICMP 1
#endif
#if defined (__MWERKS__) && defined (__MACINTOSH__)
# define HAVE_STAT_H 1
#endif
#ifdef QDOS
# define HAVE_DIRENT_H 1
# define HAVE_STDLIB_H 1
# define HAVE_SYS_STAT_H 1
# define HAVE_SYS_TIMES_H 1
# define HAVE_SYS_TYPES_H 1
# define HAVE_TIME_H 1
# define HAVE_UNISTD_H 1
# define STDC_HEADERS 1
# define HAVE_CLOCK 1
# define HAVE_FGETPOS 1
# define HAVE_FTRUNCATE 1
# define HAVE_OPENDIR 1
# define HAVE_PUTENV 1
# define HAVE_REMOVE 1
# define HAVE_STRERROR 1
# define HAVE_STRSTR 1
# define HAVE_TIMES 1
# define HAVE_TRUNCATE 1
# define NON_CONST_PUTENV_PROTOTYPE 1
#endif
#if defined (__vms) && ! defined (VMS)
# define VMS
#endif
#ifdef VMS
# define CASE_INSENSITIVE_FILENAMES 1
# define HAVE_STDLIB_H 1
# define HAVE_TIME_H 1
# ifdef VAXC
# define HAVE_STAT_H 1
# define HAVE_TYPES_H 1
# else
# define HAVE_FCNTL_H 1
# define HAVE_SYS_STAT_H 1
# define HAVE_SYS_TYPES_H 1
# endif
# define HAVE_CLOCK 1
# define HAVE_FGETPOS 1
# define HAVE_STRERROR 1
# define HAVE_STRSTR 1
# define HAVE_UNISTD_H 1
#endif
/* Define regex if supported */
#if (defined (HAVE_REGCOMP) && !defined (REGCOMP_BROKEN))
# define HAVE_REGEX 1
@ -198,6 +83,17 @@
# define strncasecmp strnicmp
#endif
/* This is a helpful internal feature of later versions (> 2.7) of GCC
* to prevent warnings about unused variables.
*/
#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)) && !(defined (__APPLE_CC__) || defined (__GNUG__))
# define __unused__ __attribute__((unused))
# define __printf__(s,f) __attribute__((format (printf, s, f)))
#else
# define __unused__
# define __printf__(s,f)
#endif
/*
* DATA DECLARATIONS
*/
@ -221,12 +117,6 @@ typedef enum { FALSE, TRUE } boolean;
# define fpos_t long
#endif
/* Work-around for broken implementation of fgetpos()/fsetpos() on Mingw32 */
#if defined (__MINGW32__) && defined (__MSVCRT__)
# undef HAVE_FGETPOS
# define NEED_PROTO_FGETPOS 1
#endif
/*
* FUNCTION PROTOTYPES
*/

View File

@ -98,11 +98,18 @@ extern void vStringPut (vString *const string, const int c)
extern void vStringCatS (vString *const string, const char *const s)
{
#if 1
const size_t len = strlen (s);
while (string->length + len >= string->size)/* check for buffer overflow */
vStringAutoResize (string);
strcpy (string->buffer + string->length, s);
string->length += len;
#else
const char *p = s;
do
vStringPut (string, *p);
while (*p++ != '\0');
#endif
}
extern vString *vStringNewCopy (vString *const string)