While this works in both flavours...
...this does chrash in the upper, de-referenced ("&ds") variant:
- struct TimeVal tv;
- struct TimeVal *tv;
I must admit that I'm still sometimes lost in regards of buildung structs and passing pointers/addresses to OS API functions. There must be some unknown mystery that I were not able to decypher yet. I already saw that the synopsis for the used functions here differ...
- struct DateStamp ds;
- struct DateStamp *ds;
...but I still did not understand what in these definitions tell me how and why I have to feed the structures (like TimeEval or DateStamp) to them.
- struct DateStamp *ds = DateStamp( struct DateStamp *ds );
- // versus
- void GetSysTime( struct TimeVal * );