#define VERSION "1.0"
#define RELEASED "June, 2005"
/*
   <h3>The environ library</h3>
   <p>- <i>written by Martin Gregorie, June, 2005.</i></p>

   <p>This library was initially developed to allow me to write C code that
   could be ported between the OS-9 and MS-DOS environments with minimal
   code changes and, so far as possible, to restrict machine-dependent code
   to functions within this library. It was later extended for portability
   to Linux as well.</p>

   <p>A major part of this library's development involved implementing,
   e.g., library functions peculiar to MS-DOS, which has a lot of
   library functions that are not part of the standard C libraries,
   within the OS-9 and Linux environments. As a result of this
   philosophy, the package exists in three distinct forms because
   functions provided by each native C library are omitted from the
   version of this package for that environment.</p>

   <p>On top of this, the library has been extended to incorporate
   a number of generally useful functions that are used in many
   programs, such as the error trapping and tracing functions
   and the improved command line parsing functions.</p>
 
   <p>As a result of both the portability and convenience functions, almost
   every program I write uses part of this library, so it is documented
   and distributed with all such open source programs.</p>

   <p>The library contents fall into a number of categories:</p>
   <ul>
   <li>extensions of standard functions, e.g. <i>getopt()</i>.</li>
   <li>portability aids. These are implementations of functions
       used in other operating systems, e.g. <i>strmfe()</i>.</li>
   <li>commonly used convenience functions, e.g. <i>error(), warn()</i></li>
   <li>less common function groups, such as the tab manipulation functions.</li>
   <li>Sub-packages, such as TCP/IP socket wrappers, that work in one
       environment, such as Linux, but not in others, such as OS-9. These
       functions are not portable, but then, a program written to use them
       could not be ported to an environment that doesn't allow them to
       be implemented.
   </ul>

   <p>This collection of functions is compiled to form part
   of the <b>libenviron.a</b> library, which must be linked
   if any of of its constituent functions are called.</p>

   <p>Running the <i>environ</i> utility will display the version
   and release date of the library.</p>

   <h3>Compilation</h3>
        
   <p>The calling programs should include <i>environ.h</i> and must be
   linked using <i>-lenviron</i>.</p>

   <kbd>
   <b>environ - C programming support functions</b><br>
   Copyright (C) 2005  Martin C Gregorie
   
   This program is free software; you can redistribute it and/or
   modify it under the terms of the Lesser GNU General Public License.
   
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
  
   You should have received a copy of the Lesser GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   </kbd>
  
   <p>Contact Martin Gregorie at <i>martin@gregorie.org</i></p>
*/

#include "environ.h"

#ifdef OS9
#include <strings.h>
#else
#include <stdlib.h>
#include <string.h>
#endif

int main(int argv, char **argc)
{
   if (argv == 2 && strcmp(argc[1], "-?") == 0)
   {
      printf("Syntax:   environ\n");
      printf("Function: Display version details for the environ library\n");
      printf("Options:  none\n");
   }
   else
   if (argv != 1)
   {
      printf("Usage: environ\n");
      printf("   or: environ -?\n");
   }
   else
   {
      printf("\nEnviron library version %s\n", VERSION);
      printf("Released under the GNU GPL in %s\n", RELEASED);
      printf("Author: Martin Gregorie, martin@gregorie.org\n\n");
   }
   
   return 0;
}
