On Mon, 19 Jan 2009, Mindaugas Kavaliauskas wrote: Hi,
> Some parameter error detection is done (I'm not sure that error subcode we > should use, so, I've used 3012, just like in HB_STRTOHEX()). String is not > reallocated if xor'ing to empty string or zero byte. Feel free to commit > this code. The RT error code numbers in Harbour is more general problem. In Clipper each function uses its own unique error codes. Most of these errors is replicated in Harbour code but our own new functions does not use unique errors. It should be cleaned. We should create header file with RT error codes (also with the Clipper) ones and use the #define costnant instead of numbers in source code. Centralized list of RT errors should help in eliminating duplicated errors. It's quite big job and I do not know if we will find contributors for it. Similar problem we have with compile time errors though here the situations is a little bit better. Anyhow it's not exactly what Clipper does. In Harbour we have warning and error messages divided in separated list. Additionally error messages are divided into FATAL (stoping compilation) and normal once. In Clipper seems that all error and warning messages are kept in single list and error/warning number defined type of error: 1000 <= x < 2000 // warnings 2000 <= x < 3000 // errors 3000 <= x < 4000 // fatal errors Probably we should make the same and use and single function to generate warnings and errors and eliminate current cPrefix parameter which seems to be redundant. Because we have different warning levels then we should divide warnings for different levels: 1000 <= x < 1200 // -w1 1200 <= x < 1300 // -w2 1300 <= x < 1400 // -w3 1400 <= x < 1500 // -w4 ... and remove current hack with number set as 1-st character of warning message. Clear error numbers definition greatly helps in creating documentation, translations and locating the problem. In the past I even created such modification for Harbour compiler but I've never committed it so now it should be probably updated for modified code. If we will find voluntaries to update RT error list then I can made modifications in compiler code. We should also create list of internal errors. best regards, Przemek _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour