VIS

src/tst/tst.c File Reference

#include "tstInt.h"
Include dependency graph for tst.c:

Go to the source code of this file.

Functions

static int CommandTest (Hrc_Manager_t **hmgr, int argc, char **argv)
void Tst_Init (void)
void Tst_End (void)

Variables

static char rcsid[] UNUSED = "$Id: tst.c,v 1.6 2002/09/10 06:14:37 fabio Exp $"

Function Documentation

static int CommandTest ( Hrc_Manager_t **  hmgr,
int  argc,
char **  argv 
) [static]

AutomaticStart

Function********************************************************************

Synopsis [Implements the _tst_test command.]

CommandName [_tst_test]

CommandSynopsis [template for implementing commands]

CommandArguments [\[-h\] \[-v\]]

CommandDescription [This command does nothing useful. It merely serves as a template for the implementation of new commands.

Command options:

-h
Print the command usage.

-v Verbose mode.

]

SideEffects []

Definition at line 148 of file tst.c.

{
  int            c;
  int            verbose = 0;              /* default value */

  /*
   * Parse command line options.
   */
  util_getopt_reset();
  while ((c = util_getopt(argc, argv, "vh")) != EOF) {
    switch(c) {
      case 'v':
        verbose = 1;
        break;
      case 'h':
        goto usage;
      default:
        goto usage;
    }
  }

  if (verbose) {
    (void) fprintf(vis_stdout, "The _tst_test command does nothing useful.\n");
  }

  return 0;             /* normal exit */

  usage:
  (void) fprintf(vis_stderr, "usage: _tst_test [-h] [-v]\n");
  (void) fprintf(vis_stderr, "   -h\t\tprint the command usage\n");
  (void) fprintf(vis_stderr, "   -v\t\tverbose\n");
  return 1;             /* error exit */
}

Here is the caller graph for this function:

void Tst_End ( void  )

Function********************************************************************

Synopsis [Ends the test package.]

SideEffects []

SeeAlso [Tst_Init]

Definition at line 101 of file tst.c.

{
  /*
   * For example, free any global memory (if any) which the test package is
   * responsible for.
   */
}

Here is the caller graph for this function:

void Tst_Init ( void  )

AutomaticEnd Function********************************************************************

Synopsis [Initializes the test package.]

SideEffects []

SeeAlso [Tst_End]

Definition at line 81 of file tst.c.

{
  /*
   * Add a command to the global command table.  By using the leading
   * underscore, the command will be listed under "help -a" but not "help".
   */
  Cmd_CommandAdd("_tst_test", CommandTest, /* doesn't changes_network */ 0);
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

char rcsid [] UNUSED = "$Id: tst.c,v 1.6 2002/09/10 06:14:37 fabio Exp $" [static]

CFile***********************************************************************

FileName [tst.c]

PackageName [tst]

Synopsis [Test package initialization, ending, and the command test.]

Author [Originated from SIS.]

Copyright [Copyright (c) 1994-1996 The Regents of the Univ. of California. All rights reserved.

Permission is hereby granted, without written agreement and without license or royalty fees, to use, copy, modify, and distribute this software and its documentation for any purpose, provided that the above copyright notice and the following two paragraphs appear in all copies of this software.

IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.]

Definition at line 34 of file tst.c.