@kv  0.0.4
Library for graph problems in C and Python
range.h
1 
18 #if !defined(AT_CORE_H_INSIDE)
19 #error "Only <at/core.h> can be included directly."
20 #endif
21 #ifndef AT_RANGE_H
22 #define AT_RANGE_H
23 #include <at/core.h>
24 AT_BEGIN_DECLS
25 
26 /*=============================================================================
27  STRUCTURE
28  ============================================================================*/
29 typedef struct _AtRange{
30  int16_t from;
31  int16_t to;
32 }AtRange;
33 extern const AtRange AT_RANGE_ALL;
34 /*=============================================================================
35  PUBLIC API
36  ============================================================================*/
37 #define at_range_from_to(from,to) ((AtRange){from,to})
38 #define at_range_to(to) ((AtRange){0,to})
39 #define at_range_from(to) ((AtRange){from,INT16_MAX})
40 #define at_range_at(at) ((AtRange){at,at+1})
41 AT_END_DECLS
42 #endif
Definition: range.h:29