eĿlipsis
a language independent preprocessor
 
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Loading...
Searching...
No Matches
ellipsis-infra.c File Reference
#include <stdio.h>
#include "ellipsis-infra.h"
#include "utils/ellipsis-error.h"
#include "token/ellipsis-tdict.h"
#include <stdlib.h>
#include <threads.h>
#include "language/ellipsis-special.h"
#include <stdint.h>
Include dependency graph for ellipsis-infra.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_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

static void ellipsis‿infra‿_Once‿atexit‿callback (void)
 
static void ellipsis‿infra‿_Once‿init‿callback (void)
 
static void ellipsis‿infra‿_Once‿init‿user (void)
 
void ellipsis‿infra‿_Once‿init (void)
 
ellipsis‿str8 const * ellipsis‿infra‿data (ellipsis‿str32 n32[static 1])
 
char const * ellipsis‿infra‿dir (void)
 
void ellipsis‿infra‿down (void)
 
char const * ellipsis‿infra‿file (size_t pos)
 
size_t ellipsis‿infra‿fileno (void)
 
size_t ellipsis‿infra‿find (ellipsis‿str32 n32[static 1], ellipsis‿str8 const *data)
 
size_t ellipsis‿infra‿line (void)
 
void ellipsis‿infra‿newline (void)
 
size_t ellipsis‿infra‿subscribe (char const n[static 1], ellipsis‿str8 const *data)
 
size_t ellipsis‿infra‿up (char const n[static 1], char const *dir)
 

Variables

static ellipsis‿carraydirs
 
thread_local bool volatile ellipsis‿contracts‿ignore‿dynamic
 
thread_local bool volatile ellipsis‿contracts‿proceed‿dynamic
 
thread_local bool volatile ellipsis‿contracts‿verbose‿dynamic
 
static void(*const ellipsis‿infra‿_Once‿atexit‿pointer )(void) = ellipsis‿infra‿_Once‿atexit‿callback
 
bool const ellipsis‿infra‿_Once‿strong = true
 
ellipsis‿carrayellipsis‿infra‿dependencies
 
_Thread_local size_t ellipsis‿infra‿filter_file = 0
 
_Thread_local size_t ellipsis‿infra‿filter_line = 0
 
_Thread_local size_t ellipsis‿infra‿filter_lineno = 0
 
static ellipsis‿token‿dictionary filenames
 
static ellipsis‿sarrayfiles
 
static ellipsis‿sarraylines
 
static ellipsis‿carraynames
 

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 ELLIPSIS_TEST_ICE(...)
Definition ellipsis-infra.c:51
#define ELLIPSIS_CONTRACT_CHECK_STATIC(CTYPE, COND, CSTR,...)
Definition ellipsis-infra.c:59
#define ELLIPSIS_CONTRACT_IMPL(COUNT, COND, ACTION, VERB, CSTR, CTYPE,...)
Definition ellipsis-infra.c:41
#define __VA_OPT__
A pseudo macro that cannot be redefined.
Definition ellipsis-predefined.dirs:89

◆ 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-infra.c:53

◆ 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-infra.c:32

◆ 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-infra.c:29

◆ 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‿infra‿_Once‿atexit‿callback()

◆ ellipsis‿infra‿_Once‿init‿callback()

static void ellipsis‿infra‿_Once‿init‿callback ( void  )
static

References __FILE__, ellipsis‿infra‿_Once‿atexit‿pointer, ellipsis‿infra‿_Once‿init‿user(), and GNU_ATTR_USED.

Referenced by ellipsis‿infra‿_Once‿init().

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

◆ ellipsis‿infra‿_Once‿init‿user()

static void ellipsis‿infra‿_Once‿init‿user ( void  )
static

◆ ellipsis‿infra‿_Once‿init()

◆ ellipsis‿infra‿data()

ellipsis‿str8 const * ellipsis‿infra‿data ( ellipsis‿str32  n32[static 1])

◆ ellipsis‿infra‿dir()

char const * ellipsis‿infra‿dir ( void  )

References __FILE__, ellipsis‿carray::array, dirs, ellipsis‿infra‿_Once‿init(), ellipsis‿infra‿_Once‿strong, GNU_ATTR_USED, and ellipsis‿carray::length.

Referenced by ellipsis‿include‿fopen().

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

◆ ellipsis‿infra‿down()

◆ ellipsis‿infra‿file()

char const * ellipsis‿infra‿file ( size_t  pos)

◆ ellipsis‿infra‿fileno()

size_t ellipsis‿infra‿fileno ( void  )

◆ ellipsis‿infra‿find()

size_t ellipsis‿infra‿find ( ellipsis‿str32  n32[static 1],
ellipsis‿str8 const *  data 
)

◆ ellipsis‿infra‿line()

size_t ellipsis‿infra‿line ( void  )

References __FILE__, ellipsis‿sarray::array, ellipsis‿infra‿_Once‿init(), ellipsis‿infra‿_Once‿strong, GNU_ATTR_USED, ellipsis‿sarray::length, and lines.

Referenced by ellipsis‿tokenize().

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

◆ ellipsis‿infra‿newline()

void ellipsis‿infra‿newline ( void  )

◆ ellipsis‿infra‿subscribe()

size_t ellipsis‿infra‿subscribe ( char const  n[static 1],
ellipsis‿str8 const *  data 
)

References ellipsis‿infra‿find(), ellipsis‿str32‿construct(), and ellipsis‿str32‿delete().

Referenced by ellipsis‿infra‿up().

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

◆ ellipsis‿infra‿up()

size_t ellipsis‿infra‿up ( char const  n[static 1],
char const *  dir 
)

References __FILE__, dirs, ellipsis‿infra‿_Once‿init(), ellipsis‿infra‿_Once‿strong, ellipsis‿infra‿subscribe(), files, GNU_ATTR_USED, and lines.

Referenced by ellipsis‿include‿fopen(), and main().

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

Variable Documentation

◆ dirs

◆ 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

◆ ellipsis‿infra‿_Once‿atexit‿pointer

static void(*) const ellipsis‿infra‿_Once‿atexit‿pointer(void) ( void  ) = ellipsis‿infra‿_Once‿atexit‿callback
static

◆ ellipsis‿infra‿_Once‿strong

◆ ellipsis‿infra‿dependencies

◆ ellipsis‿infra‿filter_file

◆ ellipsis‿infra‿filter_line

◆ ellipsis‿infra‿filter_lineno

_Thread_local size_t ellipsis‿infra‿filter_lineno = 0

◆ filenames

◆ files

◆ lines

◆ names