Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – tendra.SVN – Blame – /branches/tendra5/src/utilities/sid/cstring-list.c – Rev 2

Subversion Repositories tendra.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 7u83 1
/*
2
    		 Crown Copyright (c) 1997
3
 
4
    This TenDRA(r) Computer Program is subject to Copyright
5
    owned by the United Kingdom Secretary of State for Defence
6
    acting through the Defence Evaluation and Research Agency
7
    (DERA).  It is made available to Recipients with a
8
    royalty-free licence for its use, reproduction, transfer
9
    to other parties and amendment for any purpose not excluding
10
    product development provided that any such use et cetera
11
    shall be deemed to be acceptance of the following conditions:-
12
 
13
        (1) Its Recipients shall ensure that this Notice is
14
        reproduced upon any copies or amended versions of it;
15
 
16
        (2) Any amended version of it shall be clearly marked to
17
        show both the nature of and the organisation responsible
18
        for the relevant amendment or amendments;
19
 
20
        (3) Its onward transfer from a recipient to another
21
        party shall be deemed to be that party's acceptance of
22
        these conditions;
23
 
24
        (4) DERA gives no warranty or assurance as to its
25
        quality or suitability for any purpose and DERA accepts
26
        no liability whatsoever in relation to any use to which
27
        it may be put.
28
*/
29
 
30
 
31
/**** cstring-list.c --- String list ADT.
32
 *
33
 ** Author: Steve Folkes <smf@hermes.mod.uk>
34
 *
35
 **** Commentary:
36
 *
37
 * This file implements the string list facility specified in the file
38
 * "cstring-list.h".  See that file for more details.
39
 *
40
 **** Change Log:
41
 * $Log: cstring-list.c,v $
42
 * Revision 1.1.1.1  1998/01/17  15:57:45  release
43
 * First version to be checked into rolling release.
44
 *
45
 * Revision 1.2  1994/12/12  11:44:30  smf
46
 * Performing changes for 'CR94_178.sid+tld-update' - bringing in line with
47
 * OSSG C Coding Standards.
48
 *
49
 * Revision 1.1.1.1  1994/07/25  16:05:48  smf
50
 * Initial import of library shared files.
51
 *
52
**/
53
 
54
/****************************************************************************/
55
 
56
#include "cstring-list.h"
57
 
58
/*--------------------------------------------------------------------------*/
59
 
60
void
61
cstring_list_init PROTO_N ((list))
62
		  PROTO_T (CStringListP list)
63
{
64
    list->head = NIL (CStringListEntryP);
65
    list->tail = &(list->head);
66
}
67
 
68
void
69
cstring_list_append PROTO_N ((list, string))
70
		    PROTO_T (CStringListP list X
71
			     CStringP     string)
72
{
73
    CStringListEntryP entry = ALLOCATE (CStringListEntryT);
74
 
75
    entry->next   = NIL (CStringListEntryP);
76
    entry->string = string;
77
    *(list->tail) = entry;
78
    list->tail    = &(entry->next);
79
}
80
 
81
CStringListEntryP
82
cstring_list_head PROTO_N ((list))
83
		  PROTO_T (CStringListP list)
84
{
85
    return (list->head);
86
}
87
 
88
CStringP
89
cstring_list_entry_string PROTO_N ((entry))
90
			  PROTO_T (CStringListEntryP entry)
91
{
92
    return (entry->string);
93
}
94
 
95
CStringListEntryP
96
cstring_list_entry_deallocate PROTO_N ((entry))
97
			      PROTO_T (CStringListEntryP entry)
98
{
99
    CStringListEntryP next = entry->next;
100
 
101
    DEALLOCATE (entry);
102
    return (next);
103
}
104
 
105
/*
106
 * Local variables(smf):
107
 * eval: (include::add-path-entry "../os-interface" "../generated")
108
 * end:
109
**/