2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: setdb.c /main/2 1996/05/09 04:16:53 drk $ */
25 * COMPONENT_NAME: austext
31 * OBJECT CODE ONLY SOURCE MATERIALS
33 /*-----------------------------------------------------------------------
34 setdb.c -- db_VISTA current database set module.
36 (C) Copyright 1987 by Raima Corporation.
37 -----------------------------------------------------------------------*/
39 /* ********************** EDIT HISTORY *******************************
41 SCR DATE INI DESCRIPTION
42 ----- --------- --- -----------------------------------------------------
43 04-Aug-88 RTK MULTI_TASK changes
44 419 05-Oct-88 RSC also need to set curr_rn_table
45 420 06-Dec-88 WLW Updated Curr_db_table when using setdb.
53 /* Set current database
55 d_setdb(dbn TASK_PARM)
56 int dbn; /* database number */
59 DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_NOIO));
61 /* For WINDOWS, all that needs to happen here is the dbn_check() which
62 DB_ENTER results in */
63 if ( dbn < 0 || dbn >= no_of_dbs )
64 RETURN( dberr( S_INVDB ) );
67 curr_db_table->curr_dbt_rec = curr_rec;
68 curr_db_table = &db_table[curr_db = dbn];
69 curr_rn_table = &rn_table[dbn]; /*[419]*/
70 curr_rec = curr_db_table->curr_dbt_rec;
72 RETURN( db_status = S_OKAY );
75 /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin setdb.c */