|
NCBI Home IEB Home C Toolkit docs C++ Toolkit source browser C Toolkit source browser (2) |
NCBI C Toolkit Cross ReferenceC/biostruc/dvncode.h |
source navigation diff markup identifier search freetext search file search |
1 /* dvncode.h
2 * ===========================================================================
3 *
4 * PUBLIC DOMAIN NOTICE
5 * National Center for Biotechnology Information
6 *
7 * This software/database is a "United States Government Work" under the
8 * terms of the United States Copyright Act. It was written as part of
9 * the author's official duties as a United States Government employee and
10 * thus cannot be copyrighted. This software/database is freely available
11 * to the public for use. The National Library of Medicine and the U.S.
12 * Government have not placed any restriction on its use or reproduction.
13 *
14 * Although all reasonable efforts have been taken to ensure the accuracy
15 * and reliability of the software and data, the NLM and the U.S.
16 * Government do not and cannot warrant the performance or results that
17 * may be obtained by using this software or data. The NLM and the U.S.
18 * Government disclaim all warranties, express or implied, including
19 * warranties of performance, merchantability or fitness for any particular
20 * purpose.
21 *
22 * Please cite the author in any work or product based on this material.
23 *
24 * ===========================================================================
25 *
26 * File Name: dvncode.h
27 *
28 * Author: Hogue
29 *
30 * Version Creation Date: 25 JULY 95
31 *
32 * $Revision: 6.1 $
33 *
34 * File Description:
35 * Doubly-linked list functions like ValNode.
36 *
37 *
38 *
39 * Modifications:
40 * --------------------------------------------------------------------------
41 * Date Name Description of modification
42 * ------- ---------- -----------------------------------------------------
43 *
44 * $Log: dvncode.h,v $
45 * Revision 6.1 1999/04/26 20:49:59 lewisg
46 * changed arguments named list to fix visual c++ bug
47 *
48 * Revision 6.0 1997/08/25 18:10:37 madden
49 * Revision changed to 6.0
50 *
51 * Revision 5.0 1996/05/28 14:02:09 ostell
52 * Set to revision 5.0
53 *
54 * Revision 1.2 1995/08/03 21:44:33 kans
55 * numerous changes
56 *
57 *
58 * ==========================================================================
59 */
60
61
62 #ifndef _DVNCODE_
63 #define _DVNCODE_
64
65 #ifdef __cplusplus
66 extern "C" {
67 #endif
68
69 typedef struct dvalnode {
70 Nlm_Int2 choice; /* to pick a choice or numbering */
71 DataVal data; /* attached data */
72 struct dvalnode PNTR next; /* next in linked list */
73 struct dvalnode PNTR last; /* last in linked list */
74 } DValNode, PNTR DValNodePtr;
75
76 typedef void (LIBCALLBACK *pFreeFunc)(Pointer pThis);
77
78
79 /* function prototypes here */
80 DValNodePtr LIBCALL DValNodeNew (DValNodePtr dvp);
81 DValNodePtr LIBCALL DValNodeAdd (DValNodePtr PNTR head);
82 DValNodePtr LIBCALL DValNodeLink (DValNodePtr PNTR head, DValNodePtr newnode);
83 DValNodePtr LIBCALL DValNodeAddStr (DValNodePtr PNTR head,
84 Nlm_Int2 choice, Nlm_CharPtr str);
85 DValNodePtr LIBCALL DValNodeCopyStr (DValNodePtr PNTR head, Nlm_Int2 choice, Nlm_CharPtr str);
86 DValNodePtr LIBCALL DValNodeAddInt (DValNodePtr PNTR head, Nlm_Int2 choice, Nlm_Int4 value);
87 DValNodePtr LIBCALL DValNodeAddBoolean (DValNodePtr PNTR head, Nlm_Int2 choice, Nlm_Boolean value);
88 DValNodePtr LIBCALL DValNodeAddFloat (DValNodePtr PNTR head, Nlm_Int2 choice, Nlm_FloatHi value);
89 DValNodePtr LIBCALL DValNodeAddPointer (DValNodePtr PNTR head, Nlm_Int2 choice, Nlm_VoidPtr value);
90 DValNodePtr LIBCALL DValNodeAddFunction (DValNodePtr PNTR head, Nlm_Int2 choice, Nlm_FnPtr value);
91 DValNodePtr LIBCALL DValNodeFree (DValNodePtr dvp);
92 DValNodePtr LIBCALL DValNodeFreeData (DValNodePtr dvp, pFreeFunc freefn);
93 DValNodePtr LIBCALL DValNodeExtract (DValNodePtr PNTR headptr, Nlm_Int2 choice);
94 DValNodePtr LIBCALL DValNodeExtractList (DValNodePtr PNTR headptr, Nlm_Int2 choice);
95 DValNodePtr LIBCALL DValNodeFindNext (DValNodePtr head, DValNodePtr curr, Nlm_Int2 choice);
96 Nlm_Int2 LIBCALL DVNodeListLen (DValNodePtr head);
97 Nlm_Boolean LIBCALL DValNodeRead (DValNodePtr dvp, Nlm_VoidPtr ptr, size_t size);
98 Nlm_Boolean LIBCALL DValNodeWrite (DValNodePtr dvp, Nlm_VoidPtr ptr, size_t size, pFreeFunc freefn);
99 Nlm_Boolean LIBCALL DVNodeListAppend (DValNodePtr head, Nlm_VoidPtr ptr, size_t size);
100 Nlm_Boolean LIBCALL DValNodeInsert (DValNodePtr where, DValNodePtr what);
101 DValNodePtr LIBCALL DValNodeHeadLink (DValNodePtr pdnList, DValNodePtr dvp);
102 DValNodePtr LIBCALL DValNodeUnlink (DValNodePtr pdnList, DValNodePtr dvp);
103 DValNodePtr LIBCALL DValNodeListDelNode (DValNodePtr pdnList, DValNodePtr dvp, pFreeFunc freefn);
104 Nlm_Boolean LIBCALL DValNodeListInsert(DValNodePtr wherelist, DValNodePtr whatlist);
105 Nlm_Boolean LIBCALL DValNodeListCat(DValNodePtr dest, DValNodePtr source);
106 Nlm_Boolean LIBCALL ValNodeListCat(ValNodePtr dest, ValNodePtr source);
107 DValNodePtr LIBCALL DValNodeListCut(DValNodePtr what, DValNodePtr where);
108
109 #ifdef __cplusplus
110 }
111 #endif
112
113
114 #endif
115
116 |
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more information. |