change obscene files to be rotated on disk
[unix-history] / usr / src / games / fortune / strfile / strfile.h
/*
* Copyright (c) 1989 The Regents of the University of California.
* All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Ken Arnold.
*
* Redistribution and use in source and binary forms are permitted
* provided that the above copyright notice and this paragraph are
* duplicated in all such forms and that any documentation,
* advertising materials, and other materials related to such
* distribution and use acknowledge that the software was developed
* by the University of California, Berkeley. The name of the
* University may not be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* @(#)strfile.h 5.5 (Berkeley) %G%
*/
# ifndef __STRFILE__
# define __STRFILE__
/*
* bits for flag field
*/
# define STR_RANDOM 0x1
# define STR_ORDERED 0x2
# define STR_ROTATED 0x4
# define STR_ENDSTRING(line,tbl) ((line)[0] == (tbl).str_delim && (line)[1] == '\n')
typedef struct { /* information table */
unsigned long str_numstr; /* # of strings in the file */
unsigned long str_longlen; /* length of longest string */
unsigned long str_shortlen; /* length of shortest string */
unsigned char str_flags; /* bit field for flags */
char str_delim; /* delimiting character */
} STRFILE;
# endif /* __STRFILE__ */