]> Dogcows Code - chaz/homebank/blob - src/hb-misc.h
import homebank-5.1.2
[chaz/homebank] / src / hb-misc.h
1 /* HomeBank -- Free, easy, personal accounting for everyone.
2 * Copyright (C) 1995-2016 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 hb_amount_round(const double x, unsigned int n);
24 gdouble hb_amount_base(gdouble value, guint32 kcur);
25 gdouble hb_amount_to_euro(gdouble amount);
26
27 gchar *hb_str_rate(gchar *outstr, gint outlen, gdouble rate);
28
29 gchar *hb_str_formatd(gchar *outstr, gint outlen, gchar *buf1, Currency *cur, gboolean showsymbol);
30
31 void hb_strfmon(gchar *outstr, gint outlen, gdouble value, guint32 kcur, gboolean minor);
32 void hb_strfmon_int(gchar *outstr, gint outlen, gdouble value, guint32 kcur, gboolean minor);
33 void hb_strfnum(gchar *outstr, gint outlen, gdouble value, guint32 kcur, gboolean minor);
34
35 gchar *hb_util_filename_new_with_extension(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, guint32 kcur, gboolean minor);
41 void hb_label_set_colvalue(GtkLabel *label, gdouble value, guint32 kcur, gboolean minor);
42
43 //void get_period_minmax(guint month, guint year, guint32 *mindate, guint32 *maxdate);
44 //void get_range_minmax(guint32 refdate, gint range, guint32 *mindate, guint32 *maxdate);
45
46 gint hb_string_compare(gchar *s1, gchar *s2);
47 gint hb_string_utf8_compare(gchar *s1, gchar *s2);
48
49 void hb_string_strip_crlf(gchar *str);
50 void hb_string_replace_char(gchar c, gchar *str);
51 gchar* hb_strdup_nobrackets (const gchar *str);
52
53 gchar *hb_sprint_date(gchar *outstr, guint32 julian);
54
55 guint32 hb_date_get_julian(gchar *string, gint datefmt);
56
57 gboolean hb_string_isdate(gchar *str);
58 gboolean hb_string_isdigit(gchar *str);
59 gboolean hb_string_isprint(gchar *str);
60
61
62 void hb_print_date(guint32 jdate, gchar *label);
63
64 void hex_dump(guchar *ptr, guint length);
65
66
67 #endif
This page took 0.035493 seconds and 4 git commands to generate.