[BACK]Return to cache.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / cvs

Diff for /src/usr.bin/cvs/Attic/cache.c between version 1.1 and 1.2

version 1.1, 2004/07/13 22:02:40 version 1.2, 2004/12/07 17:10:56
Line 1 
Line 1 
 /*      $OpenBSD$       */  /*      $OpenBSD$       */
 /*  /*
  * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>   * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
  * All rights reserved.   * All rights reserved.
  *   *
  * Redistribution and use in source and binary forms, with or without   * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions   * modification, are permitted provided that the following conditions
  * are met:   * are met:
  *   *
  * 1. Redistributions of source code must retain the above copyright   * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.   *    notice, this list of conditions and the following disclaimer.
  * 2. The name of the author may not be used to endorse or promote products   * 2. The name of the author may not be used to endorse or promote products
  *    derived from this software without specific prior written permission.   *    derived from this software without specific prior written permission.
  *   *
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY   * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
Line 21 
Line 21 
  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,   * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR   * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF   * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.   * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */   */
   
 #include <sys/param.h>  #include <sys/param.h>
Line 70 
Line 70 
  * Initialize the RCS file data cache.   * Initialize the RCS file data cache.
  * Returns 0 on success, -1 on failure.   * Returns 0 on success, -1 on failure.
  */   */
   
 int  int
 rcs_cache_init(u_int maxent)  rcs_cache_init(u_int maxent)
 {  {
Line 91 
Line 90 
 /*  /*
  * rcs_cache_destroy()   * rcs_cache_destroy()
  */   */
   
 void  void
 rcs_cache_destroy(void)  rcs_cache_destroy(void)
 {  {
Line 102 
Line 100 
  * rcs_cache_fetch()   * rcs_cache_fetch()
  *   *
  */   */
   
 RCSFILE*  RCSFILE*
 rcs_cache_fetch(const char *path)  rcs_cache_fetch(const char *path)
 {  {
Line 144 
Line 141 
  * should still rcs_close() the file once they are done with it.   * should still rcs_close() the file once they are done with it.
  * Returns 0 on success, or -1 on failure.   * Returns 0 on success, or -1 on failure.
  */   */
   
 int  int
 rcs_cache_store(RCSFILE *rfp)  rcs_cache_store(RCSFILE *rfp)
 {  {
Line 191 
Line 187 
  *   *
  * Hash the <path> string.   * Hash the <path> string.
  */   */
   
 static u_int8_t  static u_int8_t
 rcs_cache_hash(const char *path)  rcs_cache_hash(const char *path)
 {  {

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2