{"id":16164262,"url":"https://github.com/troglobit/libite","last_synced_at":"2025-10-16T13:21:00.754Z","repository":{"id":2498873,"uuid":"37597675","full_name":"troglobit/libite","owner":"troglobit","description":"That missing frog DNA you've been looking for","archived":false,"fork":false,"pushed_at":"2025-04-28T06:34:03.000Z","size":639,"stargazers_count":62,"open_issues_count":0,"forks_count":8,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-06-10T22:11:39.015Z","etag":null,"topics":["frog-dna","generic-functions","helper-macro","isc","mit-license","openbsd-functions","utility-library"],"latest_commit_sha":null,"homepage":"https://codedocs.xyz/troglobit/libite/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/troglobit.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["troglobit"]}},"created_at":"2015-06-17T13:49:27.000Z","updated_at":"2025-04-28T06:34:06.000Z","dependencies_parsed_at":"2024-03-25T05:28:31.232Z","dependency_job_id":"775fa7bf-5a33-4fb0-bcd3-c2accb4403a2","html_url":"https://github.com/troglobit/libite","commit_stats":{"total_commits":516,"total_committers":7,"mean_commits":73.71428571428571,"dds":"0.025193798449612448","last_synced_commit":"eb3bb94cfa85652a311c390cb913e9c7b2256ee4"},"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"purl":"pkg:github/troglobit/libite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troglobit%2Flibite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troglobit%2Flibite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troglobit%2Flibite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troglobit%2Flibite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/troglobit","download_url":"https://codeload.github.com/troglobit/libite/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troglobit%2Flibite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271346700,"owners_count":24743685,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["frog-dna","generic-functions","helper-macro","isc","mit-license","openbsd-functions","utility-library"],"created_at":"2024-10-10T02:45:59.561Z","updated_at":"2025-10-16T13:20:55.721Z","avatar_url":"https://github.com/troglobit.png","language":"C","funding_links":["https://github.com/sponsors/troglobit"],"categories":[],"sub_categories":[],"readme":"-lite | Frog DNA, basically\n===========================\n[![GitHub Status][]][GitHub] [![codedocs status][]][codedocs] [![Coverity Status][]][Coverity Scan]\n\nTable of Contents\n-----------------\n\n* [Introduction](#introduction)\n* [Using -lite](#using--lite)\n* [API](doc/API.md#overview)\n  * [Important Node](doc/API.md#important-note)\n  * [Helper Macros](doc/API.md#helper-macros)\n  * [Generic Functions](doc/API.md#generic-functions)\n  * [GNU Functions](doc/API.md#gnu-functions)\n  * [OpenBSD/NetBSD/FreeBSD Functions](doc/API.md#openbsd-netbsd-freebsd-functions)\n* [Build \u0026 Install](#build--install)\n* [Origin \u0026 References](#origin--references)\n\n\n\u003e **NOTE:** Incompatible changes in v2.0 compared to v1.x!\n\nIntroduction\n------------\n\nLibite is a lightweight library of *frog DNA* that can be used to fill\nthe gaps in any dinosaur project.  It holds useful functions and macros\ndeveloped by both [Finit][1] and the [OpenBSD][2] project.  Most notably\nthe string functions: [strlcpy(3)][3], [strlcat(3)][3] and the highly\nuseful *BSD [sys/queue.h][4] and [sys/tree.h][7] API's.\n\nLibite holds many of the missing pieces in GNU libc, although -lite does\nnot aim to become another [GLIB][5].  One noticeable gap in GLIBC is the\n`_SAFE` macros available in the BSD `sys/queue.h` API \u0026mdash; highly\nrecommended when traversing lists to delete/free nodes.\n\nThe code is open sourced under a mix of permissive Open Source licenses:\n[MIT/X11 license][MIT], [ISC license][ISC], and [BSD licenses][BSD].\n\n\u003e **Tip:** have a look at my blog post about other useful UNIX API's!\n\u003e          https://troglobit.com/post/2020-02-22-useful-unix-apis/\n\n\nUsing -lite\n-----------\n\nLibite is by default installed as a library and a set of include files.\nTo prevent clashing with include files of the same name `-lite` employs\nan include file namespace `libite/`, which is strongly recommended to\nuse in your applications:\n\n```C\n#include \u003clibite/lite.h\u003e\n#include \u003clibite/conio.h\u003e\n#include \u003clibite/queue.h\u003e\n#include \u003clibite/tree.h\u003e\n```\n\n\u003e **Note:** prior to v2.5.0, the `lite/` namespace was used for headers,\n\u003e which is still available in the default install.  This clashed with\n\u003e the headers of the LiTE library from the DirectFB project.\n\nThe output from the `pkg-config` tool holds no surprises:\n\n```bash\n$ pkg-config --libs --static --cflags libite\n-I/usr/local/include -D_LIBITE_LITE -L/usr/local/lib -lite\n```\n\n\u003e **Note:** `_LIBITE_LITE` is defined since v2.5.0, useful for software\n\u003e that want to be able to build against headers from an older libite:\n\u003e\n\u003e ```C\n\u003e #ifdef _LIBITE_LITE\n\u003e # include \u003clibite/lite.h\u003e\n\u003e #else\n\u003e # include \u003clite/lite.h\u003e\n\u003e #endif\n\u003e ```\n\nThe prefix path `/usr/local/` shown here is only the default.  Use the\n`configure` script to select a different prefix when installing libite.\n\nFor GNU autotools based projects, use the following in `configure.ac`:\n\n```m4\n# Check for required libraries\nPKG_CHECK_MODULES([lite], [libite \u003e= 1.5.0])\n```\n\nand in your `Makefile.am`:\n\n```Makefile\nproggy_CFLAGS = $(lite_CFLAGS)\nproggy_LDADD  = $(lite_LIBS)\n```\n\n\u003e API Documentaion: https://codedocs.xyz/troglobit/libite/\n\n\nBuild \u0026 Install\n---------------\n\nThis library was initially built for and developed on GNU/Linux systems\nas a light weight utility library, these days NetBSD should also work.\n\n```bash\n$ ./configure\n$ make -j5\n$ sudo make install-strip\n$ sudo ldconfig\n```\n\nUse \u003ckbd\u003e./configure --without-symlink\u003c/kbd\u003e to prevent the install step\nfrom creating the `lite -\u003e libite/` compatibility symlink for the header\nfiles, required for systems with DirectFB LiTE.  The default, however,\nis to install the symlink to ensure compatibility with existing software\nthat depends on the `-lite` library headers in their previous namespace.\n\n**Note:** When checking out code from GIT, use \u003ckbd\u003e./autogen.sh\u003c/kbd\u003e\nto generate a `configure` script.  It is a generated file and otherwise\nonly included in released tarballs.\n\n\nOrigin \u0026 References\n-------------------\n\nMuch of the code in libite (-lite) is written by [Claudio Matsuoka][]\nfor the original [Finit][original finit] and released under the MIT/X11\nlicense.  Joachim Wiberg later improved on the [Finit][1] code base and\nincluded pieces of software released under the ISC and BSD licenses.\nSee each respective file for license details.\n\n[1]:                https://github.com/troglobit/finit\n[2]:                http://www.openbsd.org/\n[3]:                http://www.openbsd.org/cgi-bin/man.cgi?query=strlcpy\n[4]:                http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man3/LIST_EMPTY.3\n[5]:                https://developer.gnome.org/glib/\n[7]:                http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man3/SPLAY_FOREACH.3\n[MIT]:              https://en.wikipedia.org/wiki/MIT_License\n[ISC]:              https://en.wikipedia.org/wiki/ISC_license\n[BSD]:              https://en.wikipedia.org/wiki/BSD_licenses\n[GitHub]:           https://github.com/troglobit/libite/actions/workflows/build.yml/\n[GitHub Status]:    https://github.com/troglobit/libite/actions/workflows/build.yml/badge.svg\n[Coverity Scan]:    https://scan.coverity.com/projects/20602\n[Coverity Status]:  https://img.shields.io/coverity/scan/20602.svg\n[codedocs]:         https://codedocs.xyz/troglobit/libite.log\n[codedocs status]:  https://codedocs.xyz/troglobit/libite.svg\n[Claudio Matsuoka]: https://github.com/cmatsuoka\n[original finit]:   http://helllabs.org/finit/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftroglobit%2Flibite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftroglobit%2Flibite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftroglobit%2Flibite/lists"}