home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / rcs / sources / locate_r.c < prev    next >
C/C++ Source or Header  |  1992-01-19  |  885b  |  36 lines

  1. #ifndef lint
  2. static char rcsid[] = "$Id: locate_rcs.c,v 1.5 89/11/19 23:20:05 berliner Exp $";
  3. #endif 
  4.  
  5. /*
  6.  *    Copyright (c) 1989, Brian Berliner
  7.  *
  8.  *    You may distribute under the terms of the GNU General Public License
  9.  *    as specified in the README file that comes with the CVS 1.0 kit.
  10.  *
  11.  * Locate RCS File
  12.  *
  13.  * Called when the RCS file sought may be in the Attic directory.
  14.  * Sets the global Rcs variable to the correct file.
  15.  */
  16.  
  17. #include "cvs.h"
  18.  
  19. Locate_RCS()
  20. {
  21.     char old[MAXPATHLEN];
  22.  
  23.     (void) sprintf(Rcs, "%s%c%s%s", Repository, DIRSEP, User, RCSEXT);
  24.     (void) sprintf(old, "%s%c%s%c%s%s", Repository, DIRSEP, CVSATTIC,
  25.             DIRSEP, User, RCSEXT);
  26.     if (!isreadable(Rcs)) {
  27.     if (isreadable(old)) {
  28.         (void) strcpy(Rcs, old);
  29.     } else {
  30.         /*
  31.          * it is treated as if it were in the repository
  32.          */
  33.     }
  34.     }
  35. }
  36.