libporty 1.0.0 ~~~~~~~~~~~~~~ [libporty/net] -Fix: detect the header (normally unistd) for gethostname() and use it -Fix: detect and use socklen_t -Add: make init/uninit "recursive" so it can be called multiple times [c99tree] -Add: custom unary and binary operators (enabled by default) -Change: c99tree core converted into a reusable lib -Fix: don't depend on strdup() (portability issue) -Add: make depend (gcc based dependency generation) -Cleanup: various const correctness and compiler warnings -Cleanup: global name prefix: c99c -Cleanup: mark a bunch of internal functions static to avoid namespace pollution -Cleanup: always use local strlcat, prefixed -Cleanup: generalize some cli functions for lib use -Split: move generic lib functions to from main to common so the lib can benefit from them -Add: compile a couple of static link libs -Add: install headers -Fix: unique twin parent binding (to the innermost hit for now) -Fix: keep a series of non-newline whitespace in a single token (affects the token tree) for easier printing at the end -Fix: token-correctness: don't add extra () or {}, accept the existing ones -Fix: token correctness on pragma, asm, sizeof() -Change: make compound statement expression (CSE) explicit in the tree -Fix: keep twin-parent binding of goto label T_ID even if label is typedef'd -Fix: bind twin_parent properly in enum init when member's name is a custom type -Add: always name attr_list "pre" or "post" depending on whether it's before or after the ID/type -Fix: preserve order of "pre" attributes, mixed with ptrs and qualifiers -Fix: variable attribute token order correctness -Fix: token order correctness in struct attribute -Fix: asm function post-attribs are appended at the end of the child list of ID (instead of the beginning) -Fix: abstract function declaration generates the same tree as named ones: PTR and friends under TYPE/ -Add: support for c printing K&R function, case 1 -Fix: don't print VLA * twice in C print -Fix: cpp doesn't insert extra \n before pragmas -Change: cpp keeps escaped \n in strings so that c99tree-cc can handle them as it likes (keeping the info) -Fix: cpp: keep \\ \n in preproc directives -Fix: keep \\ \n in // comments -Fix: cpp keeps \\ \n in /* */ comments -Fix: cpp is gcc-compatible by default -Fix: don't relay on volatile bison args for passing ctx to flex, use a wrapper instead -Add: treecc -E works like gcc -E -Fix: c-ast-c round trip: remove the extra \n's added by cpp for # -Fix: cpp doesn't expand macro names in macro expansion annotation # line -Fix: run cpp with eval for the new -I syntax -Fix: treecc adds system incldues using -S, not -I, because of the include_next hacks -add: c99tree util has an awk command that runs awk with the tree, tree libs and gtx lib loaded -Add: c99tree edit accepts -L (be careful, it may mess with the scritps!) -Fix: define __GNUC__ to 4, else cdef overdefines __attribute__ -Add: lib API: user data in tree nodes for the caller to use -Add: C99Ninsert_after() -Fix: tolerate inserted ARGLIST -Fix: print operator name even if there's no preprocessor token available -Add: treecc can auto-include using config files from etc -Fix: c99tree util for the cpp cmd uses treecc -E because gnu libc depends on all the -i and -I that have to be configured -Add: need to define __restrict to get gnu libc to work -Add: fake type _Float128 for glibc -Change: allow treecc to pick up any file name, not just *.c or *.h for input file - opc89 will have something like .opc for file names -Fix: when printing newly created arglist, don't accidentally print a the wrong terminating token -Add: treecc accepts -D -Fix: when printing C source, don't print (null) for empty separator token -Fix: don't print NULL as gram node name -Fix: tree_print_c: don't omit the first node in list print -Add: tree calls for replacing and unlinking subtrees -Fix: print the rest of the C file (from tokens) after the last AST node and free print context properly libporty 0.9.4 ~~~~~~~~~~~~~~ Libporty: -Fix: windows header includes c99tree: -Change: c99tree is a shell wrapper that calls different stages of the tool; old c99tree is renamed to c99tree-cc -Add: migrate a bunch of oldish treecc based shell script into c99tree -Add: save begin/end byte offset info of token location -Add: compile time option for location %y: line number in the .y where the node was born -Add: various regression tests for interesting byte offs location tests -Add: c99tree cpp (imported from pcc) that saves byte offset location info and macro details -Add: c99tree-cc generates a grammar tree and a token tree from the root; the twin_parent field cross-links them -Add: tree node UIDs - unique integer identifier for easier references -Add: awk output format -Add: treecc guesses system include paths: first call gcc -v, if that fails, fall back on "safe defaults" (for i386 for now) -Add: built-in gentrex support that can generate a 3rd subtree with gentrex result (references to the grammar subtree) -Fix: make empty statement explicit in the grammar tree -Fix: treecc keeps spaces in locfmt -Fix: proper xml &; escaping of names and locations on save; interpret escape sequences on load -Add: location format support for macro expansion nesting level (%e) and is_local (%E) -Update: graphviz output for grammar/token trees -Cleanup: rename tree_load_text to tree_load_ind: loads ind only and is large enough already not host anything else in the future libporty 0.9.3 ~~~~~~~~~~~~~~ Minor cleanup release: -Fix: central makefile forces all rules -Fix: varioud make uninstall bugs -Fix: [doc] rename INSTALL to INSTALL.txt -> on case insensitive file systems it interferes with make install -Fix: [abgproc] watchdog handles eof from control sockets -Add: [util] binary peek in buf libporty 0.9.2 ~~~~~~~~~~~~~~ host: -Add: types.h with signed and unsigned integer types up to 32 bits, P_size_t, P_off_t and P_ptrdiff_t (detected using scconfig) -Add: math wrapper for log() -Add: PM wrap macros for math blocks (copied from work/pmath) -Fix: use detected 32 bit unsigned integer for P_time_t -Fix: P_usleep: don't usleep() more than 1M uS in a single call - loop with smaller values if needed -Fix: add include protection in buf.h util: -Add: binary variant of strpbrk() (required by buf) -Add: buf: binary fill for buf (ugly workaround at the moment) -Add: buf: binary get function -Add: getter in buf that returns the size of the currently growing buffer -Fix: buf: filling does not depend on \0 termination; for binary, a non-zero positive length must be provided -Fix: buf: memory leaks in buf (last partial line not free'd by uninit) -Fix: buf: proper calculation of length of binary fills net: -Add: use P_ipv4_addr_t instead of unsigned long int for IP addresses -Add: if there's no getaddrinfo, use built-in resover and make sure net_resolver.a won't duplicate the symbols -Add: use scconfig detected local protocol family to define P_AF_LOCAL for local networking -Add: modular uninit schema in P_net_uninit, for other modules like net_async -Fix: EAGAIN is acceptable as network-operation-in-progress on UNIX -Fix: stick to the hostname-addr-ip terminology in API -Fix: don't use POSIX socklen_t in tcp4 accept -Fix: invalid memory handling (string not terminated) in dns4 is_addr -Fix: accept 3 character long tags in dns4 is_addr -Fix: clean sin struct with memset before binding for listen as the structure will always have system-specific fields that should be zero -Fix: remove local P_size_t typedef, use the one in host/types.h -Fix: dns4 is_addr function did not terminate token properly - shorter token after a longer inherited extra characters runing the result -Fix: select() based implementation of P_poll() ignores negative fds as the manual of poll() mandates net_resolver: -Add: parser for /etc/hosts -Add: stat wrapper for returning mtime (for checking whether hosts or resolv.conf changed) -Add: /etc/hosts based ip<->hostname lookup (slow linear search); reread /etc/hosts when mtime of the file changed -Add: parser for resolv.conf -Add: loop until the whole answer is read even if it takes multiple read()s -Rename: replace prefix P_resolv with P_net_resolv for consistency -Fix: use memcpy instead of pointer copy for accessing ptr while parsing answer to avoid bus error caused by unaligned access -Fix: return error if unpacking the domain name failed -Fix: keep order of nameserver when parsing resolv.conf -Fix: don't truncate last digit from IP in the resolv.conf parser -Fix: do not ignore error flag of the answer net_async: -API CHANGE: new abgproc inherit API and UNIX and win32 implementations -API CHANGE: abgproc doesn't allow shared stdin/stdout anymore -API CHANGE: async stdio uses two fds because it is not guaranteed that stdin fd matches stdout fd -Add: be able to clean up after the watchdog thread -Add: register watchdog remove call in P_net_uninit -Fix: memmove bug in threaded watchdog moved much more in buf deletion -Fix: watchdog didn't quit on nomral process close -Fix: free buffer of dead children in watchdog -Fix: close control fd at the end of the watchdog thread -Fix: reset revents in abgproc watchdog to avoid depending on uninitialized memory for determining events -Fix: set watchdogt back to -1 after uninit so that multiple P_net_init/P_net_uninit cycles will not leave subsequent watchdog running -Fix: don't exit() after a failed exec() - this may flush FILE * buffers inherited from the parent, causing double writes. (thanx to nsz) -Fix: proper inheritance of SIGPIPE and fds (don't shutdown those that are closed because of the parent) c99tree: -Add: utility to generate struct field set code, based on c99tree and sphash -Add: save #line and hash macro locations in loc and print them with %m and %M (loc format) -Fix: cc.sh preserves -I -Fix: cc.sh writes outpout to stdout or to the file specified in -o -Fix: rename cc.sh to treecc as that is the installation name -Fix: accept empty statement even in the beginning of a block bgtask: -Add: fork() based alternative build system: -Add: install Makefile.config -Add: add rule make uninstall