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

  1. #ifndef lint
  2. static char rcsid[] = "$Id: register.c,v 1.5 89/11/19 23:20:21 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.  * Register
  12.  *
  13.  *    Enters the given file name/version/time-stamp into the administration,
  14.  *    removing the old entry first, if necessary.
  15.  */
  16.  
  17. #include "cvs.h"
  18.  
  19. Register(fname, vn, ts)
  20.     char *fname;
  21.     char *vn;
  22.     char *ts;
  23. {
  24.     FILE *fpin;
  25.  
  26.     Scratch_Entry(fname);
  27.     fpin = open_file(CVSADM_ENT, "a");
  28.     if (fprintf(fpin, "%s|%s|\n", vn, ts) == EOF)
  29.     error(1, "cannot write to file %s", fname);
  30.     (void) fclose(fpin);
  31. }
  32.