GCC Middle and Back End API Reference
box-drawing.cc File Reference
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "text-art/box-drawing.h"
#include "selftest.h"
#include "text-art/selftests.h"
#include "text-art/box-drawing-chars.inc"
Include dependency graph for box-drawing.cc:

Macros

#define INCLUDE_VECTOR

Variables

static const cppchar_t box_drawing_chars []

Macro Definition Documentation

◆ INCLUDE_VECTOR

#define INCLUDE_VECTOR
Procedural lookup of box drawing characters.
   Copyright (C) 2023-2025 Free Software Foundation, Inc.
   Contributed by David Malcolm <dmalcolm@redhat.com>.

This file is part of GCC.

GCC 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, or (at your option) any later
version.

GCC 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 GCC; see the file COPYING3.  If not see
<http://www.gnu.org/licenses/>.   

Variable Documentation

◆ box_drawing_chars

const cppchar_t box_drawing_chars[]
static
Initial value:
= {
0x0020,
0x2576,
0x2574,
0x2500,
0x2577,
0x250C,
0x2510,
0x252C,
0x2575,
0x2514,
0x2518,
0x2534,
0x2502,
0x251C,
0x2524,
0x253C
}
According to
  https://en.wikipedia.org/wiki/Box-drawing_character#Character_code
"DOS line- and box-drawing characters are not ordered in any programmatic
manner, so calculating a particular character shape needs to use a look-up
table. "
Hence this array.   

Referenced by text_art::get_box_drawing_char().