Files
zoitechat/src/common/hexcolor.h
T
BareMetal 0a4367b1da fix(xtext): move hexcolor_parse to its own file for the standalone xtext tests
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
2026-10-11 23:58:09 -06:00

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