aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-06-17 23:53:55 +0200
committerMattias Andrée <maandree@operamail.com>2014-06-17 23:53:55 +0200
commit2a42ef1436709cee0c7a97b2416f1c68ef8cd7d0 (patch)
tree0655b6c2313a5bc5bd0ed17690f9ad0a194241f7 /src
parenttypo (diff)
downloadlibgamma-2a42ef1436709cee0c7a97b2416f1c68ef8cd7d0.tar.gz
libgamma-2a42ef1436709cee0c7a97b2416f1c68ef8cd7d0.tar.bz2
libgamma-2a42ef1436709cee0c7a97b2416f1c68ef8cd7d0.tar.xz
change gpp symbols to ascii
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src')
-rw-r--r--src/lib/libgamma-error.c.gpp18
-rw-r--r--src/lib/libgamma-facade.c.gpp206
2 files changed, 112 insertions, 112 deletions
diff --git a/src/lib/libgamma-error.c.gpp b/src/lib/libgamma-error.c.gpp
index 64f1904..2454813 100644
--- a/src/lib/libgamma-error.c.gpp
+++ b/src/lib/libgamma-error.c.gpp
@@ -27,9 +27,9 @@
-£>set -u
-£>cd src/extract
-£>export PATH=".:${PATH}"
+$>set -u
+$>cd src/extract
+$>export PATH=".:${PATH}"
@@ -113,9 +113,9 @@ const char* libgamma_name_of_error(int value)
is sorted by error code in decreasing order. */
static const char* error_names[] =
{
-£>for error in $(libgamma-error-extract --list); do
- "£{error}",
-£>done
+$>for error in $(libgamma-error-extract --list); do
+ "${error}",
+$>done
};
/* Return `NULL` if the error code is invalid. */
@@ -142,9 +142,9 @@ int libgamma_value_of_error(const char* name)
return 0;
/* Test error names against `name` and return the value of the match error. */
-£>for error in $(libgamma-error-extract --list); do
- if (!strcmp(name, "£{error}")) return £{error};
-£>done
+$>for error in $(libgamma-error-extract --list); do
+ if (!strcmp(name, "${error}")) return ${error};
+$>done
/* Return 0 (not a valid error code) if the error name is unknown. */
return 0;
diff --git a/src/lib/libgamma-facade.c.gpp b/src/lib/libgamma-facade.c.gpp
index 96987d4..83a1539 100644
--- a/src/lib/libgamma-facade.c.gpp
+++ b/src/lib/libgamma-facade.c.gpp
@@ -24,29 +24,29 @@
/* Initialise the general preprocessor. */
-£>cd src/extract
-£>export PATH=".:${PATH}"
+$>cd src/extract
+$>export PATH=".:${PATH}"
/* Some general preprocessor we will use frequently. */
-£<
+$<
get-methods ()
{ ./libgamma-method-extract --list --method | cut -d _ -f 1,2 --complement
}
lowercase ()
{ echo "$*" | sed -e y/QWERTYUIOPASDFGHJKLZXCVBNM/qwertyuiopasdfghjklzxcvbnm/ | sed -e s:core_graphics:cg:g
}
-£>
+$>
/* Include all adjustment methods that
are enabled at compile-time. */
-£>for method in $(get-methods); do
-#ifdef HAVE_LIBGAMMA_METHOD_£{method}
-# include "gamma-£(lowercase $method | sed -e s:_:-:g).h"
+$>for method in $(get-methods); do
+#ifdef HAVE_LIBGAMMA_METHOD_${method}
+# include "gamma-$(lowercase $method | sed -e s:_:-:g).h"
# ifndef HAVE_LIBGAMMA_METHODS
# define HAVE_LIBGAMMA_METHODS
# endif
#endif
-£>done
+$>done
#include <unistd.h>
#include <stddef.h>
@@ -180,12 +180,12 @@ size_t libgamma_list_methods(int* restrict methods, size_t buf_size, int operati
#else
size_t n = 0;
-£>for method in $(get-methods); do
-#ifdef HAVE_LIBGAMMA_METHOD_£{method}
- if (libgamma_list_method_test(LIBGAMMA_METHOD_£{method}, operation) && (n++ < buf_size))
- methods[n - 1] = LIBGAMMA_METHOD_£{method};
+$>for method in $(get-methods); do
+#ifdef HAVE_LIBGAMMA_METHOD_${method}
+ if (libgamma_list_method_test(LIBGAMMA_METHOD_${method}, operation) && (n++ < buf_size))
+ methods[n - 1] = LIBGAMMA_METHOD_${method};
#endif
-£>done
+$>done
return n;
#endif
@@ -207,11 +207,11 @@ int libgamma_is_method_available(int method)
#else
switch (method)
{
-£>for method in $(get-methods); do
-#ifdef HAVE_LIBGAMMA_METHOD_£{method}
- case LIBGAMMA_METHOD_£{method}:
+$>for method in $(get-methods); do
+#ifdef HAVE_LIBGAMMA_METHOD_${method}
+ case LIBGAMMA_METHOD_${method}:
#endif
-£>done
+$>done
return 1;
default:
@@ -230,44 +230,44 @@ int libgamma_is_method_available(int method)
* this is expended into without the libgamma namespace prefix.
* @param * The function's parameters.
*/
-£<switch ()
-£>{
+$<switch ()
+$>{
/* Read out macro's parameters. */
-£<method="${1//./->}"
+$<method="${1//./->}"
ctrl=$2
fun=$3
shift 3
params="$*"
-£>params="${params// /, }"
+$>params="${params// /, }"
- switch (£{method})
+ switch (${method})
{
-£>for adjmethod in $(get-methods); do
-#ifdef HAVE_LIBGAMMA_METHOD_£{adjmethod}
- case LIBGAMMA_METHOD_£{adjmethod}:
+$>for adjmethod in $(get-methods); do
+#ifdef HAVE_LIBGAMMA_METHOD_${adjmethod}
+ case LIBGAMMA_METHOD_${adjmethod}:
/* Call the adjustment method's implementation, either
return or break after it depending on macro parameter's. */
-£>[ $ctrl = return ] &&
+$>[ $ctrl = return ] &&
return
- libgamma_£(lowercase $adjmethod)_£{fun}(£{params});
-£>[ ! $ctrl = return ] &&
+ libgamma_$(lowercase $adjmethod)_${fun}(${params});
+$>[ ! $ctrl = return ] &&
break;
#endif
-£>done
+$>done
default:
/* If the adjustment method does not exists, either return
that error, or do nothing because the function this is
expanded into does return errors. */
-£>if [ $ctrl = return ]; then
+$>if [ $ctrl = return ]; then
return LIBGAMMA_NO_SUCH_ADJUSTMENT_METHOD;
-£>else
+$>else
/* Method does not exists/excluded at compile-time.
We will assume that this is not done... */
break;
-£>fi
+$>fi
}
-£>}
+$>}
/**
@@ -279,7 +279,7 @@ int libgamma_is_method_available(int method)
void libgamma_method_capabilities(libgamma_method_capabilities_t* restrict this, int method)
{
memset(this, 0, sizeof(libgamma_method_capabilities_t));
-£>switch method break method_capabilities this
+$>switch method break method_capabilities this
}
@@ -357,7 +357,7 @@ int libgamma_site_initialise(libgamma_site_state_t* restrict this,
{
this->method = method;
this->site = site;
-£>switch method return site_initialise this site
+$>switch method return site_initialise this site
}
@@ -368,7 +368,7 @@ int libgamma_site_initialise(libgamma_site_state_t* restrict this,
*/
void libgamma_site_destroy(libgamma_site_state_t* restrict this)
{
-£>switch this.method break site_destroy this
+$>switch this.method break site_destroy this
free(this->site);
}
@@ -395,7 +395,7 @@ void libgamma_site_free(libgamma_site_state_t* restrict this)
*/
int libgamma_site_restore(libgamma_site_state_t* restrict this)
{
-£>switch this.method return site_restore this
+$>switch this.method return site_restore this
}
@@ -414,7 +414,7 @@ int libgamma_partition_initialise(libgamma_partition_state_t* restrict this,
{
this->site = site;
this->partition = partition;
-£>switch site.method return partition_initialise this site partition
+$>switch site.method return partition_initialise this site partition
}
@@ -425,7 +425,7 @@ int libgamma_partition_initialise(libgamma_partition_state_t* restrict this,
*/
void libgamma_partition_destroy(libgamma_partition_state_t* restrict this)
{
-£>switch this.site.method break partition_destroy this
+$>switch this.site.method break partition_destroy this
}
@@ -451,7 +451,7 @@ void libgamma_partition_free(libgamma_partition_state_t* restrict this)
*/
int libgamma_partition_restore(libgamma_partition_state_t* restrict this)
{
-£>switch this.site.method return partition_restore this
+$>switch this.site.method return partition_restore this
}
@@ -470,7 +470,7 @@ int libgamma_crtc_initialise(libgamma_crtc_state_t* restrict this,
{
this->partition = partition;
this->crtc = crtc;
-£>switch partition.site.method return crtc_initialise this partition crtc
+$>switch partition.site.method return crtc_initialise this partition crtc
}
@@ -481,7 +481,7 @@ int libgamma_crtc_initialise(libgamma_crtc_state_t* restrict this,
*/
void libgamma_crtc_destroy(libgamma_crtc_state_t* restrict this)
{
-£>switch this.partition.site.method break crtc_destroy this
+$>switch this.partition.site.method break crtc_destroy this
}
@@ -507,7 +507,7 @@ void libgamma_crtc_free(libgamma_crtc_state_t* restrict this)
*/
int libgamma_crtc_restore(libgamma_crtc_state_t* restrict this)
{
-£>switch this.partition.site.method return crtc_restore this
+$>switch this.partition.site.method return crtc_restore this
}
@@ -528,7 +528,7 @@ int libgamma_get_crtc_information(libgamma_crtc_information_t* restrict this,
#endif
this->edid = NULL;
this->connector_name = NULL;
-£>switch crtc.partition.site.method return get_crtc_information this crtc fields
+$>switch crtc.partition.site.method return get_crtc_information this crtc fields
}
@@ -567,9 +567,9 @@ void libgamma_crtc_information_free(libgamma_crtc_information_t* restrict this)
* @retrun The EDID in hexadecimal representation,
* `NULL` on allocation error, `errno` will be set accordingly.
*/
-£>behex_edid ()
-£>{
-char* libgamma_behex_edid_£{1}(const unsigned char* restrict edid, size_t length)
+$>behex_edid ()
+$>{
+char* libgamma_behex_edid_${1}(const unsigned char* restrict edid, size_t length)
{
char* restrict out;
size_t i;
@@ -581,15 +581,15 @@ char* libgamma_behex_edid_£{1}(const unsigned char* restrict edid, size_t lengt
/* Translate from raw octets to hexadecimal. */
for (i = 0; i < length; i++)
{
- out[i * 2 + 0] = "£{2}"[(edid[i] >> 4) & 15];
- out[i * 2 + 1] = "£{2}"[(edid[i] >> 0) & 15];
+ out[i * 2 + 0] = "${2}"[(edid[i] >> 4) & 15];
+ out[i * 2 + 1] = "${2}"[(edid[i] >> 0) & 15];
}
/* NUL-terminate the output string. */
out[length * 2] = '\0';
return out;
}
-£>}
+$>}
/**
@@ -600,7 +600,7 @@ char* libgamma_behex_edid_£{1}(const unsigned char* restrict edid, size_t lengt
* @retrun The EDID in lowercase hexadecimal representation,
* `NULL` on allocation error, `errno` will be set accordingly.
*/
-£>behex_edid lowercase 0123456789abcdef
+$>behex_edid lowercase 0123456789abcdef
/**
@@ -611,7 +611,7 @@ char* libgamma_behex_edid_£{1}(const unsigned char* restrict edid, size_t lengt
* @retrun The EDID in uppercase hexadecimal representation,
* NULL` on allocation error, `errno` will be set accordingly.
*/
-£>behex_edid uppercase 0123456789ABCDEF
+$>behex_edid uppercase 0123456789ABCDEF
/**
@@ -687,14 +687,14 @@ int libgamma_crtc_get_gamma_ramps(libgamma_crtc_state_t* restrict this,
switch (this->partition->site->method)
{
/* Methods other than Quartz/CoreGraphics uses 16-bit integers. */
-£>for method in $(get-methods | grep -v QUARTZ_CORE_GRAPHICS); do
-#ifdef HAVE_LIBGAMMA_METHOD_£{method}
- case LIBGAMMA_METHOD_£{method}:
- return libgamma_£(lowercase $method)_crtc_get_gamma_ramps(this, ramps);
+$>for method in $(get-methods | grep -v QUARTZ_CORE_GRAPHICS); do
+#ifdef HAVE_LIBGAMMA_METHOD_${method}
+ case LIBGAMMA_METHOD_${method}:
+ return libgamma_$(lowercase $method)_crtc_get_gamma_ramps(this, ramps);
#endif
/* The Quartz/CoreGraphics method uses single precision float. */
-£>done
+$>done
#ifdef HAVE_LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS
case LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
{
@@ -730,12 +730,12 @@ int libgamma_crtc_set_gamma_ramps(libgamma_crtc_state_t* restrict this,
switch (this->partition->site->method)
{
/* Methods other than Quartz/CoreGraphics uses 16-bit integers. */
-£>for method in $(get-methods | grep -v QUARTZ_CORE_GRAPHICS); do
-#ifdef HAVE_LIBGAMMA_METHOD_£{method}
- case LIBGAMMA_METHOD_£{method}:
- return libgamma_£(lowercase $method)_crtc_set_gamma_ramps(this, ramps);
+$>for method in $(get-methods | grep -v QUARTZ_CORE_GRAPHICS); do
+#ifdef HAVE_LIBGAMMA_METHOD_${method}
+ case LIBGAMMA_METHOD_${method}:
+ return libgamma_$(lowercase $method)_crtc_set_gamma_ramps(this, ramps);
#endif
-£>done
+$>done
/* The Quartz/CoreGraphics method uses single precision float. */
#ifdef HAVE_LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS
@@ -771,18 +771,18 @@ int libgamma_crtc_set_gamma_ramps(libgamma_crtc_state_t* restrict this,
* @return Zero on success, otherwise (negative) the value of an
* error identifier provided by this library.
*/
-£>crtc_set_get_gamma_ramps ()
-£>{
-£<
+$>crtc_set_get_gamma_ramps ()
+$>{
+$<
action=$1
ramps=$2
type=$3
bits=$4
p=
[ $action = get ] && p='*'
-£>
-int libgamma_crtc_£{action}_gamma_£{ramps}(libgamma_crtc_state_t* restrict this,
- libgamma_gamma_£{ramps}_t£{p:+* restrict} ramps)
+$>
+int libgamma_crtc_${action}_gamma_${ramps}(libgamma_crtc_state_t* restrict this,
+ libgamma_gamma_${ramps}_t${p:+* restrict} ramps)
{
libgamma_gamma_ramps_any_t ramps_;
switch (this->partition->site->method)
@@ -790,31 +790,31 @@ int libgamma_crtc_£{action}_gamma_£{ramps}(libgamma_crtc_state_t* restrict thi
/* The dummy method supports all ramp depths. */
#ifdef HAVE_LIBGAMMA_METHOD_DUMMY
case LIBGAMMA_METHOD_DUMMY:
- return libgamma_dummy_crtc_£{action}_gamma_£{ramps}(this, ramps);
+ return libgamma_dummy_crtc_${action}_gamma_${ramps}(this, ramps);
#endif
/* The Quartz/CoreGraphics method uses single precision float. */
#ifdef HAVE_LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS
case LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
-£>if [ $bits = -1 ]; then
+$>if [ $bits = -1 ]; then
/* Single precision float is used. */
- return libgamma_quartz_cg_crtc_£{action}_gamma_£{ramps}(this, ramps);
-£>else
+ return libgamma_quartz_cg_crtc_${action}_gamma_${ramps}(this, ramps);
+$>else
/* Something else is used and we convert to Single precision float. */
- ramps_.£{type} = £{p}ramps;
- return libgamma_translated_ramp_£{action}(this, £{p:+&}ramps_, £{bits}, -1,
- libgamma_crtc_£{action}_gamma_rampsf);
-£>fi
+ ramps_.${type} = ${p}ramps;
+ return libgamma_translated_ramp_${action}(this, ${p:+&}ramps_, ${bits}, -1,
+ libgamma_crtc_${action}_gamma_rampsf);
+$>fi
#endif
/* Other methods use 16-bit integers. */
default:
- ramps_.£{type} = £{p}ramps;
- return libgamma_translated_ramp_£{action}(this, £{p:+&}ramps_, £{bits}, 16,
- libgamma_crtc_£{action}_gamma_ramps);
+ ramps_.${type} = ${p}ramps;
+ return libgamma_translated_ramp_${action}(this, ${p:+&}ramps_, ${bits}, 16,
+ libgamma_crtc_${action}_gamma_ramps);
}
}
-£>}
+$>}
@@ -826,7 +826,7 @@ int libgamma_crtc_£{action}_gamma_£{ramps}(libgamma_crtc_state_t* restrict thi
* @return Zero on success, otherwise (negative) the value of an
* error identifier provided by this library.
*/
-£>crtc_set_get_gamma_ramps get ramps32 bits32 32
+$>crtc_set_get_gamma_ramps get ramps32 bits32 32
/**
@@ -837,7 +837,7 @@ int libgamma_crtc_£{action}_gamma_£{ramps}(libgamma_crtc_state_t* restrict thi
* @return Zero on success, otherwise (negative) the value of an
* error identifier provided by this library.
*/
-£>crtc_set_get_gamma_ramps set ramps32 bits32 32
+$>crtc_set_get_gamma_ramps set ramps32 bits32 32
@@ -849,7 +849,7 @@ int libgamma_crtc_£{action}_gamma_£{ramps}(libgamma_crtc_state_t* restrict thi
* @return Zero on success, otherwise (negative) the value of an
* error identifier provided by this library.
*/
-£>crtc_set_get_gamma_ramps get ramps64 bits64 64
+$>crtc_set_get_gamma_ramps get ramps64 bits64 64
/**
@@ -860,7 +860,7 @@ int libgamma_crtc_£{action}_gamma_£{ramps}(libgamma_crtc_state_t* restrict thi
* @return Zero on success, otherwise (negative) the value of an
* error identifier provided by this library.
*/
-£>crtc_set_get_gamma_ramps set ramps64 bits64 64
+$>crtc_set_get_gamma_ramps set ramps64 bits64 64
/**
@@ -871,7 +871,7 @@ int libgamma_crtc_£{action}_gamma_£{ramps}(libgamma_crtc_state_t* restrict thi
* @return Zero on success, otherwise (negative) the value of an
* error identifier provided by this library.
*/
-£>crtc_set_get_gamma_ramps get rampsf float_single -1
+$>crtc_set_get_gamma_ramps get rampsf float_single -1
/**
@@ -882,7 +882,7 @@ int libgamma_crtc_£{action}_gamma_£{ramps}(libgamma_crtc_state_t* restrict thi
* @return Zero on success, otherwise (negative) the value of an
* error identifier provided by this library.
*/
-£>crtc_set_get_gamma_ramps set rampsf float_single -1
+$>crtc_set_get_gamma_ramps set rampsf float_single -1
@@ -894,7 +894,7 @@ int libgamma_crtc_£{action}_gamma_£{ramps}(libgamma_crtc_state_t* restrict thi
* @return Zero on success, otherwise (negative) the value of an
* error identifier provided by this library.
*/
-£>crtc_set_get_gamma_ramps get rampsd float_double -2
+$>crtc_set_get_gamma_ramps get rampsd float_double -2
/**
@@ -905,7 +905,7 @@ int libgamma_crtc_£{action}_gamma_£{ramps}(libgamma_crtc_state_t* restrict thi
* @return Zero on success, otherwise (negative) the value of an
* error identifier provided by this library.
*/
-£>crtc_set_get_gamma_ramps set rampsd float_double -2
+$>crtc_set_get_gamma_ramps set rampsd float_double -2
@@ -923,15 +923,15 @@ int libgamma_crtc_£{action}_gamma_£{ramps}(libgamma_crtc_state_t* restrict thi
* @return Zero on success, otherwise (negative) the value of an
* error identifier provided by this library.
*/
-£>crtc_set_gamma_ramps_f ()
-£>{
-int libgamma_crtc_set_gamma_£{2}_f(libgamma_crtc_state_t* restrict this,
- libgamma_gamma_£{2}_fun* red_function,
- libgamma_gamma_£{2}_fun* green_function,
- libgamma_gamma_£{2}_fun* blue_function)
+$>crtc_set_gamma_ramps_f ()
+$>{
+int libgamma_crtc_set_gamma_${2}_f(libgamma_crtc_state_t* restrict this,
+ libgamma_gamma_${2}_fun* red_function,
+ libgamma_gamma_${2}_fun* green_function,
+ libgamma_gamma_${2}_fun* blue_function)
{
libgamma_crtc_information_t info;
- libgamma_gamma_£{2}_t ramps;
+ libgamma_gamma_${2}_t ramps;
size_t i, n;
int e;
@@ -949,7 +949,7 @@ int libgamma_crtc_set_gamma_£{2}_f(libgamma_crtc_state_t* restrict this,
n += ramps. blue_size = info. blue_gamma_size;
/* Allocate gamma ramps. */
- ramps. red = malloc(n * sizeof(£{1}));
+ ramps. red = malloc(n * sizeof(${1}));
ramps.green = ramps. red + ramps. red_size;
ramps. blue = ramps.green + ramps.green_size;
if (ramps.red == NULL)
@@ -968,11 +968,11 @@ int libgamma_crtc_set_gamma_£{2}_f(libgamma_crtc_state_t* restrict this,
ramps.blue[i] = blue_function((float)i / (float)(n - 1));
/* Apply the gamma ramps. */
- e = libgamma_crtc_set_gamma_£{2}(this, ramps);
+ e = libgamma_crtc_set_gamma_${2}(this, ramps);
free(ramps.red);
return e;
}
-£>}
+$>}
/**
@@ -987,7 +987,7 @@ int libgamma_crtc_set_gamma_£{2}_f(libgamma_crtc_state_t* restrict this,
* @return Zero on success, otherwise (negative) the value of an
* error identifier provided by this library.
*/
-£>crtc_set_gamma_ramps_f uint16_t ramps
+$>crtc_set_gamma_ramps_f uint16_t ramps
/**
@@ -1002,7 +1002,7 @@ int libgamma_crtc_set_gamma_£{2}_f(libgamma_crtc_state_t* restrict this,
* @return Zero on success, otherwise (negative) the value of an
* error identifier provided by this library.
*/
-£>crtc_set_gamma_ramps_f uint32_t ramps32
+$>crtc_set_gamma_ramps_f uint32_t ramps32
/**
@@ -1017,7 +1017,7 @@ int libgamma_crtc_set_gamma_£{2}_f(libgamma_crtc_state_t* restrict this,
* @return Zero on success, otherwise (negative) the value of an
* error identifier provided by this library.
*/
-£>crtc_set_gamma_ramps_f uint64_t ramps64
+$>crtc_set_gamma_ramps_f uint64_t ramps64
/**
@@ -1032,7 +1032,7 @@ int libgamma_crtc_set_gamma_£{2}_f(libgamma_crtc_state_t* restrict this,
* @return Zero on success, otherwise (negative) the value of an
* error identifier provided by this library.
*/
-£>crtc_set_gamma_ramps_f float rampsf
+$>crtc_set_gamma_ramps_f float rampsf
/**
@@ -1047,7 +1047,7 @@ int libgamma_crtc_set_gamma_£{2}_f(libgamma_crtc_state_t* restrict this,
* @return Zero on success, otherwise (negative) the value of an
* error identifier provided by this library.
*/
-£>crtc_set_gamma_ramps_f double rampsd
+$>crtc_set_gamma_ramps_f double rampsd