2015-04-11 07:44:37 +08:00
|
|
|
/* stdio.h */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (c) 2014 Wind River Systems, Inc.
|
|
|
|
*
|
2017-01-19 09:01:01 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2015-04-11 07:44:37 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __INC_stdio_h__
|
|
|
|
#define __INC_stdio_h__
|
|
|
|
|
2017-02-28 04:50:45 +08:00
|
|
|
#include <toolchain.h>
|
2015-04-11 07:44:37 +08:00
|
|
|
#include <stdarg.h> /* Needed to get definition of va_list */
|
2015-12-18 00:04:31 +08:00
|
|
|
#include <bits/restrict.h>
|
2016-09-13 10:19:07 +08:00
|
|
|
#include <stddef.h>
|
2015-04-11 07:44:37 +08:00
|
|
|
|
2016-01-23 01:38:49 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2015-04-11 07:44:37 +08:00
|
|
|
#if !defined(__FILE_defined)
|
|
|
|
#define __FILE_defined
|
|
|
|
typedef int FILE;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !defined(EOF)
|
|
|
|
#define EOF (-1)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define stdin ((FILE *) 1)
|
|
|
|
#define stdout ((FILE *) 2)
|
|
|
|
#define stderr ((FILE *) 3)
|
|
|
|
|
|
|
|
/*
|
|
|
|
* NOTE: This libc implementation does not define the routines
|
|
|
|
* declared below.
|
|
|
|
*/
|
|
|
|
|
2017-02-28 04:50:45 +08:00
|
|
|
int __printf_like(1, 2) printf(const char *_MLIBC_RESTRICT fmt, ...);
|
|
|
|
int __printf_like(3, 4) snprintf(char *_MLIBC_RESTRICT s, size_t len,
|
|
|
|
const char *_MLIBC_RESTRICT fmt, ...);
|
|
|
|
int __printf_like(2, 3) sprintf(char *_MLIBC_RESTRICT s,
|
|
|
|
const char *_MLIBC_RESTRICT fmt, ...);
|
|
|
|
int __printf_like(2, 3) fprintf(FILE * _MLIBC_RESTRICT stream,
|
|
|
|
const char *_MLIBC_RESTRICT format, ...);
|
2015-04-11 07:44:37 +08:00
|
|
|
|
|
|
|
|
2017-02-28 04:50:45 +08:00
|
|
|
int __printf_like(1, 0) vprintf(const char *_MLIBC_RESTRICT fmt, va_list list);
|
|
|
|
int __printf_like(3, 0) vsnprintf(char *_MLIBC_RESTRICT s, size_t len,
|
|
|
|
const char *_MLIBC_RESTRICT fmt,
|
|
|
|
va_list list);
|
|
|
|
int __printf_like(2, 0) vsprintf(char *_MLIBC_RESTRICT s,
|
|
|
|
const char *_MLIBC_RESTRICT fmt, va_list list);
|
|
|
|
int __printf_like(2, 0) vfprintf(FILE * _MLIBC_RESTRICT stream,
|
|
|
|
const char *_MLIBC_RESTRICT format,
|
|
|
|
va_list ap);
|
2015-04-11 07:44:37 +08:00
|
|
|
|
2015-04-08 00:59:24 +08:00
|
|
|
int puts(const char *s);
|
2015-04-11 07:44:37 +08:00
|
|
|
|
2015-05-12 23:12:36 +08:00
|
|
|
int fputc(int c, FILE *stream);
|
2017-02-03 04:01:59 +08:00
|
|
|
int fputs(const char *_MLIBC_RESTRICT s, FILE *_MLIBC_RESTRICT stream);
|
|
|
|
size_t fwrite(const void *_MLIBC_RESTRICT ptr, size_t size, size_t nitems,
|
|
|
|
FILE *_MLIBC_RESTRICT stream);
|
2015-04-11 07:44:37 +08:00
|
|
|
|
2016-01-23 01:38:49 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2015-04-11 07:44:37 +08:00
|
|
|
#endif /* __INC_stdio_h__ */
|