📄 update.txt
字号:
+-------+| v0.31 |+-------+ .OK name literal changed to Ok [hint] change "OK" to "Ok" (known exceptions for textual replacement are F_OK,R_OK,W_OK) .WyFileStat members that access struct stat added prefix sf_, e.g. mode(), ino(),.. changed name literal to sf_mode(), sf_ino(),.. [hint] Compiler would complain. Add the prefix sf_ to the outdated items. .WyDirEnt members that access struct dirent added prifix dt_ e.g. _reclen, _ino changed name literal to dt_reclen, dt_ino. member filename changed name literal to dt_name. [hint] Compiler would complain. Add the prefix dt_ to the outdated items. change name literal filename to dt_name ._xread is removed from WyByteFlow family, and added Wy::full_read for it [hint] Change expression "bf._xread(buf,blen,n_rd)" to "Wy::full_read(bf,buf,blen,n_rd)". There might be need to include wy_uty.h .Constructor WyFileHandle(int) changed to explicit [hint] 1.Wrap the integer literal by WyFileHanle(..), for instance change the form t.set(100) to t.set( WyFileHandle(100) ), etc. 2.Constructing object considers the form: WyByteFlow b( (WyFileHandle(fd)) ); // bracket the argument .Wy_ErrInfo is removed [hint] The original usecases are supposed like: Wy_ErrInfo ei(cstr); Refer to Wy_RepInfo and WyReply manual, define an application class (e.g. AppRepInfo inherits Wy_RepInfo), then change the expression to AppRepInfo ei(cstr); .WyStr::strcmp removed. WyStr added members _strcmp (different lexic-order) [hint] Source program using strcmp(..) may need work around this change. Compiler would complain the missing function. Manual inspect. .Wy_Thread had bugfixes and revisions: 1.Member cancel() returning WYm_ENOENT changed to return Wym_ESRCH [hint] find(grep) usecase of cancel() and manually inspect for suitability 2.Destructor of inheriting class should add code to disable cancellability first. A member function close_tmain(void) is added for this purpose. [hint] find(grep) destructor of Wy_Thread inheriting class, add set_cancelable(false) to the destructor, or change codes to using close_tmain(), see manpage. 3.thread_state() changed to non-const function .Wy_Thread::tmain_id renamed to thread_id [hint] Change name literal from "tmain_id" to "thread_id" .WyCSeg responsibility modified to represent the pointed string, and added find function family, and functions _strcmp, _move_begin/_move_end. .Return type of sf_a/m/ctime changed from Wy_Second to time_t to reduce use confusion and ease identification, mode(),size(), ino() .Bugfix: Wy_Array<T>, when T is built-in types, Reply may not be caught .Wy_Array<T>(size_t,const T&) added Wym_EFBIG report .Added a class template WySeg .Wy_Array added Wy_Array(const WySeg<T>&), Wy_Array(const WySeg<const T>&) subseg, reset(const WySeg<T>&),reset(size_t,const T&) insert(size_t,const WySeg<T>&),insert(size_t,size_t,const T&) operator=(const WySeg<T>&),resize(size_t,const T&) .Added class WyIConv for ::iconv character set conversion functions .Bugfix: integer number conversion overflow .Bugfix: integer number conversion (WyTimeSpec) .Bugfix: WySysFile family initialization bugfix .Functions added in namespace Wy full_read(WyByteFlow&, void*, size_t, size_t&) full_read(WyByteFlow&, WyStr&, size_t) full_write(WyByteFlow&, const char* , size_t, size_t&) full_write(WyByteFlow&, const WyStr& , size_t&) full_write(WyByteFlow&, const WyCSeg&, size_t&) _scanum(const WyCSeg&, size_t&, ValueType&, const int=0) .Added some program examples: a_printf.cpp ,a_readconf.cpp, a_sort.cpp, a_dumphex.cpp, a_iconv.cpp .Added functions: WyRet link(const WyStr&, const WyStr&) WyRet link(const char*,const char*) .library source (larger ones) subdivided into smaller object files (size of final executables should be smaller) .Manpage bugfixes and revisions+-------+| v0.30 |+-------+ Classes for function return report are modified. Compiler should complain these changes, so it is easier to spot and update except Wy_RepInfo is now an abstract class, which need reimplement. .Wy_ErrInfo is obsolete, will be removed in latter version. An abstract class Wy_RepInfo is added for the removal. [hint] The original usecases are supposed like: Wy_ErrInfo ei(cstr); Refer to Wy_RepInfo and WyReply manual, define a application class (e.g. AppRepInfo inherits Wy_RepInfo), then change the expression to AppRepInfo ei(cstr); .WyErrMsg changed to WyReply [hint] WyReply is now explicitly a pointer like class. Update primarily involves member access(so WyRet, too): a) change c_errno() to c_repcode() b) change c_errstr() to c_repstr() c) updating u_errstr() may need an additional buffer by using the get_reply member of Wy_RepInfo to get the reply(error) string d) change set_ustr(m,cstr) to m->set_reply(cstr,strlen(cstr)+1) e) change set_ustr(m,cstr,len) to m->set_reply(cstr,len) f) change WyErrMsg::_max_errno to Wy::_max_errno .WYM_E... changed name literal to Wym_E .Fault changed name literal to Reply .WY_USE_FAULT changed name literal to WY_THROW_REPLY .Wy_Thread::Running changed name literal to Active member running_thread changed name literal to active_threads .added functions: Wy::wrd(const WySockAddrINet4::IPaddr&), Wy::wrd(const WySockAddrINet6::IPaddr&), Wy::wrd(const WySockAddrINet4&) and Wy::wrd(const WySockAddrINet6&) .removed WySockAddrINet4::IPAddr::notation() and WySockAddrINet6::IPAddr:: notation() [hint] change expression 't.notation()' to 'Wy::wrd(t)' .virtual version of function swap is renamed to _swap. Involved classes are WySysFile, WyByteFlow, WyRegFile, WyChrFile, WyTerminal, WySockFile, WyFifoFile, Wy_DirFile, Wy_LnkFile, WySockAddrLocal, WySockAddrINet4, WySockAddrINet6) [Hint] Rename the 'swap' that causes compilation problem to '_swap' .bugfix: ::close(int) is now assumed to return with the given file descriptor always closed (freely reusable). .bugfix of Wy_Array::replace, in case when source element is in *this .WyRet added one constructor, WyRet(int) [hint] So expressions like 'WY_RETURN(errno)' can be used .manuals of WyMutex/WyLock/WyCond removed WYM_EINVAL report .added WyByteFlow& operator >>(WyByteFlow&, unsigned char&) and signed char version .WyStr added members begin(),end() .WyByteFlow added a virtual member, _xread(void*,size_t,size_t&), named from an early version max_read. .added example programs a_popen,a_urandom,a_tcpecho_svr .WySockAddrLocal, WySockAddrINet4, WySockAddrINet6 added a virtual member 'WyRet notation(WyStr&) const' .added functions: Wy::_toupper(WyStr&), Wy::_tolower(WyStr&)+-------+| v0.29 |+-------+ .Wy_Array removed operator+= [Hint] change Wy_Array::operator+= to 'push_back' .Removed WyCSeg::operator= and Wy_FdSet::operator=. For the library rule now implies this. [Hint] change 't1=t2' to 't1.reset(t2)' and check the return status .Bugfix: const Wy_Array& operator=(const Wy_Array& rhs) relies on element type having operator= defined [Hint] Element type implement operator=, or change instance 'a=b' to 'a.reset(b)' .WyStr/WyCSeg _SizeType changed to size_type, _ValueType changed to value_type for easy switch with std::string .This library rule for the assign operator modified. .Wy_Array added constructor Wy_Array(size_t,const T&), and added support for element type being the built-in arithmetic types except enum types. And added a member replace(size_t,size_t,size_t,const T&) .Added WyDirEnt(const struct dirent&) throw(), WyFileStat(const struct stat&) throw(). Not documented. .Added Wy::_mkstr(WyStr,Num), _catstr(WyStr,Num), Wy::wrd(Num) .Bugfix: WyTimeSpec member add/sub/-(negate) error check .WyFileHandle added the move constructor .WyStr added find/rfind(size_t*,const WyCSeg&) .WyTermios added operator== .Added two examples, a_httpreq,a_dct+-------+| v0.28 |+-------+._strnum(NumType&,const char**,const char*,size_t,..) changed to _strnum(NumType&,const char**,WyCSeg,..) [hint] Search "_strnum". wrap the arguments by WyCSeg(a,b) Note: WyCSeg::Fault may throw .WyCSeg::operator() changed name to cseg(..) [hint] For WyCSeg object s, change s(n1,n2) to s.cseg(n1,n2) --- The following changes are not detected by previous check files --- ._alloc(..) of Wy::cin/cout/cerr changed to always fail (WYM_ENOSYS) .WyCSeg(const char*)/reset/operator=/operator[] removed throw spec. .Wy::_strmove/_strcpy removed throw spec. ._mkstr(..)'s scientific notation output: 'E' changed to 'e' .add template Wy_Array for dynamic array hence many classes have added a move constructor .added Wy::_strchr(const WyCSeg&, char) Wy::_strrchr(const WyCSeg&, char) Wy::_strstr(const WyCSeg&, const WyCSeg&) .added Wy::select(Wy_FdSet*,Wy_FdSet*,Wy_FdSet*) (no timeout version) .bugfix: compile with WYLIB_CONFIG_NORSLI .bugfix for g++ 4.0.2: Wy_SockAddr added a dummy virtual destructor .WySysFile/WyByteFlow add missing document for ftype() .add WyByteFlow& operator <<(WyByteFlow&, const void*); .add WyStr wrd(const WySockAddrINet4::IPAddr&) WyStr wrd(const WySockAddrINet6::IPAddr&) WyStr wrd(const WySockAddrLocal&) .minor bugs: Wy__RdQue had last minute changes causing some examples won't run, examples affected only.+-------+| v0.27 |+-------+.Bugfix/revision in Rationale.txt, README.TXT, manpages. .WyChrFile,WySockFile,WyFifoFile,WyRegFile,WyTerminal added static check by hiding some invalid use cases. .Wy_DirFile added a member: WyFileHandle fh(void) const throw() .Wy_Thread::reset() changed to throw WyRet() from terminate if the thread tries to reset itself. .Class member _alloc added error code(WYM_ENOSYS) if deriving class did not reimplement this member. .Bugfix: If macro WYLIB_CONFIG_THROWSPC defined, throw specification of many functions has fixed to throw() .Some minor bugs.+-------+| v0.26 |+-------+ .Bugfix: _strnum added (was not) implemented for float types and several other bugs, _mkstr/_catstr for long number (float type) .Bugfix: ::ntohl..., and WyCSeg default setting, while compiling with -O2, .WySysFile added a member ftype(), for querrying file type .WyByteFlow removed member drain(), added ftype()/_fsync()/_fdatasync() /_tcdrain()/_isatty() WyChrFile removed member drain(), added _tcdrain()/_isatty(), removed drain() WyRegFile removed member drain(), added fsync()/fdatasync() WySockFile removed member drain() WyFifokFile removed member drain() [Hint] For WyByteFlow object t, use ftype() to detect file type and use t._fdatasync() or t._tcdrain() For WyChrFile object t, use _isatty() to detect for terminal device and call _tcdrain() For WyRegFile object t, rename drain() to fdatasync() .Bugfix: WySockFile::sockpair(..),WyFifoFile::mkpipe(..) added an WYM_EINVAL error report .Wy::cin/cout/cerr changes to not allow be set to default. reset() throws WyRet(WYM_EBADF), other resets return WyRet(WYM_EBADF). [Hint] If these standard handlers set to default, succeeding use of file descriptor will not be predictable by this library.+-------+| v0.25 |+-------+ .Implement of throw specification changed to compiler option configurable the default is empty. See associated paragraph in Rationale.txt .Wy::_strnum(..) added a return code WYM_ENOENT, conversion rule adjusted for better use in scanning a string. See manpage wy(3wy). .Wy::_strcpy changed argument type to _strcpy(char*,WyCSeg) .WyCSeg had many changed for better use. added members WyCSeg(), WyCSeg(const char*,const char*) reset(), reset(const char*,const char*), is_default() rename addr() to begin() rename trail_addr() to end()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -