degesch: prefer British spelling in comments

Let's say the rest is in Oxford spelling, not sure about it.
This commit is contained in:
Přemysl Eric Janouch 2020-10-11 17:36:21 +02:00
parent 7ce1615021
commit f51dd936f5
Signed by: p
GPG Key ID: A0420B94F92B9493

View File

@ -1439,8 +1439,8 @@ enum formatter_item_type
FORMATTER_ITEM_END, ///< Sentinel value for arrays
FORMATTER_ITEM_TEXT, ///< Text
FORMATTER_ITEM_ATTR, ///< Formatting attributes
FORMATTER_ITEM_FG_COLOR, ///< Foreground color
FORMATTER_ITEM_BG_COLOR, ///< Background color
FORMATTER_ITEM_FG_COLOR, ///< Foreground colour
FORMATTER_ITEM_BG_COLOR, ///< Background colour
FORMATTER_ITEM_SIMPLE, ///< Toggle mIRC formatting
FORMATTER_ITEM_IGNORE_ATTR ///< Un/set attribute ignoration
};
@ -1449,7 +1449,7 @@ struct formatter_item
{
enum formatter_item_type type : 16; ///< Type of this item
int attribute : 16; ///< Attribute ID
int color; ///< Color
int color; ///< Colour
char *text; ///< String
};
@ -2062,7 +2062,7 @@ struct app_context
struct poller_idle input_event; ///< Pending input event
struct strv pending_input; ///< Pending input lines
int *nick_palette; ///< A 256-color palette for nicknames
int *nick_palette; ///< A 256-colour palette for nicknames
size_t nick_palette_len; ///< Number of entries in nick_palette
bool awaiting_mirc_escape; ///< Awaiting a mIRC attribute escape
@ -2607,13 +2607,13 @@ serialize_configuration (struct config_item *root, struct str *output)
// --- Terminal output ---------------------------------------------------------
/// Default color pair
/// Default colour pair
#define COLOR_DEFAULT -1
/// Bright versions of the basic color set
/// Bright versions of the basic colour set
#define COLOR_BRIGHT(x) (COLOR_ ## x + 8)
/// Builds a color pair for 256-color terminals with a 16-color backup value
/// Builds a colour pair for 256-colour terminals with a 16-colour backup value
#define COLOR_256(name, c256) \
(((COLOR_ ## name) & 0xFFFF) | (((c256) & 0xFFFF) << 16))
@ -2757,7 +2757,7 @@ init_colors (struct app_context *ctx)
// A little tool that tries to make the most of the terminal's capabilities
// to set up text attributes. It mostly targets just terminal emulators as that
// is what people are using these days. At least no stupid ncurses limits us
// with color pairs.
// with colour pairs.
enum
{
@ -2830,12 +2830,12 @@ attr_printer_apply_named (struct attr_printer *self, int attribute)
}
// NOTE: commonly terminals have:
// 8 colors (worst, bright fg with BOLD, bg sometimes with BLINK)
// 16 colors (okayish, we have the full basic range guaranteed)
// 88 colors (the same plus a 4^3 RGB cube and a few shades of gray)
// 256 colors (best, like above but with a larger cube and more gray)
// 8 colours (worst, bright fg often with BOLD, bg sometimes with BLINK)
// 16 colours (okayish, we have the full basic range guaranteed)
// 88 colours (the same plus a 4^3 RGB cube and a few shades of grey)
// 256 colours (best, like above but with a larger cube and more grey)
/// Interpolate from the 256-color palette to the 88-color one
/// Interpolate from the 256-colour palette to the 88-colour one
static int
attr_printer_256_to_88 (int color)
{
@ -2843,7 +2843,7 @@ attr_printer_256_to_88 (int color)
if (color < 16)
return color;
// 24 -> 8 extra shades of gray
// 24 -> 8 extra shades of grey
if (color >= 232)
return 80 + (color - 232) / 3;
@ -3073,8 +3073,8 @@ irc_to_utf8 (const char *text)
//
// #a inserts named attributes (auto-resets)
// #r resets terminal attributes
// #c sets foreground color
// #C sets background color
// #c sets foreground colour
// #C sets background colour
//
// Modifiers:
// & free() the string argument after using it
@ -3111,7 +3111,7 @@ enum
MIRC_L_BLUE, MIRC_L_PURPLE, MIRC_GRAY, MIRC_L_GRAY,
};
// We use estimates from the 16 color terminal palette, or the 256 color cube,
// We use estimates from the 16 colour terminal palette, or the 256 colour cube,
// which is not always available. The mIRC orange colour is only in the cube.
static const int g_mirc_to_terminal[] =
@ -3228,11 +3228,11 @@ formatter_parse_nick (struct formatter *self, const char *s)
if (color == COLOR_BLACK)
color = (uint16_t) -1;
// Use a color from the 256-color cube if available
// Use a colour from the 256-colour cube if available
color |= self->ctx->nick_palette[siphash_wrapper (nick,
strlen (nick)) % self->ctx->nick_palette_len] << 16;
// We always use the default color for ourselves
// We always use the default colour for ourselves
if (self->s && irc_is_this_us (self->s, nick))
color = -1;
@ -3243,7 +3243,7 @@ formatter_parse_nick (struct formatter *self, const char *s)
FORMATTER_ADD_TEXT (self, x);
free (x);
// Need to reset the color afterwards
// Need to reset the colour afterwards
FORMATTER_ADD_ITEM (self, FG_COLOR, .color = -1);
}
@ -3386,8 +3386,8 @@ struct line_char_attrs
{
int named; ///< Named attribute or -1
int text; ///< Text attributes
int fg; ///< Foreground color (-1 for default)
int bg; ///< Background color (-1 for default)
int fg; ///< Foreground colour (-1 for default)
int bg; ///< Background colour (-1 for default)
};
struct line_char
@ -6063,7 +6063,7 @@ irc_is_highlight (struct server *s, const char *message)
return false;
// Strip formatting from the message so that it doesn't interfere
// with nickname detection (color sequences in particular)
// with nickname detection (colour sequences in particular)
struct formatter f = formatter_make (s->ctx, NULL);
formatter_parse_mirc (&f, message);