[BACK]Return to indent.h CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / usr.bin / indent

Annotation of src/usr.bin/indent/indent.h, Revision 1.9

1.9     ! rillig      1: /*     $NetBSD: indent.h,v 1.8 2021/03/13 00:26:56 rillig Exp $        */
1.1       kamil       2:
                      3: /*-
                      4:  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
                      5:  *
                      6:  * Copyright (c) 2001 Jens Schweikhardt
                      7:  * All rights reserved.
                      8:  *
                      9:  * Redistribution and use in source and binary forms, with or without
                     10:  * modification, are permitted provided that the following conditions
                     11:  * are met:
                     12:  * 1. Redistributions of source code must retain the above copyright
                     13:  *    notice, this list of conditions and the following disclaimer.
                     14:  * 2. Redistributions in binary form must reproduce the above copyright
                     15:  *    notice, this list of conditions and the following disclaimer in the
                     16:  *    documentation and/or other materials provided with the distribution.
                     17:  *
                     18:  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
                     19:  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     20:  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     21:  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE
                     22:  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     23:  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     24:  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     25:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     26:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     27:  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     28:  * SUCH DAMAGE.
                     29:  */
                     30:
                     31: #if 0
                     32: #if defined(__NetBSD__)
1.9     ! rillig     33: __RCSID("$NetBSD: indent.h,v 1.8 2021/03/13 00:26:56 rillig Exp $");
1.1       kamil      34: #elif defined(__FreeBSD__)
                     35: __FBSDID("$FreeBSD: head/usr.bin/indent/indent.h 336333 2018-07-16 05:46:50Z pstef $");
                     36: #endif
                     37: #endif
                     38:
1.3       rillig     39: #include "indent_codes.h"
                     40: #include "indent_globs.h"
                     41:
1.1       kamil      42: #ifndef nitems
                     43: #define nitems(array) (sizeof (array) / sizeof (array[0]))
                     44: #endif
                     45:
                     46: void   add_typename(const char *);
                     47: void   alloc_typenames(void);
1.8       rillig     48: int    compute_code_column(void);
                     49: int    compute_label_column(void);
1.7       rillig     50: int    count_spaces(int, const char *);
                     51: int    count_spaces_until(int, const char *, const char *);
1.1       kamil      52: void   init_constant_tt(void);
1.5       rillig     53: #ifdef debug
1.9     ! rillig     54: void   debug_vis_range(const char *, const char *, const char *, const char *);
        !            55: void   debug_printf(const char *, ...) __printflike(1, 2);
        !            56: void   debug_println(const char *, ...) __printflike(1, 2);
1.5       rillig     57: const char *token_type_name(token_type);
1.9     ! rillig     58: #else
        !            59: #define debug_printf(fmt, ...) do { } while (false)
        !            60: #define debug_println(fmt, ...) do { } while (false)
        !            61: #define debug_vis_range(prefix, s, e, suffix) do { } while (false)
1.5       rillig     62: #endif
1.4       rillig     63: token_type lexi(struct parser_state *);
1.2       christos   64: void   diag(int, const char *, ...) __printflike(2, 3);
1.1       kamil      65: void   dump_line(void);
                     66: void   fill_buffer(void);
1.4       rillig     67: void   parse(token_type);
1.1       kamil      68: void   pr_comment(void);
                     69: void   set_defaults(void);
                     70: void   set_option(char *);
                     71: void   set_profile(const char *);

CVSweb <webmaster@jp.NetBSD.org>