summaryrefslogtreecommitdiffstats
path: root/safe.h
blob: c5cb55eb3383b7820278b580cbfdf164e3e1c51b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* ################################################################### */
/* Copyright 2015, Pierre Gentile (p.gen.progs@gmail.com)              */
/*                                                                     */
/* This Source Code Form is subject to the terms of the Mozilla Public */
/* License, v. 2.0. If a copy of the MPL was not distributed with this */
/* file, You can obtain one at https://mozilla.org/MPL/2.0/.           */
/* ################################################################### */

#ifndef SAFE_H
#define SAFE_H

int
fputs_safe(const char * restrict s, FILE * restrict stream);

int
fputc_safe(int c, FILE * stream);

int
tcsetattr_safe(int fildes, int optional_actions,
               const struct termios * termios_p);

FILE *
fopen_safe(const char * restrict stream, const char * restrict mode);

#endif