/*
 * Copyright (c) 2024 Ross Cunniff
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */

#define UC_CHAR_TYPE_Lu  0 // Letter, uppercase
#define UC_CHAR_TYPE_Ll  1 // Letter, lowercase
#define UC_CHAR_TYPE_Lt  2 // Letter, titlecase
#define UC_CHAR_TYPE_Lm  3 // Letter, modifier
#define UC_CHAR_TYPE_Lo  4 // Letter, other
#define UC_CHAR_TYPE_Mn  5 // Mark, nonspacing
#define UC_CHAR_TYPE_Me  6 // Mark, spacing, combining
#define UC_CHAR_TYPE_Mc  7 // Mark, enclosing
#define UC_CHAR_TYPE_Nd  8 // number, decimal digit
#define UC_CHAR_TYPE_Nl  9 // number, letter
#define UC_CHAR_TYPE_No 10 // number, other
#define UC_CHAR_TYPE_Zs 11 // Separator, space
#define UC_CHAR_TYPE_Zl 12 // Separator, line
#define UC_CHAR_TYPE_Zp 13 // Separator, paragraph
#define UC_CHAR_TYPE_Cc 14 // Other, control
#define UC_CHAR_TYPE_Cf 15 // Other, format
#define UC_CHAR_TYPE_Co 16 // Other, private-use
#define UC_CHAR_TYPE_Cs 17 // Other, surrogate
#define UC_CHAR_TYPE_Cn 18 // Other, not assigned
#define UC_CHAR_TYPE_Pd 19 // Punctuation, dash
#define UC_CHAR_TYPE_Ps 20 // Punctuation, open
#define UC_CHAR_TYPE_Pe 21 // Punctuation, close
#define UC_CHAR_TYPE_Pc 22 // Punctuation, connector
#define UC_CHAR_TYPE_Po 23 // Punctuation, other
#define UC_CHAR_TYPE_Pi 24 // Punctuation, initial quote
#define UC_CHAR_TYPE_Pf 25 // Punctuation, final quote
#define UC_CHAR_TYPE_Sm 26 // Symbol, math
#define UC_CHAR_TYPE_Sc 27 // Symbol, currency
#define UC_CHAR_TYPE_Sk 28 // Symbol, modifier
#define UC_CHAR_TYPE_So 29 // Symbol, other

// Line-drawing characters
#define UC_BOX_TL  0x250C  // Top left corner
#define UC_BOX_HH  0x2500  // Horizontal line
#define UC_BOX_TV  0x252C  // Top horiz with vertical intersect (from bottom)
#define UC_BOX_TR  0x2510  // Top right corner
#define UC_BOX_HL  0x251C  // Left vertical with horiz intersect (from right)
#define UC_BOX_HR  0x2524  // Right vertical with horiz intersect (from left)
#define UC_BOX_HV  0x253C  // Horizontal/vertical crossing
#define UC_BOX_VV  0x2502  // Vertical line
#define UC_BOX_BL  0x2514  // Bottom left corner
#define UC_BOX_BV  0x2534  // Bototm horiz with vertical intersect (from top)
#define UC_BOX_BR  0x2518  // Bottom right corner

// Function prototypes
extern int OADL_ucCharType(int ch);
extern int OADL_ucToUpper(int ch);
extern int OADL_ucToLower(int ch);
extern int OADL_ucToLowerMulti(int ch, int multi[3]);
extern int OADL_ucToUpperMulti(int ch, int multi[3]);