summaryrefslogtreecommitdiff
path: root/ufo/ufo-resources.c
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2017-11-26 15:32:17 +0100
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2017-11-26 15:32:17 +0100
commitbee844f2189744b12a060ff0cb8718142f36f1f0 (patch)
tree902f859f6b381ebc325a1205815c9279f25e049d /ufo/ufo-resources.c
parentfd4984cfe442d6b43d842b802c5b9b5daca24122 (diff)
Fix #135: add UFO_GPU_NODE_INFO_NAME
Diffstat (limited to 'ufo/ufo-resources.c')
-rw-r--r--ufo/ufo-resources.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/ufo/ufo-resources.c b/ufo/ufo-resources.c
index 6e49395..37885ca 100644
--- a/ufo/ufo-resources.c
+++ b/ufo/ufo-resources.c
@@ -33,6 +33,7 @@
#include <ufo/ufo-gpu-node.h>
#include <ufo/ufo-remote-node.h>
#include <ufo/ufo-enums.h>
+#include "ufo-priv.h"
#include "compat.h"
/**
@@ -536,32 +537,13 @@ opt_append_include_paths (GString *str,
g_list_foreach (priv->paths, (GFunc) append_include_path, str);
}
-static gchar *
-escape_device_name (gchar *name)
-{
- gchar *tmp = name;
-
- while (*tmp) {
- gchar c = *tmp;
-
- if (c == ' ' || c == '(' || c == ')' || c == '-' || c == '@' || c == '.')
- *tmp = '_';
- else
- *tmp = g_ascii_toupper (c);
-
- tmp++;
- }
-
- return name;
-}
-
static void
opt_append_device_options (GString *str,
UfoResourcesPrivate *priv,
guint device_index)
{
g_assert (device_index < priv->n_devices);
- g_string_append_printf (str, " -DDEVICE_%s", escape_device_name (priv->device_names[device_index]));
+ g_string_append_printf (str, " -DDEVICE_%s", ufo_escape_device_name (priv->device_names[device_index]));
}
static void