[BACK]Return to term.h CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Annotation of mandoc/term.h, Revision 1.1

1.1     ! kristaps    1: /* $Id: term.c,v 1.4 2009/02/21 15:34:46 kristaps Exp $ */
        !             2: /*
        !             3:  * Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
        !             4:  *
        !             5:  * Permission to use, copy, modify, and distribute this software for any
        !             6:  * purpose with or without fee is hereby granted, provided that the
        !             7:  * above copyright notice and this permission notice appear in all
        !             8:  * copies.
        !             9:  *
        !            10:  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
        !            11:  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
        !            12:  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
        !            13:  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
        !            14:  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
        !            15:  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
        !            16:  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
        !            17:  * PERFORMANCE OF THIS SOFTWARE.
        !            18:  */
        !            19: #ifndef TERM_H
        !            20: #define TERM_H
        !            21:
        !            22: #include "mdoc.h"
        !            23:
        !            24: __BEGIN_DECLS
        !            25:
        !            26: struct termp {
        !            27:        size_t            rmargin;
        !            28:        size_t            maxrmargin;
        !            29:        size_t            maxcols;
        !            30:        size_t            offset;
        !            31:        size_t            col;
        !            32:        int               flags;
        !            33: #define        TERMP_BOLD       (1 << 0)       /* Embolden words. */
        !            34: #define        TERMP_UNDERLINE  (1 << 1)       /* Underline words. */
        !            35: #define        TERMP_NOSPACE    (1 << 2)       /* No space before words. */
        !            36: #define        TERMP_NOLPAD     (1 << 3)       /* No leftpad before flush. */
        !            37: #define        TERMP_NOBREAK    (1 << 4)       /* No break after flush. */
        !            38:        char             *buf;
        !            39: };
        !            40:
        !            41: struct termact {
        !            42:        int             (*pre)(struct termp *,
        !            43:                                const struct mdoc_meta *,
        !            44:                                const struct mdoc_node *);
        !            45:        int             (*post)(struct termp *,
        !            46:                                const struct mdoc_meta *,
        !            47:                                const struct mdoc_node *);
        !            48: };
        !            49:
        !            50: void                     newln(struct termp *);
        !            51: void                     vspace(struct termp *);
        !            52: void                     word(struct termp *, const char *);
        !            53: void                     flushln(struct termp *);
        !            54:
        !            55: const  struct termact   *termacts;
        !            56:
        !            57: __END_DECLS
        !            58:
        !            59: #endif /*!TERM_H*/

CVSweb