Xtandard stuff...
Go to file
2024-06-16 05:38:02 -04:00
.gitignore Ignore... 2024-02-15 13:56:13 -05:00
compile.sh Created compilation script and updated some stuff... 2023-10-07 08:58:42 -04:00
install.sh Created compilation script and updated some stuff... 2023-10-07 08:58:42 -04:00
LICENSE Doing stuff... 2023-08-25 16:57:12 -04:00
README.md Read me not... 2024-02-23 14:52:02 -05:00
xtandard.c Added printing procedure... 2024-06-16 05:38:02 -04:00
xtandard.h Added printing procedure... 2024-06-16 05:38:02 -04:00

xtandard

xtandard -- Xolatile-style "header-only" library for commonly used functions.

  • This library was written mainly for my own projects, but you can repurpose it for your own needs...
  • Intended usage is writing simple programs, which can fit it one source file, often only in 'main' function.
  • I'm not scared of using global variables, but there's not many of them, also rare "C-style" namespaces.

Compile:

$ sh compile.sh

Install:

$ sudo sh install.sh

If you want to make a project that's separated in more files, you can link with '.o' or include '.c' instead of '.h' in main file. If your project consists of only 1 file, which is the intent behind this library, just include '.c' and that's it. I'm a lazy person, and I do what every lazy person does, for good reference look at Raylib, which is quite decent library.

void in  (void * data, int size);
void out (void * data, int size);

void log_in  (int type, int flag, char * data);
void log_out (char * name);

void echo (char * data);
void dump (char * name, char * data);

void echo_byte (int byte);

void fatal_failure (int condition, char * message);

void limit (int * value, int minimum, int maximum);

void * allocate   (int size);
void * reallocate (void * data, int size);
void * deallocate (void * data);

void * record (void);

int    file_open (char * name, int mode);
...
void   file_export (char * name, void * data);

void file_list_import (char * name);
...
void file_list_delete (void);

int character_is_uppercase (char character);
...
int character_is_hexadecimal (char character);

int character_compare_array (char character, char * character_array);

int character_count (char * string, char this, int from, int to, char stop);

int string_length (char * string);
...
char * string_realign (char * string, int amount, char character);

void memory_delete (void * memory, int length);

int  memory_compare (void * memory, void * source, int length);
void memory_copy    (void * memory, void * source, int length);

void terminal_clear       (void);
void terminal_colour      (int colour, int effect);
void terminal_cancel      (void);
void terminal_show_cursor (int show);

int    encode_byte (char * byte);
char * decode_byte (int    byte);

There's more, but reading the actual source code is better than opening this in your internet browser.