Re: [mkgmap-dev] methods to write signed / unsigned integers

2018-05-15 Thread Ticker Berkin
ems but I > think it should be put3u. > See attached patch. > > Gerd > > > Von: mkgmap-dev im Auftrag > von Ticker Berkin > Gesendet: Montag, 14. Mai 2018 14:48:01 > An: Development list for mkgmap > Betreff: Re: [mkgmap-d

Re: [mkgmap-dev] methods to write signed / unsigned integers

2018-05-14 Thread Gerd Petermann
endet: Montag, 14. Mai 2018 14:48:01 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] methods to write signed / unsigned integers Here is display patch based on r537 Ticker On Mon, 2018-05-14 at 12:18 +, Gerd Petermann wrote: > Hi Steve, Hi Ticker, > > okay, I've

Re: [mkgmap-dev] methods to write signed / unsigned integers

2018-05-14 Thread Ticker Berkin
__ > Von: mkgmap-dev im Auftrag > von Steve Ratcliffe > Gesendet: Montag, 14. Mai 2018 14:07:20 > An: mkgmap-dev@lists.mkgmap.org.uk > Betreff: Re: [mkgmap-dev] methods to write signed / unsigned integers > > On 14/05/18 12:42, Gerd Petermann wrote: >

Re: [mkgmap-dev] methods to write signed / unsigned integers

2018-05-14 Thread Gerd Petermann
rg.uk Betreff: Re: [mkgmap-dev] methods to write signed / unsigned integers On 14/05/18 12:42, Gerd Petermann wrote: > I am not sure what to do with NodConvert. I think the code is wrong, it fails > on NOD with restrictions, but I never use the program > so I don't want to invest

Re: [mkgmap-dev] methods to write signed / unsigned integers

2018-05-14 Thread Steve Ratcliffe
On 14/05/18 12:42, Gerd Petermann wrote: I am not sure what to do with NodConvert. I think the code is wrong, it fails on NOD with restrictions, but I never use the program so I don't want to invest the time to fix it. @Steve: What do you think? I have no interest in NodConvert, if it not usef

Re: [mkgmap-dev] methods to write signed / unsigned integers

2018-05-14 Thread Gerd Petermann
g von Ticker Berkin Gesendet: Montag, 14. Mai 2018 13:29:18 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] methods to write signed / unsigned integers Hi Gerd Another patch I've had hanging around is this. You've already taken a couple of fixes from it and there have been

Re: [mkgmap-dev] methods to write signed / unsigned integers

2018-05-14 Thread Ticker Berkin
Hi Gerd Another patch I've had hanging around is this. You've already taken a couple of fixes from it and there have been some unrelated changes that impact the same files and a fix to a mistake I made in the previous set of changes (sorry), so I can do another patch if you want. I've tested all

Re: [mkgmap-dev] methods to write signed / unsigned integers

2018-04-24 Thread Gerd Petermann
18 12:37:31 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] methods to write signed / unsigned integers Hi Gerd & Steve I've done another pass through Display to remove lots of casts and masking. This required removed the overloading of Displayer.setBytes(byte/char/short/

Re: [mkgmap-dev] methods to write signed / unsigned integers

2018-04-24 Thread Ticker Berkin
Hi Gerd & Steve I've done another pass through Display to remove lots of casts and masking. This required removed the overloading of Displayer.setBytes(byte/char/short/int) by having setBytes1/2/4() to match the existing setBytes3() DisplayItem.getValue() now returns the same value as fed in wi

Re: [mkgmap-dev] methods to write signed / unsigned integers

2018-04-17 Thread Gerd Petermann
April 2018 23:31:56 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] methods to write signed / unsigned integers Hi Gerd, Ticker > sorry for that. I waited for a comment from Steve and forgot about it. > I'd still prefer that Steve gives an OK because he wrote most of the

Re: [mkgmap-dev] methods to write signed / unsigned integers

2018-04-17 Thread Steve Ratcliffe
Hi Gerd, Ticker sorry for that. I waited for a comment from Steve and forgot about it. I'd still prefer that Steve gives an OK because he wrote most of the code that the patch changes. I read through the patch and done some very simple tests and it looks OK to me. Hope someone has tested s

Re: [mkgmap-dev] methods to write signed / unsigned integers

2018-04-17 Thread Gerd Petermann
nstag, 17. April 2018 12:51:36 An: mkgmap development Betreff: Re: [mkgmap-dev] methods to write signed / unsigned integers Hi Gerd I was hoping you'd apply/commit img_io_3.patch (15-mar, from you) and the display_io_1.patch (15-mar, from me) and then I'll do another global edit and tid

Re: [mkgmap-dev] methods to write signed / unsigned integers

2018-04-17 Thread Ticker Berkin
Hi Gerd I was hoping you'd apply/commit img_io_3.patch (15-mar, from you) and the display_io_1.patch (15-mar, from me) and then I'll do another global edit and tidy-up on Display as per the posts on 16-mar. Regards Ticker ___ mkgmap-dev mailing list m

Re: [mkgmap-dev] methods to write signed / unsigned integers

2018-03-16 Thread Ticker Berkin
___ > Von: mkgmap-dev im Auftrag > von Ticker Berkin > Gesendet: Donnerstag, 15. März 2018 15:21:25 > An: mkgmap-dev@lists.mkgmap.org.uk > Betreff: Re: [mkgmap-dev] methods to write signed / unsigned integers > > Hi Gerd > > I've attached the Display patch

Re: [mkgmap-dev] methods to write signed / unsigned integers

2018-03-16 Thread Gerd Petermann
ke I've not used NodConvert for a long time, it might well be behind the last findings reg. NOD. Gerd Von: mkgmap-dev im Auftrag von Ticker Berkin Gesendet: Donnerstag, 15. März 2018 15:21:25 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap

Re: [mkgmap-dev] methods to write signed / unsigned integers

2018-03-15 Thread Ticker Berkin
Hi Gerd I've attached the Display patch - this was a quick hack global edit and could be improved by using the relevant signed/unsigned get methods instead of masking... I'm happy to do this - let me know. Yes to DEM changes. Also the nearby asserts can go now because put2s() will check the rang

Re: [mkgmap-dev] methods to write signed / unsigned integers

2018-03-06 Thread Steve Ratcliffe
Hi Ticker Sounds good, yes please send the patch. Cheers Steve Starting from Steve's patches (getting.patch, msg.patch and img -write.patch), I've changed mkgmap+test to have/use: int get1s(), get2s(), get3s(), get4() ing get1u(), get2u(), get3u(), getNu() put1s(int), put2s(int), put

Re: [mkgmap-dev] methods to write signed / unsigned integers

2018-03-06 Thread Ticker Berkin
; > Von: mkgmap-dev im Auftrag > von Steve Ratcliffe > Gesendet: Mittwoch, 21. Februar 2018 23:40:35 > An: mkgmap-dev@lists.mkgmap.org.uk > Betreff: Re: [mkgmap-dev] methods to write signed / unsigned integers > > > Hi > > And

Re: [mkgmap-dev] methods to write signed / unsigned integers

2018-02-23 Thread Gerd Petermann
An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] methods to write signed / unsigned integers Hi And here is the patch for just the reading side. I decided that it was best to leave in 'byte get()' as there are many places where a byte is used to hold the result and a cast woul

Re: [mkgmap-dev] methods to write signed / unsigned integers

2018-02-21 Thread Steve Ratcliffe
Hi And here is the patch for just the reading side. I decided that it was best to leave in 'byte get()' as there are many places where a byte is used to hold the result and a cast would be needed for 'int get1()'. The tests pass, but there is more scope for getting this patch wrong so needs

Re: [mkgmap-dev] methods to write signed / unsigned integers

2018-02-21 Thread Steve Ratcliffe
Hi Gerd thanks, I think that this improves the code. Small problem: I think you forgot to remove / adapt some comments in BufferedImgFileWriter, e.g. for put1 and put2. Thanks for reminding me. Attached patch for the messages. Are there any more? Steve # HG changeset patch # Parent aa70a3

Re: [mkgmap-dev] methods to write signed / unsigned integers

2018-02-20 Thread Gerd Petermann
since we don't have > huge amounts of header structures. > > Gerd > > > Von: mkgmap-dev im Auftrag > von Ticker Berkin > Gesendet: Montag, 19. Februar 2018 10:19:56 > An: Development list for mkgmap > Betreff: Re: [mkgmap-dev] methods to write

Re: [mkgmap-dev] methods to write signed / unsigned integers

2018-02-20 Thread Ticker Berkin
> > > Von: mkgmap-dev im Auftrag > von Ticker Berkin > Gesendet: Montag, 19. Februar 2018 10:19:56 > An: Development list for mkgmap > Betreff: Re: [mkgmap-dev] methods to write signed / unsigned integers > > Hi > > I think

Re: [mkgmap-dev] methods to write signed / unsigned integers

2018-02-20 Thread Gerd Petermann
have huge amounts of header structures. Gerd Von: mkgmap-dev im Auftrag von Ticker Berkin Gesendet: Montag, 19. Februar 2018 10:19:56 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] methods to write signed / unsigned integers Hi I think it is im

Re: [mkgmap-dev] methods to write signed / unsigned integers

2018-02-19 Thread Ticker Berkin
Hi I think it is important to indicate if a signed or unsigned is being written so that the range can be asserted: eg: public void putU1(int val) { assert val >= 0 && val <= 255 : val; buf.put((byte)val); } and public void putS1(int val) {

Re: [mkgmap-dev] methods to write signed / unsigned integers

2018-02-18 Thread Gerd Petermann
v im Auftrag von Steve Ratcliffe Gesendet: Sonntag, 18. Februar 2018 22:37:19 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] methods to write signed / unsigned integers Hi Gerd, Ticker For ImgFileWriter I think we should just have put1(int), put2(int), put3(int) and put4(int) and r

Re: [mkgmap-dev] methods to write signed / unsigned integers

2018-02-18 Thread Steve Ratcliffe
Hi Gerd, Ticker For ImgFileWriter I think we should just have put1(int), put2(int), put3(int) and put4(int) and remove put(byte), putChar(char) and putInt(int). So each method takes an int, so no casting is needed. There is no difference between writing unisigned and signed for any value that

Re: [mkgmap-dev] methods to write signed / unsigned integers

2018-02-15 Thread Ticker Berkin
Hi Gerd I started to think about this a while ago when I was fixing cities > 65535, and introduced some alternative names for get/getChar and put/putChar and also added some of the assertions. But then I noticed that some of the names I used were used for BIT I/O elsewhere, and also the Display tr