Annotation of 43BSDReno/games/fortune/strfile.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (c) 1989 The Regents of the University of California.
                      3:  * All rights reserved.
                      4:  *
                      5:  * This code is derived from software contributed to Berkeley by
                      6:  * Ken Arnold.
                      7:  *
                      8:  * Redistribution and use in source and binary forms are permitted
                      9:  * provided that the above copyright notice and this paragraph are
                     10:  * duplicated in all such forms and that any documentation,
                     11:  * advertising materials, and other materials related to such
                     12:  * distribution and use acknowledge that the software was developed
                     13:  * by the University of California, Berkeley.  The name of the
                     14:  * University may not be used to endorse or promote products derived
                     15:  * from this software without specific prior written permission.
                     16:  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
                     17:  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
                     18:  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
                     19:  *
                     20:  *     @(#)strfile.h   5.7 (Berkeley) 12/15/89
                     21:  */
                     22: 
                     23: #define        STR_ENDSTRING(line,tbl) \
                     24:        ((line)[0] == (tbl).str_delim && (line)[1] == '\n')
                     25: 
                     26: typedef struct {                               /* information table */
                     27: #define        VERSION         1
                     28:        unsigned long   str_version;            /* version number */
                     29:        unsigned long   str_numstr;             /* # of strings in the file */
                     30:        unsigned long   str_longlen;            /* length of longest string */
                     31:        unsigned long   str_shortlen;           /* length of shortest string */
                     32: #define        STR_RANDOM      0x1                     /* randomized pointers */
                     33: #define        STR_ORDERED     0x2                     /* ordered pointers */
                     34: #define        STR_ROTATED     0x4                     /* rot-13'd text */
                     35:        unsigned long   str_flags;              /* bit field for flags */
                     36:        unsigned char   stuff[4];               /* long aligned space */
                     37: #define        str_delim       stuff[0]                /* delimiting character */
                     38: } STRFILE;

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.