Introduction
 

 



next up previous contents
Next: Packages and File Up: No Title Previous: Contents

Introduction

This document describes a set of conventionsgif for organizing and writing C code in the VIS systemgif. The conventions concern the naming of functions, macros, and variables; the style of documentation within the code; and the organization and naming of source files.

The reasons for adopting these conventions are

  • Writability: Design decisions are simplified.

  • Maintainability: Consistency makes the code comprehensible to other programmers.

  • Predictability: Conventions about names and comments make it easy to write scripts that automatically extract information (documentation and prototype extraction).

In this document, we will discuss how code within VIS is organized, how identifiers (functions, macros, structures, etc.) within VIS are named, and finally how code within VIS is maintained.

Chapter 2 describes how C code within VIS is divided into packages, a group of files centered around either a data structure or a function. It also introduces the structured comment, a C comment formatted to allow the automatic extraction of documentation.

Chapter 3 discusses naming conventions for functions, macros, structures, and variables. These conventions make the type, scope, and function of identifiers evident from their names. Chapter 4 illustrates these conventions with a simple package.

Chapter 5 describes maintenance programs for this environment, and Chapter 6 describes how to compile and how to create a new package under VIS.



Tom Shiple
Fri May 10 17:19:47 PDT 1996
Contact 
©2002-2018 U.C. Regents