Portable C Software

Mark R. Horton

Publisher: Prentice Hall, 1990, 372 pages

ISBN: 0-13-868050-7

Keywords: Programming

Last modified: July 18, 2021, 10:56 p.m.

Portable C Software is designed for professional programmers and students who want to write portable C code between System V implementations, POSIX, MSDOS, and other operating systems.

Assuming a working knowledge of C, this book addresses and rates each feature of the C software environment. Shell commands, system calls, external variables, and macros are discussed and examined in detail.

The author provides an advanced introduction to C, describes how best to write portable software, examines what not to do, discusses common mistakes, and includes an invaluable portability reference manual. In this extensive manual, the author rates the portability of the following:

  • subroutines available in C libraries
  • operating system calls
  • header include files
  • predefined variables in the C library
  • UNIX® system shell commands

Portable C Software offers concise, current coverage of C, and will be an important reference for anyone who writes C programs.

  • Part I: Introduction
    1. Why Write Portable Software?
    2. History of the C Language
      1. UNIX System History
  • Part II: Writing Portable Software
    1. How to Design a Portable Program
      1. Choosing a Paradigm
      2. Information Hiding
      3. Using the Preprocessor
      4. Redesigning an Unportable Program
      5. Example — Mouse Input
    2. Porting Existing Programs
      1. Portability Testing Techniques
      2. Porting Techniques
      3. Copying Files
    3. The User Interface
      1. Terminals
        1. Universal Subset
        2. Terminal Drivers
        3. Virtual Terminals
        4. Capability Databases
        5. Curses
        6. Form/Menu Packages
        7. Veneering
        8. Terminal Recommendations
      2. Telephone Calls
      3. Printers
      4. Graphics
      5. Pointing Devices
      6. Operating System Interfaces
    4. Network Protocol Design
      1. Protocols
      2. Protocol Design
      3. Compatibility
  • Part III: Common Portability Problems
    1. Considerations in a Portable Program
    2. Hardware Dependencies
      1. Byte Ordering
      2. Sign Extension
      3. Word Size
      4. Word Alignment
      5. Byte Addressing
      6. Shifts
      7. Floating Point Hardware
      8. Disk Space
      9. Assembly Language
    3. C Language Dependencies
      1. Stack Growth
      2. Uninitialized Variables
      3. Multiple Definitions
      4. Name Length
      5. Order of Evaluation
      6. Macro Arguments
      7. Mew ANSI C Features
    4. Operating System Dependencies
      1. Terminal Drivers
      2. Interprocess Communication
      3. Networking
  • Part IV: Reference
    1. C Library Subroutines
    2. Operating System Calls
    3. Include Files
    4. Predefined Variables
    5. User Commands
  • Appendices
    1. ANSI X3J11 C Language: Portability Issues
    2. IEEE P.1003 — 1988 POSIX System
    3. System V Interface Definitions
    4. MS DOS
    5. Macintosh, Amiga, and Atari ST
    6. Source to getopt Function
    7. Portability of C Library Functions
    8. Portability of Shell Commands

Reviews

Portable C Software

Reviewed by Roland Buresund

Decent ****** (6 out of 10)

Last modified: May 21, 2007, 3:20 a.m.

A very good book, that for the most part still is valid.

Comments

There are currently no comments

New Comment

required

required (not published)

optional

required

captcha

required