12490Sjkh/*-
22490Sjkh * Copyright (c) 1991, 1993
32490Sjkh *	The Regents of the University of California.  All rights reserved.
42490Sjkh *
52490Sjkh * This code is derived from software contributed to Berkeley by
62490Sjkh * Ken Arnold.
72490Sjkh *
82490Sjkh * Redistribution and use in source and binary forms, with or without
92490Sjkh * modification, are permitted provided that the following conditions
102490Sjkh * are met:
112490Sjkh * 1. Redistributions of source code must retain the above copyright
122490Sjkh *    notice, this list of conditions and the following disclaimer.
132490Sjkh * 2. Redistributions in binary form must reproduce the above copyright
142490Sjkh *    notice, this list of conditions and the following disclaimer in the
152490Sjkh *    documentation and/or other materials provided with the distribution.
16203926Suqs * 3. Neither the name of the University nor the names of its contributors
172490Sjkh *    may be used to endorse or promote products derived from this software
182490Sjkh *    without specific prior written permission.
192490Sjkh *
202490Sjkh * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
212490Sjkh * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
222490Sjkh * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
232490Sjkh * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
242490Sjkh * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
252490Sjkh * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
262490Sjkh * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
272490Sjkh * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
282490Sjkh * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
292490Sjkh * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
302490Sjkh * SUCH DAMAGE.
312490Sjkh *
322490Sjkh *	@(#)strfile.h	8.1 (Berkeley) 5/31/93
332490Sjkh */
3451864Sdcs/* $FreeBSD$ */
352490Sjkh
36142022Sru#include <sys/types.h>
37142022Sru
382490Sjkh#define	STR_ENDSTRING(line,tbl) \
3915944Sache	(((unsigned char)(line)[0]) == (tbl).str_delim && (line)[1] == '\n')
402490Sjkh
412490Sjkhtypedef struct {				/* information table */
422490Sjkh#define	VERSION		1
43142022Sru	uint32_t	str_version;		/* version number */
44142022Sru	uint32_t	str_numstr;		/* # of strings in the file */
45142022Sru	uint32_t	str_longlen;		/* length of longest string */
46142022Sru	uint32_t	str_shortlen;		/* length of shortest string */
472490Sjkh#define	STR_RANDOM	0x1			/* randomized pointers */
482490Sjkh#define	STR_ORDERED	0x2			/* ordered pointers */
492490Sjkh#define	STR_ROTATED	0x4			/* rot-13'd text */
5051864Sdcs#define	STR_COMMENTS	0x8			/* embedded comments */
51142022Sru	uint32_t	str_flags;		/* bit field for flags */
52142022Sru	unsigned char	stuff[4];		/* 64-bit aligned space */
532490Sjkh#define	str_delim	stuff[0]		/* delimiting character */
542490Sjkh} STRFILE;
55