|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: genx - string termination and bounding
I don't like NULL as an argument because if I pass an uninitalized pointer
happened to be NULL (and uninitialized pointer will be NULL in some flavours of C)
by omission, then instead of getting an error immediately, I see strange
behavior difficult to diagnose.
In fact, I would prefer asserts for non NULL in genxText
genxText(genxWriter *w, char *buf, char *end) {
assert(buf!=NULL&&end>=buf);
...
genxTextZ(genxWriter *w,char *buf) {
genxText(w,buf,buf+strlen(buf)); // it is fast, one will have to pass it with length anyway
David
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








