eĿlipsis
a language independent preprocessor
 
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Loading...
Searching...
No Matches
ellipsis-tlist.c File Reference
#include "ellipsis-tlist.h"
#include "utils/ellipsis-error.h"
#include "utils/ellipsis-init.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
Include dependency graph for ellipsis-tlist.c:

Macros

#define ELLIPSIS_CONTRACT(COUNT, COND, ACTION, VERB, CSTR, CTYPE, ...)
 
#define ELLIPSIS_CONTRACT_CHECK_STATIC(CTYPE, COND, CSTR, ...)
 
#define ELLIPSIS_CONTRACT_ICE_OR_TRUE(...)
 
#define ELLIPSIS_CONTRACT_IMPL(COUNT, COND, ACTION, VERB, CSTR, CTYPE, ...)
 
#define ELLIPSIS_CONTRACT_VIOLATION(COUNT, VERB, CTYPE, CSTR, ...)
 
#define ELLIPSIS_FA_UNDEPRECATE   [[__deprecated__("you should not see this")]]
 
#define ELLIPSIS_TEST_ICE(...)   (false ? ELLIPSIS_TO_VOIDS(__VA_ARGS__) : (ellipsis‿contracts‿is_ice*)nullptr)
 
#define ELLIPSIS_TO_VOIDS(...)   ((void*)((uintptr_t)((__VA_ARGS__)-(__VA_ARGS__))))
 
#define STRINGIFY(...)   STRINGIFY_(__VA_ARGS__)
 
#define STRINGIFY_(...)   #__VA_ARGS__
 

Typedefs

typedef struct ellipsis‿contracts‿is_ice ellipsis‿contracts‿is_ice
 

Functions

ELLIPSIS_FA_UNDEPRECATE tokenellipsis‿token‿list‿all (ellipsis‿token‿list tl[static 1])
 
ELLIPSIS_FA_UNDEPRECATE void ellipsis‿token‿list‿append (ellipsis‿token‿list tl[static 1], token *to)
 
ELLIPSIS_FA_UNDEPRECATE void ellipsis‿token‿list‿close (ellipsis‿token‿list tl[static 1])
 
ELLIPSIS_FA_UNDEPRECATE size_t ellipsis‿token‿list‿collect_call (size_t len, ellipsis‿token‿list arg[static restrict len], ellipsis‿token‿list in[restrict static 1], bool var, ellipsis‿str32 const *space[static 1])
 
ELLIPSIS_FA_UNDEPRECATE ellipsis‿token‿listellipsis‿token‿list‿cpy‿_Inner (ellipsis‿token‿list tl[static const 1])
 
ELLIPSIS_FA_UNDEPRECATE void ellipsis‿token‿list‿destroy (ellipsis‿token‿list tl[static 1])
 
ELLIPSIS_FA_UNDEPRECATE bool ellipsis‿token‿list‿equiv (ellipsis‿token‿list *const restrict a, ellipsis‿token‿list *const restrict b)
 
tokenellipsis‿token‿list‿first (ellipsis‿token‿list tl[static 1])
 
ELLIPSIS_FA_UNDEPRECATE void ellipsis‿token‿list‿flush (ellipsis‿token‿list target[static 1], ellipsis‿token‿list source[static 1])
 
ELLIPSIS_FA_UNDEPRECATE ellipsis‿token‿listellipsis‿token‿list‿init‿_Inner (ellipsis‿token‿list tl[static const 1])
 
ELLIPSIS_FA_UNDEPRECATE bool ellipsis‿token‿list‿is_finished (ellipsis‿token‿list tl[static 1])
 
tokenellipsis‿token‿list‿last (ellipsis‿token‿list tl[static 1])
 
ELLIPSIS_FA_UNDEPRECATE void ellipsis‿token‿list‿open (ellipsis‿token‿list tl[static 1])
 
ELLIPSIS_FA_UNDEPRECATE tokenellipsis‿token‿list‿pop (ellipsis‿token‿list tl[static 1])
 
ELLIPSIS_FA_UNDEPRECATE void ellipsis‿token‿list‿push (ellipsis‿token‿list target[static 1], ellipsis‿token‿list source[static 1])
 
ELLIPSIS_FA_UNDEPRECATE size_t ellipsis‿token‿list‿scatter‿_Inner (size_t len, ellipsis‿token‿list arg[static restrict len], ellipsis‿token‿list in[restrict static 1], bool var, bool call, ellipsis‿str32 const **space)
 
size_t ellipsis‿token‿list‿scatter‿_Insta (size_t len, ellipsis‿token‿list arg[static len], ellipsis‿token‿list in[restrict static 1], bool var, bool call, ellipsis‿str32 const **space)
 
ELLIPSIS_FA_UNDEPRECATE ellipsis‿str32ellipsis‿token‿list‿stringify‿_Inner (ellipsis‿token‿list const source[static const 1])
 
token const * ellipsis‿token‿list‿top (ellipsis‿token‿list tl[static 1])
 
ELLIPSIS_FA_UNDEPRECATE void ellipsis‿token‿list‿wait (ellipsis‿token‿list tl[static 1])
 

Variables

thread_local bool volatile ellipsis‿contracts‿ignore‿dynamic
 
thread_local bool volatile ellipsis‿contracts‿proceed‿dynamic
 
thread_local bool volatile ellipsis‿contracts‿verbose‿dynamic
 

Detailed Description

Warning
This is a file generated by eĿlipsis version 20250309, do not modify

Macro Definition Documentation

◆ ELLIPSIS_CONTRACT

#define ELLIPSIS_CONTRACT (   COUNT,
  COND,
  ACTION,
  VERB,
  CSTR,
  CTYPE,
  ... 
)
Value:
\
do { \
_Generic( \
default: ELLIPSIS_CONTRACT_IMPL(COUNT, COND, ACTION, VERB, CSTR, CTYPE __VA_OPT__(,) __VA_ARGS__));\
} while(false)
struct ellipsis‿contracts‿is_ice ellipsis‿contracts‿is_ice
Definition ellipsis-expression.c:24
#define __VA_OPT__
A pseudo macro that cannot be redefined.
Definition ellipsis-predefined.dirs:89
#define ELLIPSIS_TEST_ICE(...)
Definition ellipsis-tlist.c:43
#define ELLIPSIS_CONTRACT_CHECK_STATIC(CTYPE, COND, CSTR,...)
Definition ellipsis-tlist.c:51
#define ELLIPSIS_CONTRACT_IMPL(COUNT, COND, ACTION, VERB, CSTR, CTYPE,...)
Definition ellipsis-tlist.c:33

◆ ELLIPSIS_CONTRACT_CHECK_STATIC

#define ELLIPSIS_CONTRACT_CHECK_STATIC (   CTYPE,
  COND,
  CSTR,
  ... 
)
Value:
({\
static_assert(ELLIPSIS_CONTRACT_ICE_OR_TRUE(COND), \
"compile time violation of " CTYPE " " CSTR \
__VA_OPT__(", ") __VA_ARGS__ );\
})
#define ELLIPSIS_CONTRACT_ICE_OR_TRUE(...)
Definition ellipsis-tlist.c:45

◆ ELLIPSIS_CONTRACT_ICE_OR_TRUE

#define ELLIPSIS_CONTRACT_ICE_OR_TRUE (   ...)
Value:
_Generic( \
ELLIPSIS_TEST_ICE(__VA_ARGS__), \
ellipsis‿contracts‿is_ice*: (__VA_ARGS__), \
default: true)
#define true
The constant true made accessible to the preprocessor.
Definition ellipsis-builtins.dirs:32

◆ ELLIPSIS_CONTRACT_IMPL

#define ELLIPSIS_CONTRACT_IMPL (   COUNT,
  COND,
  ACTION,
  VERB,
  CSTR,
  CTYPE,
  ... 
)
Value:
(((false) || (COND)) \
? (void)0 \
: (ELLIPSIS_CONTRACT_VIOLATION(COUNT, VERB, CTYPE, CSTR __VA_OPT__(,) __VA_ARGS__) \
, ((false) \
? (void)0 \
: ACTION())))
#define ELLIPSIS_CONTRACT_VIOLATION(COUNT, VERB, CTYPE, CSTR,...)
Definition ellipsis-tlist.c:24

◆ ELLIPSIS_CONTRACT_VIOLATION

#define ELLIPSIS_CONTRACT_VIOLATION (   COUNT,
  VERB,
  CTYPE,
  CSTR,
  ... 
)
Value:
({\
static char const contract_format_ ## COUNT[] = \
__FILE__ ":" STRINGIFY(__LINE__) ": violation of " CTYPE " `" CSTR "`" __VA_OPT__(", ") __VA_ARGS__ "\n";\
(VERB \
? fputs(contract_format_ ## COUNT, stderr) \
: 0);\
})
#define __FILE__
The current source file as required by the C standard.
Definition ellipsis-builtins.dirs:21
#define __LINE__
The current physical source line as required by the C standard.
Definition ellipsis-builtins.dirs:24
#define STRINGIFY(...)
Definition ellipsis-tlist.c:21

◆ ELLIPSIS_FA_UNDEPRECATE

#define ELLIPSIS_FA_UNDEPRECATE   [[__deprecated__("you should not see this")]]

◆ ELLIPSIS_TEST_ICE

#define ELLIPSIS_TEST_ICE (   ...)    (false ? ELLIPSIS_TO_VOIDS(__VA_ARGS__) : (ellipsis‿contracts‿is_ice*)nullptr)

◆ ELLIPSIS_TO_VOIDS

#define ELLIPSIS_TO_VOIDS (   ...)    ((void*)((uintptr_t)((__VA_ARGS__)-(__VA_ARGS__))))

◆ STRINGIFY

#define STRINGIFY (   ...)    STRINGIFY_(__VA_ARGS__)

◆ STRINGIFY_

#define STRINGIFY_ (   ...)    #__VA_ARGS__

Typedef Documentation

◆ ellipsis‿contracts‿is_ice

Function Documentation

◆ ellipsis‿token‿list‿all()

◆ ellipsis‿token‿list‿append()

ELLIPSIS_FA_UNDEPRECATE void ellipsis‿token‿list‿append ( ellipsis‿token‿list  tl[static 1],
token to 
)

◆ ellipsis‿token‿list‿close()

ELLIPSIS_FA_UNDEPRECATE void ellipsis‿token‿list‿close ( ellipsis‿token‿list  tl[static 1])

start inner defer anchor at level 1

defer needs braces and a semicolon

end inner defer anchor, level 1

Referenced by _Atomic(), callback_call(), collect_names(), ellipsis‿c_punctuators‿_Once‿init‿user(), ellipsis‿directive‿define_process(), ellipsis‿directive‿embed_common(), ellipsis‿directive‿gather(), ellipsis‿directive‿include(), ellipsis‿directive‿include_common(), ellipsis‿directive‿include_next(), ellipsis‿directive‿include_source(), ellipsis‿directive‿line(), ellipsis‿directive‿line_common(), ellipsis‿directive‿linenumber(), ellipsis‿directive‿macro_get(), ellipsis‿directive‿mark_line(), ellipsis‿directive‿pragma(), ellipsis‿directive‿scatter(), ellipsis‿expression‿evaluate(), ellipsis‿expression‿resolve_defined(), ellipsis‿filter‿local(), ellipsis‿filter(), ellipsis‿include‿repair(), ellipsis‿macros‿_Once‿init‿user(), ellipsis‿macros‿cb‿addition(), ellipsis‿macros‿cb‿bind(), ellipsis‿macros‿cb‿error(), ellipsis‿macros‿cb‿evaluate(), ellipsis‿macros‿cb‿has_file(), ellipsis‿macros‿cb‿warning(), ellipsis‿pragma‿once(), ellipsis‿special‿directive‿lex(), ellipsis‿token‿list::ellipsis‿token‿list‿flush(), ellipsis‿token‿list::ellipsis‿token‿list‿push(), ellipsis‿token‿list‿scatter‿_Inner(), ellipsis‿tokenize(), expand_functional(), has_c_attribute_callback(), main(), and mark_parameters().

Here is the caller graph for this function:

◆ ellipsis‿token‿list‿collect_call()

ELLIPSIS_FA_UNDEPRECATE size_t ellipsis‿token‿list‿collect_call ( size_t  len,
ellipsis‿token‿list  arg[static restrict len],
ellipsis‿token‿list  in[restrict static 1],
bool  var,
ellipsis‿str32 const *  space[static 1] 
)

References ellipsis‿token‿list‿pop(), ellipsis‿token‿list‿scatter(), and ELLIPSIS_CONTRACT.

Referenced by ellipsis‿expression‿resolve_defined(), ellipsis‿include‿process(), expand_functional(), expand_macro(), and mark_parameters().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ellipsis‿token‿list‿cpy‿_Inner()

ELLIPSIS_FA_UNDEPRECATE ellipsis‿token‿list * ellipsis‿token‿list‿cpy‿_Inner ( ellipsis‿token‿list  tl[static const 1])

References ellipsis‿token‿list‿append(), ELLIPSIS_CONTRACT, ellipsis‿token‿list::finished, and ellipsis‿token‿list::first.

Referenced by ellipsis‿token‿list::ellipsis‿token‿list‿cpy‿_Ctra().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ellipsis‿token‿list‿destroy()

◆ ellipsis‿token‿list‿equiv()

ELLIPSIS_FA_UNDEPRECATE bool ellipsis‿token‿list‿equiv ( ellipsis‿token‿list *const restrict  a,
ellipsis‿token‿list *const restrict  b 
)

Referenced by ellipsis‿token‿equiv‿_Inner().

Here is the caller graph for this function:

◆ ellipsis‿token‿list‿first()

◆ ellipsis‿token‿list‿flush()

ELLIPSIS_FA_UNDEPRECATE void ellipsis‿token‿list‿flush ( ellipsis‿token‿list  target[static 1],
ellipsis‿token‿list  source[static 1] 
)

start inner defer anchor at level 1

defer needs braces and a semicolon

end inner defer anchor, level 1

start inner defer anchor at level 1

defer needs braces and a semicolon

end inner defer anchor, level 1

Referenced by ellipsis‿directive‿embed_resource(), ellipsis‿directive‿expand(), ellipsis‿directive‿gather(), ellipsis‿directive‿include_source(), ellipsis‿directive‿linenumber(), ellipsis‿directive‿macro_get(), ellipsis‿directive‿move(), ellipsis‿directive‿scatter(), ellipsis‿include‿process(), ellipsis‿token‿list‿scatter‿_Inner(), ellipsis‿tokenize(), expand_functional(), and mark_parameters().

Here is the caller graph for this function:

◆ ellipsis‿token‿list‿init‿_Inner()

◆ ellipsis‿token‿list‿is_finished()

ELLIPSIS_FA_UNDEPRECATE bool ellipsis‿token‿list‿is_finished ( ellipsis‿token‿list  tl[static 1])

start inner defer anchor at level 1

DEFER_TYPE needs a semicolon

defer needs braces and a semicolon

end inner defer anchor, level 1

◆ ellipsis‿token‿list‿last()

token * ellipsis‿token‿list‿last ( ellipsis‿token‿list  tl[static 1])

Referenced by ellipsis‿directive‿move(), ellipsis‿directive‿scatter(), ellipsis‿macros‿cb‿any(), and expand_macro().

Here is the caller graph for this function:

◆ ellipsis‿token‿list‿open()

ELLIPSIS_FA_UNDEPRECATE void ellipsis‿token‿list‿open ( ellipsis‿token‿list  tl[static 1])

◆ ellipsis‿token‿list‿pop()

◆ ellipsis‿token‿list‿push()

ELLIPSIS_FA_UNDEPRECATE void ellipsis‿token‿list‿push ( ellipsis‿token‿list  target[static 1],
ellipsis‿token‿list  source[static 1] 
)

start inner defer anchor at level 1

defer needs braces and a semicolon

end inner defer anchor, level 1

start inner defer anchor at level 1

defer needs braces and a semicolon

end inner defer anchor, level 1

Referenced by ellipsis‿directive‿define_process(), ellipsis‿directive‿embed_common(), ellipsis‿directive‿pragma(), ellipsis‿filter(), ellipsis‿tokenize‿thrd(), expand_functional(), and expand_macro().

Here is the caller graph for this function:

◆ ellipsis‿token‿list‿scatter‿_Inner()

ELLIPSIS_FA_UNDEPRECATE size_t ellipsis‿token‿list‿scatter‿_Inner ( size_t  len,
ellipsis‿token‿list  arg[static restrict len],
ellipsis‿token‿list  in[restrict static 1],
bool  var,
bool  call,
ellipsis‿str32 const **  space 
)

start inner defer anchor at level 1

DEFER_TYPE needs a semicolon

defer needs braces and a semicolon

end inner defer anchor, level 1

References ellipsis‿token‿list‿append(), ellipsis‿token‿list‿close(), ellipsis‿token‿list‿flush(), ellipsis‿token‿list‿pop(), ellipsis‿token‿list‿top(), ELLIPSIS_CONTRACT, and ELLIPSIS_WARNING.

Referenced by ellipsis‿token‿list‿scatter‿_Ctra().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ellipsis‿token‿list‿scatter‿_Insta()

size_t ellipsis‿token‿list‿scatter‿_Insta ( size_t  len,
ellipsis‿token‿list  arg[static len],
ellipsis‿token‿list  in[restrict static 1],
bool  var,
bool  call,
ellipsis‿str32 const **  space 
)
inline

start inner defer anchor at level 1

DEFER_TYPE needs a semicolon

end inner defer anchor, level 1

References ellipsis‿token‿list‿scatter‿_Ctra(), and ellipsis‿token‿list‿scatter‿_Insta().

Referenced by ellipsis‿token‿list‿scatter‿_Insta(), and ellipsis‿token‿list‿scatter().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ellipsis‿token‿list‿stringify‿_Inner()

ELLIPSIS_FA_UNDEPRECATE ellipsis‿str32 * ellipsis‿token‿list‿stringify‿_Inner ( ellipsis‿token‿list const  source[static const 1])

◆ ellipsis‿token‿list‿top()

◆ ellipsis‿token‿list‿wait()

ELLIPSIS_FA_UNDEPRECATE void ellipsis‿token‿list‿wait ( ellipsis‿token‿list  tl[static 1])

start inner defer anchor at level 1

defer needs braces and a semicolon

end inner defer anchor, level 1

Referenced by ellipsis‿output‿thrd().

Here is the caller graph for this function:

Variable Documentation

◆ ellipsis‿contracts‿ignore‿dynamic

thread_local bool volatile ellipsis‿contracts‿ignore‿dynamic
extern

◆ ellipsis‿contracts‿proceed‿dynamic

thread_local bool volatile ellipsis‿contracts‿proceed‿dynamic
extern

◆ ellipsis‿contracts‿verbose‿dynamic

thread_local bool volatile ellipsis‿contracts‿verbose‿dynamic
extern