add gitignore
[chaz/homebank] / src / hb-misc.h
1 /* HomeBank -- Free, easy, personal accounting for everyone.
2 * Copyright (C) 1995-2014 Maxime DOYEN
3 *
4 * This file is part of HomeBank.
5 *
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.
10 *
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.
15 *
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/>.
18 */
19
20 #ifndef __HB_MISC__H__
21 #define __HB_MISC__H__
22
23 double arrondi(const double x, unsigned n);
24
25 gdouble to_base_amount(gdouble value, guint32 kcur);
26
27 gint real_mystrfmon(gchar *outstr, gint outlen, gchar *buf1, struct CurrencyFmt *cur);
28 gint mystrfmon(gchar *outstr, gint outlen, gdouble value, gboolean minor);
29
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);
34
35 gchar *hb_filename_new_with_extention(gchar *filename, const gchar *extension);
36
37 gchar *get_normal_color_amount(gdouble value);
38 gchar *get_minimum_color_amount(gdouble value, gdouble minvalue);
39
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);
43
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);
46
47 gint hb_string_utf8_compare(gchar *s1, gchar *s2);
48
49 void hb_string_strip_crlf(gchar *str);
50 gchar* hb_strdup_nobrackets (const gchar *str);
51
52 gboolean hb_string_csv_valid(gchar *str, guint nbcolumns, gint *csvtype);
53
54 guint32 hb_date_get_julian(gchar *string, gint datefmt);
55
56 void hb_print_date(guint32 jdate, gchar *label);
57
58 void hex_dump(guchar *ptr, guint length);
59
60
61 #endif
This page took 0.040054 seconds and 4 git commands to generate.