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 libraries 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: disdel.c /main/2 1996/05/09 04:04:57 drk $ */
25 * COMPONENT_NAME: austext
31 * OBJECT CODE ONLY SOURCE MATERIALS
33 /*-----------------------------------------------------------------------
34 disdel.c -- db_VISTA set disconnection/deletion module
36 (C) Copyright 1985, 1986, 1987 by Raima Corp.
37 -----------------------------------------------------------------------*/
39 /* ********************** EDIT HISTORY *******************************
41 SCR DATE INI DESCRIPTION
42 ----- --------- --- -----------------------------------------------------
43 04-Aug-88 RTK MULTI_TASK changes
44 518 06-Jan-89 RSC d_discon infinite loops (not checking d_discon status)
51 /* Disconnect from all sets (owner and member) and delete record
54 d_disdel(TASK_DBN_ONLY)
58 int rectype, nset, cset;
60 DB_ADDR dba, odba, mdba;
61 DB_ADDR FAR *co_ptr, FAR *cm_ptr;
62 SET_ENTRY FAR *set_ptr;
63 MEMBER_ENTRY FAR *mem_ptr;
66 DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
68 if ( d_crtype(&rectype TASK_PARM DBN_PARM) != S_OKAY )
70 rectype += NUM2INT(-RECMARK, rt_offset);
72 d_crget(&dba TASK_PARM DBN_PARM);
73 for (set = 0, set_ptr = &set_table[ORIGIN(st_offset)];
74 set < TABLE_SIZE(Size_st);
77 cset = set + ORIGIN(st_offset);
78 co_ptr = &curr_own[cset];
79 cm_ptr = &curr_mem[cset];
82 if (set_ptr->st_own_rt == rectype) {
83 /* disconnect all member records from set s */
84 d_setor(nset TASK_PARM DBN_PARM);
85 while (d_findfm(nset TASK_PARM DBN_PARM) == S_OKAY)
86 if (d_discon(nset TASK_PARM DBN_PARM) < S_OKAY)
88 d_setro(nset TASK_PARM DBN_PARM);
90 for (mem = set_ptr->st_members, memtot = mem + set_ptr->st_memtot,
91 mem_ptr = &member_table[mem];
94 if (mem_ptr->mt_record == rectype) {
95 /* disconnect current record from set */
96 if (d_ismember(nset TASK_PARM DBN_PARM) == S_OKAY) {
97 d_csmset(nset, &dba TASK_PARM DBN_PARM);
98 if (d_discon(nset TASK_PARM DBN_PARM) < S_OKAY)
116 RETURN( d_delete(TASK_DBN_ONLY) );
118 /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin disdel.c */