mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-10-14 17:47:13 +00:00
master's new xtext_tests target compiles xtext.c on its own with only GTK linked, so hexcolor_parse cannot live in util.c. Keep it in a dependency-free hexcolor.c that both test targets compile, and register it in the Visual Studio project for the Windows build. Claude-Session: https://claude.ai/code/session_01Jxd4AknGzdAENADWAGHCzx
17 lines
523 B
C
17 lines
523 B
C
/* ZoiteChat
|
|
* Parsing of \004 (hex color) formatting codes: RRGGBB[,RRGGBB].
|
|
* See https://modern.ircdocs.horse/formatting
|
|
* Distributed under GPL-2.0-or-later; see COPYING. */
|
|
|
|
#ifndef ZOITECHAT_HEXCOLOR_H
|
|
#define ZOITECHAT_HEXCOLOR_H
|
|
|
|
#include <glib.h>
|
|
|
|
/* Parses the parameters following a \004 byte. Returns the number of bytes
|
|
* consumed (6 or 13), or 0 if no valid RRGGBB follows. fg, bg and has_bg
|
|
* may be NULL. */
|
|
int hexcolor_parse (const char *s, int avail, guint32 *fg, guint32 *bg, int *has_bg);
|
|
|
|
#endif
|