Simple code for RTC DS1302

Hi,
I had verified code from nuelectronics.com, http://sheepdogguides.com.
It works, works fine, but it is in format of library, is objects-oriented, uses a lot of macroses . huge amount of includes etc. Class/object in this case means that always full functionality has to be embedded (e.g "time set" functionality even if only time-reading is used...)
Or, in other words ,this code is not simple and readable. Does anybody knows where I can get simple, plain code? I guess I should not to invent bicycle here as smbdy already did it instead of me.

Class/object in this case means that always full functionality has to be embedded (e.g "time set" functionality even if only time-reading is used...)

This is an incorrect assumption on your part. Only the functions that are actually used are linked into your program.

Best way to confirm, is to verify.
Commented one call and result was much shorter. Not only shorter by calling code, but by whole objects function.
So looks like this c compiler for Arduino does this optimization as no tricks like pointers to functions an dynamic calls.
Good to know, thank you to pointing to this.

But returning to my initial question - does smbdy can point me to readable code. Supporting n-platforms and versions are good, but simplified version of code also have rights to live. At least to understand for what macroses and type re-definitions are for .

Open the library files and read it yourself, then copy and paste/port the code to what ever you want.

Thank you for such smart suggestion

At some point I started to do it in way you suggested. First conclusion - code has includes for almost all possible arduiono libraries. second - you need to know arduino versions and internal architecture, to be able do recompilations of huge amount of macroses in mind, third- it requires knowledge of DS1302 chip, or, at least, serious styding of its specification, forth - coding style is unnecessary complex.

Instead of pretending to be a compiler, better would be if smbdy with understanding of DS1302 and atmega chips architcture would present simple analog.