english
version "1.0"
identify "wxyz"

#: Copyright (c) 1995, 2002 by Wayne C. Gramlich.
#, All rights reserved.
#,
#, Permission to use, copy, modify, distribute, and sell this software
#, for any purpose is hereby granted without fee provided that the above
#, copyright notice and this permission are retained.  The author makes
#, no representations about the suitability of this software for any purpose.
#, It is provided "as is" without express or implied warranty.

module svms

#: This module implements the top-level Source Version Management System
#, command.

define comment_type			#: Type of comment
    enumeration
	none				#: There is no comment
	pipe				#: Read the comment from standard ina
	prompt				#: Prompt for a comment
    generate print

define diffs_options			#: Options for `svms diffs' command
    record
	file_list vector[string]	#: file_list ... => files to check
    generate allocate, erase, print

define file_operation			#: Type of file operation
    enumeration
	close				#: Close an open file
	create				#: Create a new file
	get				#: Get a read-only version of a file
	open				#: Open a file for editing
	unedit				#: Revert to previous unedited file
    generate equal, print
    
define file_options			#: Options for `svms close' command
    record
	binary logical			#: [-b] => force files into binary mode
	file_list vector[string]	#: file_list ... => files to work on
	force logical			#: [-f] => force symbolic link accept
	no_comment logical		#: [-n] => do not record a comment
	use_pipe logical		#: [-p] => use stdin (pipe) for comment
	text logical			#: [-t] => force files into text mode
	timestamp string		#" [-T timestamp] => force to timestamp
    generate allocate, erase, print

define global				#: Stuff needed to execute a command
    record
	arguments vector[string]	#: Command arguments
	data_out_delays data_out_delays	#: Delayed file renaming
	debug_stream out_stream		#: Debugging stream
	errors errors			#: {errors} object
	error_stream out_stream		#: Error stream object
	executable_directory string	#: Executable directory
	file_system file_system		#: File system
	in_stream in_stream		#: Standard input stream
	out_stream out_stream		#: Standard output stream
	project_name_table set[project_name] #: {project_name} sharing table
	project_names vector[project_name] #: All {project_name}'s
	resources resources		#: Memory manager
	system system			#: System object
	timer_top timer			#: Top-most timer
    generate allocate, erase, identical, print

define history_options			#: Options for `svms history' command:
    record
	file_list vector[string]	#: file_list ... => files to list
    generate allocate, erase, print

define merge_options			#: Options for `svms bringover/putback'
    record
	slice_list vector[string]	#: slice ... => slices to bring over
	no_action logical		#: [-n] => no action
    generate allocate, erase, print

define mkdir_options			#: Options for `svms mkdir' command
    record
	create logical			#: [-c] => create 
	file_list vector[string]	#: file_list ... => dir's to create
	duplicates_ok logical		#: [-d] => dupliates ok
    generate allocate, erase, print

define new_options			#: Options for `svms new' command
    record
	recursive logical		#: [-R] => recursively create sub-dirs
	project_directory string	#: Project directory (required)
	nickname string			#: Project nickname (required)
    generate allocate, erase, print

define parent_options			#: Options for `svms parent' command
    record
	eager logical			#: [-e] => do eager bringovers
	file_list vector[string]	#: parent_directory (or empty)
	lazy logical			#: [-l] => do lazy bringovers
	parent_directory string		#: [-d dir] => parent directory
	parent_url string		#: [-h url] => parent URL
	proxy_url string		#: [-p url] => proxy URL
	tell logical			#: [-t] => tell current parent info
	unparent logical		#: [-u] => unparent project
    generate allocate, erase, print

define refresh_options			#: Options for `svms refresh' command
    record
	delete logical			#: [-d] => delete extraneous files
	no_action logical		#: [-n] => no action
	slice_list vector[string]	#: slice_list ... => slices to refresh
	verbose logical			#: [-v] => verbose mode
    generate allocate, erase, print

define tell_options			#: Options for `svms tell' command:
    record
	slice_list vector[string]	#: slice_list ... => slices to list
    generate allocate, erase, print



procedure main
    takes
	system system
    returns unsigned

    #: This procedure will test out the printed circuit board layout module.

procedure merge_command@global
    takes
	global global
	bringover logical
	timer timer
    returns logical

    #: This procedure implements the "svms bringover" and the
    #, "svms putback" command:


procedure diffs_command@global
    takes
	global global
	timer timer
    returns logical

    #: This procedure implements the "svms create" command.


procedure file_command@global
    takes
	global global
	file_operation file_operation
	timer timer
    returns logical

    #: This procedure is the workhorse procedure that is responsible for
    #, managing most file operations (create, open, close, get, unedit,
    #, etc.)


procedure help_print
    takes
	out_stream out_stream
    returns_nothing

    #: This procedure print the help contents to {out_stream}.


procedure history_command@global
    takes
	global global
    returns logical

    #: This procedure implements the "svms history" command.


procedure mkdir_command@global
    takes
	global global
    returns logical

    #: This procedure implements the "svms create" command.


procedure new_command@global
    takes
	global global
    returns logical

    #: This procedure implements the "svms new" command.  A new project
    #, directory is created along with other associated files and
    #, sub-directories.


procedure parent_command@global
    takes
	global global
	timere timer
    returns logical

    #: This procedure implement the "svms parent" command:


procedure refresh_command@global
    takes
	global global
	timer timer
    returns logical

    #: This procedure will implement the refresh command:


procedure tell_command@global
    takes
	global global
    returns logical

    #: This procedure implements the "svms tell" command.


#: {global} procedures:

procedure deallocate@global
    takes
	global global
    returns_nothing

    #: This procedure will deallocate any storage maintained by {global}.