diff options
Diffstat (limited to 'src/grid.c')
-rw-r--r-- | src/grid.c | 30 |
1 files changed, 15 insertions, 15 deletions
@@ -25,16 +25,16 @@ struct grid { struct grid_class *class; queue_t *q; - unsigned long vmin; - unsigned long vmax; - unsigned long cur; + double vmin; + double vmax; + double cur; char *str; void *data; }; grid_t grid_create (struct grid_class *class, queue_t *q, - unsigned long vmin, unsigned long vmax, void *cdata) + double vmin, double vmax, void *cdata) { grid_t grid; @@ -54,7 +54,7 @@ grid_create (struct grid_class *class, queue_t *q, return grid; } -unsigned long +double grid_next (grid_t grid, char **str, int *mark) { return grid->class->next (grid, str, mark); @@ -87,7 +87,7 @@ size_t number_suffix_count = sizeof (short_suffix) / sizeof (short_suffix[0]); struct ygrid_data { - unsigned long step; + double step; }; static void * @@ -99,7 +99,7 @@ ygrid_create (grid_t grid, void *cdata) return gr; } -static unsigned long +static double ygrid_next (grid_t grid, char **str, int *mark) { struct ygrid_data *gr = grid->data; @@ -154,11 +154,11 @@ xgrid_2h_create (grid_t grid, void *cdata) return gr; } -static unsigned long +static double xgrid_2h_next (grid_t grid, char **str, int *mark) { struct xgrid_data *gr = grid->data; - unsigned long ret = gr->off; + double ret = gr->off; if (grid->str) { @@ -200,11 +200,11 @@ xgrid_wday_create (grid_t grid, void *cdata) return gr; } -static unsigned long +static double xgrid_wday_next (grid_t grid, char **str, int *mark) { struct xgrid_data *gr = grid->data; - unsigned long ret = gr->off; + double ret = gr->off; char buf[80]; struct tm *tm = localtime (&gr->start); @@ -250,11 +250,11 @@ xgrid_week_create (grid_t grid, void *cdata) return gr; } -static unsigned long +static double xgrid_week_next (grid_t grid, char **str, int *mark) { struct xgrid_data *gr = grid->data; - unsigned long ret = gr->off; + double ret = gr->off; struct tm *tm = localtime (&gr->start); if (tm->tm_mday && tm->tm_mday < 7 && mark && gr->unit == 0) @@ -307,11 +307,11 @@ xgrid_month_create (grid_t grid, void *cdata) return gr; } -static unsigned long +static double xgrid_month_next (grid_t grid, char **str, int *mark) { struct xgrid_data *gr = grid->data; - unsigned long ret = gr->off; + double ret = gr->off; unsigned long frac; struct tm *tm = localtime (&gr->start); int mon; |