OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gdb-6.8/] [readline/] [rldefs.h] - Diff between revs 827 and 840

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 827 Rev 840
/* rldefs.h -- an attempt to isolate some of the system-specific defines
/* rldefs.h -- an attempt to isolate some of the system-specific defines
   for readline.  This should be included after any files that define
   for readline.  This should be included after any files that define
   system-specific constants like _POSIX_VERSION or USG. */
   system-specific constants like _POSIX_VERSION or USG. */
 
 
/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
 
 
   This file contains the Readline Library (the Library), a set of
   This file contains the Readline Library (the Library), a set of
   routines for providing Emacs style line input to programs that ask
   routines for providing Emacs style line input to programs that ask
   for it.
   for it.
 
 
   The Library is free software; you can redistribute it and/or modify
   The Library is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   the Free Software Foundation; either version 2, or (at your option)
   any later version.
   any later version.
 
 
   The Library is distributed in the hope that it will be useful, but
   The Library is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   General Public License for more details.
   General Public License for more details.
 
 
   The GNU General Public License is often shipped with GNU software, and
   The GNU General Public License is often shipped with GNU software, and
   is generally kept in a file called COPYING or LICENSE.  If you do not
   is generally kept in a file called COPYING or LICENSE.  If you do not
   have a copy of the license, write to the Free Software Foundation,
   have a copy of the license, write to the Free Software Foundation,
   59 Temple Place, Suite 330, Boston, MA 02111 USA. */
   59 Temple Place, Suite 330, Boston, MA 02111 USA. */
 
 
#if !defined (_RLDEFS_H_)
#if !defined (_RLDEFS_H_)
#define _RLDEFS_H_
#define _RLDEFS_H_
 
 
#if defined (HAVE_CONFIG_H)
#if defined (HAVE_CONFIG_H)
#  include "config.h"
#  include "config.h"
#endif
#endif
 
 
#include "rlstdc.h"
#include "rlstdc.h"
 
 
#if defined (_POSIX_VERSION) && !defined (TERMIOS_MISSING)
#if defined (_POSIX_VERSION) && !defined (TERMIOS_MISSING)
#  define TERMIOS_TTY_DRIVER
#  define TERMIOS_TTY_DRIVER
#else
#else
#  if defined (HAVE_TERMIO_H)
#  if defined (HAVE_TERMIO_H)
#    define TERMIO_TTY_DRIVER
#    define TERMIO_TTY_DRIVER
#  else
#  else
#    if !defined (__MINGW32__)
#    if !defined (__MINGW32__)
#      define NEW_TTY_DRIVER
#      define NEW_TTY_DRIVER
#    else
#    else
#      define NO_TTY_DRIVER
#      define NO_TTY_DRIVER
#    endif
#    endif
#  endif
#  endif
#endif
#endif
 
 
/* Posix macro to check file in statbuf for directory-ness.
/* Posix macro to check file in statbuf for directory-ness.
   This requires that <sys/stat.h> be included before this test. */
   This requires that <sys/stat.h> be included before this test. */
#if defined (S_IFDIR) && !defined (S_ISDIR)
#if defined (S_IFDIR) && !defined (S_ISDIR)
#  define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR)
#  define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR)
#endif
#endif
 
 
/* Decide which flavor of the header file describing the C library
/* Decide which flavor of the header file describing the C library
   string functions to include and include it. */
   string functions to include and include it. */
 
 
#if defined (HAVE_STRING_H)
#if defined (HAVE_STRING_H)
#  include <string.h>
#  include <string.h>
#else /* !HAVE_STRING_H */
#else /* !HAVE_STRING_H */
#  include <strings.h>
#  include <strings.h>
#endif /* !HAVE_STRING_H */
#endif /* !HAVE_STRING_H */
 
 
#if !defined (strchr) && !defined (__STDC__)
#if !defined (strchr) && !defined (__STDC__)
extern char *strchr (), *strrchr ();
extern char *strchr (), *strrchr ();
#endif /* !strchr && !__STDC__ */
#endif /* !strchr && !__STDC__ */
 
 
#if defined (PREFER_STDARG)
#if defined (PREFER_STDARG)
#  include <stdarg.h>
#  include <stdarg.h>
#else
#else
#  if defined (PREFER_VARARGS)
#  if defined (PREFER_VARARGS)
#    include <varargs.h>
#    include <varargs.h>
#  endif
#  endif
#endif
#endif
 
 
#if defined (HAVE_STRCASECMP)
#if defined (HAVE_STRCASECMP)
#define _rl_stricmp strcasecmp
#define _rl_stricmp strcasecmp
#define _rl_strnicmp strncasecmp
#define _rl_strnicmp strncasecmp
#else
#else
extern int _rl_stricmp PARAMS((char *, char *));
extern int _rl_stricmp PARAMS((char *, char *));
extern int _rl_strnicmp PARAMS((char *, char *, int));
extern int _rl_strnicmp PARAMS((char *, char *, int));
#endif
#endif
 
 
#if defined (HAVE_STRPBRK) && !defined (HAVE_MULTIBYTE)
#if defined (HAVE_STRPBRK) && !defined (HAVE_MULTIBYTE)
#  define _rl_strpbrk(a,b)      strpbrk((a),(b))
#  define _rl_strpbrk(a,b)      strpbrk((a),(b))
#else
#else
extern char *_rl_strpbrk PARAMS((const char *, const char *));
extern char *_rl_strpbrk PARAMS((const char *, const char *));
#endif
#endif
 
 
#if !defined (emacs_mode)
#if !defined (emacs_mode)
#  define no_mode -1
#  define no_mode -1
#  define vi_mode 0
#  define vi_mode 0
#  define emacs_mode 1
#  define emacs_mode 1
#endif
#endif
 
 
#if !defined (RL_IM_INSERT)
#if !defined (RL_IM_INSERT)
#  define RL_IM_INSERT          1
#  define RL_IM_INSERT          1
#  define RL_IM_OVERWRITE       0
#  define RL_IM_OVERWRITE       0
#
#
#  define RL_IM_DEFAULT         RL_IM_INSERT
#  define RL_IM_DEFAULT         RL_IM_INSERT
#endif
#endif
 
 
/* If you cast map[key].function to type (Keymap) on a Cray,
/* If you cast map[key].function to type (Keymap) on a Cray,
   the compiler takes the value of map[key].function and
   the compiler takes the value of map[key].function and
   divides it by 4 to convert between pointer types (pointers
   divides it by 4 to convert between pointer types (pointers
   to functions and pointers to structs are different sizes).
   to functions and pointers to structs are different sizes).
   This is not what is wanted. */
   This is not what is wanted. */
#if defined (CRAY)
#if defined (CRAY)
#  define FUNCTION_TO_KEYMAP(map, key)  (Keymap)((int)map[key].function)
#  define FUNCTION_TO_KEYMAP(map, key)  (Keymap)((int)map[key].function)
#  define KEYMAP_TO_FUNCTION(data)      (rl_command_func_t *)((int)(data))
#  define KEYMAP_TO_FUNCTION(data)      (rl_command_func_t *)((int)(data))
#else
#else
#  define FUNCTION_TO_KEYMAP(map, key)  (Keymap)(map[key].function)
#  define FUNCTION_TO_KEYMAP(map, key)  (Keymap)(map[key].function)
#  define KEYMAP_TO_FUNCTION(data)      (rl_command_func_t *)(data)
#  define KEYMAP_TO_FUNCTION(data)      (rl_command_func_t *)(data)
#endif
#endif
 
 
#ifndef savestring
#ifndef savestring
#define savestring(x) strcpy ((char *)xmalloc (1 + strlen (x)), (x))
#define savestring(x) strcpy ((char *)xmalloc (1 + strlen (x)), (x))
#endif
#endif
 
 
/* Possible values for _rl_bell_preference. */
/* Possible values for _rl_bell_preference. */
#define NO_BELL 0
#define NO_BELL 0
#define AUDIBLE_BELL 1
#define AUDIBLE_BELL 1
#define VISIBLE_BELL 2
#define VISIBLE_BELL 2
 
 
/* Definitions used when searching the line for characters. */
/* Definitions used when searching the line for characters. */
/* NOTE: it is necessary that opposite directions are inverses */
/* NOTE: it is necessary that opposite directions are inverses */
#define FTO      1              /* forward to */
#define FTO      1              /* forward to */
#define BTO     -1              /* backward to */
#define BTO     -1              /* backward to */
#define FFIND    2              /* forward find */
#define FFIND    2              /* forward find */
#define BFIND   -2              /* backward find */
#define BFIND   -2              /* backward find */
 
 
/* Possible values for the found_quote flags word used by the completion
/* Possible values for the found_quote flags word used by the completion
   functions.  It says what kind of (shell-like) quoting we found anywhere
   functions.  It says what kind of (shell-like) quoting we found anywhere
   in the line. */
   in the line. */
#define RL_QF_SINGLE_QUOTE      0x01
#define RL_QF_SINGLE_QUOTE      0x01
#define RL_QF_DOUBLE_QUOTE      0x02
#define RL_QF_DOUBLE_QUOTE      0x02
#define RL_QF_BACKSLASH         0x04
#define RL_QF_BACKSLASH         0x04
#define RL_QF_OTHER_QUOTE       0x08
#define RL_QF_OTHER_QUOTE       0x08
 
 
/* Default readline line buffer length. */
/* Default readline line buffer length. */
#define DEFAULT_BUFFER_SIZE 256
#define DEFAULT_BUFFER_SIZE 256
 
 
#if !defined (STREQ)
#if !defined (STREQ)
#define STREQ(a, b)     (((a)[0] == (b)[0]) && (strcmp ((a), (b)) == 0))
#define STREQ(a, b)     (((a)[0] == (b)[0]) && (strcmp ((a), (b)) == 0))
#define STREQN(a, b, n) (((n) == 0) ? (1) \
#define STREQN(a, b, n) (((n) == 0) ? (1) \
                                    : ((a)[0] == (b)[0]) && (strncmp ((a), (b), (n)) == 0))
                                    : ((a)[0] == (b)[0]) && (strncmp ((a), (b), (n)) == 0))
#endif
#endif
 
 
#if !defined (FREE)
#if !defined (FREE)
#  define FREE(x)       if (x) free (x)
#  define FREE(x)       if (x) free (x)
#endif
#endif
 
 
#if !defined (SWAP)
#if !defined (SWAP)
#  define SWAP(s, e)  do { int t; t = s; s = e; e = t; } while (0)
#  define SWAP(s, e)  do { int t; t = s; s = e; e = t; } while (0)
#endif
#endif
 
 
/* CONFIGURATION SECTION */
/* CONFIGURATION SECTION */
#include "rlconf.h"
#include "rlconf.h"
 
 
#endif /* !_RLDEFS_H_ */
#endif /* !_RLDEFS_H_ */
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.