00:54.13 | *** join/#openjtag prpplague (n=dave@72.22.137.214) |
00:59.53 | prpplague | any c guru's awake? |
01:02.38 | AchiestDragon | is that software by any chance |
01:05.16 | prpplague | hehe yea |
01:06.19 | key2 | prpplague: shot |
01:07.09 | prpplague | ran across the declaration of: |
01:07.17 | prpplague | const char foo[]; |
01:07.26 | prpplague | where before i had always used |
01:07.34 | prpplague | const char *foo; |
01:08.02 | prpplague | not sure what the difference is |
01:08.12 | key2 | none |
01:08.20 | key2 | almost |
01:08.40 | prpplague | key2: odd |
01:08.48 | key2 | well there are no difference for me |
01:08.53 | prpplague | key2: 2.95.3 cross compile complete chokes on it |
01:09.13 | key2 | how do u use it ? |
01:09.20 | key2 | *foo is a pointer |
01:09.24 | key2 | so foo is the adress |
01:09.31 | key2 | and *foo the value |
01:09.38 | key2 | but depends |
01:10.05 | key2 | do u malloc it ? |
01:10.08 | prpplague | key2: used in a struct declaration |
01:10.43 | prpplague | short paste |
01:10.45 | prpplague | 1 |
01:10.46 | prpplague | 2 |
01:10.47 | prpplague | 3 |
01:10.50 | prpplague | struct env_link { |
01:10.50 | prpplague | <PROTECTED> |
01:10.50 | prpplague | <PROTECTED> |
01:10.50 | prpplague | <PROTECTED> |
01:10.51 | prpplague | <PROTECTED> |
01:10.53 | prpplague | <PROTECTED> |
01:10.55 | prpplague | <PROTECTED> |
01:10.57 | prpplague | <PROTECTED> |
01:10.59 | prpplague | }; |
01:11.17 | prpplague | i can change the const char region[] to const char *region |
01:11.26 | prpplague | and it compiles clean with 2.95.3 |
01:12.56 | prpplague | their seems to be a thread on the LKML about the differences |
01:13.05 | prpplague | but i've not gone through it all yet |
01:13.39 | key2 | and if u put const char *region; ? |
01:14.17 | prpplague | it compiles and runs |
01:14.35 | key2 | well that's normal |
01:14.47 | *** join/#openjtag ka6sox (n=ka6sox@nslu2-linux/ka6sox) |
01:14.54 | key2 | because in a struct const char region[] has no sense |
01:14.59 | key2 | since u gotta maloc it |
01:15.02 | key2 | it needs the pointer |
01:15.18 | prpplague | i'm thinking that 3.x gcc is handling it differentl |
01:15.19 | prpplague | y |
01:15.24 | prpplague | testing now |
01:15.28 | key2 | in the declaration const char region[]; |
01:15.41 | key2 | region = something is wrong |
01:15.57 | key2 | event tho ®ion would have returned the mem address |
01:16.54 | key2 | prpplague: to confirm, test that: const char region[50]; |
01:16.58 | key2 | just to see if it complains |
01:17.03 | prpplague | gotcha |
01:17.28 | prpplague | key2: yea looks like 3.3.2 builds it with not problem as const char region[] |
01:18.35 | prpplague | key2: 2.95.3 with region[50] builds clean |
01:20.50 | prpplague | well thats interesting |
01:20.58 | prpplague | i'll have to do some more digging on that |
01:21.06 | prpplague | key2: thanks for the input |
01:21.34 | prpplague | key2: always nice to have some verify that you aren't insane ( or atleast slight losing your mind) |
01:21.41 | prpplague | s/some/someone |
01:25.09 | key2 | prpplague: talking about me ? :) |
01:26.35 | prpplague | hehe yea |
02:53.46 | *** join/#openjtag vmaster_ (i=vmaster@p549B51F5.dip.t-dialin.net) |
03:45.22 | *** join/#openjtag dot (n=ka6sox@netblock-68-183-62-135.dslextreme.com) |
03:46.03 | *** join/#openjtag tking__ (n=ka6sox@netblock-68-183-62-135.dslextreme.com) |
04:36.29 | *** join/#openjtag fishhead (n=d3200@c-67-165-88-141.hsd1.pa.comcast.net) |
09:15.36 | *** join/#openjtag fishhead (n=d3200@c-67-165-88-141.hsd1.pa.comcast.net) [NETSPLIT VICTIM] |
09:15.36 | *** join/#openjtag bullet (n=bullet@65.53.62.81.cust.bluewin.ch) [NETSPLIT VICTIM] |
09:15.37 | *** join/#openjtag ka6sox-office (n=tking@nslu2-linux/ka6sox) [NETSPLIT VICTIM] |
09:15.37 | *** join/#openjtag [g2] (n=Tom@nslu2-linux/g2) |
09:20.13 | *** join/#openjtag fishhead- (n=d3200@c-67-165-88-141.hsd1.pa.comcast.net) |
10:29.29 | vmaster_ | key2: regarding your discussion with prpplague last night: |
10:29.45 | vmaster_ | in his case, region[] and region* are totally different |
10:30.49 | vmaster_ | region[] declares a flexible-length array, and is defined since ISO-C99 |
10:31.05 | vmaster_ | on gcc 2.95.x he would have to change it to region[0] |
10:31.57 | vmaster_ | in both cases, the struct looks like this in memory [magic][apex_start][apex_end][env_start][env_end][env_d_size][region..... |
10:32.05 | vmaster_ | i.e. the region is directly concatenated to the struct |
11:08.51 | key2 | vmaster: yep |
11:11.46 | key2 | http://ronwarez.com/catcher/2006-04/29c958c6e9d3d7e729cdc4b0768a3c03.jpg |
11:11.47 | key2 | lol |
13:14.40 | *** join/#openjtag prpplague (n=dave@72.22.137.214) |
17:23.40 | *** join/#openjtag key2 (n=key2@gob75-2-81-56-64-17.fbx.proxad.net) |
17:48.24 | *** join/#openjtag vmaster (i=vmaster@p549B7906.dip.t-dialin.net) |
17:55.18 | vmaster | prpplague: did you solve your problems with the region[]? |
17:56.09 | prpplague | vmaster: yes and no |
17:56.30 | prpplague | vmaster: hehe,, apex hasn't been 2.95.3 compatible for awhile |
17:56.40 | prpplague | vmaster: but i was just curious about that particular issue |
17:56.50 | prpplague | vmaster: using the region[0] does seem to work |
17:56.55 | vmaster | heh, not sure if it's a bad thing being 2.95.3 incompatible |
17:57.34 | vmaster | yeah... 2.95.3 lacks support for flexible length arrays |
17:57.42 | prpplague | vmaster: agreed, it was more of a "driving me nuts not knowing why" kind of thing |
17:58.37 | AchiestDragon | seems to think thats the objective of C |
17:58.50 | prpplague | hehe |
17:59.15 | prpplague | @$%@$% its hot today |
17:59.42 | vmaster | poor you :-P |
17:59.57 | vmaster | at least we had three sunny days at ~20C in a row |
18:00.05 | prpplague | hehe |
18:01.26 | AchiestDragon | a cool 15C here |
18:01.49 | prpplague | vmaster: i never had any formal education in either the hardware or coding, so there are plenty of gaps in my udnerstanding of things |
18:02.34 | AchiestDragon | prpplague: even if you had there is still always gaps |
18:03.05 | prpplague | AchiestDragon: agreed |
18:03.28 | prpplague | AchiestDragon: we hired a junior programmer at work, straight out of college |
18:03.36 | prpplague | AchiestDragon: takes him forever to get something done |
18:04.19 | prpplague | AchiestDragon: hehe, i think he forgets that we are business and time is money, he's too into doing "perfect code" |
18:04.58 | prpplague | just imho |
18:05.39 | prpplague | btw, if anyone is interested the arm720t based pixter multimedia is now selling for around $35 , even on ebay |
18:06.59 | AchiestDragon | yes , i started codeing using assembly , and i think if you do it that way you learn more about the system your programming and get to learn tricks that make the code compact |
18:07.31 | AchiestDragon | rather than have it include a full maths lib just so you can add 2 numbers |
18:07.54 | prpplague | AchiestDragon: my first language was BASIC, so i'm just screwed |
18:08.15 | AchiestDragon | its amazing what you can do in 1k in assembly |
18:08.28 | prpplague | hehe yea |
18:08.46 | prpplague | AchiestDragon: funny thing is i hear alot of people complain about arm asm, but i love it |
18:09.01 | prpplague | AchiestDragon: i find it very logical |
18:10.28 | AchiestDragon | asm on risc cpus can have some odd rules , but understanding why can let you write verry efficiant and small code |
18:11.04 | prpplague | i have got sooooo much work to do to apex |
18:12.17 | AchiestDragon | personaly i find C++ a pain , it never cut the mark and the sintax structure got overly complex , C was ok untill then |
18:13.02 | prpplague | i still have some problems with OO |
18:13.05 | prpplague | stuff |
18:13.20 | AchiestDragon | i can read and understand most c and c++ code but find it dificult to write code in it |
18:14.10 | AchiestDragon | i find writing in python easyer , and it seems just as effective |
18:14.37 | prpplague | hehe |
18:15.26 | prpplague | AchiestDragon: i've been hacking and tweaking kernel code for years now, but i'm just now feel comfortable to writing kernel drivers from scratch |
18:15.49 | AchiestDragon | kool |
18:15.53 | AchiestDragon | bbl |
18:16.33 | AchiestDragon | prgram just starting on tv ,,, dr who compulsary tv viewing |
18:19.12 | *** join/#openjtag ka6sox (n=ka6sox@nslu2-linux/ka6sox) |
18:50.09 | *** join/#openjtag dwery (n=dwery@nslu2-linux/dwery) |
20:58.24 | *** join/#openjtag bullet (n=bullet@117-180.0-85.cust.bluewin.ch) |
23:02.56 | *** join/#openjtag prpplague (n=dave@72.22.137.214) |