Giter VIP home page Giter VIP logo

g's Introduction

G

G is a portable general purpose programmable text editor with calculator and macro facility.

Table of Contents

Overview

  • G is a general purpose programmable text editor with a long history, originally written in the B programming language for GCOS‑3/TSS, running on GE/Honeywell 6000-series mainframe systems.

Features

  • G combines features from many sources. For example, the macro language was derived from the ICL George mainframe editors, regular expressions (among other things) come from UNIX vi, the screen editor keystrokes are similar to WordStar, and the mathematical syntax is inspired by the C programming language.

  • The macro language is Turing complete, offering loops, conditionals, and arithmetic. Complete G macro programs or individual commands can be executed from the command line, from an edit buffer or file, or from the home area at the top of the screen (interactively, so that the effects can be seen). In many cases, G macros can do the work of traditional UNIX text processing tools such as sed, awk, cut, and fmt.

  • G can operate as either a line editor or as a visual screen editor, similar to ex/vi on UNIX systems.

  • The G language uses a conceptually simple two-file transcription (copy/edit) paradigm, which is transparent for the casual screen editor user.

  • G is designed to be as efficient as possible, to be highly portable, and to enable manipulation of large files. G has a very fast startup time and utilizes little memory compared to other applications - approximately 130 KiB for the standard build, 112 KiB for the Tiny build, and 32 KiB for the line-mode editor (measured using the Massif heap profiler on an AMD64 system running GNU/Linux).

  • G provides a more flexible way of viewing files than commands like TYPE, pg, or more.

  • Although G is not intended to be a fully featured word processor, it does have text and paragraph formatting abilities and can easily be used to produce simple documents.

Compilation

Modern

  • G can be built for DOS, Windows, OS/2, Haiku, and many UNIX systems. IBM AIX, PASE for IBM i, Darwin, FreeBSD, NetBSD, OpenBSD, Solaris, illumos, and Linux are regularly tested and fully supported.

  • A Curses library is required on UNIX systems. AT&T System V Curses, XPG4/XSI Extended Curses, PdCurses, PdCursesMod, NetBSD Curses, and NCurses are known to work.

  • A C compiler is required. Oracle Developer Studio, LLVM Clang, AMD AOCC, GNU GCC, IBM XLC, IBM OpenXL, Intel ICX, Intel ICC, DJGPP, Microsoft C, MSVC, SGI MIPSpro, Watcom C/C++, OpenWatcom V2, Borland C, and PCC are currently known to work.

  • The included GNUmakefile can be used if GNU Make (version 3.81 or later) is available. GNU Make is helpful, but is not required to build G.

Building

  • Most users of UNIX-like operating systems can build G by simply invoking GNU Make (usually available as gmake or make) without any additional options or configuration. The conventional make targets are available, e.g. clean, strip, etc.
  • The following options affecting compilation may be set in the shell environment or on the make command-line, for example, make OPTION=1:
    • CC: Overrides default C compiler selection, e.g. CC=clang
    • LTO=1: Enables link-time optimization
    • LGC=1: Enables link-time garbage collection (reducing binary size)
    • OPTFLAGS: Overrides default optimization flags, e.g. OPTFLAGS=-Oz
    • V=1: Enables verbose compilation messages
    • NOSSP=1: Disables FORTIFY_SOURCE and compiler stack protections
    • STATIC=1: Attempt statically linking all required libraries
    • DUMA=1: Enables support for the DUMA memory debugging library
    • DSTATIC=1: Attempt statically linking DUMA library (needs GNU ld)
    • DEBUG=1: Enables debugging code (for development or troubleshooting)
    • LINE_G=1: Builds only the line-mode editor (no curses library needed)
    • TINY_G=1: Disables features for lower memory use (default for PC DOS)
    • FULL_G=1: Overrides TINY_G default (enables a fully-featured build)
    • CURSESLIB: Overrides curses library selection, e.g. -lcurses -ltinfo
    • COLOUR=0: Disables colours (required for some older curses libraries)
  • Some less common options may be undocumented, and some option combinations may not be valid.
  • For practical examples and complete details, review the GNUmakefile and test script.

Legacy

  • Historically, G was available for many systems, including Amdahl UTS/V, AT&T System V, Berkeley (BSD) UNIX, BSDI BSD/OS, Commodore Amiga UNIX (AMIX), DG/UX, Honeywell GCOS/TSS, HP‑UX, IBM OS/2, ICL CDOS, ICL DRS/NX, JRG/Everex ESIX, Microsoft Xenix, MINIX, MWC Coherent, NCR SVR4 MP‑RAS, Novell/SCO UnixWare, Pyramid DC/OSx, Reliant UNIX/SINIX, SCO OpenServer, Sequent DYNIX, SGI IRIX, SunOS 3/4, Tulip SVR3, and DEC VAX/VMS.

  • The GNUmakefile contains information relevant to building G on many of these older systems.

Roadmap

Future plans for G:

  • Overhauled documentation
  • Improved online help viewer
  • Proper Windows console support
  • VGA-mode DOS port
  • Dynamic resizing
  • UTF-8/multibyte support
  • Binaries via GitHub and GitLab releases

Binaries

g's People

Contributors

deepsource-autofix[bot] avatar johnsonjh avatar mend-bolt-for-github[bot] avatar restyled-commits avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

simrit1

g's Issues

License

  • Relicense if possible, MIT/X11-style?

Original B code?

Hi there,

Thanks so much for this work! As someone used the original version on the Aberystwyth Honeywell L66 in the late 80s to write B code I was wondering if the original B version still existed, and if so if it was possible for it to be added or made public in some way?

All the best,
Chris

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.