lisa006.c
来自「开放源码的编译器open watcom 1.6.0版的源代码」· C语言 代码 · 共 1,685 行 · 第 1/5 页
C
1,685 行
extern unsigned long int _ustrtoul( const wchar_t *, wchar_t **, int );
extern wchar_t *_uecvt( double, int, int *, int * );
extern wchar_t *_ufcvt( double, int, int *, int * );
extern wchar_t *_ugcvt( double, int, wchar_t * );
extern wchar_t *_atouni( wchar_t *, const char * );
extern wchar_t *_ugetenv( const wchar_t * );
extern wchar_t *_u_fullpath( wchar_t *, const wchar_t *, size_t );
extern int _usystem( const wchar_t * );
extern void _u_makepath( wchar_t *, const wchar_t *,
const wchar_t *, const wchar_t *,
const wchar_t * );
extern void _u_splitpath( const wchar_t *, wchar_t *, wchar_t *,
wchar_t *, wchar_t * );
extern void _u_splitpath2( const wchar_t *, wchar_t *, wchar_t **,
wchar_t **, wchar_t **, wchar_t ** );
extern char ** __near environ;
extern wchar_t ** __near _wenviron;
extern int _fileinfo;
extern int (*__get_errno_ptr( void )) ;
extern int (*__get_doserrno_ptr( void )) ;
extern unsigned __near _psp;
extern unsigned char __near _osmode;
extern int __near _fmode;
extern char * sys_errlist[];
extern int __near sys_nerr;
extern unsigned __near __minreal;
extern unsigned long __near __win_alloc_flags;
extern unsigned long __near __win_realloc_flags;
extern unsigned char __near _osmajor;
extern unsigned char __near _osminor;
extern unsigned short __near _osbuild;
extern unsigned __near _amblksiz;
extern void __near *__brk(unsigned __new_brk_value);
extern void __near *sbrk(int __increment);
typedef void (*onexit_t)( void );
extern onexit_t onexit(onexit_t __func);
#pragma pack(__pop);
};
}
struct __WATCOM_exception {
};
class __lock;
typedef long streampos;
typedef long streamoff;
enum {
DEFAULT_PUTBACK_SIZE = 4,
DEFAULT_MAINBUF_SIZE = 512,
DEFAULT_BUF_SIZE = DEFAULT_MAINBUF_SIZE + DEFAULT_PUTBACK_SIZE
};
class __WATCOM_ios;
class istream;
class ostream;
class streambuf;
#pragma pack(__push,1);
class ios {
public:
enum io_state {
goodbit = 0x00,
badbit = 0x01,
failbit = 0x02,
eofbit = 0x04
};
typedef int iostate;
enum open_mode {
in = 0x0001,
out = 0x0002,
atend = 0x0004,
append = 0x0008,
truncate = 0x0010,
nocreate = 0x0020,
noreplace = 0x0040,
text = 0x0080,
binary = 0x0100,
app = append,
ate = atend,
trunc = truncate
};
typedef int openmode;
enum seek_dir {
beg = 0x00,
cur = 0x01,
end = 0x02
};
typedef int seekdir;
enum fmt_flags {
skipws = 0x0001,
left = 0x0002,
right = 0x0004,
internal = 0x0008,
dec = 0x0010,
oct = 0x0020,
hex = 0x0040,
showbase = 0x0080,
showpoint = 0x0100,
uppercase = 0x0200,
showpos = 0x0400,
scientific = 0x0800,
fixed = 0x1000,
unitbuf = 0x2000,
stdio = 0x4000,
basefield = dec | oct | hex,
adjustfield= left | right | internal,
floatfield = scientific | fixed,
};
typedef long fmtflags;
class failure : public __WATCOM_exception {
iostate __cause;
public:
failure( iostate );
iostate cause() const;
};
ios( streambuf *__sb );
ios( ios const & );
virtual ~ios();
ios &operator = ( ios const & );
operator void * () const;
int operator ! () const;
ostream *tie( ostream *__ostrm );
ostream *tie() const;
streambuf *rdbuf() const;
iostate rdstate() const;
iostate clear( iostate __state = 0 );
int good() const;
int bad() const;
int fail() const;
int eof() const;
iostate exceptions( iostate __enable );
iostate exceptions() const;
fmtflags setf( fmtflags __onbits, fmtflags __mask );
fmtflags setf( fmtflags __onbits );
fmtflags unsetf( fmtflags __offbits );
fmtflags flags( fmtflags __bits );
fmtflags flags() const;
char fill( char __fillchar );
char fill() const;
int precision( int __precision );
int precision() const;
int width( int __width );
int width() const;
long &iword( int __index );
void *&pword( int __index );
static void sync_with_stdio( void ) {};
static fmtflags bitalloc();
static int xalloc();
__lock *__i_lock;
static __lock *__x_lock;
protected:
ios();
void init( streambuf *__sb );
void setstate( ios::iostate __orbits );
private:
streambuf *__strmbuf;
ostream *__tied_stream;
long __format_flags;
int __error_state;
int __enabled_exceptions;
int __float_precision;
int __field_width;
void *__xalloc_list;
char __fill_character;
static int __xalloc_index;
static fmtflags __last_format_flag;
friend class __WATCOM_ios;
int : 0;
};
#pragma pack(__pop);
inline streambuf *ios::rdbuf() const {
return( __strmbuf );
}
inline ios::iostate ios::rdstate() const {
return( __error_state );
}
inline int ios::good() const {
return( __error_state == 0 );
}
inline int ios::bad() const {
return( __error_state & ios::badbit );
}
inline int ios::fail() const {
return( __error_state & (ios::failbit|ios::badbit) );
}
inline int ios::eof() const {
return( __error_state & ios::eofbit );
}
inline ios::iostate ios::exceptions() const {
return( __enabled_exceptions );
}
inline ios::operator void * () const {
return( (void *) (fail()==0) );
}
inline int ios::operator ! () const {
return( fail() );
}
inline ios::fmtflags ios::setf( ios::fmtflags __onbits ) {
;
ios::fmtflags __old_flags = __format_flags;
__format_flags |= __onbits;
return( __old_flags );
}
inline ios::fmtflags ios::setf( ios::fmtflags __onbits, ios::fmtflags __mask ) {
;
ios::fmtflags __old_flags = __format_flags;
__format_flags &= ~__mask;
__format_flags |= __onbits & __mask;
return( __old_flags );
}
inline ios::fmtflags ios::unsetf( ios::fmtflags __offbits ) {
;
ios::fmtflags __old_flags = __format_flags;
__format_flags &= ~__offbits;
return( __old_flags );
}
inline ios::fmtflags ios::flags( ios::fmtflags __flags ) {
;
ios::fmtflags __old_flags = __format_flags;
__format_flags = __flags;
return( __old_flags );
}
inline ios::fmtflags ios::flags() const {
return( __format_flags );
}
inline char ios::fill( char __fillchar ) {
;
char __old_fill = __fill_character;
__fill_character = __fillchar;
return( __old_fill );
}
inline char ios::fill() const {
return( __fill_character );
}
inline int ios::precision( int __precision ) {
;
int __old_precision = __float_precision;
__float_precision = __precision;
return( __old_precision );
}
inline int ios::precision() const {
return( __float_precision );
}
inline int ios::width( int __width ) {
;
int __old_width = __field_width;
__field_width = __width;
return( __old_width );
}
inline int ios::width() const {
return( __field_width );
}
inline ostream *ios::tie( ostream *__ostrm ) {
;
ostream *__old_tie = __tied_stream;
__tied_stream = __ostrm;
return( __old_tie );
}
inline ostream *ios::tie() const {
return( __tied_stream );
}
#pragma pack(__push,1);
class streambuf {
public:
int in_avail() const;
int out_waiting() const;
int snextc();
int sgetn( char *__buf, int __len );
int speekc();
int sgetc();
int sgetchar();
int sbumpc();
void stossc();
int sputbackc( char __c );
int sputc( int __c );
int sputn( char const *__buf, int __len );
void dbp();
virtual int do_sgetn( char *__buf, int __len );
virtual int do_sputn( char const *__buf, int __len );
virtual int pbackfail( int __ignored );
virtual int overflow( int = (-1) ) = 0;
virtual int underflow() = 0;
virtual streambuf *setbuf( char *__buf, int __len );
virtual streampos seekoff( streamoff __ignored1,
ios::seekdir __ignored2,
ios::openmode __ignored3 = ios::in | ios::out );
virtual streampos seekpos( streampos __position,
ios::openmode __mode = ios::in | ios::out );
virtual int sync();
__lock *__b_lock;
protected:
streambuf();
streambuf( char *__buf, int __len );
virtual ~streambuf();
int allocate();
char *base() const;
char *ebuf() const;
int blen() const;
void setb( char *__buf, char *__endbuf, int __autodelete = 0 );
char *eback() const;
char *gptr() const;
char *egptr() const;
void gbump( streamoff __offset );
void setg( char *__eback, char *__gptr, char *__egptr );
char *pbase() const;
char *pptr() const;
char *epptr() const;
void pbump( streamoff __offset );
void setp( char *__pptr, char *__epptr );
int unbuffered( int __unbuffered );
int unbuffered() const;
virtual int doallocate();
private:
streambuf( streambuf & );
void operator = ( streambuf & );
char *__reserve_base;
char *__reserve_end;
char *__get_base;
char *__get_end;
char *__get_ptr;
char *__put_base;
char *__put_end;
char *__put_ptr;
unsigned __unbuffered_state : 1;
unsigned __delete_reserve : 1;
};
#pragma pack(__pop);
inline char *streambuf::base() const {
return( __reserve_base );
}
inline char *streambuf::ebuf() const {
return( __reserve_end );
}
inline int streambuf::blen() const {
;
return( (int)(__reserve_end - __reserve_base) );
}
inline int streambuf::allocate() {
;
return( (base() != 0 || unbuffered()) ? 0
: doallocate() );
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?