(root)/
gettext-0.22.4/
libtextstyle/
lib/
misc.h
       1  /* Miscellaneous public API.
       2     Copyright (C) 2019 Free Software Foundation, Inc.
       3     Written by Bruno Haible <bruno@clisp.org>, 2019.
       4  
       5     This program is free software: you can redistribute it and/or modify
       6     it under the terms of the GNU General Public License as published by
       7     the Free Software Foundation; either version 3 of the License, or
       8     (at your option) any later version.
       9  
      10     This program is distributed in the hope that it will be useful,
      11     but WITHOUT ANY WARRANTY; without even the implied warranty of
      12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      13     GNU General Public License for more details.
      14  
      15     You should have received a copy of the GNU General Public License
      16     along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
      17  
      18  #ifndef _MISC_H
      19  #define _MISC_H
      20  
      21  #include "styled-ostream.h"
      22  #include "term-ostream.h"
      23  
      24  #ifdef __cplusplus
      25  extern "C" {
      26  #endif
      27  
      28  
      29  /* Create an output stream referring to the file descriptor FD, styled with
      30     the file CSS_FILENAME if possible.
      31     FILENAME is used only for error messages.
      32     TTY_CONTROL specifies the amount of control to take over the underlying tty.
      33     Note that the resulting stream must be closed before FD can be closed.  */
      34  extern styled_ostream_t
      35         styled_ostream_create (int fd, const char *filename,
      36                                ttyctl_t tty_control,
      37                                const char *css_filename);
      38  
      39  /* Set the exit value upon failure within libtextstyle.  */
      40  extern void libtextstyle_set_failure_exit_code (int exit_code);
      41  
      42  
      43  #ifdef __cplusplus
      44  }
      45  #endif
      46  
      47  #endif /* _MISC_H */