OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [ada/] [namet.h] - Diff between revs 281 and 384

Only display areas with differences | Details | Blame | View Log

Rev 281 Rev 384
/****************************************************************************
/****************************************************************************
 *                                                                          *
 *                                                                          *
 *                         GNAT COMPILER COMPONENTS                         *
 *                         GNAT COMPILER COMPONENTS                         *
 *                                                                          *
 *                                                                          *
 *                                N A M E T                                 *
 *                                N A M E T                                 *
 *                                                                          *
 *                                                                          *
 *                              C Header File                               *
 *                              C Header File                               *
 *                                                                          *
 *                                                                          *
 *            Copyright (C) 1992-2008, Free Software Foundation, Inc.       *
 *            Copyright (C) 1992-2008, Free Software Foundation, Inc.       *
 *                                                                          *
 *                                                                          *
 * GNAT is free software;  you can  redistribute it  and/or modify it under *
 * GNAT is free software;  you can  redistribute it  and/or modify it under *
 * terms of the  GNU General Public License as published  by the Free Soft- *
 * terms of the  GNU General Public License as published  by the Free Soft- *
 * ware  Foundation;  either version 3,  or (at your option) any later ver- *
 * ware  Foundation;  either version 3,  or (at your option) any later ver- *
 * sion.  GNAT is distributed in the hope that it will be useful, but WITH- *
 * sion.  GNAT is distributed in the hope that it will be useful, but WITH- *
 * OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY *
 * OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY *
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License *
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License *
 * for  more details.  You should have  received  a copy of the GNU General *
 * for  more details.  You should have  received  a copy of the GNU General *
 * Public License  distributed with GNAT; see file COPYING3.  If not, go to *
 * Public License  distributed with GNAT; see file COPYING3.  If not, go to *
 * http://www.gnu.org/licenses for a complete copy of the license.          *
 * http://www.gnu.org/licenses for a complete copy of the license.          *
 *                                                                          *
 *                                                                          *
 * GNAT was originally developed  by the GNAT team at  New York University. *
 * GNAT was originally developed  by the GNAT team at  New York University. *
 * Extensive contributions were provided by Ada Core Technologies Inc.      *
 * Extensive contributions were provided by Ada Core Technologies Inc.      *
 *                                                                          *
 *                                                                          *
 ****************************************************************************/
 ****************************************************************************/
 
 
/* This is the C file that corresponds to the Ada package specification
/* This is the C file that corresponds to the Ada package specification
   Namet. It was created manually from files namet.ads and namet.adb.  */
   Namet. It was created manually from files namet.ads and namet.adb.  */
 
 
/* Structure defining a names table entry.  */
/* Structure defining a names table entry.  */
 
 
struct Name_Entry
struct Name_Entry
{
{
  Int Name_Chars_Index; /* Starting location of char in Name_Chars table. */
  Int Name_Chars_Index; /* Starting location of char in Name_Chars table. */
  Short Name_Len;         /* Length of this name in characters. */
  Short Name_Len;         /* Length of this name in characters. */
  Byte Byte_Info;       /* Byte value associated with this name */
  Byte Byte_Info;       /* Byte value associated with this name */
  Byte Spare;           /* Unused */
  Byte Spare;           /* Unused */
  Name_Id Hash_Link;    /* Link to next entry in names table for same hash
  Name_Id Hash_Link;    /* Link to next entry in names table for same hash
                           code. Not accessed by C routines.  */
                           code. Not accessed by C routines.  */
  Int Int_Info;         /* Int value associated with this name */
  Int Int_Info;         /* Int value associated with this name */
};
};
 
 
/* Pointer to names table vector. */
/* Pointer to names table vector. */
#define Names_Ptr namet__name_entries__table
#define Names_Ptr namet__name_entries__table
extern struct Name_Entry *Names_Ptr;
extern struct Name_Entry *Names_Ptr;
 
 
/* Pointer to name characters table. */
/* Pointer to name characters table. */
#define Name_Chars_Ptr namet__name_chars__table
#define Name_Chars_Ptr namet__name_chars__table
extern char *Name_Chars_Ptr;
extern char *Name_Chars_Ptr;
 
 
#define Name_Buffer namet__name_buffer
#define Name_Buffer namet__name_buffer
extern char Name_Buffer[];
extern char Name_Buffer[];
 
 
extern Int namet__name_len;
extern Int namet__name_len;
#define Name_Len namet__name_len
#define Name_Len namet__name_len
 
 
/* Get_Name_String returns a null terminated C string for the specified name.
/* Get_Name_String returns a null terminated C string for the specified name.
   We could use the official Ada routine for this purpose, but since the
   We could use the official Ada routine for this purpose, but since the
   strings we want are sitting in the name strings table in exactly the form
   strings we want are sitting in the name strings table in exactly the form
   we need them (null terminated), we just point to the name directly. */
   we need them (null terminated), we just point to the name directly. */
 
 
static char *Get_Name_String (Name_Id);
static char *Get_Name_String (Name_Id);
 
 
INLINE char *
INLINE char *
Get_Name_String (Name_Id Id)
Get_Name_String (Name_Id Id)
{
{
  return Name_Chars_Ptr + Names_Ptr[Id - First_Name_Id].Name_Chars_Index + 1;
  return Name_Chars_Ptr + Names_Ptr[Id - First_Name_Id].Name_Chars_Index + 1;
}
}
 
 
/* Get_Decoded_Name_String returns a null terminated C string in the same
/* Get_Decoded_Name_String returns a null terminated C string in the same
   manner as Get_Name_String, except that it is decoded (i.e. upper half or
   manner as Get_Name_String, except that it is decoded (i.e. upper half or
   wide characters are put back in their external form, and character literals
   wide characters are put back in their external form, and character literals
   are also returned in their external form (with surrounding apostrophes) */
   are also returned in their external form (with surrounding apostrophes) */
 
 
extern void namet__get_decoded_name_string (Name_Id);
extern void namet__get_decoded_name_string (Name_Id);
 
 
static char *Get_Decoded_Name_String (Name_Id);
static char *Get_Decoded_Name_String (Name_Id);
 
 
INLINE char *
INLINE char *
Get_Decoded_Name_String (Name_Id Id)
Get_Decoded_Name_String (Name_Id Id)
{
{
  namet__get_decoded_name_string (Id);
  namet__get_decoded_name_string (Id);
  Name_Buffer[Name_Len] = 0;
  Name_Buffer[Name_Len] = 0;
  return Name_Buffer;
  return Name_Buffer;
}
}
 
 
/* Like Get_Decoded_Name_String, but the result has all qualification and
/* Like Get_Decoded_Name_String, but the result has all qualification and
   package body entity suffixes stripped, and also all letters are upper
   package body entity suffixes stripped, and also all letters are upper
   cased.  This is used for building the enumeration literal table. */
   cased.  This is used for building the enumeration literal table. */
 
 
extern void casing__set_all_upper_case (void);
extern void casing__set_all_upper_case (void);
 
 
/* The following routines and variables are not part of Namet, but we
/* The following routines and variables are not part of Namet, but we
   include the header here since it seems the best place for it.  */
   include the header here since it seems the best place for it.  */
 
 
#define Get_Encoded_Type_Name exp_dbug__get_encoded_type_name
#define Get_Encoded_Type_Name exp_dbug__get_encoded_type_name
extern Boolean Get_Encoded_Type_Name (Entity_Id);
extern Boolean Get_Encoded_Type_Name (Entity_Id);
#define Get_Variant_Encoding exp_dbug__get_variant_encoding
#define Get_Variant_Encoding exp_dbug__get_variant_encoding
extern void Get_Variant_Encoding (Entity_Id);
extern void Get_Variant_Encoding (Entity_Id);
 
 
#define Spec_Context_List exp_dbug__spec_context_list
#define Spec_Context_List exp_dbug__spec_context_list
#define Body_Context_List exp_dbug__body_context_list
#define Body_Context_List exp_dbug__body_context_list
extern char *Spec_Context_List, *Body_Context_List;
extern char *Spec_Context_List, *Body_Context_List;
#define Spec_Filename exp_dbug__spec_filename
#define Spec_Filename exp_dbug__spec_filename
#define Body_Filename exp_dbug__body_filename
#define Body_Filename exp_dbug__body_filename
extern char *Spec_Filename, *Body_Filename;
extern char *Spec_Filename, *Body_Filename;
 
 
#define Is_Non_Ada_Error exp_ch11__is_non_ada_error
#define Is_Non_Ada_Error exp_ch11__is_non_ada_error
extern Boolean Is_Non_Ada_Error (Entity_Id);
extern Boolean Is_Non_Ada_Error (Entity_Id);
 
 
/* Here are some functions in sinput.adb we call from a-trans.c.  */
/* Here are some functions in sinput.adb we call from a-trans.c.  */
typedef Nat Source_File_Index;
typedef Nat Source_File_Index;
typedef Int Logical_Line_Number;
typedef Int Logical_Line_Number;
typedef Int Column_Number;
typedef Int Column_Number;
 
 
#define Debug_Source_Name sinput__debug_source_name
#define Debug_Source_Name sinput__debug_source_name
#define Full_Debug_Name sinput__full_debug_name
#define Full_Debug_Name sinput__full_debug_name
#define Reference_Name sinput__reference_name
#define Reference_Name sinput__reference_name
#define Get_Source_File_Index sinput__get_source_file_index
#define Get_Source_File_Index sinput__get_source_file_index
#define Get_Logical_Line_Number sinput__get_logical_line_number
#define Get_Logical_Line_Number sinput__get_logical_line_number
#define Get_Column_Number sinput__get_column_number
#define Get_Column_Number sinput__get_column_number
#define Instantiation sinput__instantiation
#define Instantiation sinput__instantiation
 
 
extern File_Name_Type Debug_Source_Name (Source_File_Index);
extern File_Name_Type Debug_Source_Name (Source_File_Index);
extern File_Name_Type Full_Debug_Name   (Source_File_Index);
extern File_Name_Type Full_Debug_Name   (Source_File_Index);
extern File_Name_Type Reference_Name    (Source_File_Index);
extern File_Name_Type Reference_Name    (Source_File_Index);
extern Source_File_Index Get_Source_File_Index (Source_Ptr);
extern Source_File_Index Get_Source_File_Index (Source_Ptr);
extern Logical_Line_Number Get_Logical_Line_Number (Source_Ptr);
extern Logical_Line_Number Get_Logical_Line_Number (Source_Ptr);
extern Column_Number Get_Column_Number (Source_Ptr);
extern Column_Number Get_Column_Number (Source_Ptr);
extern Source_Ptr Instantiation (Source_File_Index);
extern Source_Ptr Instantiation (Source_File_Index);
 
 

powered by: WebSVN 2.1.0

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