w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

makeutype.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unibasics.h>
#include "combiners.h"
Include dependency graph for makeutype.c:

Go to the source code of this file.

Macros

#define true   1
 
#define false   0
 
#define MAXC   65536
 
#define MAXA   18
 
#define _LOWER   1
 
#define _UPPER   2
 
#define _TITLE   4
 
#define _DIGIT   8
 
#define _SPACE   0x10
 
#define _PUNCT   0x20
 
#define _HEX   0x40
 
#define _ZEROWIDTH   0x80
 
#define _LEFT_2_RIGHT   0x100
 
#define _RIGHT_2_LEFT   0x200
 
#define _ENUMERIC   0x400
 
#define _ANUMERIC   0x800
 
#define _ENS   0x1000
 
#define _CS   0x2000
 
#define _ENT   0x4000
 
#define _COMBINING   0x8000
 
#define _BREAKBEFOREOK   0x10000
 
#define _BREAKAFTEROK   0x20000
 
#define _NONSTART   0x40000 /* small kana, close punct, can't start a line */
 
#define _NONEND   0x80000 /* open punct, can't end a line */
 
#define _URLBREAKAFTER   0x100000 /* break after slash not followed by digits (ie. in URLs not fractions or dates) */
 
#define _ALPHABETIC   0x200000
 
#define _IDEOGRAPHIC   0x400000
 
#define _INITIAL   0x800000
 
#define _MEDIAL   0x1000000
 
#define _FINAL   0x2000000
 
#define _ISOLATED   0x4000000
 
#define _NOBREAK   0x8000000
 
#define _DecompositionNormative   0x10000000
 
#define _CombiningClass   0xff
 
#define _Above   0x100
 
#define _Below   0x200
 
#define _Overstrike   0x400
 
#define _Left   0x800
 
#define _Right   0x1000
 
#define _Joins2   0x2000
 
#define _CenterLeft   0x4000
 
#define _CenterRight   0x8000
 
#define _CenteredOutside   0x10000
 
#define _Outside   0x20000
 
#define _RightEdge   0x40000
 
#define _LeftEdge   0x80000
 
#define _Touching   0x100000
 

Functions

static void FreeNamesMemorySpace ()
 
static void FigureAlternates (long index, char *apt, int normative)
 
static void processAssignment (long index, char *pt)
 
static void readin (void)
 
static void readcorpfile (char *prefix, char *corp)
 
static int find (char *base, char *suffix)
 
static void dumparabicdata (FILE *header)
 
static void dump ()
 
static int AnyAlts (int i)
 
static void dump_alttable ()
 
static void visualalts (void)
 
static void cheat (void)
 
int main ()
 

Variables

char * names [65536]
 
unsigned short mytolower [65536]
 
unsigned short mytoupper [65536]
 
unsigned short mytotitle [65536]
 
unsigned char mynumericvalue [65536]
 
unsigned short mymirror [65536]
 
unsigned long flags [65536]
 
unsigned long flags2 [65536]
 
unichar_t alts [65536][18+1]
 
unsigned long assignedcodepoints [0x120000/32]
 
const char GeneratedFileMessage [] = "\n/* This file was generated using the program 'makeutype' */\n\n"
 
const char CantReadFile [] = "Can't find or read file %s\n"
 
const char CantSaveFile [] = "Can't open or write to output file %s\n"
 
const char NoMoreMemory [] = "Can't access more memory.\n"
 
const char LineLengthBg [] = "Error with %s. Found line too long: %s\n"
 

Macro Definition Documentation

◆ _Above

#define _Above   0x100

Definition at line 105 of file makeutype.c.

◆ _ALPHABETIC

#define _ALPHABETIC   0x200000

Definition at line 93 of file makeutype.c.

◆ _ANUMERIC

#define _ANUMERIC   0x800

Definition at line 80 of file makeutype.c.

◆ _Below

#define _Below   0x200

Definition at line 106 of file makeutype.c.

◆ _BREAKAFTEROK

#define _BREAKAFTEROK   0x20000

Definition at line 87 of file makeutype.c.

◆ _BREAKBEFOREOK

#define _BREAKBEFOREOK   0x10000

Definition at line 86 of file makeutype.c.

◆ _CenteredOutside

#define _CenteredOutside   0x10000

Definition at line 113 of file makeutype.c.

◆ _CenterLeft

#define _CenterLeft   0x4000

Definition at line 111 of file makeutype.c.

◆ _CenterRight

#define _CenterRight   0x8000

Definition at line 112 of file makeutype.c.

◆ _COMBINING

#define _COMBINING   0x8000

Definition at line 84 of file makeutype.c.

◆ _CombiningClass

#define _CombiningClass   0xff

Definition at line 104 of file makeutype.c.

◆ _CS

#define _CS   0x2000

Definition at line 82 of file makeutype.c.

◆ _DecompositionNormative

#define _DecompositionNormative   0x10000000

Definition at line 102 of file makeutype.c.

◆ _DIGIT

#define _DIGIT   8

Definition at line 71 of file makeutype.c.

◆ _ENS

#define _ENS   0x1000

Definition at line 81 of file makeutype.c.

◆ _ENT

#define _ENT   0x4000

Definition at line 83 of file makeutype.c.

◆ _ENUMERIC

#define _ENUMERIC   0x400

Definition at line 79 of file makeutype.c.

◆ _FINAL

#define _FINAL   0x2000000

Definition at line 98 of file makeutype.c.

◆ _HEX

#define _HEX   0x40

Definition at line 74 of file makeutype.c.

◆ _IDEOGRAPHIC

#define _IDEOGRAPHIC   0x400000

Definition at line 94 of file makeutype.c.

◆ _INITIAL

#define _INITIAL   0x800000

Definition at line 96 of file makeutype.c.

◆ _ISOLATED

#define _ISOLATED   0x4000000

Definition at line 99 of file makeutype.c.

◆ _Joins2

#define _Joins2   0x2000

Definition at line 110 of file makeutype.c.

◆ _Left

#define _Left   0x800

Definition at line 108 of file makeutype.c.

◆ _LEFT_2_RIGHT

#define _LEFT_2_RIGHT   0x100

Definition at line 77 of file makeutype.c.

◆ _LeftEdge

#define _LeftEdge   0x80000

Definition at line 116 of file makeutype.c.

◆ _LOWER

#define _LOWER   1

Definition at line 68 of file makeutype.c.

◆ _MEDIAL

#define _MEDIAL   0x1000000

Definition at line 97 of file makeutype.c.

◆ _NOBREAK

#define _NOBREAK   0x8000000

Definition at line 101 of file makeutype.c.

◆ _NONEND

#define _NONEND   0x80000 /* open punct, can't end a line */

Definition at line 89 of file makeutype.c.

◆ _NONSTART

#define _NONSTART   0x40000 /* small kana, close punct, can't start a line */

Definition at line 88 of file makeutype.c.

◆ _Outside

#define _Outside   0x20000

Definition at line 114 of file makeutype.c.

◆ _Overstrike

#define _Overstrike   0x400

Definition at line 107 of file makeutype.c.

◆ _PUNCT

#define _PUNCT   0x20

Definition at line 73 of file makeutype.c.

◆ _Right

#define _Right   0x1000

Definition at line 109 of file makeutype.c.

◆ _RIGHT_2_LEFT

#define _RIGHT_2_LEFT   0x200

Definition at line 78 of file makeutype.c.

◆ _RightEdge

#define _RightEdge   0x40000

Definition at line 115 of file makeutype.c.

◆ _SPACE

#define _SPACE   0x10

Definition at line 72 of file makeutype.c.

◆ _TITLE

#define _TITLE   4

Definition at line 70 of file makeutype.c.

◆ _Touching

#define _Touching   0x100000

Definition at line 117 of file makeutype.c.

◆ _UPPER

#define _UPPER   2

Definition at line 69 of file makeutype.c.

◆ _URLBREAKAFTER

#define _URLBREAKAFTER   0x100000 /* break after slash not followed by digits (ie. in URLs not fractions or dates) */

Definition at line 91 of file makeutype.c.

◆ _ZEROWIDTH

#define _ZEROWIDTH   0x80

Definition at line 75 of file makeutype.c.

◆ false

#define false   0

Definition at line 61 of file makeutype.c.

◆ MAXA

#define MAXA   18

Definition at line 65 of file makeutype.c.

◆ MAXC

#define MAXC   65536

Definition at line 64 of file makeutype.c.

◆ true

#define true   1

Definition at line 60 of file makeutype.c.

Function Documentation

◆ AnyAlts()

static int AnyAlts ( int  i)
static

Definition at line 976 of file makeutype.c.

References alts, i, and j.

Referenced by dump_alttable().

◆ cheat()

static void cheat ( void  )
static

Definition at line 1637 of file makeutype.c.

References alts, mymirror, mytolower, mytotitle, and mytoupper.

Referenced by AddToStem(), and main().

◆ dump()

◆ dump_alttable()

static void dump_alttable ( )
static

Definition at line 986 of file makeutype.c.

References alts, AnyAlts(), CantSaveFile, fclose, FILE, file, fopen, fprintf, GeneratedFileMessage, i, j, MAXA, MAXC, and NULL.

Referenced by main().

◆ dumparabicdata()

◆ FigureAlternates()

static void FigureAlternates ( long  index,
char *  apt,
int  normative 
)
static

Definition at line 145 of file makeutype.c.

References _DecompositionNormative, alt, alts, end, flags, fprintf, i, index, MAXA, strlen(), strncmp(), and strtol().

Referenced by readcorpfile(), and readin().

◆ find()

static int find ( char *  base,
char *  suffix 
)
static

Definition at line 558 of file makeutype.c.

References base, i, MAXC, name, names, NULL, strcmp(), strcpy(), and suffix.

Referenced by dumparabicdata().

◆ FreeNamesMemorySpace()

static void FreeNamesMemorySpace ( )
static

Definition at line 138 of file makeutype.c.

References free, index, MAXC, names, and NULL.

Referenced by dump(), dumparabicdata(), main(), readcorpfile(), and readin().

◆ main()

int main ( void  )

Definition at line 1826 of file makeutype.c.

References cheat(), dump(), dump_alttable(), FreeNamesMemorySpace(), readin(), and visualalts().

◆ processAssignment()

static void processAssignment ( long  index,
char *  pt 
)
static

Definition at line 182 of file makeutype.c.

References assignedcodepoints, first, fprintf, i, index, NULL, pt, and strstr().

Referenced by readin().

◆ readcorpfile()

static void readcorpfile ( char *  prefix,
char *  corp 
)
static

◆ readin()

◆ visualalts()

static void visualalts ( void  )
static

Definition at line 1045 of file makeutype.c.

References alts.

Referenced by main().

Variable Documentation

◆ alts

◆ assignedcodepoints

unsigned long assignedcodepoints[0x120000/32]

Definition at line 130 of file makeutype.c.

Referenced by dump(), and processAssignment().

◆ CantReadFile

const char CantReadFile[] = "Can't find or read file %s\n"

Definition at line 133 of file makeutype.c.

Referenced by readcorpfile(), and readin().

◆ CantSaveFile

const char CantSaveFile[] = "Can't open or write to output file %s\n"

Definition at line 134 of file makeutype.c.

Referenced by dump(), dump_alttable(), and dumparabicdata().

◆ flags

unsigned long flags[65536]

Definition at line 127 of file makeutype.c.

Referenced by dump(), FigureAlternates(), and readin().

◆ flags2

unsigned long flags2[65536]

Definition at line 128 of file makeutype.c.

Referenced by dump(), internal_fnmatch(), mpfr_agm(), mpfr_pow_general(), mrb_fd_cloexec(), and readin().

◆ GeneratedFileMessage

const char GeneratedFileMessage[] = "\n/* This file was generated using the program 'makeutype' */\n\n"

Definition at line 132 of file makeutype.c.

Referenced by dump(), dump_alttable(), and dumparabicdata().

◆ LineLengthBg

const char LineLengthBg[] = "Error with %s. Found line too long: %s\n"

Definition at line 136 of file makeutype.c.

Referenced by readcorpfile(), and readin().

◆ mymirror

unsigned short mymirror[65536]

Definition at line 126 of file makeutype.c.

Referenced by cheat(), and dump().

◆ mynumericvalue

unsigned char mynumericvalue[65536]

Definition at line 125 of file makeutype.c.

Referenced by dump(), and readin().

◆ mytolower

unsigned short mytolower[65536]

Definition at line 122 of file makeutype.c.

Referenced by cheat(), dump(), and readin().

◆ mytotitle

unsigned short mytotitle[65536]

Definition at line 124 of file makeutype.c.

Referenced by cheat(), dump(), and readin().

◆ mytoupper

unsigned short mytoupper[65536]

Definition at line 123 of file makeutype.c.

Referenced by cheat(), dump(), and readin().

◆ names

char* names[65536]

Definition at line 121 of file makeutype.c.

Referenced by dump(), dumparabicdata(), find(), FreeNamesMemorySpace(), readcorpfile(), and readin().

◆ NoMoreMemory

const char NoMoreMemory[] = "Can't access more memory.\n"

Definition at line 135 of file makeutype.c.

Referenced by readcorpfile().