|
beuges posted:I just got this email last monday: If you are working with a lot of different people's/projects' code, as in, not from within your group with the pristine coding conventions, BE CONSISTENT is a simple and effective rule of thumb. What pisses people off most is combining spaces and tabs. An unbelievable lot of people carelessly miss this. Consistency takes precedence over whatever convention agenda you want to push. Be considerate and make that simple adjustment in your editor whenever possible. On the other hand, some OSS projects are just crap. Sometimes I would make a clean patch, but then mess it up before committing just to be consistent.
|
| # ¿ Jun 30, 2008 17:01 |
|
|
| # ¿ May 25, 2013 02:12 |
|
Avenging Dentist posted:Realtalkin', I wish I knew how to build parse tables manually. Maybe one of these days I should get a book on lexing/parsing. I suggest some reading on the lemon parser. Quite educational.
|
| # ¿ Nov 24, 2008 14:41 |
|
Well AD's code wasn't "pure-C", but Otto Skorzeny's link explains it well. edit: efb by edit
|
| # ¿ Jan 13, 2009 02:15 |
|
riggsninja posted:But that puts it on the stack, right? If I need the array on the heap, is there a trick for doing something similar? Or once I malloc, do I need to go through arr[0].a = 1; arr[0].b = 2; arr[0].c = 3;... ? Well you can build the struct on the stack like you're doing, malloc() your destination heap memory, then memcpy() from stack to heap. Put that code in a function to clean up memory after. But that would be kinda roundabout. If your purpose is just to pretty your code, it doesn't really matter.
|
| # ¿ Apr 20, 2009 09:28 |



