Luanti
5.11.0-dev
Loading...
Searching...
No Matches
colorize.h
Go to the documentation of this file.
1
/*
2
Part of Minetest
3
Copyright (C) 2024 rubenwardy
4
5
Permission to use, copy, modify, and distribute this software for any
6
purpose with or without fee is hereby granted, provided that the above
7
copyright notice and this permission notice appear in all copies.
8
9
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16
*/
17
18
#pragma once
19
20
#include <string>
21
#include "
config.h
"
22
23
#define COLOR_CODE(color) "\x1b(c@" color ")"
24
25
#if USE_CURL
26
#include <curl/curlver.h>
27
// curl_url functions since 7.62.0
28
#if LIBCURL_VERSION_NUM >= 0x073e00
29
#define HAVE_COLORIZE_URL
30
#endif
31
#endif
32
33
#ifdef HAVE_COLORIZE_URL
34
40
std::string colorize_url(
const
std::string &url);
41
42
#endif
config.h
util
colorize.h
Generated on Sun Dec 1 2024 10:42:57 for Luanti by
1.11.0