]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/scm-tags.h
Switch the license of all .c files to GPLv3.
[thirdparty/binutils-gdb.git] / gdb / scm-tags.h
index fbe45cc1890752a2eece178c05167473aee5847b..9f8ac80802a471e93aab4ec6e240c0ed74491dee 100644 (file)
@@ -3,82 +3,80 @@
 
 #ifndef TAGSH
 #define TAGSH
-/*     Copyright (C) 1995 Free Software Foundation, Inc.
- * 
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- * 
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY 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 Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * As a special exception, the Free Software Foundation gives permission
- * for additional uses of the text contained in its release of GUILE.
- *
- * The exception is that, if you link the GUILE library with other files
- * to produce an executable, this does not by itself cause the
- * resulting executable to be covered by the GNU General Public License.
- * Your use of that executable is in no way restricted on account of
- * linking the GUILE library code into it.
- *
- * This exception does not however invalidate any other reasons why
- * the executable file might be covered by the GNU General Public License.
- *
- * This exception applies only to the code released by the
- * Free Software Foundation under the name GUILE.  If you copy
- * code from other Free Software Foundation releases into a copy of
- * GUILE, as the General Public License permits, the exception does
- * not apply to the code that you add in this way.  To avoid misleading
- * anyone as to the status of such modified files, you must delete
- * this exception notice from them.
- *
- * If you write modifications of your own for GUILE, it is your choice
- * whether to permit this exception to apply to your modifications.
- * If you do not wish that, delete this exception notice.  
- */
+/*      Copyright (C) 1995, 1999 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY 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 Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+  
+   As a special exception, the Free Software Foundation gives permission
+   for additional uses of the text contained in its release of GUILE.
+  
+   The exception is that, if you link the GUILE library with other files
+   to produce an executable, this does not by itself cause the
+   resulting executable to be covered by the GNU General Public License.
+   Your use of that executable is in no way restricted on account of
+   linking the GUILE library code into it.
+  
+   This exception does not however invalidate any other reasons why
+   the executable file might be covered by the GNU General Public License.
+  
+   This exception applies only to the code released by the
+   Free Software Foundation under the name GUILE.  If you copy
+   code from other Free Software Foundation releases into a copy of
+   GUILE, as the General Public License permits, the exception does
+   not apply to the code that you add in this way.  To avoid misleading
+   anyone as to the status of such modified files, you must delete
+   this exception notice from them.
+  
+   If you write modifications of your own for GUILE, it is your choice
+   whether to permit this exception to apply to your modifications.
+   If you do not wish that, delete this exception notice.  */
 \f
 
 /** This file defines the format of SCM values and cons pairs.  
  ** It is here that tag bits are assigned for various purposes.
  **/
-
 \f
+
 /* Three Bit Tags
- *
+
  * 000 -- a non-immediate value.  Points into the pair heap.  
  *
  * 001 -- a gloc (i.e., a resolved global variable in a CAR in a code graph)
- *       or the CAR of an object handle (i.e., the tagged pointer to the
- *       vtable part of a user-defined object).
+ *        or the CAR of an object handle (i.e., the tagged pointer to the
+ *        vtable part of a user-defined object).
  *
  *        If X has this tag, the value at CDAR(X - 1) distinguishes
- *       glocs from object handles.  The distinction only needs
- *       to be made in a few places.  Only a few parts of the code know
- *       about glocs.  In most cases, when a value in the CAR of a pair
- *       has the tag 001, it means that the pair is an object handle.
+ *        glocs from object handles.  The distinction only needs
+ *        to be made in a few places.  Only a few parts of the code know
+ *        about glocs.  In most cases, when a value in the CAR of a pair
+ *        has the tag 001, it means that the pair is an object handle.
  *
  * 010 -- the tag for immediate, exact integers. 
  *
  * 011 -- in the CAR of a pair, this tag indicates that the pair is a closure.
- *       The remaining bits of the CAR are a pointer into the pair heap
- *       to the code graph for the closure.
+ *        The remaining bits of the CAR are a pointer into the pair heap
+ *        to the code graph for the closure.
  *
  * 1xy -- an extension tag which means that there is a five or six bit
- *       tag to the left of the low three bits.  See the nice diagrams
- *       in ../doc/code.doc if you want to know what the bits mean.
+ *        tag to the left of the low three bits.  See the nice diagrams
+ *        in ../doc/code.doc if you want to know what the bits mean.
  */
-
 \f
 
 
 
+
 #define scm_tc3_cons           0
 #define scm_tc3_cons_gloc      1
 #define scm_tc3_closure                3
 #define scm_tcs_symbols scm_tc7_ssymbol:case scm_tc7_msymbol
 
 #define scm_tcs_bignums tc16_bigpos:case tc16_bigneg
-
 \f
 
+
 /* References to objects are of type SCM.  Values may be non-immediate
  * (pointers) or immediate (encoded, immutable, scalar values that fit
  * in an SCM variable).
@@ -191,34 +189,34 @@ typedef long SCM;
  * to scm_vector elts, functions, &c are not munged.
  */
 #ifdef _UNICOS
-# define SCM2PTR(x) ((int)(x) >> 3)
-# define PTR2SCM(x) (((SCM)(x)) << 3)
-# define SCM_POINTERS_MUNGED
+#define SCM2PTR(x) ((int)(x) >> 3)
+#define PTR2SCM(x) (((SCM)(x)) << 3)
+#define SCM_POINTERS_MUNGED
 #else
-# define SCM2PTR(x) (x)
-# define PTR2SCM(x) ((SCM)(x))
+#define SCM2PTR(x) (x)
+#define PTR2SCM(x) ((SCM)(x))
 #endif /* def _UNICOS */
-
 \f
 
+
 /* Immediate? Predicates 
  */
 #define SCM_IMP(x)     (6 & (int)(x))
 #define SCM_NIMP(x)    (!SCM_IMP(x))
-
 \f
 
+
 enum scm_tags
-{
-  scm_tc8_char = 0xf4
-};
+  {
+    scm_tc8_char = 0xf4
+  };
 
 #define SCM_ITAG8(X)           ((int)(X) & 0xff)
 #define SCM_MAKE_ITAG8(X, TAG) (((X)<<8) + TAG)
 #define SCM_ITAG8_DATA(X)      ((X)>>8)
+\f
 
 
-\f
 /* Local Environment Structure
  */
 #define SCM_ILOCP(n)           ((0xff & (int)(n))==0xfc)
@@ -230,8 +228,8 @@ enum scm_tags
 #define SCM_IFRAME(n)          ((int)((SCM_ICDR-SCM_IFRINC)>>8) & ((int)(n)>>8))
 #define SCM_IDIST(n)           (((unsigned long)(n))>>20)
 #define SCM_ICDRP(n)           (SCM_ICDR & (n))
-
 \f
+
 /* Immediate Symbols, Special Symbols, Flags (various constants).
  */
 
@@ -287,22 +285,22 @@ enum scm_tags
 #endif
 
 #define SCM_UNSPECIFIED                SCM_MAKIFLAG(SCM_NUM_ISYMS+5)
-
 \f
 
+
 /* Heap Pairs and the Empty List Predicates
  */
 #define SCM_NULLP(x)   (SCM_EOL == (x))
 #define SCM_NNULLP(x)  (SCM_EOL != (x))
 #define SCM_CELLP(x)   (!SCM_NCELLP(x))
 #define SCM_NCELLP(x)  ((sizeof(scm_cell)-1) & (int)(x))
+\f
 
 
-\f
 #define SCM_UNBNDP(x)  (SCM_UNDEFINED==(x))
-
 \f
 
+
 /* Testing and Changing GC Marks in Various Standard Positions
  */
 #define SCM_GCMARKP(x)                 (1 & (int)SCM_CDR(x))
@@ -311,8 +309,8 @@ enum scm_tags
 #define SCM_CLRGCMARK(x)       (SCM_CDR(x) &= ~1L)
 #define SCM_SETGC8MARK(x)      (SCM_CAR(x) |= 0x80)
 #define SCM_CLRGC8MARK(x)      (SCM_CAR(x) &= ~0x80L)
-
 \f
+
 /* Extracting Tag Bits, With or Without GC Safety and Optional Bits
  */
 #define SCM_TYP3(x)            (7 & (int)SCM_CAR(x))
@@ -321,27 +319,27 @@ enum scm_tags
 #define SCM_TYP16(x)           (0xffff & (int)SCM_CAR(x))
 #define SCM_TYP16S(x)          (0xfeff & (int)SCM_CAR(x))
 #define SCM_GCTYP16(x)                 (0xff7f & (int)SCM_CAR(x))
-
 \f
+
 /* Two slightly extensible types: smobs and ptobs.
- *
+
  */
 #define SCM_SMOBNUM(x) (0x0ff & (CAR(x)>>8));
 #define SCM_PTOBNUM(x) (0x0ff & (CAR(x)>>8));
+\f
 
 
-\f
 
 #define SCM_DIRP(x) (SCM_NIMP(x) && (TYP16(x)==(scm_tc16_dir)))
 #define SCM_OPDIRP(x) (SCM_NIMP(x) && (CAR(x)==(scm_tc16_dir | OPN)))
-
 \f
 
+
 /* Lvectors 
  */
 #define SCM_LVECTORP(x) (TYP7(x)==tc7_lvector)
-
 \f
+
 #if 0
 \f
 /* Sockets 
@@ -349,14 +347,14 @@ enum scm_tags
 #define tc_socket (tc7_port | OPN)
 #define SCM_SOCKP(x) (((0x7f | OPN | RDNG | WRTNG) & CAR(x))==(tc_socket))
 #define SCM_SOCKTYP(x) (CAR(x)>>24)
-
 \f
 
+
 extern int scm_tc16_key_vector;
 #define SCM_KEYVECP(X)   (scm_tc16_key_vector == TYP16 (X))
 #define SCM_KEYVECLEN(OBJ) (((unsigned long)CAR (obj)) >> 16)
-
 \f
+
 #define SCM_MALLOCDATA(obj) ((char *)CDR(obj))
 #define SCM_MALLOCLEN(obj) (((unsigned long)CAR (obj)) >> 16)
 #define SCM_WORDDATA(obj)  (CDR (obj))
@@ -368,18 +366,12 @@ extern int scm_tc16_key_vector;
 #define SCM_BYTECODE_NAME(X) (VELTS(X)[3])
 #define SCM_BYTECODE_BCODE(X) (VELTS(X)[4])
 #define SCM_BYTECODE_ELTS 5
-
 \f
+
 #define SCM_FREEP(x) (CAR(x)==tc_free_cell)
 #define SCM_NFREEP(x) (!FREEP(x))
 \f
-#endif /* 0*/
+#endif /* 0 */
 \f
-#ifdef __STDC__
-
-#else /* STDC */
-
-#endif /* STDC */
-
 
-#endif  /* TAGSH */
+#endif /* TAGSH */