home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume25 / finger / part01 / pversion.c < prev    next >
C/C++ Source or Header  |  1992-04-03  |  1KB  |  42 lines

  1. /*
  2.  * pversion -- display finger version for build procedure
  3.  *
  4.  * Copyright (C) 1986, 1990  Philip L. Budne
  5.  *
  6.  * This file is part of "Phil's Finger Program".
  7.  *
  8.  * This program is free software; you can redistribute it and/or modify
  9.  * it under the terms of the GNU General Public License as published by
  10.  * the Free Software Foundation; either version 1, or (at your option)
  11.  * any later version.
  12.  *
  13.  */
  14.  
  15. # include "finger.h"
  16. # include "History.h"
  17.  
  18. # ifndef lint
  19. static char *history_rcsid = HISTORY_RCSID;
  20. static char *rcsid = "$Id: pversion.c,v 3.0 90/07/06 13:11:35 budd Rel $";
  21. # endif /* lint not defined */
  22.  
  23. int main() {
  24.     printf("%o", ver.major );
  25.     if( ver.minor != 0 ) {
  26.     int m1;
  27.     if( ver.minor > 25 ) {
  28.         m1 = ver.minor / 26;
  29.         if( m1 > 26 )
  30.         m1 = 26;
  31.         printf("%c", 'A' + m1 - 1 );
  32.         ver.minor %= 26;
  33.     } /* more than one letter? */
  34.     printf("%c", 'A' + ver.minor - 1 );
  35.     } /* minor version */
  36.     printf("(%o)", ver.edit );
  37.     if( ver.who != 0 )
  38.     printf("-%o", ver.who );
  39.     puts("");
  40.     return( 0 );            /* be a good ANSI program */
  41. } /* main */
  42.