Releases: zakarouf/z_
Releases · zakarouf/z_
z_ 1.100.0
Added
types
- str :: z__String_cmp(s1, s2) : Compare two strings, preforms same as strcmp but for z_ string types.
- str :: z__String_pushChar(str, ch) : Push a character top of string
str
- str :: z__AutoFree(f) : Set an pointer to be freed one it has left the scope automatically
- str :: z__StringList_replace() : Replace a string in a string list
- T :: z__Bytes: New Type for handling byte stream
- str :: z__String_replace: Replace a string with a new formated input
- str :: z__String_append: Append a formated text to a string.
- str :: String Parsing Functions
- str :: z__String_expand(s, n) : Expand
s
string byn
bytes. - str :: z__String() : Python String Constructor (works only with primitive types)
- str :: z__String_tok() : Like strtok but does not changes the state of the string, is faster, works with string index rather than pointers.
- T :: z__Str : C string wraper, only holds data and size.
- dynt :: z__Dynt_isdataequal() : Takes two dynt objects and returns true if there data is equal, otherwise false
- bytes :: z__Bytes_isdataequal() : Takes in two byte stream objects and returns true is their data is equal, otherwise false.
- T :: z__HashInt(T) : Type Generic Hash sets with integer keys
- mem :: z__mem_copy_left : Copies the specified region of an array towards specifed steps to the left
- mem :: z__mem_copy_right : Copies the specified region of an array towards specifed steps to the right
- mem :: z__mem_move_left : Moves the specified region of an array towards specifed steps to the left, sets the old unused region as 0
- mem :: z__mem_move_right : Moves the specified region of an array towards specifed steps to the right, sets the old unused region as 0
- str :: z__String_replace_seg : Replace a specified region/segment of a string from a printf like formated text
- arr :: z__Arr_cmp : same as memcmp but for
z__Arr
Types - T :: obj.h : Object Functions as vtables constructions and Closures
prep
- util :: zpp__macIdent(name): For creating non overlaping indentifier inside macros
- nm :: zpp__do_construct((method1...), (method2...)) : For creating Scope Constructor and de-constructor
- pure :: loop.h; zpp__ALoop(t, f, x...): Apply each
x
asf(x)
recursivelyt
times - pure :: args.h; zpp__Args_Expandif((p), (s), ...): only expands with prefix and suffix around the vardic argument if it exists, use will be same as doing ##VA_ARGS
- pure :: args.h; zpp__Args_applyfxy(f, x, ...) : Apply
f(x, y)
wherex
is a constant,y
is each of vardic argument
imp
- new :: termio.h : A terminal interface implementation
- new :: sub.h : Sub Routine, create new processes
- sub :: z__sub_fork : Create a new child process using fork
- sub :: z__sub_spawn : Create a new child process using posix_spawn
- sub :: z__sub_exec : Execute a binary as a child process
- sub :: z__sub_exec_nowait : Execute a binary as child process, but dont wait for it to be finished, it is killed regardless if the parent exits.
- time :: z__time_getLocalTime_str : Get the current time as a formated string object, string provided must of 28 length.
- new :: test.h : Small Unit testing Implementation
- new :: type.h : Type Interface Implementation
- new :: tgprint.h : Replacement of older generic Print
- new :: print.h : print function
Changed
types
- tree :: changed data member name from
val
todata
- str :: String type structure
- arr :: z__Arr_foreach update, takes in only the looping variable name, can now also works as reverse foreach loop
- offsetof :: Uses built in offsetof if avaliable
- hashhoyt :: mem leak issue because of multiple strdup calls.
imp
- fio :: fixed z__Arr_ptr_dump to accept pointer as it should
Removed
imp
- print.h : Old Type generic print for tgprint.h
Full Changelog: 1.75.0...1.100.0
❤️ by zak
z_ 1.75.0
Added
- Arr: z__Arr_newSlice => Creates a new Array slice
- Arr: z__Arr_copy => copy an array to an existing array.
- Types: typegen.h => Evaluating type info and doing stuff accordingly at compile time, (Very Primitive Generic)
- imp: strto.h => String to type
- imp: z__String_to => same as z__strto but for
z__String
- prep: zpp__UNPAREN(x) => makes x = (v) into v.
- types: z__Tree: for hierarchical data structures.
- types: arr: z__Arr_pop_getval(arr, v) => Pops an array and returns the popped value.
- types: fnptr: z__fnptr_call(fptr, defrval, ...) => Calls a function pointer, if
fptr
is null, It returns outdefrval
. - types: str: z__String_newFrom(const char *, ...) => Creates a new formated string, similar to
printf
.
Changed
- Fixed: Nested Macro types acting wierd for
z__Record
andz__RecordX
- Reword:
z_/imp/argparse.h
, Made more sane to handle. - prep: zpp__NUM_IS_EQUAL => Now supports macro expanstion
- Fixed: Enum macro codegen
- types: z__Vector: z__Vector can now create vector of pointer types too.
- imp: sys: z__panic() will print out to stderr instead of stdout.
- types: str: z__String_newfrom to z__String_newFromStr
Removed
- types/imp: z__Dynt_newFromFile | z__fio_Dynt_newFromFile already exists.
- Various Code cleanups
Full Changelog: 1.63.0...1.75.0
z_ 1.63
z_ 1.61.4
- Reformed Type system.
- Minor bug changes.
Full Changelog: 1.56.0...1.61.4
z_ 1.56.0
Added
- Result Type
- Option Typle
- Enum: Slot and IfSlot supports Tuples & Record structure reffernce.
Fixed
- String Bugfixes
- Enum: Tuple Pattern match refferncing.
- Minor Bug Fixed
Changed
- z__EnumType => z__EnumDef
- Every 'Type' suffix on a type name will reffer to a an hidden/private name being used.