home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume21 / coda / part01 / version.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-04-08  |  1.3 KB  |  50 lines

  1. /*
  2. **  Copyright 1989 BBN Systems and Technologies Corporation.
  3. **  All Rights Reserved.
  4. **  This is free software, and may be distributed under the terms of the
  5. **  GNU Public License; see the file COPYING for more details.
  6. **
  7. **  Print copyright and version.
  8. */
  9. #include <stdio.h>
  10. #include "patchlevel.h"
  11.  
  12. #define LINE1    \
  13.     "Copyright 1989 BBN Systems and Technologies Corporation."
  14. #define LINE2    \
  15.     "All Rights Reserved."
  16. #define LINE3    \
  17.     "This is free software, and may be distributed under the terms of the"
  18. #define LINE4    \
  19.     "GNU Public License; see the file COPYING for more details."
  20.  
  21. /*
  22. **  Sigh, I wish I didn't have to do this stuff -- both the copyright,
  23. **  and having to crack the RCS string are a pain in the neck.
  24. */
  25. Copyright()
  26. {
  27.     static char    REVISION[] = "$Revision: 2.0 $";
  28.     char    buff[sizeof REVISION + 2];
  29.     char    *p;
  30.     char    *q;
  31.  
  32.     /* Skip to the first space. */
  33.     for (p = REVISION; *p && *p != ' '; p++)
  34.     ;
  35.  
  36.     /* If we found it, take everything up to the next space. */
  37.     if (*p) {
  38.     for (q = buff, p++; *p && *p != ' '; )
  39.         *q++ = *p++;
  40.     *q = '\0';
  41.     }
  42.     else {
  43.     buff[0] = '?';
  44.     buff[1] = '\0';
  45.     }
  46.  
  47.     (void)printf("This is CODA, Version %s.%d.\n", buff, PATCHLEVEL);
  48.     (void)printf("%s\n%s\n%s\n%s\n", LINE1, LINE2, LINE3, LINE4);
  49. }
  50.