Using C with Curses, Lex and YACC

Building a Window Shell for UNIX System V

Axel T. Schreiner

Publisher: Prentice Hall, 1990, 257 pages

ISBN: 0-13-932864-5

Keywords: Programming

Last modified: June 6, 2021, 11:28 a.m.

This book presents the development of programs that make extensive use of curses and provides solutions to the typical problems encountered when implementing full-screen applications with curses.

The book illustrates how to work in the Unix C environment:

  • how to build command language with the compiler generators lex and yacc
  • how to make portable full-screen dialogs with the curses library
  • how to build symbol tables and manage variable-length argument lists using C library functions
  • how to manage program development with the make program
  • how to manage multiple process from a program and how to communicate with them

Throughout the book the full source code of a major example is shown.

  1. The Window Shell: wish
    1. Overview
    2. Desk Calculator
    3. Interactive curses
    4. View Management
    5. Viewing Text
    6. Editor
    7. Dialog with a Command
  2. A Desk Calculator: scan, scanl and calc
    1. Design
    2. Lexical Analysis: scan.l
    3. Syntax Analysis: calc.y
    4. Variables: sym.c
    5. Environment Variables: export
    6. Macros
    7. Functions
    8. Conclusion
  3. Introduction to curses: cdc
    1. Getting Acquainted
    2. Output
    3. Input
    4. Windows
    5. Boxes and Subwindows
    6. Scrolling
    7. A curses Desk Calculator: cdc
  4. A View Manager: vm.c
    1. Design
    2. A View Calculator
    3. A View Manager: vm.c
    4. Excursion to the Shell
    5. Changing Windows
    6. A Variable Parameters List
    7. Key Mapping: mvwgetkey(), loadmap(), and keymap()
    8. Conclusion
  5. A Viewer: file.c
    1. Architecture
    2. Viewing Files
    3. Viewing Another Process
    4. Help
    5. Information Functions
    6. Conclusion
  6. An Editor: edit.c
    1. Windows and Pads
    2. Editing with a Pad
    3. Loading a File
    4. Saving a Window
    5. Conclusion
  7. Dialog with a Command: talk.c
    1. Connection Architecture
    2. Impatient Input: winput()
    3. Talking to Another Process
    4. Killing a Zombie
  • Appendix
    1. Commands
    2. Functions
    3. Capsules

Reviews

Using C with Curses, Lex and YACC

Reviewed by Roland Buresund

Good ******* (7 out of 10)

Last modified: May 21, 2007, 2:51 a.m.

This is an excellent work of art. Nearly nobody uses the techniques of curses nowadays, but the general ideas are still valid.

Comments

There are currently no comments

New Comment

required

required (not published)

optional

required

captcha

required