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
24 * Copyright 1993 Open Software Foundation, Inc., Cambridge, Massachusetts.
25 * All rights reserved.
29 * Open Software Foundation, Inc.
31 * Permission is hereby granted to use, copy, modify and freely distribute
32 * the software in this file and its documentation for any purpose without
33 * fee, provided that the above copyright notice appears in all copies and
34 * that both the copyright notice and this permission notice appear in
35 * supporting documentation. Further, provided that the name of Open
36 * Software Foundation, Inc. ("OSF") not be used in advertising or
37 * publicity pertaining to distribution of the software without prior
38 * written permission from OSF. OSF makes no representations about the
39 * suitability of this software for any purpose. It is provided "as is"
40 * without express or implied warranty.
42 /* ________________________________________________________________________
44 * Hypermedia-related facilities.
46 * Entry points for this module:
47 * AddID(elem, idval) add elem-id pair to list of known ids
48 * FindElemByID(idval) find elem by id
49 * ________________________________________________________________________
54 "$XConsortium: hyper.c /main/3 1996/06/19 17:13:07 drk $";
62 #include <sys/types.h>
67 /* ______________________________________________________________________ */
70 AddID(Element *e, char *idval)
74 Calloc(1, id_last, ID);
78 Calloc(1, id_last->next, ID);
79 id_last = id_last->next;
86 FindElemByID(char *idval)
89 for (id=IDList; id; id=id->next)
90 if (!strcmp(id->id, idval)) return id->elem;
94 /* ______________________________________________________________________ */