]> mj.ucw.cz Git - libucw.git/commit
Extended types: Review and cleanup of xt_size and xt_timestamp
authorMartin Mares <mj@ucw.cz>
Fri, 25 Jul 2014 11:47:12 +0000 (13:47 +0200)
committerMartin Mares <mj@ucw.cz>
Fri, 25 Jul 2014 11:47:12 +0000 (13:47 +0200)
commit2b826f747295fab4ad90af2313453cdcf2c343bd
treed5df0270141d5c91b909dbc43589f0bf3829ded4
parente1497e22bb9f68e3d396784b1ae319bcb72555a7
Extended types: Review and cleanup of xt_size and xt_timestamp

  •  Adapted to naming convention on custom formatting modes.

  •  Use macro to wrap unit in a formatting mode, like we already
     do in XT_DOUBLE_FMT_PREC. Besides, encode such modes as proper
     custom modes with XTYPE_FMT_CUSTOM set.

  •  Do not check for NULL in parsing functions, it makes no sense
     (that is, the program would already have crashed before getting
     there with a NULL argument). If you really want to check for
     NULLs, do it in generic parsing functions, which call these
     callbacks.

  •  Do not mix definitions related to xt_size and xt_timestamp
     in the header file.

  •  Cleaned up selection of units in xt_size_format().

  •  Added a bunch of FIXMEs.
ucw/table-test-2.c
ucw/table-types.c
ucw/table-types.h
ucw/xtypes-test.c
ucw/xtypes.c
ucw/xtypes.h