home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / x / xhyper10.zip / XHyper_v1.0 / src / main.c < prev    next >
C/C++ Source or Header  |  1992-12-08  |  2KB  |  69 lines

  1.  
  2. /*
  3.  * Copyright (c) 1992 U.S. Geological Survey (USGS)
  4.  *
  5.  * Permission to use, copy, modify, distribute, and sell this software and its
  6.  * documentation for any purpose is hereby granted without fee, provided that
  7.  * the above copyright notice appear in all copies and that both that
  8.  * copyright notice and this permission notice appear in supporting
  9.  * documentation, and that the name of USGS not be used in advertising or
  10.  * publicity pertaining to distribution of the software without specific,
  11.  * written prior permission.  USGS makes no representations about the
  12.  * suitability of this software for any purpose.  It is provided "as is"
  13.  * without express or implied warranty.
  14.  *
  15.  * USGS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
  16.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL USGS
  17.  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  18.  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  19.  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  20.  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  21.  *
  22.  */
  23.  
  24. #include <InterViews/session.h>
  25. #include <InterViews/style.h>
  26. #include <string.h>
  27. #include <stdlib.h>
  28.  
  29. #include "HyperView.h"
  30.  
  31. /*-------------------------------------------------------------------------
  32.   Jim Hemmer
  33.   Hughes STX Corporation
  34.   4/92
  35.  
  36.   This program demonstrates a hypertext implementation used for an On-Line
  37.   Help system.  The format for the help information is similar to  the
  38.   Maker Markup Language used in the FrameMaker desktop publisher.  
  39.   
  40.   Usage:
  41.     XHyper    [tag]
  42.  
  43.   where the tag defines the hypertext tag for the initial display.
  44.  *-------------------------------------------------------------------------*/
  45.  
  46. main(int argc, char** argv, char *envp[])
  47.    {
  48.    HyperViewer* hv;
  49.    char           *tag;
  50.  
  51.    //
  52.    //  *** check if tag argument is present
  53.    //
  54.    if ((argc > 1) && (argv[1][0] != '-'))
  55.       tag = argv[1];
  56.  
  57.    //
  58.    //  *** create InterViews session
  59.    //
  60.    Session*  session = new Session("ON-LINE HELP", argc, argv);
  61.    hv = new HyperViewer(tag);
  62.  
  63.    session->run_window(hv);
  64.  
  65.    delete hv;
  66.    }
  67.  
  68.  
  69.