other feedback:

src/stapl/README: move it to doc/README.stapl

include/urjtag/stapl.h: don't duplicate the README in the header ...
use same header style as like include/urjtag/tap.h

src/stapl/stapl.h: this looks like a useless/broken file ... it's
declaring storage in a header that gets included in multiple places
(notice there is no "extern").  considering it's so tiny, just move
all the code to stapl.c and remove stapl.h.

src/stapl/stapl.c:
 - SA_ONESHOT: POSIX specifies SA_RESETHAND, so convert all users of
ONESHOT to RESETHAND
 - delete all the commented out headers
 - BOOL/TRUE/FALSE: include stdbool.h, and then use "bool", "true", and "false"
 - BYTE/WORD/DWORD: if you need specific sizes, then use specific
sizes.  uint8_t, uint16_t, uint32_t.  then punt BYTE/WORD/DWORD.
 - replace VECTOR_SIGNAL_COUNT with ARRAY_SIZE()
 - mark vector_list static, as well as any other variables that
shouldnt be exported
 - conv_to_hex: Jie is adding a lib/hex.c file which should provide this API
 - jam_delay: sysdep.h already takes care of providing usleep() for
everyone, so drop this
 - windows_nt: this is set, but never used, so just drop it
 - drop the PORT==DOS logic

src/stapl/jamexec.c: drop the PORT==DOS logic
src/stapl/jamheap.c: drop the PORT==DOS logic

src/stapl/jamcrc.c: jam_hexchar is also replaced by lib/hex.c

src/stapl/jamport.h: once all the above changes are made, this file
can be punted

in general: global variables are wrong.  these need to get
allocated/passed-by-function-args/freed on the fly.  i noticed this
with current_cable and current_chain, but it seems that there are
other global vars as well.  libraries are supposed to be re-entrant,
support multiple instances, and thread safe which global variables
almost always prevent.

in general: "//comment" should be "// comment"

in general: "return (foo);" should be "return foo;"

in general: do not use printf() ... use the urj_log funcs
-mike

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
UrJTAG-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/urjtag-development

Reply via email to