Remove building with NOCRYPTO option
[minix.git] / external / bsd / flex / dist / tables.h
blobd9df00d1b93886f3b76613461bbcd1179f73b682
1 /* $NetBSD: tables.h,v 1.2 2014/10/29 18:28:36 christos Exp $ */
3 /* tables.h - tables serialization code
5 * Copyright (c) 1990 The Regents of the University of California.
6 * All rights reserved.
8 * This code is derived from software contributed to Berkeley by
9 * Vern Paxson.
11 * The United States Government has rights in this work pursuant
12 * to contract no. DE-AC03-76SF00098 between the United States
13 * Department of Energy and the University of California.
15 * This file is part of flex.
17 * Redistribution and use in source and binary forms, with or without
18 * modification, are permitted provided that the following conditions
19 * are met:
21 * 1. Redistributions of source code must retain the above copyright
22 * notice, this list of conditions and the following disclaimer.
23 * 2. Redistributions in binary form must reproduce the above copyright
24 * notice, this list of conditions and the following disclaimer in the
25 * documentation and/or other materials provided with the distribution.
27 * Neither the name of the University nor the names of its contributors
28 * may be used to endorse or promote products derived from this software
29 * without specific prior written permission.
31 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
32 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
33 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
34 * PURPOSE.
37 #ifndef TABLES_H
38 #define TABLES_H
40 #ifdef __cplusplus
41 /* *INDENT-OFF* */
42 extern "C" {
43 /* *INDENT-ON* */
44 #endif
46 /* Tables serialization API declarations. */
47 #include "tables_shared.h"
48 struct yytbl_writer {
49 FILE *out;
50 flex_uint32_t total_written;
51 /**< bytes written so far */
52 fpos_t th_ssize_pos;
53 /**< position of th_ssize */
56 /* These are used by main.c, gen.c, etc.
57 * tablesext - if true, create external tables
58 * tablesfilename - filename for external tables
59 * tablesname - name that goes in serialized data, e.g., "yytables"
60 * tableswr - writer for external tables
61 * tablesverify - true if tables-verify option specified
62 * gentables - true if we should spit out the normal C tables
64 extern bool tablesext, tablesverify,gentables;
65 extern char *tablesfilename, *tablesname;
66 extern struct yytbl_writer tableswr;
68 int yytbl_writer_init (struct yytbl_writer *, FILE *);
69 int yytbl_hdr_init (struct yytbl_hdr *th, const char *version_str,
70 const char *name);
71 int yytbl_data_init (struct yytbl_data *tbl, enum yytbl_id id);
72 int yytbl_data_destroy (struct yytbl_data *td);
73 int yytbl_hdr_fwrite (struct yytbl_writer *wr,
74 const struct yytbl_hdr *th);
75 int yytbl_data_fwrite (struct yytbl_writer *wr, struct yytbl_data *td);
76 void yytbl_data_compress (struct yytbl_data *tbl);
77 struct yytbl_data *mkftbl (void);
80 #ifdef __cplusplus
81 /* *INDENT-OFF* */
83 /* *INDENT-ON* */
84 #endif
85 #endif
87 /* vim:set expandtab cindent tabstop=4 softtabstop=4 shiftwidth=4 textwidth=0: */