Startle
Useful and efficient algorithms and facilities
types.h
Go to the documentation of this file.
1 /* Copyright 2012-2018 Dustin M. DeWeese
2 
3  This file is part of the Startle library.
4 
5  Licensed under the Apache License, Version 2.0 (the "License");
6  you may not use this file except in compliance with the License.
7  You may obtain a copy of the License at
8 
9  http://www.apache.org/licenses/LICENSE-2.0
10 
11  Unless required by applicable law or agreed to in writing, software
12  distributed under the License is distributed on an "AS IS" BASIS,
13  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  See the License for the specific language governing permissions and
15  limitations under the License.
16 */
17 
18 #ifndef __STARTLE_TYPES__
19 #define __STARTLE_TYPES__
20 
26 typedef struct pair_t {
27  uintptr_t first, second;
28 } pair_t;
29 
31 typedef struct seg_t {
32  const char *s;
33  size_t n;
34 } seg_t;
35 
36 #define UNUSED __attribute__((unused))
37 
38 #endif
A string segment.
Definition: types.h:31
size_t n
length in bytes
Definition: types.h:33
A pair of things.
Definition: types.h:26
const char * s
pointer to the first character
Definition: types.h:32