File: uf_glib.h

package info (click to toggle)
ufraw 0.22-1.1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 5,608 kB
  • ctags: 2,799
  • sloc: ansic: 27,835; cpp: 14,351; sh: 4,378; xml: 202; makefile: 174
file content (47 lines) | stat: -rw-r--r-- 1,442 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
 * UFRaw - Unidentified Flying Raw converter for digital camera images
 *
 * uf_glib.h - glib compatibility header
 * Copyright 2004-2015 by Udi Fuchs
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 */

#ifndef _UF_GLIB_H
#define _UF_GLIB_H

#ifdef __cplusplus
extern "C" {
#endif

#include <glib.h>
#include <glib/gstdio.h>

// g_win32_locale_filename_from_utf8 is needed only on win32
#ifdef _WIN32
#define uf_win32_locale_filename_from_utf8(__some_string__) \
    g_win32_locale_filename_from_utf8(__some_string__)
#define uf_win32_locale_filename_free(__some_string__) g_free(__some_string__)
#else
#define uf_win32_locale_filename_from_utf8(__some_string__) (__some_string__)
#define uf_win32_locale_filename_free(__some_string__) (void)(__some_string__)
#endif

// On win32 command-line arguments need to be translated to UTF-8
#ifdef _WIN32
#define uf_win32_locale_to_utf8(__some_string__) \
    g_locale_to_utf8(__some_string__, -1, NULL, NULL, NULL)
#define uf_win32_locale_free(__some_string__) g_free(__some_string__)
#else
#define uf_win32_locale_to_utf8(__some_string__) (__some_string__)
#define uf_win32_locale_free(__some_string__) (void)(__some_string__)
#endif

#ifdef __cplusplus
}
#endif

#endif /*_UF_GLIB_H*/