📄 main.lst
字号:
L 1 "..\Source\main.c"
N/*---------------------------------------------------------------------------------------------------------*/
N/* */
N/* Copyright(c) 2009 Nuvoton Technology Corp. All rights reserved. */
N/* */
N/*---------------------------------------------------------------------------------------------------------*/
N#include <stdio.h>
L 1 "C:\Keil\ARM\RV31\INC\stdio.h" 1
N/* stdio.h: ANSI 'C' (X3J11 Oct 88) library header, section 4.9 */
N/* Copyright (C) Codemist Ltd., 1988-1993 */
N/* Copyright 1991-1998 ARM Limited. All rights reserved. */
N
N/*
N * RCS $Revision: 137287 $
N * Checkin $Date: 2008-08-27 13:36:52 +0100 (Wed, 27 Aug 2008) $
N * Revising $Author: sdouglas $
N */
N
N/*
N * stdio.h declares two types, several macros, and many functions for
N * performing input and output. For a discussion on Streams and Files
N * refer to sections 4.9.2 and 4.9.3 in the above ANSI draft, or to a
N * modern textbook on C.
N */
N
N#ifndef __stdio_h
N#define __stdio_h
N
N#define _ARMABI __declspec(__nothrow)
N
N #ifndef __STDIO_DECLS
N #define __STDIO_DECLS
N
N #undef __CLIBNS
N #ifdef __cplusplus
S namespace std {
S #define __CLIBNS ::std::
S extern "C" {
N #else /* ndef __cplusplus */
N #define __CLIBNS
N #endif /* ndef __cplusplus */
N
N#if defined(__cplusplus) || !defined(__STRICT_ANSI__) || !defined(__size_t)
X#if 0L || !0L || !0L
N /* always defined in C++ and non-strict C for consistency of debug info */
N typedef unsigned int size_t; /* see <stddef.h> */
N #if !defined(__cplusplus) && defined(__STRICT_ANSI__)
X #if !0L && 0L
S #define __size_t 1
N #endif
N#endif
N
N#undef NULL
N#define NULL 0 /* see <stddef.h> */
N
N/* ANSI forbids va_list to be defined here */
N/* keep in step with <stdarg.h> and <wchar.h> */
N#if defined(__cplusplus) || !defined(__STRICT_ANSI__) || !defined(__va_list_defined)
X#if 0L || !0L || !0L
N/* always defined in C++ and non-strict C for consistency of debug info */
N typedef struct __va_list __va_list;
N #if !defined(__cplusplus) && defined(__STRICT_ANSI__)
X #if !0L && 0L
S #define __va_list_defined 1
N #endif
N#endif
N
N /*
N * If the compiler supports signalling nans as per N965 then it
N * will define __SUPPORT_SNAN__, in which case a user may define
N * _WANT_SNAN in order to obtain compliant versions of the printf
N * and scanf families of functions
N */
N#if defined(__SUPPORT_SNAN__) && defined(_WANT_SNAN)
X#if 0L && 0L
S#pragma import(__use_snan)
N#endif
N
Ntypedef struct __fpos_t_struct {
N unsigned __int64 __pos;
N /*
N * this structure is equivalent to an mbstate_t, but we're not
N * allowed to actually define the type name `mbstate_t' within
N * stdio.h
N */
N struct {
N unsigned int __state1, __state2;
N } __mbstate;
N} fpos_t;
N /*
N * fpos_t is an object capable of recording all information needed to
N * specify uniquely every position within a file.
N */
N
N#define _SYS_OPEN 16
N /* _SYS_OPEN defines a limit on the number of open files that is imposed
N * by this C library
N */
N
Ntypedef struct __FILE FILE;
N /*
N * FILE is an object capable of recording all information needed to control
N * a stream, such as its file position indicator, a pointer to its
N * associated buffer, an error indicator that records whether a read/write
N * error has occurred and an end-of-file indicator that records whether the
N * end-of-file has been reached.
N * Its structure is not made known to library clients.
N */
N
Nextern FILE __stdin, __stdout, __stderr;
Nextern FILE *__aeabi_stdin, *__aeabi_stdout, *__aeabi_stderr;
N
N#if _AEABI_PORTABILITY_LEVEL != 0 || (!defined _AEABI_PORTABILITY_LEVEL && __DEFAULT_AEABI_PORTABILITY_LEVEL != 0)
X#if _AEABI_PORTABILITY_LEVEL != 0 || (!0L && __DEFAULT_AEABI_PORTABILITY_LEVEL != 0)
S#define stdin (__CLIBNS __aeabi_stdin)
S /* pointer to a FILE object associated with standard input stream */
S#define stdout (__CLIBNS __aeabi_stdout)
S /* pointer to a FILE object associated with standard output stream */
S#define stderr (__CLIBNS __aeabi_stderr)
S /* pointer to a FILE object associated with standard error stream */
Sextern const int __aeabi_IOFBF;
S#define _IOFBF (__CLIBNS __aeabi_IOFBF)
Sextern const int __aeabi_IONBF;
S#define _IONBF (__CLIBNS __aeabi_IONBF)
Sextern const int __aeabi_IOLBF;
S#define _IOLBF (__CLIBNS __aeabi_IOLBF)
Sextern const int __aeabi_BUFSIZ;
S#define BUFSIZ (__CLIBNS __aeabi_BUFSIZ)
Sextern const int __aeabi_FOPEN_MAX;
S#define FOPEN_MAX (__CLIBNS __aeabi_FOPEN_MAX)
Sextern const int __aeabi_TMP_MAX;
S#define TMP_MAX (__CLIBNS __aeabi_TMP_MAX)
Sextern const int __aeabi_FILENAME_MAX;
S#define FILENAME_MAX (__CLIBNS __aeabi_FILENAME_MAX)
Sextern const int __aeabi_L_tmpnam;
S#define L_tmpnam (__CLIBNS __aeabi_L_tmpnam)
N#else
N#define stdin (&__CLIBNS __stdin)
N /* pointer to a FILE object associated with standard input stream */
N#define stdout (&__CLIBNS __stdout)
N /* pointer to a FILE object associated with standard output stream */
N#define stderr (&__CLIBNS __stderr)
N /* pointer to a FILE object associated with standard error stream */
N
N#define _IOFBF 0x100 /* fully buffered IO */
N#define _IOLBF 0x200 /* line buffered IO */
N#define _IONBF 0x400 /* unbuffered IO */
N
N /* Various default file IO buffer sizes */
N#define BUFSIZ (512) /* system buffer size (as used by setbuf) */
N
N#define FOPEN_MAX _SYS_OPEN
N /*
N * an integral constant expression that is the minimum number of files that
N * this implementation guarantees can be open simultaneously.
N */
N
N#define FILENAME_MAX 256
N /*
N * an integral constant expression that is the size of an array of char
N * large enough to hold the longest filename string
N */
N#define L_tmpnam FILENAME_MAX
N /*
N * an integral constant expression that is the size of an array of char
N * large enough to hold a temporary file name string generated by the
N * tmpnam function.
N */
N#define TMP_MAX 256
N /*
N * an integral constant expression that is the minimum number of unique
N * file names that shall be generated by the tmpnam function.
N */
N
N#endif
N
N#define EOF (-1)
N /*
N * negative integral constant, indicates end-of-file, that is, no more input
N * from a stream.
N */
N
N#define SEEK_SET 0 /* start of stream (see fseek) */
N#define SEEK_CUR 1 /* current position in stream (see fseek) */
N#define SEEK_END 2 /* end of stream (see fseek) */
N
N /*
N * _IOBIN is the flag passed to _sys_write to denote a binary
N * file.
N */
N#define _IOBIN 0x04 /* binary stream */
N
N#define STDIN_BUFSIZ (64) /* default stdin buffer size */
N#define STDOUT_BUFSIZ (64) /* default stdout buffer size */
N#define STDERR_BUFSIZ (16) /* default stderr buffer size */
N
Nextern _ARMABI int remove(const char * /*filename*/) __attribute__((__nonnull__(1)));
Xextern __declspec(__nothrow) int remove(const char * ) __attribute__((__nonnull__(1)));
N /*
N * causes the file whose name is the string pointed to by filename to be
N * removed. Subsequent attempts to open the file will fail, unless it is
N * created anew. If the file is open, the behaviour of the remove function
N * is implementation-defined.
N * Returns: zero if the operation succeeds, nonzero if it fails.
N */
Nextern _ARMABI int rename(const char * /*old*/, const char * /*new*/) __attribute__((__nonnull__(1,2)));
Xextern __declspec(__nothrow) int rename(const char * , const char * ) __attribute__((__nonnull__(1,2)));
N /*
N * causes the file whose name is the string pointed to by old to be
N * henceforth known by the name given by the string pointed to by new. The
N * file named old is effectively removed. If a file named by the string
N * pointed to by new exists prior to the call of the rename function, the
N * behaviour is implementation-defined.
N * Returns: zero if the operation succeeds, nonzero if it fails, in which
N * case if the file existed previously it is still known by its
N * original name.
N */
Nextern _ARMABI FILE *tmpfile(void);
Xextern __declspec(__nothrow) FILE *tmpfile(void);
N /*
N * creates a temporary binary file that will be automatically removed when
N * it is closed or at program termination. The file is opened for update.
N * Returns: a pointer to the stream of the file that it created. If the file
N * cannot be created, a null pointer is returned.
N */
Nextern _ARMABI char *tmpnam(char * /*s*/);
Xextern __declspec(__nothrow) char *tmpnam(char * );
N /*
N * generates a string that is not the same as the name of an existing file.
N * The tmpnam function generates a different string each time it is called,
N * up to TMP_MAX times. If it is called more than TMP_MAX times, the
N * behaviour is implementation-defined.
N * Returns: If the argument is a null pointer, the tmpnam function leaves
N * its result in an internal static object and returns a pointer to
N * that object. Subsequent calls to the tmpnam function may modify
N * the same object. if the argument is not a null pointer, it is
N * assumed to point to an array of at least L_tmpnam characters;
N * the tmpnam function writes its result in that array and returns
N * the argument as its value.
N */
N
Nextern _ARMABI int fclose(FILE * /*stream*/) __attribute__((__nonnull__(1)));
Xextern __declspec(__nothrow) int fclose(FILE * ) __attribute__((__nonnull__(1)));
N /*
N * causes the stream pointed to by stream to be flushed and the associated
N * file to be closed. Any unwritten buffered data for the stream are
N * delivered to the host environment to be written to the file; any unread
N * buffered data are discarded. The stream is disassociated from the file.
N * If the associated buffer was automatically allocated, it is deallocated.
N * Returns: zero if the stream was succesfully closed, or nonzero if any
N * errors were detected or if the stream was already closed.
N */
Nextern _ARMABI int fflush(FILE * /*stream*/);
Xextern __declspec(__nothrow) int fflush(FILE * );
N /*
N * If the stream points to an output or update stream in which the most
N * recent operation was output, the fflush function causes any unwritten
N * data for that stream to be delivered to the host environment to be
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -