"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "charclass.c" between
xterm-363.tgz and xterm-364.tgz

About: xterm is a terminal emulator for X with ISO/ANSI color and vt220 enhancements.

charclass.c  (xterm-363.tgz):charclass.c  (xterm-364.tgz)
/* $XTermId: charclass.c,v 1.43 2020/11/08 20:06:53 tom Exp $ */ /* $XTermId: charclass.c,v 1.44 2021/02/02 00:19:32 tom Exp $ */
/* /*
* Copyright 2002-2017,2020 by Thomas E. Dickey * Copyright 2002-2020,2021 by Thomas E. Dickey
* *
* All Rights Reserved * All Rights Reserved
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the * copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including * "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish, * without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to * distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to * permit persons to whom the Software is furnished to do so, subject to
* the following conditions: * the following conditions:
skipping to change at line 107 skipping to change at line 107
static int opt_check; static int opt_check;
static int opt_quiet; static int opt_quiet;
static int opt_v; static int opt_v;
#endif #endif
void void
init_classtab(void) init_classtab(void)
{ {
const int size = 50; const int size = 50;
TRACE(("init_classtab {{\n")); TRACE(("init_classtab " TRACE_L "\n"));
classtab = TypeMallocN(struct classentry, (unsigned) size); classtab = TypeMallocN(struct classentry, (unsigned) size);
if (!classtab) if (!classtab)
abort(); abort();
classtab[0].cclass = size; classtab[0].cclass = size;
classtab[0].first = 1; classtab[0].first = 1;
classtab[0].last = 0; classtab[0].last = 0;
/* old xterm default classes */ /* old xterm default classes */
SetCharacterClassRange(0, 0, BLANK); SetCharacterClassRange(0, 0, BLANK);
skipping to change at line 160 skipping to change at line 160
SetCharacterClassRange(0x30a0, 0x30ff, U_KAT); /* Katakana */ SetCharacterClassRange(0x30a0, 0x30ff, U_KAT); /* Katakana */
SetCharacterClassRange(0x3300, 0x9fff, U_CJK); /* CJK Ideographs */ SetCharacterClassRange(0x3300, 0x9fff, U_CJK); /* CJK Ideographs */
SetCharacterClassRange(0xac00, 0xd7a3, U_HAN); /* Hangul Syllables */ SetCharacterClassRange(0xac00, 0xd7a3, U_HAN); /* Hangul Syllables */
SetCharacterClassRange(0xf900, 0xfaff, U_CJK); /* CJK Ideographs */ SetCharacterClassRange(0xf900, 0xfaff, U_CJK); /* CJK Ideographs */
SetCharacterClassRange(0xfe30, 0xfe6b, IDENT); /* punctuation forms */ SetCharacterClassRange(0xfe30, 0xfe6b, IDENT); /* punctuation forms */
SetCharacterClassRange(0xff00, 0xff0f, IDENT); /* half/fullwidth ASCII * / SetCharacterClassRange(0xff00, 0xff0f, IDENT); /* half/fullwidth ASCII * /
SetCharacterClassRange(0xff1a, 0xff20, IDENT); /* half/fullwidth ASCII * / SetCharacterClassRange(0xff1a, 0xff20, IDENT); /* half/fullwidth ASCII * /
SetCharacterClassRange(0xff3b, 0xff40, IDENT); /* half/fullwidth ASCII * / SetCharacterClassRange(0xff3b, 0xff40, IDENT); /* half/fullwidth ASCII * /
SetCharacterClassRange(0xff5b, 0xff64, IDENT); /* half/fullwidth ASCII * / SetCharacterClassRange(0xff5b, 0xff64, IDENT); /* half/fullwidth ASCII * /
TRACE(("}} init_classtab\n")); TRACE((TRACE_R " init_classtab\n"));
return; return;
} }
int int
CharacterClass(int c) CharacterClass(int c)
{ {
int i, cclass = IDENT; int i, cclass = IDENT;
for (i = classtab[0].first; i <= classtab[0].last; i++) for (i = classtab[0].first; i <= classtab[0].last; i++)
if (classtab[i].first <= c && classtab[i].last >= c) if (classtab[i].first <= c && classtab[i].last >= c)
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)