00:04.21 | *** join/#htc-linux brinx (n=brinx@udsl-8-203.VIC.dft.com.au) |
00:41.54 | *** join/#htc-linux swc666 (n=no@24.143.67.18) |
00:43.44 | swc666 | I'm confused about something.. I have a Dopod 900 with a 1GB SD card... do I need to format it partially with fat and the rest ext3 to install the openmoko cab file or no? |
00:44.38 | tsdogs | swc666: what's dopod 900? |
00:44.42 | swc666 | uni |
00:44.53 | swc666 | universal* |
00:45.15 | tsdogs | swc666: Latest images don't need ext3 partition |
00:45.30 | swc666 | cool |
00:45.35 | tsdogs | just leave the 1st fat partition to the whole SD |
00:45.43 | swc666 | sweet |
00:45.58 | tsdogs | Put the exe and tar.bz2 in there, and after the first run |
00:46.15 | tsdogs | you'll get a file with the whole rootfs |
00:46.30 | tsdogs | 100MB img file |
00:46.35 | swc666 | awesome |
00:46.42 | tsdogs | I think it's in the readme |
00:47.11 | cr2 | tsdogs: i'm trying to convert gstr->osm, but it's too late and i get it wrong :) |
00:47.12 | swc666 | one more question... qtopia or openmoko... which is more stable and robust? |
00:47.24 | cr2 | swc666: neither |
00:47.31 | tsdogs | cr2: hi |
00:47.31 | swc666 | lol |
00:48.09 | cr2 | tsdogs: hi. i have such an evil plan, than you'll not believe :) |
00:48.24 | tsdogs | swc666: I think the actual qtopia image will last your battery for only few hours, dunno about openmoko |
00:48.31 | tsdogs | cr2: listening :) |
00:49.00 | swc666 | so if i want to use it for the phone capability as well as wlan, what should i be using? opie? |
00:49.12 | tsdogs | cr2: is it legal ? :-) |
00:49.12 | cr2 | tsdogs: no, it's too evil :) |
00:49.31 | cr2 | tsdogs: yes, if you do it right. |
00:50.09 | cr2 | tsdogs: better: if you use it in the right way |
00:50.27 | tsdogs | swc666: opie does not support phone, qtopia is ok, openmoko have no idea. Don't expect it to be all working though. |
00:50.40 | tsdogs | cr2: curios *** |
00:51.13 | swc666 | thanks.. |
00:51.31 | tsdogs | swc666: I think qtopia is the best available now for the phone |
00:51.56 | swc666 | downloading it right now.. |
00:52.37 | tsdogs | cr2: btw, I made a few "experimental" changes to roadmap, to make moving around the map faster |
00:52.50 | cr2 | tsdogs: i've added Webda data to roadmap CVS |
00:53.01 | tsdogs | it ain't perfect... |
00:53.14 | cr2 | tsdogs: and i'll change the indexer to use it, and utf8 too. |
00:53.22 | tsdogs | cr2: I saw the data folder, I suppose you'll use it for map indexing |
00:53.28 | tsdogs | :) |
00:53.33 | cr2 | well, it's better than us* and a_* |
00:53.43 | tsdogs | defenately |
00:53.49 | cr2 | i have one problem though |
00:54.07 | cr2 | the cities are gathered into the index. |
00:54.23 | cr2 | but the dictionary is limited by 2^16 |
00:54.28 | cr2 | entries |
00:54.36 | tsdogs | hmm, do they contain lon,lat? |
00:54.44 | tsdogs | ho ... |
00:54.53 | cr2 | no, it's the name search. |
00:55.05 | tsdogs | Splitting them into countries would help? |
00:55.20 | cr2 | and i guess there are more than 2^16 cities/villages in the world. |
00:55.31 | cr2 | no, it's the global index. |
00:56.03 | cr2 | we need some better search schema |
00:56.08 | tsdogs | hmm, would making it let's say 2^32 kill a PDA? |
00:56.22 | cr2 | and the dictionary is uncompressed too. |
00:56.31 | cr2 | it will kill the search speed |
00:56.35 | cr2 | i think. |
00:57.12 | tsdogs | cr2: well, let's build some kind of indexed file, so you simply get to the closest fast. But I'm no math expert |
00:57.45 | cr2 | ok, i'll do 2^16 working first |
00:57.56 | cr2 | because the changes are minimal. |
00:58.12 | tsdogs | cr2: dicotomic search? |
00:58.27 | tsdogs | or at least for the first part |
00:58.50 | tsdogs | actually I have no idea on what kind of search roadmap is using |
01:03.05 | tsdogs | cr2: u didn't tell me about the evil idea :) |
01:03.57 | cr2 | tsdogs: i want to split a geotiff |
01:04.05 | cr2 | using osm naming schema. |
01:04.24 | tsdogs | hmm sounds complicated to me |
01:05.17 | cr2 | yes, that's why it's evil |
01:05.47 | cr2 | imaging that you have some random geotiff. |
01:05.50 | cr2 | file |
01:06.44 | tsdogs | ok |
01:07.37 | cr2 | you convert it with gdalwarp to use spherical mercator with R=6378137m |
01:07.59 | cr2 | and the appropriate 2^zoom pixel size |
01:08.37 | cr2 | then you only need to cut it by tile x/y grid |
01:09.06 | cr2 | to create the z/x/y.png osm-compatible tiles. |
01:09.56 | tsdogs | ok, so then u can draw the png on the map right? |
01:10.05 | cr2 | it's then similar to gdal2tiles.py http://www.gdal.org/gdal2tiles.html |
01:10.21 | cr2 | but just more evil, unlike this one :) |
01:10.50 | cr2 | yes, you can then use whatever osm-compatible software with these tiles. |
01:11.09 | swc666 | wow i'm having issues... formatted the sd card (in xp) to fat, put both qtopia files (exe + tar) in the sd card, when I run the exe I get a mount error for the vfat sd |
01:11.34 | tsdogs | cr2: ok, but the 2^zoom part is pretty nasty |
01:12.07 | tsdogs | and also are there free geotiffs for the world? |
01:12.09 | cr2 | tsdogs: gdal2tiles.py is just some lame google-sponsored script, the 2^z part is the most important one. |
01:12.28 | cr2 | tsdogs: you can create them for some parts of the world :) |
01:12.57 | tsdogs | ok, then I think it's a great evil idea :) |
01:13.13 | cr2 | tsdogs: the landsat 15/30 m/pix imagery is free for the whole world, then there are some NIMA b&w 10m/pix imagery |
01:13.58 | tsdogs | swc666: hmm, is it the first partition? I think u need to make a vfat |
01:14.18 | tsdogs | cr2: at least it's a start :) |
01:14.35 | tsdogs | and a good one too |
01:14.39 | swc666 | should I make 2 partitions with fdisk or does the exe take care of it? |
01:15.13 | cr2 | tsdogs: then we'll have a politically correct osm support, but the user can supply his own geotiffs :) |
01:15.35 | cr2 | tsdogs: this is the evil plan. |
01:15.40 | tsdogs | swc666: no, there is no need of 2 partitions, linux goes installed into a file rootfs mounted with loop. |
01:15.55 | tsdogs | though there are some issues with some SD cards ... |
01:16.14 | tsdogs | cr2: :) |
01:16.19 | swc666 | ok so just one fat for the entire sd then, correct? |
01:16.31 | tsdogs | swc666: yes |
01:16.37 | swc666 | cool.. |
01:17.07 | tsdogs | swc666: read the readme everything should be in there |
01:17.20 | tsdogs | cr2: are u subscribed to osm mailing list? |
01:17.31 | swc666 | cant find the readme |
01:17.37 | tsdogs | hmm |
01:17.51 | swc666 | the one i found doesnt mention partitioning |
01:17.59 | swc666 | http://www.linuxtogo.org/~htcpxa/htcuniversal/images/Qtopia/README |
01:18.21 | swc666 | just says needs at least 128MB free space on your fat partition on the sd card |
01:18.36 | cr2 | tsdogs: no, but i read the archives. |
01:19.03 | tsdogs | swc666: http://www.linuxtogo.org/~htcpxa/htcuniversal/images/Qtopia/ that's the one |
01:19.42 | tsdogs | cr2: ok. I think u could send an e-mail before starting to work on it. |
01:19.54 | cr2 | swc666: if you have an empty 1GB SD card, you'll obviously have 128MB free space. |
01:20.00 | swc666 | right |
01:20.21 | swc666 | free as in unformatted / unpartitioned..? |
01:20.43 | swc666 | disregard that* |
01:20.56 | cr2 | tsdogs: i'm at a similar stage as with the .mp -> .rdm |
01:21.31 | cr2 | tsdogs: it mostly works, but i need to add more user-friendlyness |
01:21.41 | *** join/#htc-linux skodde (n=skodde@unaffiliated/skodde) |
01:21.48 | cr2 | tsdogs: and fix 2 bugs. |
01:21.54 | tsdogs | :) |
01:23.00 | tsdogs | hmm, goxboxlive: link at linuxtogo for qtopia is broken ... |
01:24.18 | tsdogs | cr2: ok, so u already done it :) |
01:24.21 | cr2 | tsdogs: i'm just missing some small handy tools here and there. |
01:25.02 | cr2 | tsdogs: the linuxtogo links work for me |
01:25.07 | tsdogs | cr2: I can give u some of my time, though have no idea on how much I can help |
01:25.30 | cr2 | tsdogs: yes, i've done and tested the most dirty part. |
01:25.38 | tsdogs | cr2: hoops, damn cache :( |
01:25.44 | tsdogs | goxboxlive: ignore my last post |
01:27.28 | tsdogs | cr2: whouldn't it be nice also to display them into roadmap? |
01:27.31 | swc666 | now its working... creating the 100mb root file |
01:28.45 | tsdogs | swc666: will take a while, then you'll be ready (please note that some times the phone won't work, so you won't be able to do anything beside reset), dunno if it's fixed now on that image |
01:29.05 | cr2 | tsdogs: the 2^z part is mostly done in roadmap, but we need to switch to mercator. |
01:29.58 | swc666 | yeah i read that on the forum... we'll see how it goes... many thanks for the input ;>) |
01:29.59 | tsdogs | well, should only need a conversion between lon,lat -> mercator and back for the user, and create maps which use mercator insthead of lon,lat |
01:30.13 | cr2 | tsdogs: i think roadmap uses http://en.wikipedia.org/wiki/Plate_carrée_projection now |
01:30.38 | cr2 | yes, for the user, and for gps. |
01:30.51 | tsdogs | lol, 100AD :) |
01:31.06 | cr2 | the */1000000 should be replaced by some conversion function. |
01:31.47 | cr2 | yes, it's just cos(lat) scaling. google was using it at the beginning too. |
01:32.39 | tsdogs | cr2: actually I think that the only complicated part is the zoom... |
01:33.17 | tsdogs | 'cause of the decluttering part is there too |
01:33.33 | tsdogs | I think it's a task for u :) |
01:33.54 | cr2 | we have the 2^z zoom already. |
01:34.02 | cr2 | unlike the mainline. |
01:34.19 | cr2 | it's only necessary to fix the zoom0 m/pix value |
01:35.20 | cr2 | static RoadMapUnits RoadMapMetricSystem = { |
01:35.20 | cr2 | <PROTECTED> |
01:37.05 | swc666 | is there no terminal in qtopia? |
01:37.53 | cr2 | tsdogs: this 0.11112 values is something like awk 'END{print 6378137*2*3.14159265358979323846/360/10000000}' < /dev/null |
01:38.07 | cr2 | tsdogs: i.e. m/microdegree |
01:38.09 | tsdogs | cr2: ok, btw osm is already using yahoo maps for the background |
01:38.14 | tsdogs | when editing |
01:38.36 | cr2 | tsdogs: yes, but using the weird yahoo api. |
01:39.13 | cr2 | tsdogs: you can use it directly, but it's against the yahoo rules. |
01:39.49 | tsdogs | yes, it's not really nice, at least not very usefull |
01:40.18 | cr2 | yeah, they are afraid that you'll just grab the tiles. |
01:40.40 | cr2 | the same applies to the not so evil company. |
01:40.58 | cr2 | which doesn't even allow to draw using their imagery. |
01:41.51 | tsdogs | yep |
01:41.53 | cr2 | but since they use the same tiling schema, it's only a namespace conversion. |
01:44.58 | cr2 | 0.0111195 |
01:45.04 | cr2 | 0.11112 |
01:45.26 | cr2 | 0.111195 |
01:45.26 | tsdogs | is the first one for zoom0 ? |
01:45.57 | cr2 | it's the current value |
01:47.47 | cr2 | in the 2^z schema it should be awk 'END{print 6378137*2*3.14159265358979323846/2^z}' z=26 < /dev/null |
01:47.56 | cr2 | 0.597164 |
01:48.39 | cr2 | the current 11cm/pix is an overkill. |
01:48.43 | cr2 | imho |
01:48.49 | tsdogs | so we only need a changing value to adapt to the zoom? |
01:48.58 | tsdogs | cr2: yes, way too big |
01:49.17 | cr2 | for z=28 it's 0.149291 |
01:50.39 | cr2 | subtract 8 to get the google zoom |
01:50.48 | *** join/#htc-linux TimRiker (n=timr@rikers.org) |
01:50.55 | cr2 | 2^8=256 pixels per tile |
01:51.26 | tsdogs | ok. |
01:52.53 | *** join/#htc-linux the_sys0p (i=the_sys0@gateway/tor/x-30da3890ed86ef7c) |
01:53.16 | cr2 | ok, good night :) |
01:53.23 | tsdogs | cr2: it's pretty late, good night yeah |
03:11.44 | *** join/#htc-linux swc666 (n=no@24.143.67.18) |
03:36.52 | swc666 | I installed openmoko (via cab) to my universal and the windows system shows a bunch of red x's in place of (missing) images... anyone seen this happen before? |
03:39.29 | swc666 | i cant figure it out |
03:47.33 | swc666 | anyone have an idea? |
04:17.25 | *** join/#htc-linux sw1ft (i=sw1ft@c-67-184-13-125.hsd1.il.comcast.net) |
04:24.35 | sw1ft | Does anyone possibly have the file titan_exitbl.rar used to get a Titan out of the rainbow screen? |
04:53.49 | *** join/#htc-linux ltxda (n=ltxda@c-98-196-125-205.hsd1.tx.comcast.net) |
07:38.56 | *** join/#htc-linux Zoolooc (n=fredsiba@nrbg-4dbfa789.pool.einsundeins.de) |
08:22.57 | *** join/#htc-linux diogene31 (n=rj@mur31-2-82-243-122-54.fbx.proxad.net) |
09:02.09 | *** join/#htc-linux ndavey_ (n=neil@60-240-227-199-vic-pppoe.tpgi.com.au) |
10:26.55 | *** join/#htc-linux cods (n=cods@rsbac/developer/cods) |
10:31.10 | *** join/#htc-linux Marex (n=marex@gwfm10-3-250.802.cz) |
10:39.52 | *** join/#htc-linux rob_w|laptop (n=rob@Ma23e.m.pppool.de) |
10:45.09 | *** join/#htc-linux goxboxlive (n=goxboxli@134.84-48-212.nextgentel.com) |
10:48.46 | *** join/#htc-linux pH5 (n=ph5@p5485EF4A.dip.t-dialin.net) |
10:59.15 | *** join/#htc-linux hlbot (n=adm@82.67.76.179) |
11:06.05 | *** part/#htc-linux respawn (n=spawn@eminescu.rdsor.ro) |
11:09.19 | *** join/#htc-linux hlbot (n=adm@iclem.net) |
11:46.52 | *** join/#htc-linux pH5 (n=ph5@p5485EF4A.dip.t-dialin.net) |
12:05.00 | *** join/#htc-linux pleemans (n=peter@d51A5E76A.access.telenet.be) |
12:28.56 | *** join/#htc-linux diogene31_ (n=rj@mur31-2-82-243-122-54.fbx.proxad.net) |
12:41.22 | *** join/#htc-linux Marex (n=marex@gwfm10-3-250.802.cz) |
13:39.11 | *** join/#htc-linux rob_w|laptop (n=rob@X12ad.x.pppool.de) |
14:00.36 | *** join/#htc-linux BabelO (n=Fabrice@lun34-2-82-238-28-28.fbx.proxad.net) |
14:28.19 | BabelO | hi |
14:31.25 | cr2 | hi BabelO |
14:32.08 | BabelO | cr2: did you see the link to TomTom website i post yesturday ? |
14:32.59 | cr2 | no |
14:33.12 | cr2 | ah, about the s3c* kernel ? |
14:33.21 | BabelO | cr2: yes |
14:33.25 | cr2 | yes. |
15:01.10 | *** join/#htc-linux bernt (n=bernt@dslb-084-060-107-046.pools.arcor-ip.net) |
15:11.37 | cr2 | BabelO: do you know imagemagic ? |
15:12.37 | BabelO | cr2: not really, i use it last time with pH5 to do batch convert on openmoko picture |
15:13.30 | cr2 | ok. |
15:15.17 | *** join/#htc-linux kiozen (n=kiozen@rgnb-4db1da3e.pool.einsundeins.de) |
15:15.42 | kiozen | morning :) |
15:16.02 | BabelO | lol kiozen |
15:16.19 | kiozen | just feel like that :) |
15:16.29 | cr2 | hm. it seems i missed 't' at the beginning |
15:16.30 | BabelO | yes it is for me ;) |
15:16.32 | cr2 | hi kiozen |
15:16.55 | kiozen | hi cr2 just read the log |
15:16.59 | cr2 | kiozen: i'm back to hacking n560. didn't have any time before ;) |
15:17.11 | kiozen | I know |
15:17.36 | kiozen | cr2: you ever thought about WMS servers? |
15:17.57 | kiozen | they do somehow the stuff you want to do |
15:19.00 | kiozen | and try out latest GT |
15:19.02 | cr2 | kiozen: yes, but then you need to georeference each tile |
15:19.40 | kiozen | why not leave the gtiff as one and just grab the part you need? |
15:20.19 | cr2 | kiozen: i'm was looking for something simple. setting up the mapserver is not for an average user. unlike apache. |
15:20.41 | cr2 | kiozen: it's rescaling, and, maybe, rotating. |
15:21.13 | dcordes | hi |
15:21.15 | cr2 | kiozen: it's not for GT/M :) |
15:21.44 | dcordes | cr2, still nothing new under msm sky -_- |
15:21.55 | kiozen | cr2: ok |
15:22.33 | cr2 | dcordes: yes. |
15:31.08 | cr2 | kiozen: very nice :) |
15:31.35 | kiozen | cr2: did you notice the overzoom? |
15:31.53 | cr2 | kiozen: one problem though. it should not segfault if the .tif files in .qmap are not available. |
15:32.32 | kiozen | oh again a segfault :) those little bugs creep in faster than you can kill them |
15:32.47 | cr2 | kiozen: overzoom as an option is ok, but i've somehow used to no-overzoom. |
15:33.37 | kiozen | cr2: well you can stop using the mouse wheel right in time :) |
15:40.21 | kiozen | cr2: how did you get it to crash? Tryed with no qmap as well as with missing tif -> no crash |
15:40.54 | cr2 | i've moved the *.tif to another directory |
15:42.03 | cr2 | ERROR 4: `FOO.tif' does not exist in the file system, |
15:42.15 | cr2 | and is not recognised as a supported dataset name. |
15:42.15 | cr2 | zoom: 2 |
15:42.15 | cr2 | done |
15:42.15 | cr2 | Speicherzugriffsfehler |
15:43.20 | kiozen | ah, ok you just have one tiff, don't you? |
15:43.40 | cr2 | no, a gazillion of tiles. |
15:43.56 | cr2 | and for each tile is get this ERROR 4: |
15:44.01 | BabelO | kiozen: i need a QT expert :) what are the reason that QTimer::singleShot( 8000, this, SLOT(requestStorages()) ); never happen ? |
15:44.15 | cr2 | QStatusBar::insertPermanentWidget: Index out of range (1), appending widget |
15:45.19 | kiozen | BabelO: any messages on the console about missing slots? |
15:45.39 | kiozen | cr2: that is just some QT SNAFU |
15:46.09 | BabelO | kiozen: no, it is a qtopia source code :( i add many trace |
15:48.24 | kiozen | BabelO: usually either the event q is blocked (but you should notice that quickly) or the slot has a spelling or parameter error |
15:50.19 | BabelO | kiozen: it sound more like if i have a thread paused |
15:50.30 | cr2 | kiozen: i'll compile with -g |
15:50.51 | kiozen | cr2: no need I am on it |
15:53.10 | kiozen | cr2: fixed |
15:53.38 | kiozen | ok got to de-elect or major :) bbl |
16:16.22 | kiozen | cr2: did it work? |
16:30.25 | cr2 | kiozen: yes, it does not crash now |
16:30.35 | kiozen | ok :) |
16:31.57 | kiozen | ok have to do some windows stuff for GT, bbl |
16:45.15 | *** join/#htc-linux skodde (n=skodde@unaffiliated/skodde) |
16:53.47 | *** join/#htc-linux CVirus (n=GoD@196.205.192.185) |
16:55.08 | *** join/#htc-linux diogene31 (n=rj@mur31-2-82-243-122-54.fbx.proxad.net) |
16:59.28 | *** join/#htc-linux pleemans (n=peter@d51A5E76A.access.telenet.be) |
17:34.24 | *** join/#htc-linux tsdogs (n=tsdogs@62.123.180.130) |
17:43.44 | *** join/#htc-linux LunohoD_ (n=alex@e180078032.adsl.alicedsl.de) |
17:46.38 | cr2 | hi tsdogs |
17:47.11 | cr2 | BabelO: c++ programmers are evil |
17:47.18 | cr2 | return int(pow(2, zoomlevel+0.0)); |
17:47.45 | cr2 | 1<<zoomlevel ? |
17:53.40 | cr2 | wow. i'm evil too :) |
17:53.46 | Pryan | :o) |
17:54.12 | Pryan | offuscate your own code, then you are evil |
18:18.24 | *** join/#htc-linux hlbot (n=adm@iclem.net) |
19:26.48 | cr2 | tsdogs: are you here ? |
19:27.09 | tsdogs | cr2: kind of :) |
19:29.30 | cr2 | tsdogs: i'm looking for something like http://csourcesearch.net/package/junkbuster/2.0.2/ijb20/ssplit.c |
19:30.06 | cr2 | tsdogs: to remove whitespace and split the string. like argc, **argv is doing it. |
19:31.41 | tsdogs | cr2: C? |
19:32.45 | cr2 | yes. QString is too easy :) |
19:33.14 | tsdogs | cr2: ok what's wrong with that one? |
19:34.47 | cr2 | it's too complex |
19:37.19 | tsdogs | cr2: I have no idea about an exsisting one in C |
19:38.58 | tsdogs | hmm, reimplementing it would lead to the same, probably if u only need the withspace or a char as a separator, it gets easyer |
19:40.42 | cr2 | yes, with 1 char separator, and ignoring multiple spaces. |
19:41.43 | cr2 | there is an example in the strtok(3) page |
19:41.46 | tsdogs | cr2: it sould be easyly coded then. |
19:42.41 | cr2 | i want to get rid of the awk script, because it became too complex too. |
19:43.10 | cr2 | and using QString is a too high requirement. |
19:43.20 | tsdogs | cr2: I think that using strstr and a while loop is enough |
19:44.05 | tsdogs | or in case of only one char split, a loop is enough |
19:44.19 | tsdogs | cr2: u wanted me to implement it ? |
19:44.30 | cr2 | would be nice :) |
19:45.02 | cr2 | with the dynamic memory management, and sfree() after reprocessing. |
19:46.25 | tsdogs | ok, let's see with what I can come up... |
19:48.14 | cr2 | thanks :) |
19:51.12 | tsdogs | cr2: is the white space a splitter, or simply ignore multiple subsequent splitting char? |
19:52.03 | cr2 | ignore as in s/ / /g |
19:52.12 | tsdogs | ok |
20:02.52 | *** join/#htc-linux pleemans (n=peter@d51A5E76A.access.telenet.be) |
20:17.10 | *** join/#htc-linux TimRiker (n=timr@rikers.org) |
20:20.08 | *** join/#htc-linux Marex (n=marex@vasut.kolej.mff.cuni.cz) |
20:55.34 | tsdogs | cr2: should it also trim ? |
20:56.22 | cr2 | tsdogs: ? |
20:56.46 | cr2 | the s/ / /g ? |
20:57.02 | tsdogs | the strip, should it also trim? (i.e. one, two, three) |
20:57.29 | tsdogs | not trimming would lead to a " two" " three" if u split with , char |
21:01.15 | cr2 | ah, ok. |
21:01.28 | cr2 | yes, i think it's of no good use. |
21:01.45 | cr2 | to preserve the spaces at the beginning |
21:02.53 | tsdogs | cr2: also u want the "char **out" to be a struct dynamically allocated insthead? |
21:02.59 | tsdogs | a linked list |
21:03.29 | tsdogs | (so u actually are asking for a QStringList, which is what the split in QString does :) |
21:03.47 | tsdogs | ? |
21:03.50 | cr2 | can be an array of pointers, but then it should be also freed in sfree() |
21:04.11 | tsdogs | hmm, not something u define from the calling part? |
21:04.12 | cr2 | as in **argv, with the size of argc. |
21:04.40 | tsdogs | cr2: ok, but whould not know how to free it afterwards. |
21:05.17 | cr2 | argc=ssplit(const char *string,&argv,const char sep) |
21:05.43 | tsdogs | cr2: so argv is already allocated |
21:05.56 | cr2 | two parms for free ? free all argv[i], and then *argv |
21:06.23 | cr2 | no, argv is just const char **argv |
21:06.58 | tsdogs | hmm ok, so I need to free it if it's allocated, otherwise I'll simply allocate a new one. |
21:07.20 | cr2 | sfree(argv,argc) |
21:07.36 | cr2 | hm. ok, so it's necessary to be careful with const. |
21:07.53 | *** join/#htc-linux aLeSD (n=alex@162.Red-83-33-46.dynamicIP.rima-tde.net) |
21:08.16 | cr2 | so argv is char **argv then |
21:08.29 | tsdogs | cr2: ok |
21:10.36 | cr2 | hehe. created 1.5G of tiles. need to recheck the math now :) |
21:24.44 | *** join/#htc-linux rmoravcik (n=rmoravci@ip-89-102-255-171.karneval.cz) |
21:52.08 | *** join/#htc-linux CVirus (n=GoD@196.205.192.185) |
22:20.13 | tsdogs | cr2: how do I check if the argv is allocated ? |
22:21.01 | cr2 | you can't |
22:21.13 | cr2 | maybe check if it's NULL |
22:21.30 | tsdogs | :) then how the heck am I able to free the argv dynamically ? |
22:21.43 | tsdogs | cr2: NULL won't work |
22:22.06 | cr2 | ssplit will allocate it |
22:22.14 | cr2 | so it should be ther.e |
22:22.46 | tsdogs | cr2: but then I'd need external variables to do this check. |
22:23.00 | cr2 | why ? |
22:23.25 | tsdogs | cr2: argv = malloc(whatever); and return it |
22:25.53 | cr2 | yes. |
22:26.06 | tsdogs | cr2: http://pastebin.com/m77fb646e actual code |
22:28.53 | cr2 | tsdogs: looks good. we only need to check the !malloc |
22:29.53 | tsdogs | cr2: it's working but either we use a sfree(out,r) outside the ssplit, or we need to pass the r value to the function. |
22:30.18 | tsdogs | if I had the "count" value (which is the previous one) this whold be pretty easy |
22:30.31 | tsdogs | r = count |
22:30.37 | cr2 | yes, it should be outside. |
22:30.47 | cr2 | otherwise it's a mess. |
22:31.14 | tsdogs | ok so u do r = ssplit(str, argv, c); use it and the sfree(argv,r); |
22:31.23 | cr2 | yes. |
22:31.29 | tsdogs | ok, easy :) |
22:31.33 | cr2 | :) |
22:36.09 | tsdogs | cr2: paul is working on roadmap ... :) |
22:36.47 | cr2 | not only he. i've seen the roadmap_editor patches too. |
22:43.01 | tsdogs | yes on 04/02/2008 :) |
22:46.48 | tsdogs | cr2: I'm really a dumb, but I get a glibc detected double free ??? on free(argv[i]); |
22:52.15 | tsdogs | hmm it's only when i==0 |
22:53.44 | cr2 | it happens when you free a !NULL pointer not allocated by malloc |
22:53.54 | cr2 | because glibc tracks all mallocs |
22:54.25 | tsdogs | ok, so it's something wrong with * |
22:59.10 | tsdogs | cr2: but why does this happen when i is == 0, but it is working when i>0 |
23:04.34 | cr2 | hmm. |
23:16.50 | tsdogs | cr2: I really do not get it, when i free it from 1 to n it works, but if it's 0 it will fail (even inside the ssplit???) |
23:22.19 | *** join/#htc-linux Marex (n=marex@vasut.kolej.mff.cuni.cz) |
23:22.43 | tsdogs | cr2: I give up: http://pastebin.com/m5880d124 this one works ... |
23:26.26 | *** join/#htc-linux Marex (n=marex@vasut.kolej.mff.cuni.cz) |
23:27.39 | tsdogs | well: sfree is missing an initial line: if (count<=0) return; |
23:27.54 | cr2 | looking |
23:28.37 | tsdogs | and a few checks to see if malloc failed :) |
23:29.36 | tsdogs | cr2: does it segfault to u too? I hope so otherwise I have a broken glibc :( |
23:35.00 | cr2 | works on amd64 |
23:35.44 | tsdogs | cr2: amd64 here too, the version I past bin works, but if u do i>=0 it segfaults here. |
23:39.47 | cr2 | ok, i'll check. |
23:40.36 | cr2 | valgrind on amd32 is not happy |
23:40.38 | tsdogs | cr2: hmm maybe I found out why :) |
23:40.50 | tsdogs | the first malloc is wrong :) |
23:40.57 | cr2 | ==13640== Invalid read of size 4 |
23:41.00 | tsdogs | should be malloc(count*sizeof(char *) |
23:41.12 | tsdogs | yep :) it's a pointer and not a char |
23:41.52 | cr2 | <PROTECTED> |
23:41.57 | cr2 | this one ? |
23:42.20 | tsdogs | ok now it's working :) |
23:42.25 | tsdogs | cr2: yes |
23:42.31 | *** join/#htc-linux Flameweaver (i=Flamewea@82-37-2-1.cable.ubr01.wolv.blueyonder.co.uk) |
23:42.42 | cr2 | ==13662== Invalid read of size 1 |
23:42.42 | cr2 | ==13662== at 0x4021FC3: strlen (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) |
23:42.43 | cr2 | ==13662== by 0x407C807: vfprintf (in /lib/libc-2.4.so) |
23:42.43 | cr2 | ==13662== by 0x4081C92: printf (in /lib/libc-2.4.so) |
23:42.43 | cr2 | ==13662== by 0x8048482: main (in /cluster/oleg/ROADMAP/a.out) |
23:42.43 | cr2 | ==13662== Address 0x415F169 is 0 bytes after a block of size 9 alloc'd |
23:42.52 | Flameweaver | hey all |
23:43.06 | cr2 | ==13662== LEAK SUMMARY: |
23:43.06 | cr2 | ==13662== definitely lost: 42 bytes in 4 blocks. |
23:43.28 | Flameweaver | anyone running OpenMoko on Uni with a working gprs pppd connection? |
23:43.42 | cr2 | Flameweaver: not me. |
23:43.44 | tsdogs | cr2: http://pastebin.com/md8e756c this one is working |
23:43.47 | cr2 | ==13662== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 3 from 1) |
23:43.47 | cr2 | ==13662== |
23:43.48 | cr2 | ==13662== 1 errors in context 1 of 1: |
23:43.48 | cr2 | ==13662== Invalid read of size 1 |
23:43.53 | cr2 | tsdogs: ok. |
23:44.28 | tsdogs | Flameweaver: I think goxboxlive is the only developer who actually tested openmoko on Uni |
23:44.51 | tsdogs | Flameweaver: anyway activating gprs on Uni is a bit triky |
23:45.17 | Flameweaver | tell me about it |
23:45.30 | tsdogs | Flameweaver: looking :) |
23:45.35 | cr2 | tsdogs: still one error remaining. |
23:45.43 | tsdogs | cr2: where? |
23:45.46 | Flameweaver | I've been reading gprs config docs for a day now |
23:47.00 | Flameweaver | I'm just gettting to sent [LCP ConfReq id=0x1 <a syncmap 0x0> <magix 0Xa26d0a8f> <pcomp> <accomp>] |
23:47.12 | tsdogs | Flameweaver: http://www.pastebin.ca/925394 |
23:47.15 | cr2 | ==13743== Address 0x415F169 is 0 bytes after a block of size 9 alloc'd |
23:47.15 | cr2 | ==13743== at 0x4021259: malloc (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) |
23:47.15 | cr2 | ==13743== by 0x804872C: ssplit (ssplit2.c:87) |
23:47.15 | cr2 | ==13743== by 0x804844F: main (ssplit2.c:13) |
23:47.17 | cr2 | tsdogs: |
23:49.11 | tsdogs | cr2: what's wrong with main at line 13? |
23:49.42 | tsdogs | at line 87, should be some kind of cast I think... |
23:50.15 | Flameweaver | cheers tsdogs... |
23:50.35 | Flameweaver | anyone know if he's managed gprs under qtopia? |
23:50.59 | cr2 | tsdogs: yes, it's better to have a cast there. |
23:51.26 | tsdogs | Flameweaver: it works just inside console, so it should be working on both (no gui though) |
23:51.32 | cr2 | tsdogs: why don't you use strdup ? |
23:51.33 | tsdogs | cr2: I'm fixing :) |
23:51.44 | tsdogs | cr2: I'm not a c programmer :) |
23:51.45 | cr2 | it's not ansi c though. |
23:51.48 | cr2 | ok :) |
23:52.07 | tsdogs | actually I know c, but don't use it that much. |
23:52.51 | tsdogs | cr2: http://pastebin.com/m43fcb824 |
23:53.25 | tsdogs | cr2: probably line 13 is a warning 'cause of a not initialized var? |
23:55.14 | tsdogs | hmm, probably should do a sizeof(char)* inside memcpy and memset too |
23:56.38 | cr2 | i don't know why it whines at this line. |
23:57.00 | tsdogs | I think it's 'cause it is not allocated ... |
23:57.25 | tsdogs | otherwise it should complain about line 19 too |
23:58.04 | cr2 | sizeof(char *) should be better |
23:58.27 | tsdogs | cr2: the * is not for pointer but for multipling :) |
23:58.53 | cr2 | i've changed it to char * |
23:58.59 | cr2 | but get anohter error now |
23:59.02 | cr2 | ==13860== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 3 from 1) |
23:59.02 | cr2 | ==13860== |
23:59.03 | cr2 | ==13860== 1 errors in context 1 of 1: |
23:59.03 | cr2 | ==13860== Conditional jump or move depends on uninitialised value(s) |
23:59.24 | tsdogs | hope this is final :) http://pastebin.com/m778d4182 |
23:59.25 | tsdogs | ho |