{"id":23239427,"url":"https://github.com/r32/clib","last_synced_at":"2026-03-17T09:32:08.118Z","repository":{"id":78669544,"uuid":"309402246","full_name":"R32/clib","owner":"R32","description":"my clib","archived":false,"fork":false,"pushed_at":"2025-10-28T16:26:10.000Z","size":284,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-28T18:26:44.289Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/R32.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-11-02T14:53:09.000Z","updated_at":"2025-06-02T06:22:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"62b52277-b2a8-471f-941d-f838e156ab4b","html_url":"https://github.com/R32/clib","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/R32/clib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/R32%2Fclib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/R32%2Fclib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/R32%2Fclib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/R32%2Fclib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/R32","download_url":"https://codeload.github.com/R32/clib/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/R32%2Fclib/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30620672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T08:10:05.930Z","status":"ssl_error","status_checked_at":"2026-03-17T08:10:04.972Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-12-19T04:28:09.080Z","updated_at":"2026-03-17T09:32:08.102Z","avatar_url":"https://github.com/R32.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"my c language trashbox\r\n--------\r\n\r\n- [`tinyalloc`](src/tinyalloc.c) : Releases all requested memory at once instead of releasing each object separately.\r\n\r\n  * tinyalloc : The requested memory block can be freed individually.\r\n  * bumpalloc : The requested memory block cannot be freed individually, you can only call `bumpreset/bumpdestroy` to free all blocks at once\r\n  * fixedalloc :\r\n\r\n- [`strbuf`](src/strbuf.c): Auto-growing string buffer\r\n\r\n  * [`wcsbuf`](src/wcsbuf.c) : The wchar_t version of strbuf\r\n\r\n- [`pmap`](src/pmap.c) : PMap in C language, This code is ported from OCaml ExtLib PMap [sample](test/pmap_test.c)\r\n\r\n- ~~[`rarray`](src/rarray.c) : Auto-growing arrays(by `realloc`)~~ It's horrible\r\n\r\n  \u003cdetails\u003e\u003csummary\u003ehiden\u003c/summary\u003e\r\n  ```c\r\n  // rarray_fast_set, rarray_fast_get\r\n  struct point {\r\n      int x, y, z;\r\n  };\r\n  struct rarray array = { .size = sizeof(struct point), .base = NULL };\r\n  int len = 16;\r\n  // you could also call `rarray_grow()` to increase \"capacity\" only\r\n  rarray_setlen(\u0026array, len);\r\n  struct point *ptr = rarray_fast_get(\u0026array, struct point, 0);\r\n  for (int i = 0; i \u003c len; i++) {\r\n      *ptr++ = (struct point){ i, i, i };\r\n  }\r\n  for (int i = 0; i \u003c len; i++) {\r\n      struct point *ptr = rarray_fast_get(\u0026array, struct point, i);\r\n      assert(ptr-\u003ex == i \u0026\u0026 ptr-\u003ey == i \u0026\u0026 ptr-\u003ez == i);\r\n  }\r\n  rarray_discard(\u0026array);\r\n  ```\r\n  \u003c/details\u003e\r\n\r\n- ~~`slist.h`: Singly Linked List.~~ Deprecated\r\n\r\n- `ucs2`: wcs_to_utf8, utf8_to_wcs\r\n\r\n- [`rjson`](src/rjson.c) :\r\n\r\n- `circ_buf.h`: Copied from [linux/circ_buf.h](https://github.com/torvalds/linux/blob/master/include/linux/circ_buf.h)\r\n\r\n- `list.h`: Doubly Linked List. Copied from [linux/tools/list.h](https://github.com/torvalds/linux/blob/master/tools/include/linux/list.h)\r\n\r\n- `rbtree`: Copied from [linux/tools/rbtree.h](https://github.com/torvalds/linux/blob/master/tools/include/linux/rbtree.h)\r\n\r\n## external links\r\n\r\n- [lexer and Simple LR tool](https://github.com/r32/lex)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr32%2Fclib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fr32%2Fclib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr32%2Fclib/lists"}