Read me not...
This commit is contained in:
parent
999e5907ad
commit
803584021d
68
README.md
68
README.md
@ -2,10 +2,9 @@
|
||||
|
||||
xtandard -- Xolatile-style "header-only" library for commonly used functions.
|
||||
|
||||
- Purpose of this library is to replace < stdio, stdlib, unistd, fcntl, ctype, string... .h >. (:
|
||||
- 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.
|
||||
- Of course, it uses some global variables, be careful with naming your variables, and avoid C-style "namespaces", they're bad.
|
||||
- Everything related to my libraries is clean of all warning options on Clang, GCC and Valgrind.
|
||||
- I'm not scared of using global variables, but there's not many of them, also rare "C-style" namespaces.
|
||||
|
||||
Compile:
|
||||
```bash
|
||||
@ -17,7 +16,64 @@ Install:
|
||||
$ sudo sh install.sh
|
||||
```
|
||||
|
||||
Xolatile-style "header-only" library is my take on 'stb' header-only libraries. There are a lot of ideas that came from Ada, which is my second language.
|
||||
Main idea behind them is to avoid standard library and macros in programs. Also, I like to avoid C-style "namespaces" and bad function names...
|
||||
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.
|
||||
|
||||
This is the core library behind my other libraries such as xector, xatrix, xyntax, xurses, xender, xame...
|
||||
```c
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user