{"id":20987175,"url":"https://github.com/haxpor/vector_c","last_synced_at":"2025-09-06T19:39:04.416Z","repository":{"id":149553128,"uuid":"156421840","full_name":"haxpor/vector_c","owner":"haxpor","description":"Generic vector array implemented in C.","archived":false,"fork":false,"pushed_at":"2021-11-08T22:40:56.000Z","size":48,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T10:40:54.112Z","etag":null,"topics":["c","vector"],"latest_commit_sha":null,"homepage":"","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/haxpor.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}},"created_at":"2018-11-06T17:31:19.000Z","updated_at":"2022-04-25T13:38:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"23a14bb2-6eae-414d-a931-804b066b63a0","html_url":"https://github.com/haxpor/vector_c","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/haxpor/vector_c","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haxpor%2Fvector_c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haxpor%2Fvector_c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haxpor%2Fvector_c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haxpor%2Fvector_c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haxpor","download_url":"https://codeload.github.com/haxpor/vector_c/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haxpor%2Fvector_c/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273954924,"owners_count":25197575,"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-09-06T02:00:13.247Z","response_time":2576,"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":["c","vector"],"created_at":"2024-11-19T06:16:13.437Z","updated_at":"2025-09-06T19:39:04.393Z","avatar_url":"https://github.com/haxpor.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vector_c\n\n`std::vector` in C++ implemented simply and minimally in C.  \nThe repository contains general purpose one `vector` which you need to cast to specific struct and supply creation function with size of struct.\n\nIt allocate more memory space to reduce calling to expensive call to `realloc()`. It uses 1.5 as factor of increasing elements the same as in `std::vector`.\n\n# Build \u0026 Run\n\nIt's based on autotools. Execute the following\n\n* `./autogen.sh`\n* `./configure`\n* `make`\n* (optional) `make check`\n* `make install` - will install both static, shared library included header files to your system\n\n# Installation\n\n## Debian/Ubuntu\n\n* `sudo add-apt-repository ppa:haxpor/combined`\n* `sudo apt install vector_c`\n\n## NDK-BUILD support for Android\n\nThis project has support for building this library for Android.\n\nIt has `Android.mk` file at the root directory of this project.\nYou can use the following commands\n\n```\nndk-build NDK_PROJECT_PATH=null NDK_OUT=build/objs NDK_LIBS_OUT=build/libs APP_BUILD_SCRIPT=Android.mk APP_PLATFORM=android-18 APP_MODULES=\"vector vector_static\" NDK_DEBUG=1\n```\n\nThat will generate obj and library (shared and static one) files at `build/objs` and `build/libs` (static library is at `build/objs/local` for minimum sdk support of api level 18 with debugging symbols also generated. `APP_MODULES` tells to build for both shared and static library.\n\n# Note\n\nUse `vector.h` and `vector.c` to integrate with your main source code.  \nSee example code at `vector_test.c`.\n\nThis one will do deep copy for input data, so it won't be mess or broken when you change input data from outside, it's separate.\nIt also accepts custom memory freeing function if your element needs a proper memory care. Just set its `free_element` function pointer to your function imeplementation via `free_element(void* element)` signature.\n\nWhen using `vector_clear()` it will shrink down allocated memory to `estimatedLen` which is sent to `vector_new()` at first time, and will expand again if needed.\n\n# License\n\n[MIT](https://github.com/haxpor/vector_c/blob/master/LICENSE), Wasin Thonkaew\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaxpor%2Fvector_c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaxpor%2Fvector_c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaxpor%2Fvector_c/lists"}