{"id":21206622,"url":"https://github.com/oncomouse/ratpoison","last_synced_at":"2025-03-14T23:14:11.738Z","repository":{"id":149628427,"uuid":"496737938","full_name":"oncomouse/ratpoison","owner":"oncomouse","description":null,"archived":false,"fork":false,"pushed_at":"2022-05-27T13:18:20.000Z","size":1505,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-21T15:48:38.732Z","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/oncomouse.png","metadata":{"files":{"readme":"README.developers","changelog":"ChangeLog","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-26T18:53:25.000Z","updated_at":"2022-05-26T19:00:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"17707e38-1e44-4c1e-9ca2-0f3ee76853a6","html_url":"https://github.com/oncomouse/ratpoison","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oncomouse%2Fratpoison","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oncomouse%2Fratpoison/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oncomouse%2Fratpoison/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oncomouse%2Fratpoison/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oncomouse","download_url":"https://codeload.github.com/oncomouse/ratpoison/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243658270,"owners_count":20326467,"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","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-11-20T20:56:15.058Z","updated_at":"2025-03-14T23:14:11.725Z","avatar_url":"https://github.com/oncomouse.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"-*- outline -*-\n\nThis file is intented to give people who would like to modify\nratpoison an idea the utility functions I've built up in ratpoison and\nthe structure of the code.\n\n* Utility Functions\n\n** String Manipulation\n\nString manipulation is something C is seriously lacking, and something\neveryone does all the time. When writing ratpoison code, you SHOULD\nNOT be malloc'ing temporary string buffers then using strcat, strcpy,\netc to patch strings together. The following structures and functions\nshould give you just about everything you need.\n\nIf there's something you want to do but can't with the following\nutils, then you should consider adding that functionality (Don't just\nhack it!) to them. Chances are, someone else will want to do it too.\n\n*** struct sbuf\nWhen you need to build a string by concating a bunch together or some\nmessy frankensteinish string manipulation sbuf is nice to use. It\nhandles all the memory allocation and you just say what you want to do\nwith the sbuf_* commands. See sbuf.h.\n\n*** char *xstrdup(char *)\nIf you need to copy a string, use this.\n\n*** char *xsprintf (char *fmt, ...)  If you need to printf something\ninto a string, don't go xmalloc'ing strlen(s)+20. Use xsprintf, it\nreturns a new string, which you need to free when you're\ndone. Guaranteed.\n\n*** char *xvsprintf (char *fmt, va_list ap)\nThis is just like xsprintf except it takes a va_list argument.\n\n*** str_comp (char *s1, char *s2, int len)\nJust like strncmp, except that it's case-insensitive.\n\n** Memory\n\n*** xmalloc and xrealloc\nThese functions are exactly like malloc and realloc, but they will\nNEVER return NULL.\n\n** Lists\nRatpoison has taken a double-linked list implementation from the Linux\nkernel. Look at linkedlist.h. For an example of how to use it...read\nthe source!\n\n* Coding Style\n\nRatpoison follows the GNU coding style as described in the GNU Coding\nStandards Document (http://www.gnu.org/prep/standards.html). If you\nsee something not compliant with the GNU Standard, please fix it and\nsend a patch.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foncomouse%2Fratpoison","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foncomouse%2Fratpoison","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foncomouse%2Fratpoison/lists"}