[BACK]Return to getcap.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libc / gen

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/lib/libc/gen/getcap.c between version 1.1.1.1 and 1.10.4.1

version 1.1.1.1, 1995/02/25 09:11:40 version 1.10.4.1, 1996/09/16 18:40:22
Line 1 
Line 1 
   /*      $NetBSD$        */
   
 /*-  /*-
  * Copyright (c) 1992, 1993   * Copyright (c) 1992, 1993
  *      The Regents of the University of California.  All rights reserved.   *      The Regents of the University of California.  All rights reserved.
Line 35 
Line 37 
  */   */
   
 #if defined(LIBC_SCCS) && !defined(lint)  #if defined(LIBC_SCCS) && !defined(lint)
   #if 0
 static char sccsid[] = "@(#)getcap.c    8.3 (Berkeley) 3/25/94";  static char sccsid[] = "@(#)getcap.c    8.3 (Berkeley) 3/25/94";
   #else
   static char rcsid[] = "$NetBSD$";
   #endif
 #endif /* LIBC_SCCS and not lint */  #endif /* LIBC_SCCS and not lint */
   
   #include "namespace.h"
 #include <sys/types.h>  #include <sys/types.h>
   
 #include <ctype.h>  #include <ctype.h>
Line 242  getent(cap, len, db_array, fd, name, dep
Line 249  getent(cap, len, db_array, fd, name, dep
                  */                   */
   
                 if (fd >= 0) {                  if (fd >= 0) {
                         (void)lseek(fd, (off_t)0, L_SET);                          (void)lseek(fd, (off_t)0, SEEK_SET);
                         myfd = 0;                          myfd = 0;
                 } else {                  } else {
                         (void)snprintf(pbuf, sizeof(pbuf), "%s.db", *db_p);                          (void)snprintf(pbuf, sizeof(pbuf), "%s.db", *db_p);
Line 270  getent(cap, len, db_array, fd, name, dep
Line 277  getent(cap, len, db_array, fd, name, dep
                                 fd = open(*db_p, O_RDONLY, 0);                                  fd = open(*db_p, O_RDONLY, 0);
                                 if (fd < 0) {                                  if (fd < 0) {
                                         /* No error on unfound file. */                                          /* No error on unfound file. */
                                         if (errno == ENOENT)                                          continue;
                                                 continue;  
                                         free(record);  
                                         return (-2);  
                                 }                                  }
                                 myfd = 1;                                  myfd = 1;
                         }                          }

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.10.4.1

CVSweb <webmaster@jp.NetBSD.org>