home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Zodiac Super OZ
/
MEDIADEPOT.ISO
/
FILES
/
16
/
FREEDOS.ZIP
/
FD_A4PRE.ZIP
/
SOURCE
/
MICROC.ZIP
/
VERSION.C
< prev
Wrap
C/C++ Source or Header
|
1994-01-01
|
2KB
|
86 lines
/*
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
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 GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <stdio.h>
#include "freedos.h"
#include "getopt.c"
static char DISCLAIMER[] = {"\n\
Except where noted, Free-DOS and its associated programs are free\n\
software; you can redistribute and/or modify them under the terms\n\
of the GNU General Public License as published by the Free Software\n\
Foundation; either version 2 of the License, or (at your option) any\n\
later version.\n\
\n\
Free-DOS is distributed in the hope that it will be useful,\n\
but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\
GNU General Public License for more details.\n\
\n\
You should have received a copy of the GNU General Public License\n\
along with these programs; if not, write to the Free Software\n\
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. " };
void usage (void);
main (int argc, char **argv)
{
char c;
int iDos, ver;
iDos = 0; ver = version ();
/* Scan the command line */
while ((c = getopt (argc, argv, "D?", "")) != EOF)
{
switch (c)
{
case 'd':
case 'D':
/* Dos only! */
iDos = 1;
break;
default:
usage ();
break;
}
}
if ((argc - optind) > 0)
usage ();
/* Display the version numbers */
printf ("\n");
if (!iDos)
printf (" Free-DOS version %s\n", VER_REL);
printf (" DOS version %u.%02u\n", (ver & 0xFF00) >> 8 , (ver & 0x00FF));
puts (DISCLAIMER);
exit (0);
}
void usage (void)
{
printp ("VER", "Displays the DOS and Free-DOS version numbers.");
printu ("VER", "[/D]");
printo ("/D", "Display the DOS version number only.");
exit (1);
}