{"id":16164642,"url":"https://github.com/johnsonjh/g","last_synced_at":"2025-03-16T10:30:41.516Z","repository":{"id":37827993,"uuid":"349302002","full_name":"johnsonjh/g","owner":"johnsonjh","description":"g: A portable general purpose programmable text editor with calculator and macro facility.","archived":false,"fork":false,"pushed_at":"2025-03-07T03:16:06.000Z","size":3110,"stargazers_count":35,"open_issues_count":8,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-07T04:23:12.604Z","etag":null,"topics":["calculator","curses","dos","editor","g-editor","gcos","honeywell-6000","macro","ms-dos","os2","text-editor","text-processing"],"latest_commit_sha":null,"homepage":"https://github.com/johnsonjh/G","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johnsonjh.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-19T04:38:47.000Z","updated_at":"2025-03-07T03:16:09.000Z","dependencies_parsed_at":"2023-11-15T07:29:36.282Z","dependency_job_id":"bb195310-4300-423b-bfb3-9fc00d64e15f","html_url":"https://github.com/johnsonjh/g","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnsonjh%2Fg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnsonjh%2Fg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnsonjh%2Fg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnsonjh%2Fg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnsonjh","download_url":"https://codeload.github.com/johnsonjh/g/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243809887,"owners_count":20351407,"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":["calculator","curses","dos","editor","g-editor","gcos","honeywell-6000","macro","ms-dos","os2","text-editor","text-processing"],"created_at":"2024-10-10T02:47:19.574Z","updated_at":"2025-03-16T10:30:41.510Z","avatar_url":"https://github.com/johnsonjh.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# G\n\n**_`G`_** is a portable general purpose programmable\ntext editor with calculator and macro facility.\n\n## Table of Contents\n\n\u003c!-- toc --\u003e\n\n- [Overview](#overview)\n- [Features](#features)\n- [Compilation](#compilation)\n  - [Modern](#modern)\n  - [Legacy](#legacy)\n- [Roadmap](#roadmap)\n- [Binaries](#binaries)\n\n\u003c!-- tocstop --\u003e\n\n## Overview\n\n- **_`G`_** is a general purpose programmable text editor with a\n  [long history](https://github.com/johnsonjh/g/blob/master/HISTORY.md),\n  originally written in the **B** programming language for **GCOS‑3/TSS**,\n  running on GE/Honeywell 6000-series mainframe systems.\n\n## Features\n\n- **_`G`_** combines features from many sources. For example, the macro\n  language was derived from the **ICL** **George** mainframe editors,\n  regular expressions (_among other things_) come from **UNIX** **vi**,\n  the screen editor keystrokes are similar to **WordStar**, and the\n  mathematical syntax is inspired by the **C** programming language.\n\n- The macro language is _Turing complete_, offering loops, conditionals,\n  and arithmetic. Complete **_`G`_** macro programs or individual commands\n  can be executed from the command line, from an edit buffer or file, or\n  from the _home_ area at the top of the screen (_interactively_, so that\n  the effects can be seen). In many cases, **_`G`_** macros can do the work\n  of traditional _UNIX_ text processing tools such as `sed`, `awk`, `cut`,\n  and `fmt`.\n\n- **_`G`_** can operate as either a line editor or as a visual screen\n  editor, similar to `ex`/`vi` on _UNIX_ systems.\n\n- The **_`G`_** language uses a conceptually simple two-file transcription\n  (_copy_/_edit_) paradigm, which is transparent for the casual screen\n  editor user.\n\n- **_`G`_** is designed to be as efficient as possible, to be highly\n  portable, and to enable manipulation of large files. **_`G`_** has a very\n  fast startup time and utilizes little memory compared to other applications -\n  approximately **130 KiB** for the standard build, **112 KiB** for the _Tiny_\n  build, and **32 KiB** for the _line-mode_ editor (_measured using the_\n  **Massif** _heap profiler on an AMD64 system running GNU/Linux_).\n\n- **_`G`_** provides a more flexible way of viewing files than commands\n  like `TYPE`, `pg`, or `more`.\n\n- Although **_`G`_** is not intended to be a fully featured word processor,\n  it does have text and paragraph formatting abilities and can easily be\n  used to produce simple documents.\n\n## Compilation\n\n### Modern\n\n- **_`G`_** can be built for **DOS**, **Windows**, **OS/2**, **Haiku**, and\n  many **UNIX** systems. **IBM AIX**, **PASE for IBM i**, **Darwin**,\n  **FreeBSD**, **NetBSD**, **OpenBSD**, **Solaris**, **illumos**, and\n  **Linux** are regularly tested and fully supported.\n\n- A **Curses** library is required on **UNIX** systems. **AT\u0026T System V**\n  **Curses**, **XPG4**/**XSI** **Extended Curses**, **PdCurses**,\n  **PdCursesMod**, **NetBSD** **Curses**, and **NCurses** are known to work.\n\n- A **C** compiler is required. _Oracle_ **Developer Studio**, _LLVM_\n  **Clang**, _AMD_ **AOCC**, _GNU_ **GCC**, _IBM_ **XLC**, _IBM_ **OpenXL**,\n  _Intel_ **ICX**, _Intel_ **ICC**, **DJGPP**, **Microsoft C**, **MSVC**,\n  _SGI_ **MIPSpro**, **Watcom C/C++**, **OpenWatcom V2**, **Borland C**, and\n  **PCC** are currently known to work.\n\n- The included `GNUmakefile` can be used if **GNU** **Make** (version 3.81\n  or later) is available. **GNU** **Make** is helpful, but is not required\n  to build **_`G`_**.\n\n#### Building\n\n- Most users of _UNIX_-like operating systems can build **_`G`_** by simply\n  invoking **GNU** **Make** (usually available as `gmake` or `make`) without\n  any additional options or configuration. The conventional `make` targets\n  are available, e.g. `clean`, `strip`, etc.\n- The following options affecting compilation may be set in the shell\n  environment or on the `make` command-line, for example, `make OPTION=1`:\n  - `CC`: Overrides default C compiler selection, e.g. `CC=clang`\n  - `LTO=1`: Enables link-time optimization\n  - `LGC=1`: Enables link-time garbage collection (reducing binary size)\n  - `OPTFLAGS`: Overrides default optimization flags, e.g. `OPTFLAGS=-Oz`\n  - `V=1`: Enables verbose compilation messages\n  - `NOSSP=1`: Disables `FORTIFY_SOURCE` and compiler stack protections\n  - `STATIC=1`: Attempt statically linking all required libraries\n  - `DUMA=1`: Enables support for the _DUMA_ memory debugging library\n  - `DSTATIC=1`: Attempt statically linking _DUMA_ library (_needs GNU ld_)\n  - `DEBUG=1`: Enables debugging code (for development or troubleshooting)\n  - `LINE_G=1`: Builds only the line-mode editor (no curses library needed)\n  - `TINY_G=1`: Disables features for lower memory use (default for PC DOS)\n  - `FULL_G=1`: Overrides `TINY_G` default (enables a fully-featured build)\n  - `CURSESLIB`: Overrides curses library selection, e.g. `-lcurses -ltinfo`\n  - `COLOUR=0`: Disables colours (required for some older curses libraries)\n- Some less common options may be undocumented, and some option combinations\n  may not be valid.\n- For practical examples and complete details, review the\n  [`GNUmakefile`](/src/GNUmakefile) and [test script](/test/build.sh).\n\n### Legacy\n\n- Historically, **_`G`_** was available for many systems, including Amdahl\n  UTS/V, AT\u0026T System V, Berkeley (BSD) UNIX, BSDI BSD/OS, Commodore Amiga\n  UNIX (AMIX), DG/UX, Honeywell GCOS/TSS, HP‑UX, IBM OS/2, ICL CDOS, ICL\n  DRS/NX, JRG/Everex ESIX, Microsoft Xenix, MINIX, MWC Coherent, NCR SVR4\n  MP‑RAS, Novell/SCO UnixWare, Pyramid DC/OSx, Reliant UNIX/SINIX, SCO\n  OpenServer, Sequent DYNIX, SGI IRIX, SunOS 3/4, Tulip SVR3, and DEC VAX/VMS.\n\n- Line-mode **_`G`_** is known to build on IBM z/OS UNIX (USS) using XL C.\n\n- Read the notes in the\n  [`GNUmakefile`](https://github.com/johnsonjh/g/blob/master/src/GNUmakefile)\n  for information relevant to building **_`G`_** on these systems.\n\n## Roadmap\n\nFuture plans for **_`G`_**:\n\n- Overhauled documentation\n- Improved online help viewer\n- Proper Windows console support\n- VGA-mode DOS port\n- Dynamic resizing\n- UTF-8/multibyte support\n- Binaries via GitHub and GitLab releases\n\n## Binaries\n\n- **_`G`_** for IBM PC DOS (MS-DOS, PC-DOS, DR-DOS, PTS-DOS, FreeDOS, etc.)\n  - [**_`G`_** V4.7.4β for PC DOS](https://github.com/johnsonjh/g/raw/master/bin/DOS/g474_x86.exe), 16-bit 8086, Real mode, Tiny build, G-Curses\n  - [**_`G`_** V4.7.4β for PC DOS](https://github.com/johnsonjh/g/raw/master/bin/DOS/g474_2bg.exe), 16-bit 8086, Real mode, Full build, G-Curses\n  - [**_`G`_** V4.7.3 for PC DOS](https://github.com/johnsonjh/g/raw/master/bin/DOS/g473_386.exe), 16-bit 80386, Real mode, Fast-Curses\n  - [**_`G`_** V4.7.3 for PC DOS](https://github.com/johnsonjh/g/raw/master/bin/DOS/g473_pro.exe), 32-bit 80386, Protected mode, DPMI, G-Curses\n  - [**_`G`_** V4.7.3 for PC DOS](https://github.com/johnsonjh/g/raw/master/bin/DOS/g473_cws.exe), 32-bit 80386, Protected mode, DPMI, PdCursesMod\n- **_`G`_** for IBM OS/2\n  - [**_`G`_** V4.7.4β for OS/2](https://github.com/johnsonjh/g/raw/master/bin/OS2/g474_216.exe), 16-bit 80286, Protected mode, OS/2 console, PdCursesMod\n  - [**_`G`_** V4.7.4β for OS/2](https://github.com/johnsonjh/g/raw/master/bin/OS2/g474_232.exe), 32-bit 80386, Protected mode, OS/2 console, PdCursesMod\n- **_`G`_** for Microsoft Windows\n  - [**_`G`_** V4.7.3 for Windows](https://github.com/johnsonjh/g/raw/master/bin/WIN32/g473_w32.exe), 32-bit i686, Win32 GUI, PdCursesMod\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnsonjh%2Fg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnsonjh%2Fg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnsonjh%2Fg/lists"}