summaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-10-06 10:57:16 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-10-06 10:57:16 -0700
commitb3490213f42ed63bc4b05b37bcfc12809f2d432c (patch)
treed56ede6f1ea8d20c2120eba2b9ca705927a77913 /file.c
parent92d8978ab4ad980397883b50d0e7bc81d2bf5f73 (diff)
parent70352c3962cf3b4379590326cdc489ac0543f7e9 (diff)
downloadsubsurface-b3490213f42ed63bc4b05b37bcfc12809f2d432c.tar.gz
Merge branch 'glib-removal-hack'
Fix obvious merge issue in Rules.mk Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'file.c')
-rw-r--r--file.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/file.c b/file.c
index 53b03330c..130568245 100644
--- a/file.c
+++ b/file.c
@@ -4,7 +4,7 @@
#include <stdlib.h>
#include <string.h>
#include <errno.h>
-#include <glib/gi18n.h>
+#include "gettext.h"
#include <zip.h>
#include "dive.h"
@@ -24,7 +24,7 @@ int readfile(const char *filename, struct memblock *mem)
mem->buffer = NULL;
mem->size = 0;
- fd = g_open(filename, O_RDONLY | O_BINARY, 0);
+ fd = open(filename, O_RDONLY | O_BINARY, 0);
if (fd < 0)
return fd;
ret = fstat(fd, &st);
@@ -103,9 +103,9 @@ static int try_to_xslt_open_csv(const char *filename, struct memblock *mem, char
if (readfile(filename, mem) < 0) {
if (error) {
- int len = strlen(_("Failed to read '%s'")) + strlen(filename);
+ int len = strlen(tr("Failed to read '%s'")) + strlen(filename);
*error = malloc(len);
- snprintf(*error, len, _("Failed to read '%s'"), filename);
+ snprintf(*error, len, tr("Failed to read '%s'"), filename);
}
return 1;
@@ -232,7 +232,7 @@ static int try_to_open_csv(const char *filename, struct memblock *mem, enum csv_
struct sample *sample;
errno = 0;
- val = g_ascii_strtod(p,&end);
+ val = strtod(p,&end); // FIXME == localization issue
if (end == p)
break;
if (errno)
@@ -300,9 +300,9 @@ void parse_file(const char *filename, char **error)
return;
if (error) {
- int len = strlen(_("Failed to read '%s'")) + strlen(filename);
+ int len = strlen(tr("Failed to read '%s'")) + strlen(filename);
*error = malloc(len);
- snprintf(*error, len, _("Failed to read '%s'"), filename);
+ snprintf(*error, len, tr("Failed to read '%s'"), filename);
}
return;