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)  

bkmk2uni.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Include dependency graph for bkmk2uni.c:

Go to the source code of this file.

Macros

#define KFS1(a)   ((0x81<=(a)) && ((a)<=0x9f))
 
#define KFS2(a)   ((0xe0<=(a)) && ((a)<=0xfc))
 
#define KSC1(a)   ((0x40<=(a)) && ((a)<=0x7e))
 
#define KSC2(a)   ((0x80<=(a)) && ((a)<=0xfc))
 
#define MAXBUF   716800
 
#define RDBUF   512000
 
#define NOFSTR   9
 
#define CUSCSS   const unsigned char **
 

Functions

void usage (char *s)
 
int iskanji (int c)
 
int iskanji1 (int c)
 
int iskanji2 (int c)
 
unsigned int EUCtoSJIS (unsigned int k)
 
int cmp (const void *p, const void *q)
 
int putucode (unsigned char *f, unsigned int u)
 
void dopar (unsigned char **r, unsigned char **q, int *n)
 
int main (int argc, char **argv)
 

Variables

unsigned int in_sjis_a []
 
unsigned int in_sjis_b []
 
unsigned int in_sjis_c []
 
unsigned int in_sjis_d []
 
static unsigned int offsetsFromUTF8 [6]
 
static unsigned char bytesFromUTF8 [256]
 
int euc = 0
 
int utf8 = 0
 
int parcount = 0
 

Macro Definition Documentation

◆ CUSCSS

#define CUSCSS   const unsigned char **

Definition at line 1532 of file bkmk2uni.c.

◆ KFS1

#define KFS1 (   a)    ((0x81<=(a)) && ((a)<=0x9f))

Definition at line 1498 of file bkmk2uni.c.

◆ KFS2

#define KFS2 (   a)    ((0xe0<=(a)) && ((a)<=0xfc))

Definition at line 1499 of file bkmk2uni.c.

◆ KSC1

#define KSC1 (   a)    ((0x40<=(a)) && ((a)<=0x7e))

Definition at line 1500 of file bkmk2uni.c.

◆ KSC2

#define KSC2 (   a)    ((0x80<=(a)) && ((a)<=0xfc))

Definition at line 1501 of file bkmk2uni.c.

◆ MAXBUF

#define MAXBUF   716800

Definition at line 1529 of file bkmk2uni.c.

◆ NOFSTR

#define NOFSTR   9

Definition at line 1531 of file bkmk2uni.c.

◆ RDBUF

#define RDBUF   512000

Definition at line 1530 of file bkmk2uni.c.

Function Documentation

◆ cmp()

int cmp ( const void p,
const void q 
)

Definition at line 1611 of file bkmk2uni.c.

References CUSCSS, p, and q.

Referenced by __declspec(), __gmpf_cmp(), __gmpz_cmp(), __gmpz_cmpabs(), __gmpz_urandomm(), _addAttributeToList(), _addExtensionToList(), _addVariantToList(), _cairo_bo_edge_compare(), _cairo_bo_event_dequeue(), _cairo_bo_point32_compare(), _cairo_bo_sweep_line_compare_edges(), _cairo_bo_sweep_line_insert(), _cairo_hull_vertex_compare(), _cairo_point_compare(), _cairo_slope_compare(), _cairo_uint128_cmp(), _InterpretPS(), CollationDataBuilder::addCE32(), AllToBeOutput(), avl_delete(), avl_find(), avl_find_atleast(), avl_find_atmost(), avl_index(), avl_probe(), avl_span(), avl_split(), avl_t_find(), binarySearch(), bo_intersect_ordinate_32_compare(), cairo_bo_event_compare(), check_next_token(), checkBaseExtBytes(), checkBaseExtUnicode(), cmp_key(), SplashXPathSeg::cmpMX(), TextLine::cmpXY(), TextLineFrag::cmpXYColumnLineRot(), TextLineFrag::cmpXYColumnPrimaryRot(), TextLineFrag::cmpXYLineRot(), TextBlock::cmpXYPrimaryRot(), SplashXPathSeg::cmpY(), TextLine::cmpYX(), TextWord::cmpYX(), TextLineFrag::cmpYXLineRot(), TextLineFrag::cmpYXPrimaryRot(), TextBlock::cmpYXPrimaryRot(), GlyphFilter::Pattern::compare(), TailoredSet::compareContractions(), TailoredSet::comparePrefixes(), units::UnitPreferenceMetadata::compareTo(), Compiler::Compiler(), decLnOp(), DefaultAppearance::DefaultAppearance(), doInsertionSort(), AnnotAppearanceBuilder::drawListBox(), event_next(), FcLangSetIndex(), ToUnicodeMap::fillRange(), Catalog::findDestInTree(), FormField::findFieldByFullyQualifiedName(), Gfx::findOp(), OT::CmapSubtableFormat4::accelerator_t::get_glyph(), GfxCIDFont::getCodeToGIDMap(), ColorTable::getColorIndex(), GfxDeviceNColorSpace::GfxDeviceNColorSpace(), glyf_cmp(), insertionSort(), TextBlock::isBeforeByRule2(), ColorTable::isKnownColor(), main(), mod_eq_m1(), mp_avl_ins(), mpfr_mpn_cmp_aux(), mpfr_pow(), mpq_cmp_numden(), mpz_abs_sub(), mrb_cmp(), node_find(), offsetTOCPrefixBinarySearch(), PostScriptFunction::parseCode(), pdf_colorspace_findresource(), pointerTOCPrefixBinarySearch(), presym_find(), TextBlock::primaryCmp(), TextLine::primaryCmp(), TextWord::primaryCmp(), hb_array_t< Type >::qsort(), hb_vector_t< Type >::qsort(), quickSort(), rectangle_compare_start(), drvbase::TextInfo::samecolor(), drvbase::TextInfo::samefont(), TextLine::secondaryCmp(), slope_compare(), GList::sort(), sort_r_simple(), stem_compare(), strcmpAfterPrefix(), subQuickSort(), sweep_line_compare_edges(), sweep_line_insert(), sym_operator_name(), tdelete(), TECkit_Compile(), TECkit_CompileOpt(), tfind(), trav_refresh(), tsearch(), ucm_mergeTables(), uprv_sortArray_68(), uprv_stableBinarySearch_68(), wcomp(), yyparse(), and zzip_dir_stat().

◆ dopar()

void dopar ( unsigned char **  r,
unsigned char **  q,
int n 
)

Definition at line 1655 of file bkmk2uni.c.

References a, b, bytesFromUTF8, euc, EUCtoSJIS(), in_sjis_a, in_sjis_b, in_sjis_c, in_sjis_d, iskanji(), j, KFS1, KFS2, KSC1, KSC2, n, offsetsFromUTF8, parcount, putucode(), q, r, tolower, u, and utf8.

Referenced by main().

◆ EUCtoSJIS()

unsigned int EUCtoSJIS ( unsigned int  k)

Definition at line 1586 of file bkmk2uni.c.

References high, iskanji1(), iskanji2(), k, low, nh, nl, and u.

Referenced by dopar().

◆ iskanji()

int iskanji ( int  c)

Definition at line 1562 of file bkmk2uni.c.

References c.

Referenced by dopar().

◆ iskanji1()

int iskanji1 ( int  c)

Definition at line 1571 of file bkmk2uni.c.

References c.

Referenced by EUCtoSJIS().

◆ iskanji2()

int iskanji2 ( int  c)

Definition at line 1577 of file bkmk2uni.c.

References c.

Referenced by EUCtoSJIS().

◆ main()

int main ( int  argc,
char **  argv 
)

◆ putucode()

int putucode ( unsigned char *  f,
unsigned int  u 
)

Definition at line 1624 of file bkmk2uni.c.

References a, b, buf, f, i, ret, sprintf, and u.

Referenced by dopar().

◆ usage()

void usage ( char *  s)

Definition at line 1537 of file bkmk2uni.c.

References printf(), and s.

Referenced by main().

Variable Documentation

◆ bytesFromUTF8

unsigned char bytesFromUTF8[256]
static
Initial value:
= {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5
}

Definition at line 1518 of file bkmk2uni.c.

Referenced by dopar(), and topenin().

◆ euc

int euc = 0

Definition at line 1534 of file bkmk2uni.c.

Referenced by dopar(), main(), and mrb_ptexenc_fromEUC().

◆ in_sjis_a

unsigned int in_sjis_a[]

Definition at line 73 of file bkmk2uni.c.

Referenced by dopar().

◆ in_sjis_b

unsigned int in_sjis_b[]

Definition at line 321 of file bkmk2uni.c.

Referenced by dopar().

◆ in_sjis_c

unsigned int in_sjis_c[]

Definition at line 809 of file bkmk2uni.c.

Referenced by dopar().

◆ in_sjis_d

unsigned int in_sjis_d[]

Definition at line 1041 of file bkmk2uni.c.

Referenced by dopar().

◆ offsetsFromUTF8

unsigned int offsetsFromUTF8[6]
static
Initial value:
= {
0x00000000UL,
0x00003080UL,
0x000E2080UL,
0x03C82080UL,
0xFA082080UL,
0x82082080UL
}

Definition at line 1508 of file bkmk2uni.c.

Referenced by dopar(), and topenin().

◆ parcount

int parcount = 0

Definition at line 1653 of file bkmk2uni.c.

Referenced by dopar(), and main().

◆ utf8

int utf8 = 0

Definition at line 1535 of file bkmk2uni.c.

Referenced by dopar(), and main().