libreis  0.1.0
A simple header-based drop-in library
Macros | Typedefs | Functions | Variables
base.h File Reference

Shared types and functions, accounts for GNU Linux and MacOS specifications. More...

#include <stdlib.h>
#include <unistd.h>
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include <dirent.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/types.h>
#include <sys/prctl.h>
#include <signal.h>
#include <syslog.h>
#include <time.h>
#include <fcntl.h>
#include <stdatomic.h>
#include <reis/memory.h>

Go to the source code of this file.

Macros

#define VERISION   "0.1.0"
 
#define REISLIB_INT_MAX   2147483647
 
#define CHARSET   "abcdefghijklmnopqrstuvwxyz"
 
#define CHARSET_LEN   26
 
#define MAX_CHARSET_SIZE   256
 
#define SUB   0x1A
 
#define fnname(name)   #name
 
#define T   , ...) rsNew##T(__VA_ARGS__)
 
#define _(T, S)   rsFree##T(S)
 
#define foreach(item, arr)
 

Typedefs

typedef uint8_t u8
 
typedef uint16_t u16
 
typedef uint32_t u32
 
typedef uint64_t u64
 
typedef int8_t s8
 
typedef int16_t s16
 
typedef int32_t s32
 
typedef int64_t s64
 
typedef float f32
 
typedef double f64
 
typedef long double f128
 

Functions

enum __attribute__ ((__packed__))
 

Variables

 bool
 

Detailed Description

Shared types and functions, accounts for GNU Linux and MacOS specifications.

Author
yung-turabian
Date
4 8 2024

Macro Definition Documentation

◆ foreach

#define foreach (   item,
  arr 
)
Value:
for ( size_t keep = 1, \
count = 0, \
size = sizeof(arr) / sizeof(*(arr)); \
keep && count != size; \
keep = !keep, count++) \
for (item = (arr)[count]; keep; keep = !keep)