X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Ftable.h;h=6c8f7631a103ece3e8b8869d6ddb602f99d0e406;hb=003ce655b7116d18c86a74c50391e54990346931;hp=e35fefaf4b061d5ae23fc7caaa756c69a02ea4b8;hpb=c6a4125250b97d41d18dbeeea13043a86e9b8f55;p=sliver-openvswitch.git diff --git a/lib/table.h b/lib/table.h index e35fefaf4..6c8f7631a 100644 --- a/lib/table.h +++ b/lib/table.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, 2011 Nicira Networks. + * Copyright (c) 2009, 2010, 2011, 2012 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,11 +32,13 @@ struct table { size_t n_rows, allocated_rows; size_t current_column; char *caption; + bool timestamp; }; void table_init(struct table *); void table_destroy(struct table *); void table_set_caption(struct table *, char *caption); +void table_set_timestamp(struct table *, bool timestamp); void table_add_column(struct table *, const char *heading, ...) PRINTF_FORMAT(2, 3); @@ -85,12 +87,12 @@ struct table_style { OPT_PRETTY, \ OPT_BARE -#define TABLE_LONG_OPTIONS \ - {"format", required_argument, 0, 'f'}, \ - {"data", required_argument, 0, 'd'}, \ - {"no-headings", no_argument, 0, OPT_NO_HEADINGS}, \ - {"pretty", no_argument, 0, OPT_PRETTY}, \ - {"bare", no_argument, 0, OPT_BARE} +#define TABLE_LONG_OPTIONS \ + {"format", required_argument, NULL, 'f'}, \ + {"data", required_argument, NULL, 'd'}, \ + {"no-headings", no_argument, NULL, OPT_NO_HEADINGS}, \ + {"pretty", no_argument, NULL, OPT_PRETTY}, \ + {"bare", no_argument, NULL, OPT_BARE} #define TABLE_OPTION_HANDLERS(STYLE) \ case 'f': \