]>
Dogcows Code - chaz/homebank/blob - src/hb-misc.h
0674a054f8576c8da617749f7bc3a588dc527afd
1 /* HomeBank -- Free, easy, personal accounting for everyone.
2 * Copyright (C) 1995-2014 Maxime DOYEN
4 * This file is part of HomeBank.
6 * HomeBank is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * HomeBank is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef __HB_MISC__H__
21 #define __HB_MISC__H__
23 double arrondi(const double x
, unsigned n
);
25 gdouble
to_base_amount(gdouble value
, guint32 kcur
);
27 gint
real_mystrfmon(gchar
*outstr
, gint outlen
, gchar
*buf1
, struct CurrencyFmt
*cur
);
28 gint
mystrfmon(gchar
*outstr
, gint outlen
, gdouble value
, gboolean minor
);
30 //void hb_strfmon(gchar *outstr, gint outlen, gdouble value, guint32 kcur);
31 //void hb_strfmon_int(gchar *outstr, gint outlen, gdouble value, guint32 kcur);
32 //gint hb_strfmon(gchar *outstr, gint outlen, gdouble value, gboolean minor);
33 gint
mystrfmon_int(gchar
*outstr
, gint outlen
, gdouble value
, gboolean minor
);
35 gchar
*hb_filename_new_with_extention(gchar
*filename
, const gchar
*extension
);
37 gchar
*get_normal_color_amount(gdouble value
);
38 gchar
*get_minimum_color_amount(gdouble value
, gdouble minvalue
);
40 void hb_label_set_amount(GtkLabel
*label
, gdouble value
, gboolean minor
);
41 void hb_label_set_colvalue(GtkLabel
*label
, gdouble value
, gboolean minor
);
42 void hb_label_set_colvaluecurr(GtkLabel
*label
, gdouble value
, guint32 currkey
);
44 //void get_period_minmax(guint month, guint year, guint32 *mindate, guint32 *maxdate);
45 //void get_range_minmax(guint32 refdate, gint range, guint32 *mindate, guint32 *maxdate);
47 gint
hb_string_utf8_compare(gchar
*s1
, gchar
*s2
);
49 void hb_string_strip_crlf(gchar
*str
);
50 gchar
* hb_strdup_nobrackets (const gchar
*str
);
52 gboolean
hb_string_csv_valid(gchar
*str
, guint nbcolumns
, gint
*csvtype
);
54 guint32
hb_date_get_julian(gchar
*string
, gint datefmt
);
56 void hb_print_date(guint32 jdate
, gchar
*label
);
58 void hex_dump(guchar
*ptr
, guint length
);
This page took 0.03872 seconds and 3 git commands to generate.