// SPDX-License-Identifier: GPL-2.0-or-later /* * conmakehash.c * * Create arrays for initializing the kernel folded tables (using a hash * table turned out to be to limiting...) Unfortunately we can't simply * preinitialize the tables at compile time since kfree() cannot accept * memory not allocated by kmalloc(), and doing our own memory management * just for this seems like massive overkill. * * Copyright (C) 1995-1997 H. Peter Anvin
*/
if ( fp0 < 0 || fp0 >= fontlen )
{
fprintf(stderr, "%s: Glyph number (0x%x) larger than font length\n",
tblname, fp0); exit(EX_DATAERR);
} if ( fp1 && (fp1 < fp0 || fp1 >= fontlen) )
{
fprintf(stderr, "%s: Bad end of range (0x%x)\n",
tblname, fp1); exit(EX_DATAERR);
}
if (fp1)
{ /* we have a range; expect the word "idem" or a Unicode range of the
same length */ while (*p == ' ' || *p == '\t')
p++; if (!strncmp(p, "idem", 4))
{ for (i=fp0; i<=fp1; i++)
addpair(i,i);
p += 4;
} else
{
un0 = getunicode(&p); while (*p == ' ' || *p == '\t')
p++; if (*p != '-')
{
fprintf(stderr, "%s: Corresponding to a range of font positions, there should be a Unicode range\n",
tblname); exit(EX_DATAERR);
}
p++;
un1 = getunicode(&p); if (un0 < 0 || un1 < 0)
{
fprintf(stderr, "%s: Bad Unicode range corresponding to font position range 0x%x-0x%x\n",
tblname, fp0, fp1); exit(EX_DATAERR);
} if (un1 - un0 != fp1 - fp0)
{
fprintf(stderr, "%s: Unicode range U+%x-U+%x not of the same length as font position range 0x%x-0x%x\n",
tblname, un0, un1, fp0, fp1); exit(EX_DATAERR);
} for(i=fp0; i<=fp1; i++)
addpair(i,un0-fp0+i);
}
} else
{ /* no range; expect a list of unicode values for a single font position */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.