home *** CD-ROM | disk | FTP | other *** search
/ Serving the Web / ServingTheWeb1995.disc1of1.iso / linux / slacksrce / tcl / tcl+tk+t / tclx7.3bl / tclx7 / tclX7.3b / tools / getversion.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-07-16  |  1.4 KB  |  45 lines

  1. /*
  2.  * getversion.c
  3.  *
  4.  * Utility program used during installation. Returns the version suffix to
  5.  * add to the master directory name.  This can be compiled to get either the
  6.  * TclX or TkX version depending on if TK_GET_VERSION is defined.
  7.  *-----------------------------------------------------------------------------
  8.  * Copyright 1991-1994 Karl Lehenbauer and Mark Diekhans.
  9.  *
  10.  * Permission to use, copy, modify, and distribute this software and its
  11.  * documentation for any purpose and without fee is hereby granted, provided
  12.  * that the above copyright notice appear in all copies.  Karl Lehenbauer and
  13.  * Mark Diekhans make no representations about the suitability of this
  14.  * software for any purpose.  It is provided "as is" without express or
  15.  * implied warranty.
  16.  *-----------------------------------------------------------------------------
  17.  * $Id: getversion.c,v 4.0 1994/07/16 05:29:06 markd Rel $
  18.  *-----------------------------------------------------------------------------
  19.  */
  20.  
  21. #include "tclExtend.h"
  22. #include "tclXpatchl.h"
  23.  
  24. #ifdef TK_GET_VERSION
  25. #include "tk.h"
  26. #endif
  27.  
  28. int
  29. main (argc, argv)
  30.     int    argc;
  31.     char **argv;
  32. {
  33. #ifdef TK_GET_VERSION
  34.     printf ("%s%s", TK_VERSION, TCL_EXTD_VERSION_SUFFIX);
  35. #else
  36.     printf ("%s%s", TCL_VERSION, TCL_EXTD_VERSION_SUFFIX);
  37. #endif
  38. #ifdef TCLX_PATCHLEVEL
  39.     if (TCLX_PATCHLEVEL != 0) 
  40.         printf ("-p%d", TCLX_PATCHLEVEL);
  41. #endif    
  42.     printf ("\n");
  43.     exit (0);
  44. }
  45.