summaryrefslogtreecommitdiffstats
path: root/fortune/strfile/strfile.h
diff options
context:
space:
mode:
authorsimonb <simonb@NetBSD.org>1999-08-21 07:02:46 +0000
committersimonb <simonb@NetBSD.org>1999-08-21 07:02:46 +0000
commit9f5f92a0f3b2deed923c1d9c5613fe2dc55e605f (patch)
treed48210e3e87ce7617ea961b9d8cc43db484bccfe /fortune/strfile/strfile.h
parente6838d71c5f48786e0e7ce3a0ff47d9b1f71abcf (diff)
downloadbsdgames-darwin-9f5f92a0f3b2deed923c1d9c5613fe2dc55e605f.tar.gz
bsdgames-darwin-9f5f92a0f3b2deed923c1d9c5613fe2dc55e605f.tar.zst
bsdgames-darwin-9f5f92a0f3b2deed923c1d9c5613fe2dc55e605f.zip
Use new endian-specific conversion macros - 64-bit off_t's are now
the stored the same regardess of the byte order of the generating host. Note in the strfile(8) man page that all fields are big-endian, not in network byte order.
Diffstat (limited to 'fortune/strfile/strfile.h')
-rw-r--r--fortune/strfile/strfile.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/fortune/strfile/strfile.h b/fortune/strfile/strfile.h
index 48efc747..326ccd0d 100644
--- a/fortune/strfile/strfile.h
+++ b/fortune/strfile/strfile.h
@@ -1,4 +1,4 @@
-/* $NetBSD: strfile.h,v 1.3 1995/03/23 08:28:49 cgd Exp $ */
+/* $NetBSD: strfile.h,v 1.4 1999/08/21 07:02:46 simonb Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -38,19 +38,22 @@
* @(#)strfile.h 8.1 (Berkeley) 5/31/93
*/
+#include <sys/types.h>
+#include <sys/endian.h>
+
#define STR_ENDSTRING(line,tbl) \
((line)[0] == (tbl).str_delim && (line)[1] == '\n')
typedef struct { /* information table */
#define VERSION 1
- unsigned long str_version; /* version number */
- 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 */
+ u_int32_t str_version; /* version number */
+ u_int32_t str_numstr; /* # of strings in the file */
+ u_int32_t str_longlen; /* length of longest string */
+ u_int32_t str_shortlen; /* length of shortest string */
#define STR_RANDOM 0x1 /* randomized pointers */
#define STR_ORDERED 0x2 /* ordered pointers */
#define STR_ROTATED 0x4 /* rot-13'd text */
- unsigned long str_flags; /* bit field for flags */
+ u_int32_t str_flags; /* bit field for flags */
unsigned char stuff[4]; /* long aligned space */
#define str_delim stuff[0] /* delimiting character */
} STRFILE;