"Fossies" - the Fresh Open Source Software Archive

Member "tnftp-20200705/libedit/literal.h" (4 Jul 2020, 2212 Bytes) of package /linux/privat/tnftp-20200705.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "literal.h" see the Fossies "Dox" file reference documentation.

    1 /*  $NetBSD: literal.h,v 1.1.1.1 2020/07/04 12:41:18 lukem Exp $    */
    2 /*  from    NetBSD: literal.h,v 1.2 2017/06/30 20:26:52 kre Exp */
    3 
    4 /*-
    5  * Copyright (c) 2017 The NetBSD Foundation, Inc.
    6  * All rights reserved.
    7  *
    8  * This code is derived from software contributed to The NetBSD Foundation
    9  * by Christos Zoulas.
   10  *
   11  * Redistribution and use in source and binary forms, with or without
   12  * modification, are permitted provided that the following conditions
   13  * are met:
   14  * 1. Redistributions of source code must retain the above copyright
   15  *    notice, this list of conditions and the following disclaimer.
   16  * 2. Redistributions in binary form must reproduce the above copyright
   17  *    notice, this list of conditions and the following disclaimer in the
   18  *    documentation and/or other materials provided with the distribution.
   19  *
   20  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   21  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   22  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   23  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   24  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   25  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   26  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   27  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   28  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   29  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   30  * SUCH DAMAGE.
   31  */
   32 
   33 /*
   34  * el.literal.h: Literal character
   35  */
   36 #ifndef _h_el_literal
   37 #define _h_el_literal
   38 
   39 #define EL_LITERAL  ((wint_t)0x80000000)
   40 
   41 typedef struct el_literal_t {
   42     char        **l_buf;    /* array of buffers */
   43     size_t      l_idx;      /* max in use */
   44     size_t      l_len;      /* max allocated */
   45 } el_literal_t;
   46 
   47 libedit_private void literal_init(EditLine *);
   48 libedit_private void literal_end(EditLine *);
   49 libedit_private void literal_clear(EditLine *);
   50 libedit_private wint_t literal_add(EditLine *, const wchar_t *,
   51     const wchar_t *, int *);
   52 libedit_private const char *literal_get(EditLine *, wint_t);
   53 
   54 #endif /* _h_el_literal */