star-cmap

Mapping values onto color ramps
git clone git://git.meso-star.fr/star-cmap.git
Log | Files | Refs | README | LICENSE

commit c75c5dd5be832e5143dab95154c0b691232a47db
parent fcdbc40949be6cbc1b655d8c0126a1f47269a40a
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Fri, 27 Oct 2023 16:21:55 +0200

Merge branch 'feature_posix_make' into develop

Diffstat:
M.gitignore | 14++++++++------
AMakefile | 202+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
MREADME.md | 42++++++++++++++++++++----------------------
Dcmake/CMakeLists.txt | 146-------------------------------------------------------------------------------
Aconfig.mk | 77+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amake.sh | 70++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ascmap.pc.in | 10++++++++++
Msrc/scmap.c | 2+-
Msrc/scmap.h | 2+-
Msrc/scmap_palettes.c | 2+-
Msrc/test_scmap.c | 4++--
Msrc/test_scmap_fetch_color.c | 2+-
Msrc/test_scmap_palettes.c | 2+-
13 files changed, 394 insertions(+), 181 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -1,11 +1,13 @@ .gitignore -CMakeCache.txt -CMakeFiles -Makefile -tmp [Bb]uild* *.sw[po] -*.[ao] -*.orig +*.[aod] +*.so *~ +test* +!test*.[ch] +.config +.test tags +*.pc +*.ppm diff --git a/Makefile b/Makefile @@ -0,0 +1,202 @@ +# Copyright (C) 2020, 2021, 2023 |Méso|Star> (contact@meso-star.com) +# +# 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 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +.POSIX: +.SUFFIXES: # Clean up default inference rules + +include config.mk + +LIBNAME_STATIC = libscmap.a +LIBNAME_SHARED = libscmap.so +LIBNAME = $(LIBNAME_$(LIB_TYPE)) + +################################################################################ +# Library building +################################################################################ +SRC = src/scmap.c src/scmap_palettes.c +OBJ = $(SRC:.c=.o) +DEP = $(SRC:.c=.d) + +build_library: .config $(DEP) + @$(MAKE) -fMakefile $$(for i in $(DEP); do echo -f $${i}; done) \ + $$(if [ -n "$(LIBNAME)" ]; then \ + echo "$(LIBNAME)"; \ + else \ + echo "$(LIBNAME_SHARED)"; \ + fi) + +$(DEP) $(OBJ): config.mk + +$(LIBNAME_SHARED): $(OBJ) + $(CC) $(CFLAGS_SO) $(RSYS_CFLAGS) -o $@ $(OBJ) $(LDFLAGS_SO) $(RSYS_LIBS) + +$(LIBNAME_STATIC): libscmap.o + $(AR) -rc $@ $? + $(RANLIB) $@ + +libscmap.o: $(OBJ) + $(LD) -r $(OBJ) -o $@ + $(OBJCOPY) $(OCPFLAGS) $@ + +.config: config.mk + @if ! $(PKG_CONFIG) --atleast-version $(RSYS_VERSION) rsys; then \ + echo "rsys $(RSYS_VERSION) not found" >&2; exit 1; fi + @echo "config done" > $@ + +.SUFFIXES: .c .d .o +.c.d: + @$(CC) $(CFLAGS_SO) $(RSYS_CFLAGS) -MM -MT "$(@:.d=.o) $@" $< -MF $@ + +.c.o: + $(CC) $(CFLAGS_SO) $(RSYS_CFLAGS) -DSCMAP_SHARED_BUILD -c $< -o $@ + +################################################################################ +# Installation +################################################################################ +pkg: + sed -e 's#@PREFIX@#$(PREFIX)#g'\ + -e 's#@VERSION@#$(VERSION)#g'\ + -e 's#@RSYS_VERSION@#$(RSYS_VERSION)#g'\ + scmap.pc.in > scmap.pc + +scmap-local.pc: scmap.pc.in + sed -e '1d'\ + -e 's#^includedir=.*#includedir=./src/#'\ + -e 's#^libdir=.*#libdir=./#'\ + -e 's#@VERSION@#$(VERSION)#g'\ + -e 's#@RSYS_VERSION@#$(RSYS_VERSION)#g'\ + scmap.pc.in > $@ + +install: build_library pkg + @$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/lib" $(LIBNAME) + @$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/lib/pkgconfig" scmap.pc + @$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/include/star" src/scmap.h + @$(SHELL) make.sh install "$(DESTDIR)$(PREFIX)/share/doc/star-cmap" COPYING README.md + +uninstall: + rm -f "$(DESTDIR)$(PREFIX)/lib/$(LIBNAME)" + rm -f "$(DESTDIR)$(PREFIX)/lib/pkgconfig/scmap.pc" + rm -f "$(DESTDIR)$(PREFIX)/share/doc/star-cmap/COPYING" + rm -f "$(DESTDIR)$(PREFIX)/share/doc/star-cmap/README.md" + rm -f "$(DESTDIR)$(PREFIX)/include/star/scmap.h" + +################################################################################ +# Miscellaneous targets +################################################################################ +all: build_library build_tests + +clean: clean_test + rm -f $(OBJ) $(TEST_OBJ) $(LIBNAME) + rm -f .config .test libscmap.o scmap.pc scmap-local.pc + +distclean: clean + rm -f $(DEP) $(TEST_DEP) + +lint: + shellcheck -o all make.sh + +################################################################################ +# Tests +################################################################################ +TEST_SRC =\ + src/test_scmap.c\ + src/test_scmap_fetch_color.c\ + src/test_scmap_palettes.c +TEST_OBJ = $(TEST_SRC:.c=.o) +TEST_DEP = $(TEST_SRC:.c=.d) +PALETTES=\ + accent\ + blues\ + brbg\ + bugn\ + bupu\ + chromajs\ + dark2\ + gnbu\ + gnpu\ + greens\ + greys\ + inferno\ + jet\ + magma\ + moreland\ + oranges\ + orrd\ + paired\ + parula\ + pastel1\ + pastel2\ + piyg\ + plasma\ + prgn\ + pubu\ + pubugn\ + puor\ + purd\ + purples\ + rdbu\ + rdgy\ + rdpu\ + rdylbu\ + rdylgn\ + reds\ + sand\ + set1\ + set2\ + set3\ + spectral\ + viridis\ + whgnbu\ + whylrd\ + ylgn\ + ylgnbu\ + ylorbr\ + ylorrd\ + ylrd + +PKG_CONFIG_LOCAL = PKG_CONFIG_PATH="./:$${PKG_CONFIG_PATH}" $(PKG_CONFIG) +SCMAP_CFLAGS = $$($(PKG_CONFIG_LOCAL) $(PCFLAGS) --cflags scmap-local.pc) +SCMAP_LIBS = $$($(PKG_CONFIG_LOCAL) $(PCFLAGS) --libs scmap-local.pc) + +build_tests: build_library $(TEST_DEP) .test + @$(MAKE) -fMakefile -f.test $$(for i in $(TEST_DEP); do echo -f"$${i}"; done) test_bin + +test: build_tests + @$(SHELL) make.sh check test_scmap test_scmap + @$(SHELL) make.sh check test_scmap_fetch_color test_scmap_fetch_color + @printf "%s\n" $(PALETTES) | while read -r i; do\ + $(SHELL) make.sh check test_scmap_palettes_"$${i}" test_scmap_palettes "$${i}"; \ + done + +.test: Makefile + @$(SHELL) make.sh config_test $(TEST_SRC) > $@ + +clean_test: + $(SHELL) make.sh clean_test $(TEST_SRC) + echo "$(PALETTES)" | sed 's/[[:space:]]/\n/g' | \ + while read -r i; do rm -f "$${i}.ppm"; done + +$(TEST_DEP): config.mk scmap-local.pc + @$(CC) $(CFLAGS_EXE) $(SCMAP_CFLAGS) $(RSYS_CFLAGS) \ + -MM -MT "$(@:.d=.o) $@" $(@:.d=.c) -MF $@ + +$(TEST_OBJ): config.mk scmap-local.pc + $(CC) $(CFLAGS_EXE) $(SCMAP_CFLAGS) $(RSYS_CFLAGS) -c $(@:.o=.c) -o $@ + +test_scmap test_scmap_palettes: config.mk scmap-local.pc $(LIBNAME) + $(CC) $(CFLAGS_EXE) -o $@ src/$@.o $(LDFLAGS_EXE) $(SCMAP_LIBS) $(RSYS_LIBS) + +test_scmap_fetch_color: config.mk scmap-local.pc $(LIBNAME) + $(CC) $(CFLAGS_EXE) -o $@ src/$@.o $(LDFLAGS_EXE) $(SCMAP_LIBS) $(RSYS_LIBS) -lm diff --git a/README.md b/README.md @@ -1,29 +1,27 @@ -# Star-ColorMap +# Star Color Map -This library maps a a real value to a color by interpolating between -pre-defined support points defined in palettes. Several common palettes are -provided by the library. +This library maps a real value to a color by interpolating for a given value +the colors predefined in a palette. A set of common palettes is integrated into +the library; see the scmap.h header for a complete list. -## How to build +## Requirements -Star-ColorMap is compatible GNU/Linux 64 bits. It relies on the -[CMake](http://www.cmake.org) and the -[RCMake](https://gitlab.com/vaplv/rcmake/) packages to build. It also depends -on the [RSys](https://gitlab.com/vaplv/rsys/), library. +- C compiler +- POSIX make +- pkg-config +- [RSys](https://gitlab.com/vaplv/rsys) -First ensure that CMake is installed on your system. Then install the RCMake -package as well as the RSys prerequisite. Finally generate the project from the -`cmake/CMakeLists.txt` file by appending to the `CMAKE_PREFIX_PATH` variable -the install directories of its dependencies. The resulting project can be -edited, built, tested and installed as any CMake project. Refer to the [CMake -documentation](https://cmake.org/documentation) for further informations on -CMake. +## Installation + +Edit config.mk as needed, then run: + + make clean install ## Release notes ### Version 0.0.3 -Fix compilation warnings detected by gcc 11 +Fix compilation warnings detected by gcc 11 ### Version 0.0.2 @@ -36,8 +34,8 @@ Fix MSVC build. ## License -Copyright (C) 2020, 2021 [|Meso|Star>](https://www.meso-star.com) -(<contact@meso-star.com>). Star-ColorMap is free software released -under the GPL v3+ license: GNU GPL version 3 or later. You are welcome to -redistribute it under certain conditions; refer to the COPYING file for -details. +Copyright (C) 2020, 2021, 2023 |Méso|Star> (contact@meso-star.com) + +Star-CMap is free software released under the GPL v3+ license: GNU GPL version +3 or later. You are welcome to redistribute it under certain conditions; refer +to the COPYING file for details. diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt @@ -1,146 +0,0 @@ -# Copyright (C) 2020, 2021 |Meso|Star> (contact@meso-star.com) -# -# 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 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -cmake_minimum_required(VERSION 3.1) -project(scmap C) -enable_testing() - -set(SCMAP_SOURCE_DIR ${PROJECT_SOURCE_DIR}/../src) -option(NO_TEST "Do not build tests" OFF) - -################################################################################ -# Check dependencies -################################################################################ -find_package(RCMake 0.4 REQUIRED) -find_package(RSys 0.9 REQUIRED) - -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${RCMAKE_SOURCE_DIR}) -include(rcmake) -include(rcmake_runtime) - -include_directories(${RSys_INCLUDE_DIR}) - -################################################################################ -# Configure and define targets -################################################################################ -set(VERSION_MAJOR 0) -set(VERSION_MINOR 0) -set(VERSION_PATCH 3) -set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) - -set(SCMAP_FILES_SRC scmap.c scmap_palettes.c) -set(SCMAP_FILES_INC ) -set(SCMAP_FILES_INC_API scmap.h) -set(SCMAP_FILES_DOC COPYING README.md) - -# Prepend each file in the `SCMAP_FILES_<SRC|INC>' list by `SCMAP_SOURCE_DIR' -rcmake_prepend_path(SCMAP_FILES_SRC ${SCMAP_SOURCE_DIR}) -rcmake_prepend_path(SCMAP_FILES_INC ${SCMAP_SOURCE_DIR}) -rcmake_prepend_path(SCMAP_FILES_INC_API ${SCMAP_SOURCE_DIR}) -rcmake_prepend_path(SCMAP_FILES_DOC ${PROJECT_SOURCE_DIR}/../) - -add_library(scmap SHARED ${SCMAP_FILES_SRC} ${SCMAP_FILES_INC} ${SCMAP_FILES_INC_API}) -target_link_libraries(scmap RSys) - -set_target_properties(scmap PROPERTIES - DEFINE_SYMBOL SCMAP_SHARED_BUILD - VERSION ${VERSION} - SOVERSION ${VERSION_MAJOR}) - -rcmake_setup_devel(scmap StarCMap ${VERSION} star/scmap_version.h) - -################################################################################ -# Add tests -################################################################################ -if(NOT NO_TEST) - function(build_test _name) - add_executable(${_name} ${SCMAP_SOURCE_DIR}/${_name}.c) - target_link_libraries(${_name} scmap RSys) - endfunction() - - function(new_test _name) - build_test(${_name}) - add_test(${_name}_${_palette} ${_name}) - endfunction() - - new_test(test_scmap) - new_test(test_scmap_fetch_color) - - build_test(test_scmap_palettes) - add_test(test_scmap_palettes_accent test_scmap_palettes "accent") - add_test(test_scmap_palettes_blues test_scmap_palettes "blues") - add_test(test_scmap_palettes_brbg test_scmap_palettes "brbg") - add_test(test_scmap_palettes_bugn test_scmap_palettes "bugn") - add_test(test_scmap_palettes_bupu test_scmap_palettes "bupu") - add_test(test_scmap_palettes_chromajs test_scmap_palettes "chromajs") - add_test(test_scmap_palettes_dark2 test_scmap_palettes "dark2") - add_test(test_scmap_palettes_gnbu test_scmap_palettes "gnbu") - add_test(test_scmap_palettes_gnpu test_scmap_palettes "gnpu") - add_test(test_scmap_palettes_greens test_scmap_palettes "greens") - add_test(test_scmap_palettes_greys test_scmap_palettes "greys") - add_test(test_scmap_palettes_inferno test_scmap_palettes "inferno") - add_test(test_scmap_palettes_jet test_scmap_palettes "jet") - add_test(test_scmap_palettes_magma test_scmap_palettes "magma") - add_test(test_scmap_palettes_moreland test_scmap_palettes "moreland") - add_test(test_scmap_palettes_oranges test_scmap_palettes "oranges") - add_test(test_scmap_palettes_orrd test_scmap_palettes "orrd") - add_test(test_scmap_palettes_paired test_scmap_palettes "paired") - add_test(test_scmap_palettes_parula test_scmap_palettes "parula") - add_test(test_scmap_palettes_pastel1 test_scmap_palettes "pastel1") - add_test(test_scmap_palettes_pastel2 test_scmap_palettes "pastel2") - add_test(test_scmap_palettes_piyg test_scmap_palettes "piyg") - add_test(test_scmap_palettes_plasma test_scmap_palettes "plasma") - add_test(test_scmap_palettes_prgn test_scmap_palettes "prgn") - add_test(test_scmap_palettes_pubu test_scmap_palettes "pubu") - add_test(test_scmap_palettes_pubugn test_scmap_palettes "pubugn") - add_test(test_scmap_palettes_puor test_scmap_palettes "puor") - add_test(test_scmap_palettes_purd test_scmap_palettes "purd") - add_test(test_scmap_palettes_purples test_scmap_palettes "purples") - add_test(test_scmap_palettes_rdbu test_scmap_palettes "rdbu") - add_test(test_scmap_palettes_rdgy test_scmap_palettes "rdgy") - add_test(test_scmap_palettes_rdpu test_scmap_palettes "rdpu") - add_test(test_scmap_palettes_rdylbu test_scmap_palettes "rdylbu") - add_test(test_scmap_palettes_rdylgn test_scmap_palettes "rdylgn") - add_test(test_scmap_palettes_reds test_scmap_palettes "reds") - add_test(test_scmap_palettes_sand test_scmap_palettes "sand") - add_test(test_scmap_palettes_set1 test_scmap_palettes "set1") - add_test(test_scmap_palettes_set2 test_scmap_palettes "set2") - add_test(test_scmap_palettes_set3 test_scmap_palettes "set3") - add_test(test_scmap_palettes_spectral test_scmap_palettes "spectral") - add_test(test_scmap_palettes_viridis test_scmap_palettes "viridis") - add_test(test_scmap_palettes_whgnbu test_scmap_palettes "whgnbu") - add_test(test_scmap_palettes_whylrd test_scmap_palettes "whylrd") - add_test(test_scmap_palettes_ylgn test_scmap_palettes "ylgn") - add_test(test_scmap_palettes_ylgnbu test_scmap_palettes "ylgnbu") - add_test(test_scmap_palettes_ylorbr test_scmap_palettes "ylorbr") - add_test(test_scmap_palettes_ylorrd test_scmap_palettes "ylorrd") - add_test(test_scmap_palettes_ylrd test_scmap_palettes "ylrd") - - if(CMAKE_COMPILER_IS_GNUCC) - target_link_libraries(test_scmap_fetch_color m) - endif() - -endif() - -################################################################################ -# Define output & install directories -################################################################################ -install(TARGETS scmap - ARCHIVE DESTINATION bin - LIBRARY DESTINATION lib - RUNTIME DESTINATION bin) -install(FILES ${SCMAP_FILES_INC_API} DESTINATION include/star) -install(FILES ${SCMAP_FILES_DOC} DESTINATION share/doc/star-cmap) - diff --git a/config.mk b/config.mk @@ -0,0 +1,77 @@ +VERSION = 0.0.3 +PREFIX = /usr/local + +LIB_TYPE = SHARED +#LIB_TYPE = STATIC + +BUILD_TYPE = RELEASE +#BUILD_TYPE = DEBUG + +################################################################################ +# Tools +################################################################################ +AR = ar +CC = cc +LD = ld +OBJCOPY = objcopy +PKG_CONFIG = pkg-config +RANLIB = ranlib + +################################################################################ +# Dependencies +################################################################################ +PCFLAGS_SHARED = +PCFLAGS_STATIC = --static +PCFLAGS = $(PCFLAGS_$(LIB_TYPE)) + +RSYS_VERSION = 0.14 +RSYS_CFLAGS = $$($(PKG_CONFIG) $(PCFLAGS) --cflags rsys) +RSYS_LIBS = $$($(PKG_CONFIG) $(PCFLAGS) --libs rsys) + +################################################################################ +# Compilation options +################################################################################ +WFLAGS =\ + -Wall\ + -Wcast-align\ + -Wconversion\ + -Wextra\ + -Wmissing-declarations\ + -Wmissing-prototypes\ + -Wshadow + +CFLAGS_HARDENED =\ + -D_FORTIFY_SOURCES=2\ + -fcf-protection=full\ + -fstack-clash-protection\ + -fstack-protector-strong + +CFLAGS_COMMON =\ + -std=c89\ + -pedantic\ + -fvisibility=hidden\ + -fstrict-aliasing\ + $(CFLAGS_HARDENED)\ + $(WFLAGS) + +CFLAGS_DEBUG = -g $(CFLAGS_COMMON) +CFLAGS_RELEASE = -O2 -DNDEBUG $(CFLAGS_COMMON) +CFLAGS = $(CFLAGS_$(BUILD_TYPE)) + +CFLAGS_SO = $(CFLAGS) -fPIC +CFLAGS_EXE = $(CFLAGS) -fPIE + +################################################################################ +# Linker options +################################################################################ +LDFLAGS_HARDENED = -Wl,-z,relro,-z,now +LDFLAGS_DEBUG = $(LDFLAGS_HARDENED) +LDFLAGS_RELEASE = -s $(LDFLAGS_HARDENED) +LDFLAGS = $(LDFLAGS_$(BUILD_TYPE)) + +LDFLAGS_SO = $(LDFLAGS) -shared -Wl,--no-undefined +LDFLAGS_EXE = $(LDFLAGS) -pie + +OCPFLAGS_DEBUG = --localize-hidden +OCPFLAGS_RELEASE = --localize-hidden --strip-unneeded +OCPFLAGS = $(OCPFLAGS_$(BUILD_TYPE)) diff --git a/make.sh b/make.sh @@ -0,0 +1,70 @@ +#!/bin/sh + +# Copyright (C) 2020, 2021, 2023 |Méso|Star> (contact@meso-star.com) +# +# 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 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +set -e + +config_test() +{ + for i in "$@"; do + test=$(basename "${i}" ".c") + test_list="${test_list} ${test}" + printf "%s: %s\n" "${test}" "src/${test}.o" + done + printf "test_bin: %s\n" "${test_list}" +} + +check() +{ + name="$1" + prog="$2" + shift 2 + + printf "%s " "${name}" + if ./"${prog}" "$@" > /dev/null 2>&1; then + printf "\033[1;32mOK\033[m\n" + else + printf "\033[1;31mError\033[m\n" + fi 2> /dev/null +} + +clean_test() +{ + for i in "$@"; do + rm -f "$(basename "${i}" ".c")" + done +} + +install() +{ + prefix=$1 + shift 1 + + mkdir -p "${prefix}" + + for i in "$@"; do + dst="${prefix}/${i##*/}" + + if cmp -s "${i}" "${dst}"; then + printf "Up to date %s\n" "${dst}" + else + printf "Installing %s\n" "${dst}" + cp "${i}" "${prefix}" + fi + done +} + +"$@" diff --git a/scmap.pc.in b/scmap.pc.in @@ -0,0 +1,10 @@ +prefix=@PREFIX@ +includedir=${prefix}/include +libdir=${prefix}/lib + +Requires: rsys >= @RSYS_VERSION@ +Name: Star-CMap +Description: Star Color Map library +Version: @VERSION@ +Libs: -L${libdir} -lscmap +CFlags: -I${includedir} diff --git a/src/scmap.c b/src/scmap.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2020, 2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2020, 2021, 2023 |Méso|Star> (contact@meso-star.com) * * 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 diff --git a/src/scmap.h b/src/scmap.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2020, 2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2020, 2021, 2023 |Méso|Star> (contact@meso-star.com) * * 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 diff --git a/src/scmap_palettes.c b/src/scmap_palettes.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2020, 2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2020, 2021, 2023 |Méso|Star> (contact@meso-star.com) * * 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 diff --git a/src/test_scmap.c b/src/test_scmap.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2020, 2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2020, 2021, 2023 |Méso|Star> (contact@meso-star.com) * * 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 @@ -78,7 +78,7 @@ main(int argc, char** argv) palette.get_color = get_white; palette.ncolors = 1 ; - palette.context = (void*)0xDECAFBADLL; + palette.context = (void*)(intptr_t)0xDECAFBAD; CHK(scmap_create(NULL, NULL, 1, &palette, &scmap) == RES_OK); CHK(scmap_ref_put(scmap) == RES_OK); diff --git a/src/test_scmap_fetch_color.c b/src/test_scmap_fetch_color.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2020, 2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2020, 2021, 2023 |Méso|Star> (contact@meso-star.com) * * 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 diff --git a/src/test_scmap_palettes.c b/src/test_scmap_palettes.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2020, 2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2020, 2021, 2023 |Méso|Star> (contact@meso-star.com) * * 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