Friday, 2013-09-13

*** tpb has joined #timvideos00:00
*** tpb has joined #timvideos01:07
*** CarlFK has joined #timvideos01:10
*** mithro has joined #timvideos01:32
SewarCarlFK, iiie, mithro:
tpbTitle: Snippet #240028 (at
Sewarignore 51 for now01:42
iiieSewar, how can I help?01:43
Sewariiie: memset set all new extended bytes in string to NUL so they can be written by strcat01:43
Sewaroutput is updated in parse_edid but in main() it still the same 001:44
iiieit can be written by strcat01:44
iiieeven without being set to NULL01:44
CarlFKMeeting Sep 12 EdX / Rackspace Autoscaling / What's Love Got to do with It? | LIVE:
tpbTitle: Streaming for ChiPy - Chicago Python User Group (at
Sewarremoving memset breaks things, maybe another line affects it01:46
iiieline 50, you're reassigning output I think01:46
iiiewhat breaks skipping the memset?01:46
iiieeven though the memset only runs on the destination buffer?01:47
iiiealright, we're going to try something odd01:47
Sewarline 50, yeah, extending its size01:47
iiieright, but after that the address of output is different01:48
iiie*output = realloc....01:51
iiiethat probably won't work either....01:52
Sewaraccess violation, because output points to 001:52
iiiewhat do we want output to be? we want it to be a pointer01:53
iiieso I think we want to change the function signature01:54
Sewarlet me simplify the code without win stuff01:54
tpbTitle: Snippet #240029 (at
SewarTo be clear, what I want to achieve, a char * variable in main(), which I can pass to parse_edid() multiple times so it gets extended,
tpbTitle: Snippet #240028 (at
* iiie is doing too many things at once02:27
iiieI think we want to pass the address of output to test / parser02:28
iiiewe want the address of the pointer not the pointer itself, because we assign a value to it with realloc02:29
Sewariiie: how to do that?02:34
iiie&variable is the address of the variable02:35
iiiewhat does that make the signature though, hm02:36
iiiejust a minute none windows so I should be able to run it...02:38
Sewar can be compiled and run in linux, I guess02:43
tpbTitle: Snippet #240029 (at
CarlFKim off02:50
*** CarlFK has quit IRC02:50
iiieyeah, so c doesn't support passing by reference, so I think we have to be a little trickier02:56
iiiec++ on the other hand02:57
Sewarwell, the requirement is c right?03:02
iiie the requirement is binary that works03:03
tpbTitle: Snippet #240036 (at
tpbTitle: Snippet #240038 (at
iiiethis was the result, see how the addresses don't match for outer and inner; that's why we need pass by reference, or to pass the value of the address and cast to what we want.03:05
tpbTitle: pointers - Passing by reference in C - Stack Overflow (at
iiiethat sounds like it should work then03:11
SewarI think there's an incorrect mix of output, &output and *output in the code03:13
Sewar line 15 breaks03:24
tpbTitle: - GU36fH - Online C Compiler & Debugging Tool (at
*** mithro has quit IRC03:25
iiieNow there's a cool tool03:31
Sewarthere's too03:36
*** CarlFK has joined #timvideos03:41
*** iiie has quit IRC04:19
*** hyades has joined #timvideos05:17
hyadesSewar: you will need something like05:43
hyadesint test(char **output, int *output_len)05:43
tpbTitle: - MoRbnr - Online C Compiler & Debugging Tool (at
Sewarwaw, thanks hyades06:41
hyadesSewar: btw, I dont think realloc and memset are good things06:46
hyadesthey sometimes dont work as expected06:46
Sewarwhat can I use instead then?06:47
hyadesfree + malloc06:59
hyadesand for loop :D06:59
hyadesonly malloc will do I guess07:01
*** CarlFK has quit IRC07:21
*** hyades has quit IRC11:53
*** CarlFK has joined #timvideos12:13
*** skay has quit IRC12:56
*** hyades has joined #timvideos13:05
*** hyades has quit IRC13:25
*** CarlFK has quit IRC13:27
*** hyades has joined #timvideos13:31
*** hyades has quit IRC13:38
*** hyades has joined #timvideos14:26
*** hyades_ has joined #timvideos14:44
*** hyades_ has quit IRC15:23
*** hyades has quit IRC15:23
*** hyades has joined #timvideos16:14
*** hyades has quit IRC17:31
*** hyades has joined #timvideos19:33
*** hyades_ has joined #timvideos20:03
*** hyades has quit IRC21:07
*** hyades_ has quit IRC21:08
*** hyades has joined #timvideos21:31
*** hyades has quit IRC22:35
*** hyades has joined #timvideos22:53

Generated by 2.12.1 by Marius Gedminas - find it at!