application_guidelines


		    Application Programming Guidelines

	 1. All modules should contain the header shown below.  The banners
	    below the main header are recommended but optional.

	 2. All new modules should be coded in C++.

	 3. Use standard defined constants and structures wherever possible.
	    Also, create and use locally defined constants in place of
	    numeric constants.

	 4. A block of help text should be created for every routine having
	    the format shown below.

	 5. Don't pass arguments by reference unless it is necessary to do so.

	 6. Use of routines that are listed under old CLIB help should be
	    avoided.  Filesharing file access should be done via "fm_"
	    routines (see intro_file_io).  Data acquisition should be
	    performed via "dio_" routines (see intro_dio).  TV I/O should
	    use window manager routines (see intro_tv_windows), and
	    graphics should be done with wnlib routines (see
	    intro_graphics_windows).

	 7. Routines and variables internal to a module should be defined
	    as static.

	 8. Static constants should use the "const" modifier.

	 9. The memory allocation routines clib_malloc, clib_calloc,
	    clib_realloc, and clib_free should be used in place of the
	    C RTL routines malloc, calloc, realloc, and free.  The macros
	    in memory_macro.h can be used to achieve this goal in a
	    transparent manner.

	10. All ACNET network messages should be typecoded.

	11. Form feeds should be placed between adjacent functions.

	12. Stored data should be held in a database table if it can be
	    expressed as a table or is more than 256 bytes in size.  For
	    smaller/simpler storage needs, the CLIB routines
	    pgm_data_storage or pgm_data_storage_shared can be used.

	13. Handle program events (interrupts) by utilizing callback fields
	    created by calls to window_field_create_c rather than by
	    explicitly checking interrupt coordinate values.

	14. Exceptions to these guidelines should be documented in the
	    source code.


	Program header:

	/!*
	**	Copyright 2008, Universities Research Association.  All rights reserved.
	**++
	**  FACILITY:
	**
	**	{title indicating functionality}
	**
	**  ABSTRACT:
	**
	**	{more verbose description of functionality}
	**
	**  AUTHORS:
	**
	**	{author name(s)}
	**
	**  CREATION DATE:	{dd-Mmm-yy}
	**
	**--
	*******************************************************************************!/
	
	/!*******************************************************************************
	*
	*	Include	Files
	*
	*******************************************************************************!/
	
	/!*******************************************************************************
	*
	*	Local definitions and types
	*
	*******************************************************************************!/
	
	/!*******************************************************************************
	*
	*	Module variables
	*
	*******************************************************************************!/
	
	/!*******************************************************************************
	*
	*	Global variables
	*
	*******************************************************************************!/
	
	/!*******************************************************************************
	*
	*	Module internal	routines
	*
	*******************************************************************************!/
	
	
	Function header:
	
	/!*****************************************************************************!/
	/!* {function name}
	*	{return value (if any)} = {function_name}({argument_list})
	*
	*	{qualitative function description}
	*!/
	/!******************************************************************************!/