| 1 | /* -*- Mode: C; c-file-style: "stroustrup" -*- */cxx . . $ `<file>/utct.h`/ |
| 2 | |
| 3 | #if !defined( _utct_h ) |
| 4 | #define _utct_hcxx . . $ `utct.h:4:9`! |
| 5 | |
| 6 | #include <time.h> |
| 7 | |
| 8 | #if defined( __cplusplus ) |
| 9 | extern "C" { |
| 10 | #endif |
| 11 | |
| 12 | #if !defined(HCEXPORTcxx . . $ `sdb.h:18:17`!) |
| 13 | #if !defined(WIN32) || defined(MONOLITHIC) |
| 14 | #define HCEXPORT |
| 15 | #elif defined(BUILD_DLL) |
| 16 | #define HCEXPORT __declspec(dllexport) |
| 17 | #else /* USE_DLL */ |
| 18 | #define HCEXPORT extern __declspec(dllimport) |
| 19 | #endif |
| 20 | #endif |
| 21 | |
| 22 | const char* strtimecxx . . $ strtime(f4b0cc662bb878e7).( time_tcxx . . $ time_t#* timep, int utc ); /* ctime like with utc arg */ |
| 23 | time_tcxx . . $ time_t# mk_utctimecxx . . $ mk_utctime(237c3516b2cfac2c).( struct tmcxx . . $ tm#* tms ); /* mktime like with utc struct tm */ |
| 24 | |
| 25 | /* functions to parse and create UTCTime string which is: |
| 26 | * YYMMDDhhmm[ss]Z |
| 27 | */ |
| 28 | |
| 29 | /* when creating utc string, if requested len is odd Z is appended, |
| 30 | * if even Z is omitted |
| 31 | * |
| 32 | * when parsing Z or missing Z is tolerated |
| 33 | * |
| 34 | * parsing has an extension to parse like: |
| 35 | * |
| 36 | * YYMMDD[hh[mm[ss]]][Z] |
| 37 | */ |
| 38 | |
| 39 | #define MAX_UTCcxx . . $ `utct.h:39:9`! 13 |
| 40 | |
| 41 | HCEXPORTcxx . . $ `sdb.h:18:17`! |
| 42 | time_tcxx . . $ time_t# hashcash_from_utctimestrcxx . . $ hashcash_from_utctimestr(71083d4ee4d9cb41).( const char utct[MAX_UTCcxx . . $ `utct.h:39:9`!+1], int utc ); |
| 43 | |
| 44 | HCEXPORTcxx . . $ `sdb.h:18:17`! |
| 45 | int hashcash_to_utctimestrcxx . . $ hashcash_to_utctimestr(9276ee04ba38ce81).( char utct[MAX_UTCcxx . . $ `utct.h:39:9`!+1], int len, time_tcxx . . $ time_t# t ); |
| 46 | |
| 47 | #if defined( __cplusplus ) |
| 48 | } |
| 49 | #endif |
| 50 | |
| 51 | #endif |