Olly Betts
2014-Dec-19 22:13 UTC
[Xapian-devel] Replace atoi and atol with strtol strtoul:Need Help
On Sat, Dec 20, 2014 at 12:42:08AM +0530, Priyank Bhatt wrote:> As James said I am attaching two file *date.cc* and *datematchdecider.cc*Please send patches, not complete source files: http://trac.xapian.org/browser/git/xapian-core/HACKING#L1176 Patches are much smaller, and don't require the reviewer to work out the exact version of the source file you started from. Cheers, Olly
Priyank Bhatt
2014-Dec-20 18:07 UTC
[Xapian-devel] Replace atoi and atol with strtol strtoul:Need Help
ok i will submit the patch , But What should be done if strtol or strtoll overflows or underflow's . Thank You, Priyank Bhatt On 20 December 2014 at 03:43, Olly Betts <olly at survex.com> wrote:> On Sat, Dec 20, 2014 at 12:42:08AM +0530, Priyank Bhatt wrote: > > As James said I am attaching two file *date.cc* and *datematchdecider.cc* > > Please send patches, not complete source files: > > http://trac.xapian.org/browser/git/xapian-core/HACKING#L1176 > > Patches are much smaller, and don't require the reviewer to work out the > exact version of the source file you started from. > > Cheers, > Olly >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20141220/1bdb09d1/attachment-0002.html>
Priyank Bhatt
2014-Dec-22 06:43 UTC
[Xapian-devel] Replace atoi and atol with strtol strtoul:Need Help
Hello, Hello, I am attaching diff file which is basically of date.cc and datematchdecider.cc in */xapian-application/omega/* in which i modified atoi function. If i need to submit patch in some other way please let me know. I have checked for overflow and underflow condition using errno variable which becomes equal to ERANGE when underflow or overflow occurs and for checking underflow or overflow the strtol returns LONG_MIN and LONG_MAX for this i had to add climits header file and also i had to add errno.h header file for errno variable. Thank You, Priyank Bhatt On 20 December 2014 at 23:37, Priyank Bhatt <priyankbhatt1234 at gmail.com> wrote:> ok i will submit the patch , But What should be done if strtol or strtoll > overflows or underflow's . > > > > Thank You, > Priyank Bhatt > > On 20 December 2014 at 03:43, Olly Betts <olly at survex.com> wrote: > >> On Sat, Dec 20, 2014 at 12:42:08AM +0530, Priyank Bhatt wrote: >> > As James said I am attaching two file *date.cc* and >> *datematchdecider.cc* >> >> Please send patches, not complete source files: >> >> http://trac.xapian.org/browser/git/xapian-core/HACKING#L1176 >> >> Patches are much smaller, and don't require the reviewer to work out the >> exact version of the source file you started from. >> >> Cheers, >> Olly >> > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20141222/bcabe3b3/attachment-0002.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: diff.patch Type: text/x-patch Size: 3404 bytes Desc: not available URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20141222/bcabe3b3/attachment-0002.bin>