Skip to content

Commit

Permalink
Remove comments repeated in range.h
Browse files Browse the repository at this point in the history
These comments are contained in range.h, and are also wrong
in several places, as range.h was updated and the comments
in range.c were not.
  • Loading branch information
ChrisJefferson authored and markuspf committed Aug 28, 2017
1 parent dba295c commit 821b043
Showing 1 changed file with 0 additions and 150 deletions.
150 changes: 0 additions & 150 deletions src/range.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,156 +85,6 @@
#include <src/gaputils.h>


/****************************************************************************
**
*F NEW_RANGE() . . . . . . . . . . . . . . . . . . . . . . make a new range
**
** 'NEW_RANGE' returns a new range. Note that you must set the length, the
** low value, and the increment before you can use the range.
**
** 'NEW_RANGE' is defined in the declaration part of this package as follows
**
#define NEW_RANGE_NSORT() NewBag( T_RANGE_NSORT, 3 * sizeof(Obj) )
#define NEW_RANGE_SSORT() NewBag( T_RANGE_SSORT, 3 * sizeof(Obj) )
*/


/****************************************************************************
**
*F IS_RANGE(<val>) . . . . . . . . . . . . . . . test if a value is a range
**
** 'IS_RANGE' returns 1 if the value <val> is known to be a range, and 0
** otherwise. Note that a list for which 'IS_RANGE' returns 0 may still be
** a range, but the kernel does not know this yet. Use 'IsRange' to test
** whether a list is a range.
**
** Note that 'IS_RANGE' is a macro, so do not call it with arguments that
** have side effects.
**
** 'IS_RANGE' is defined in the declaration part of this package as follows
**
#define IS_RANGE(val) (TNUM_OBJ(val)==T_RANGE_NSORT || TNUM_OBJ(val)==T_RANGE_SSORT)
*/


/****************************************************************************
**
*F SET_LEN_RANGE(<list>,<len>) . . . . . . . . . . set the length of a range
**
** 'SET_LEN_RANGE' sets the length of the range <list> to the value <len>,
** which must be a C integer larger than 1.
**
** Note that 'SET_LEN_RANGE' is a macro, so do not call it with arguments
** that have side effects.
**
** 'SET_LEN_RANGE' is defined in the declaration part of this package as
** follows
**
#define SET_LEN_RANGE(list,len) (ADDR_OBJ(list)[0] = INTOBJ_INT(len))
*/


/****************************************************************************
**
*F GET_LEN_RANGE(<list>) . . . . . . . . . . . . . . . . . length of a range
**
** 'GET_LEN_RANGE' returns the logical length of the range <list>, as a C
** integer.
**
** Note that 'GET_LEN_RANGE' is a macro, so do not call it with arguments
** that have side effects.
**
** 'GET_LEN_RANGE' is defined in the declaration part of this package as
** follows
**
#define GET_LEN_RANGE(list) INT_INTOBJ( ADDR_OBJ(list)[0] )
*/


/****************************************************************************
**
*F SET_LOW_RANGE(<list>,<low>) . . . . . . set the first element of a range
**
** 'SET_LOW_RANGE' sets the first element of the range <list> to the value
** <low>, which must be a C integer.
**
** Note that 'SET_LOW_RANGE' is a macro, so do not call it with arguments
** that have side effects.
**
** 'SET_LOW_RANGE' is defined in the declaration part of this package as
** follows
**
#define SET_LOW_RANGE(list,low) (ADDR_OBJ(list)[1] = INTOBJ_INT(low))
*/


/****************************************************************************
**
*F GET_LOW_RANGE(<list>) . . . . . . . . . . . . . first element of a range
**
** 'GET_LOW_RANGE' returns the first element of the range <list> as a C
** integer.
**
** Note that 'GET_LOW_RANGE' is a macro, so do not call it with arguments
** that have side effects.
**
** 'GET_LOW_RANGE' is defined in the declaration part of this package as
** follows
**
#define GET_LOW_RANGE(list) INT_INTOBJ( ADDR_OBJ(list)[1] )
*/


/****************************************************************************
**
*F SET_INC_RANGE(<list>,<inc>) . . . . . . . . set the increment of a range
**
** 'SET_INC_RANGE' sets the increment of the range <list> to the value
** <inc>, which must be a C integer.
**
** Note that 'SET_INC_RANGE' is a macro, so do not call it with arguments
** that have side effects.
**
** 'SET_INC_RANGE' is defined in the declaration part of this package as
** follows
**
#define SET_INC_RANGE(list,inc) (ADDR_OBJ(list)[2] = INTOBJ_INT(inc))
*/


/****************************************************************************
**
*F GET_INC_RANGE(<list>) . . . . . . . . . . . . . . . increment of a range
**
** 'GET_INC_RANGE' returns the increment of the range <list> as a C integer.
**
** Note that 'GET_INC_RANGE' is a macro, so do not call it with arguments
** that have side effects.
**
** 'GET_INC_RANGE' is defined in the declaration part of this package as
** follows
**
#define GET_INC_RANGE(list) INT_INTOBJ( ADDR_OBJ(list)[2] )
*/


/****************************************************************************
**
*F GET_ELM_RANGE(<list>,<pos>) . . . . . . . . . . . . . element of a range
**
** 'GET_ELM_RANGE' return the <pos>-th element of the range <list>. <pos>
** must be a positive integer less than or equal to the length of <list>.
**
** Note that 'GET_ELM_RANGE' is a macro, so do not call it with arguments
** that have side effects.
**
** 'GET_ELM_RANGE' is defined in the declaration part of this package as
** follows
**
#define GET_ELM_RANGE(list,pos) INTOBJ_INT( GET_LOW_RANGE(list) \
+ ((pos)-1) * GET_INC_RANGE(list) )
*/


/****************************************************************************
**
Expand Down

0 comments on commit 821b043

Please sign in to comment.