1 /*
2  *  Copyright (C) 2013-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
3  *  Copyright (C) 2007-2013 Sourcefire, Inc.
4  *
5  *  Authors: Nigel Horne
6  *
7  *  This program is free software; you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License version 2 as
9  *  published by the Free Software Foundation.
10  *
11  *  This program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with this program; if not, write to the Free Software
18  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19  *  MA 02110-1301, USA.
20  *
21  * $Log: line.h,v $
22  * Revision 1.5  2006/04/09 19:59:27  kojm
23  * update GPL headers with new address for FSF
24  *
25  * Revision 1.4  2004/10/14 17:45:55  nigelhorne
26  * Try to reclaim some memory if it becomes low when decoding
27  *
28  * Revision 1.3  2004/08/21 11:57:57  nigelhorne
29  * Use line.[ch]
30  *
31  * Revision 1.2  2004/08/20 19:06:45  kojm
32  * add line.[ch]
33  *
34  * Revision 1.1  2004/08/20 11:58:20  nigelhorne
35  * First draft
36  *
37  */
38 
39 #ifndef __LINE_H
40 #define __LINE_H
41 
42 typedef char line_t; /* first byte is the ref count */
43 
44 line_t *lineCreate(const char *data);
45 line_t *lineLink(line_t *line);
46 line_t *lineUnlink(line_t *line);
47 const char *lineGetData(const line_t *line);
48 
49 #define lineGetRefCount(line) ((unsigned char)line[0])
50 
51 #endif
52