mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-02 09:31:07 +00:00
(IndexRange): changed to location/length from start/end.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@107 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f531c211f6
commit
ff1d666547
2 changed files with 4 additions and 28 deletions
|
@ -39,21 +39,9 @@
|
||||||
#include <objects/KeyedCollecting.h>
|
#include <objects/KeyedCollecting.h>
|
||||||
|
|
||||||
typedef struct _IndexRange {
|
typedef struct _IndexRange {
|
||||||
unsigned start;
|
unsigned location;
|
||||||
unsigned end;
|
unsigned length;
|
||||||
} IndexRange;
|
} IndexRange;
|
||||||
/* Includes elements from start to end-1 Is this ugly?
|
|
||||||
I do this so I can specify a NULL range
|
|
||||||
How about this instead:
|
|
||||||
typedef struct _IndexRange {
|
|
||||||
unsigned start;
|
|
||||||
unsigned length;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
//#define MakeIndexRange(START,END) \
|
|
||||||
// ({ IndexRange __ir = {(START), (END)}; __ir; })
|
|
||||||
// USE: ((IndexRange) {(START),(END)})
|
|
||||||
|
|
||||||
#define IndexRangeInside(RANGE1,RANGE2) \
|
#define IndexRangeInside(RANGE1,RANGE2) \
|
||||||
({IndexRange __a=(RANGE1), __b=(RANGE2); \
|
({IndexRange __a=(RANGE1), __b=(RANGE2); \
|
||||||
|
|
|
@ -39,21 +39,9 @@
|
||||||
#include <objects/KeyedCollecting.h>
|
#include <objects/KeyedCollecting.h>
|
||||||
|
|
||||||
typedef struct _IndexRange {
|
typedef struct _IndexRange {
|
||||||
unsigned start;
|
unsigned location;
|
||||||
unsigned end;
|
unsigned length;
|
||||||
} IndexRange;
|
} IndexRange;
|
||||||
/* Includes elements from start to end-1 Is this ugly?
|
|
||||||
I do this so I can specify a NULL range
|
|
||||||
How about this instead:
|
|
||||||
typedef struct _IndexRange {
|
|
||||||
unsigned start;
|
|
||||||
unsigned length;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
//#define MakeIndexRange(START,END) \
|
|
||||||
// ({ IndexRange __ir = {(START), (END)}; __ir; })
|
|
||||||
// USE: ((IndexRange) {(START),(END)})
|
|
||||||
|
|
||||||
#define IndexRangeInside(RANGE1,RANGE2) \
|
#define IndexRangeInside(RANGE1,RANGE2) \
|
||||||
({IndexRange __a=(RANGE1), __b=(RANGE2); \
|
({IndexRange __a=(RANGE1), __b=(RANGE2); \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue