{"id":19483548,"url":"https://github.com/librity/ft_kilo","last_synced_at":"2026-06-19T05:31:38.294Z","repository":{"id":99703043,"uuid":"311828836","full_name":"librity/ft_kilo","owner":"librity","description":"CLI text editor written in C, following 42's Norminette","archived":false,"fork":false,"pushed_at":"2022-08-06T19:21:12.000Z","size":324,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-25T17:46:14.640Z","etag":null,"topics":["42","42born2code","42saopaulo","42school","c","ft-kilo","norminette","text-editor"],"latest_commit_sha":null,"homepage":"https://www.42sp.org.br/","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/librity.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":"2020-11-11T01:24:12.000Z","updated_at":"2024-04-27T13:08:55.000Z","dependencies_parsed_at":"2023-04-01T09:35:25.033Z","dependency_job_id":null,"html_url":"https://github.com/librity/ft_kilo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/librity/ft_kilo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librity%2Fft_kilo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librity%2Fft_kilo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librity%2Fft_kilo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librity%2Fft_kilo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/librity","download_url":"https://codeload.github.com/librity/ft_kilo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librity%2Fft_kilo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34519048,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"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":["42","42born2code","42saopaulo","42school","c","ft-kilo","norminette","text-editor"],"created_at":"2024-11-10T20:15:31.239Z","updated_at":"2026-06-19T05:31:38.266Z","avatar_url":"https://github.com/librity.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch3 align=\"center\"\u003eThe 42-compliant Kilo Text editor\u003c/h3\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n![42 São Paulo](https://img.shields.io/badge/42-SP-1E2952)\n![License](https://img.shields.io/github/license/librity/ft_kilo?color=yellow)\n![Code size in bytes](https://img.shields.io/github/languages/code-size/librity/ft_kilo?color=blue)\n![Lines of code](https://img.shields.io/tokei/lines/github/librity/ft_kilo?color=blueviolet)\n![Top language](https://img.shields.io/github/languages/top/librity/ft_kilo?color=ff69b4)\n![Last commit](https://img.shields.io/github/last-commit/librity/ft_kilo?color=orange)\n\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e A simple terminal text editor compliant with 42's standards.\n  \u003cbr\u003e\n\u003c/p\u003e\n\n---\n\n## 📜 Table of Contents\n\n- [About](#about)\n- [Notes](#notes)\n- [42 São Paulo](#ft_sp)\n- [Resources](#resources)\n\n## 🧐 About \u003ca name = \"about\"\u003e\u003c/a\u003e\n\n\u003e “Programs do one thing, do it well, and act on files.”\n\u003e [Some bearded nerd in the 70's](https://en.wikipedia.org/wiki/Ken_Thompson)\n\nCLI text editor written in C, following 42's Norminette. Inspired by:\n\n- https://github.com/antirez/kilo/blob/master/kilo.c\n- https://viewsourcecode.org/snaptoken/kilo/\n\n## 📝 Notes \u003ca name = \"notes\"\u003e\u003c/a\u003e\n\n### Compile and Run\n\nUsing `make`:\n\n```bash\n$ make \u0026\u0026 ./kilo\n$ make clean\n```\n\n### [Norminnette](https://github.com/42Paris/norminette)\n\n1. Install\n\n```bash\n$ git clone https://github.com/42Paris/norminette.git ~/.norminette/\n$ cd ~/.norminette/\n$ bundle\n\n$ echo 'alias norminette=\"~/.norminette/norminette.rb\"' \u003e\u003e ~/.bash_profile\n$ source ~/.bash_profile\n```\n\n2. Run\n\n```bash\n$ norminette *.c **/*.c **/*.h\n```\n\n#### Quirks\n\n```c\n/*\n** This is a proper norminette comment\n*/\n\nint\t\tmain(void)\n{\n\tint\t\tvariable_one;\n\tchar\tvariable_two;\n\n\tvariable_one = 42;\n\treturn (0);\n}\n```\n\n### Makefile\n\n- `$(CC)` is a variable that make expands to cc by default.\n- `-Wall` stands for “all Warnings”, and gets the compiler to warn you when it\n  sees code in your program that might not technically be wrong, but is considered\n  bad or questionable usage of the C language, like using variables before\n  initializing them.\n- `-Wextra`, `-Werror` and `-pedantic` turn on even more warnings. For each step\n  in this tutorial, if your program compiles, it shouldn’t produce any warnings\n  except for “unused variable” warnings in some cases. If you get any other\n  warnings, check to make sure your code exactly matches the code in that step.\n- `-std=c99` specifies the exact version of the C language standard we’re using,\n  which is C99. C99 allows us to declare variables anywhere within a function,\n  whereas ANSI C requires all variables to be declared at the top of a function or\n  block.\n\n### [termios.h](https://man7.org/linux/man-pages/man0/termios.h.0p.html)\n\nContains the definitions used by the terminal I/O interfaces.\n\n- `IXON`: input bitflag that enables `XOFF` and `XON` signal, `Ctrl-S` and\n  `Ctrl-Q` respectively.\n- `ICRNL`: input bitflag that enables the terminal to interpret a carriage\n  return as a new line.\n- `BRKINT`: input bitflag sends a `SIGINT` signal to the program whenever it\n  reaches a break condition.\n- `INPCK`: input bitflag that enables parity checking.\n- `ISTRIP`: input bitflag that \"strips\" the 8th bit of each input byte, i.e.,\n  sets it to 0.\n\n- `OPOST`: output bitflag that enables post-processing of output, like `\\n` into\n  `\\r\\n`. When we disable it, the terminal emulator doesn't input a carriage\n  return after every new line and the output \"stairs down\" the terminal.\n\n- `CS8`: bit mask that sets the character size (CS) to 8 bits per byte.\n\n- `ECHO`: local [bitflag](https://en.wikipedia.org/wiki/Bit_field) that causes\n  each key you type to be printed to the terminal. Disabling it no longer prints\n  everything we type on the terminal.\n- `ICANON`: local bitflag that enables canonical mode, i.e., reads input\n  line-by-line. Disabling it allows us to read input byte-by-byte.\n- `ISIG`: local bitflag that enables `SIGINT` and `SIGTSTP` signal, `Ctrl-C`\n  and `Ctrl-Z` respectively.\n- `IEXTEN`: local bitflag that enables `Ctrl-V` and `Ctrl-O` signals, that\n  interpret the next character as a literal.\n\n- `VMIN`: control character index that represents the minimun number of bytes\n  that `read()` reads before returning.\n- `VTIME`: control character index that represents the timeout of `read()` in\n  tenths of a second.\n\n### [sys/ioctl.h](https://man7.org/linux/man-pages/man2/ioctl.2.html)\n\n- `TIOCGWINSZ`: TerminalInputOutputControlGetWINdowSiZe\n\n## 🛸 42 São Paulo \u003ca name = \"ft_sp\"\u003e\u003c/a\u003e\n\nPart of the larger [42 Network](https://www.42.fr/42-network/),\n[42 São Paulo](https://www.42sp.org.br/) is a software engineering school\nthat offers a healthy alternative to traditional education:\n\n- It doesn't have any teachers and classes.\n- Students learn by cooperating\n  and correcting each other's work (peer-to-peer learning).\n- Its focus is as much on social skills as it is on technical skills.\n- It's completely free to anyone that passes its selection process -\n  [**The Piscine**](https://42.fr/en/admissions/42-piscine/)\n\nIt's an amazing school, and I'm grateful for the opportunity.\n\n\u003e “I believe 42 will have a rippling effect on the history of the world.”\n\u003e [@michaelbrave](https://github.com/michaelbrave)\n\nThe more I study at 42 the more I see the revival of a powerful educational\nmethod renewed to a modern discipline. It's not a school in the traditional sense,\nbut more like a Tech _Dojo_ with training and sparring.\n\nBasically the computer nerd version of the\n[Lyceum](\u003chttps://en.wikipedia.org/wiki/Lyceum_(Classical)\u003e)\nas opposed to the Apollonian\n[Academy](https://en.wikipedia.org/wiki/Platonic_Academy).\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\".github/school_of_athens_center.jpg\" /\u003e\n\u003c/p\u003e\n\n## 📚 Resources \u003ca name = \"resources\"\u003e\u003c/a\u003e\n\n- https://www.tutorialspoint.com/cprogramming/c_data_types.htm\n- https://stackoverflow.com/questions/31119606/expression-is-not-an-integer-constant-expression-in-ios-objective-c\n- https://data-flair.training/blogs/macros-in-c-programming/\n\n- https://github.com/Gegel85/norminette/tree/master/tests\n- http://check.sourceforge.net/doc/check_html/check_2.html#SEC3\n- https://stackoverflow.com/questions/65820/unit-testing-c-code\n- https://notes.eatonphil.com/unit-testing-c-code-with-gtest.html\n\n- https://en.wikipedia.org/wiki/Makefile\n- https://opensource.com/article/19/7/structure-multi-file-c-part-1\n\n- https://vt100.net/docs/vt100-ug/chapter3.html#ED\n- https://en.wikipedia.org/wiki/VT100\n- http://ascii-table.com/control-chars.php\n- https://en.wikipedia.org/wiki/Ncurses\n- https://en.wikipedia.org/wiki/Terminfo\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibrity%2Fft_kilo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibrity%2Fft_kilo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibrity%2Fft_kilo/lists"}