Imported Upstream version 1.11
[platform/upstream/gdbm.git] / compat / dbmdirfno.c
1 /* dbmdirfno.c - The .dir file number for NDBM interface. */
2
3 /* This file is part of GDBM, the GNU data base manager.
4    Copyright (C) 1990, 1991, 1993, 2007, 2011, 2013 Free Software Foundation,
5    Inc.
6
7    GDBM is free software; you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation; either version 3, or (at your option)
10    any later version.
11
12    GDBM is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16
17    You should have received a copy of the GNU General Public License
18    along with GDBM. If not, see <http://www.gnu.org/licenses/>.   */
19
20 /* Include system configuration before all else. */
21 #include "autoconf.h"
22 #include "ndbm.h"
23 #include "gdbmdefs.h"
24
25 /* Return the file number of the DBF file.  NDBM original wanted the .dir
26    file number.  Since we have only one file number, we return it. */
27
28 int
29 dbm_dirfno (DBM *dbm)
30 {
31   return dbm->dirfd;
32 }