2f 2a 0a 09 57 41 52 4e 49 4e 47 3a 20 54 68 69 /*..WARNING: Thi 73 20 66 69 6c 65 20 77 61 73 20 67 65 6e 65 72 s file was gener 61 74 65 64 20 62 79 20 64 6b 63 74 2e 0a 09 43 ated by dkct...C 68 61 6e 67 65 73 20 79 6f 75 20 6d 61 6b 65 20 hanges you make 68 65 72 65 20 77 69 6c 6c 20 62 65 20 6c 6f 73 here will be los 74 20 69 66 20 64 6b 63 74 20 69 73 20 72 75 6e t if dkct is run 20 61 67 61 69 6e 21 0a 09 59 6f 75 20 73 68 6f again!..You sho 75 6c 64 20 6d 6f 64 69 66 79 20 74 68 65 20 6f uld modify the o 72 69 67 69 6e 61 6c 20 73 6f 75 72 63 65 20 61 riginal source a 6e 64 20 72 75 6e 20 64 6b 63 74 20 6f 6e 20 69 nd run dkct on i 74 2e 0a 09 4f 72 69 67 69 6e 61 6c 20 73 6f 75 t...Original sou 72 63 65 3a 20 64 6b 33 75 63 32 6c 2e 63 74 72 rce: dk3uc2l.ctr 0a 2a 2f 0a 0a 2f 2a 0a 43 6f 70 79 72 69 67 68 .*/../*.Copyrigh 74 20 28 43 29 20 32 30 31 31 2d 32 30 31 33 2c t (C) 2011-2013, 20 44 69 72 6b 20 4b 72 61 75 73 65 0a 0a 52 65 Dirk Krause..Re 64 69 73 74 72 69 62 75 74 69 6f 6e 20 61 6e 64 distribution and 20 75 73 65 20 69 6e 20 73 6f 75 72 63 65 20 61 use in source a 6e 64 20 62 69 6e 61 72 79 20 66 6f 72 6d 73 2c nd binary forms, 20 77 69 74 68 20 6f 72 20 77 69 74 68 6f 75 74 with or without 0a 6d 6f 64 69 66 69 63 61 74 69 6f 6e 2c 20 61 .modification, a 72 65 20 70 65 72 6d 69 74 74 65 64 20 70 72 6f re permitted pro 76 69 64 65 64 20 74 68 61 74 20 74 68 65 20 66 vided that the f 6f 6c 6c 6f 77 69 6e 67 20 63 6f 6e 64 69 74 69 ollowing conditi 6f 6e 73 20 61 72 65 20 6d 65 74 3a 0a 0a 2a 20 ons are met:..* 52 65 64 69 73 74 72 69 62 75 74 69 6f 6e 73 20 Redistributions 6f 66 20 73 6f 75 72 63 65 20 63 6f 64 65 20 6d of source code m 75 73 74 20 72 65 74 61 69 6e 20 74 68 65 20 61 ust retain the a 62 6f 76 65 20 63 6f 70 79 72 69 67 68 74 20 6e bove copyright n 6f 74 69 63 65 2c 0a 20 20 74 68 69 73 20 6c 69 otice,. this li 73 74 20 6f 66 20 63 6f 6e 64 69 74 69 6f 6e 73 st of conditions 20 61 6e 64 20 74 68 65 20 66 6f 6c 6c 6f 77 69 and the followi 6e 67 20 64 69 73 63 6c 61 69 6d 65 72 2e 0a 2a ng disclaimer..* 20 52 65 64 69 73 74 72 69 62 75 74 69 6f 6e 73 Redistributions 20 69 6e 20 62 69 6e 61 72 79 20 66 6f 72 6d 20 in binary form 6d 75 73 74 20 72 65 70 72 6f 64 75 63 65 20 74 must reproduce t 68 65 20 61 62 6f 76 65 20 6f 70 79 72 69 67 68 he above opyrigh 74 20 6e 6f 74 69 63 65 2c 0a 20 20 74 68 69 73 t notice,. this 20 6c 69 73 74 20 6f 66 20 63 6f 6e 64 69 74 69 list of conditi 6f 6e 73 20 61 6e 64 20 74 68 65 20 66 6f 6c 6c ons and the foll 6f 77 69 6e 67 20 64 69 73 63 6c 61 69 6d 65 72 owing disclaimer 20 69 6e 20 74 68 65 20 64 6f 63 75 6d 65 6e 74 in the document 61 74 69 6f 6e 0a 20 20 61 6e 64 2f 6f 72 20 6f ation. and/or o 74 68 65 72 20 6d 61 74 65 72 69 61 6c 73 20 70 ther materials p 72 6f 76 69 64 65 64 20 77 69 74 68 20 74 68 65 rovided with the 20 64 69 73 74 72 69 62 75 74 69 6f 6e 2e 0a 2a distribution..* 20 4e 65 69 74 68 65 72 20 74 68 65 20 6e 61 6d Neither the nam 65 20 6f 66 20 74 68 65 20 61 75 74 68 6f 72 20 e of the author 6e 6f 72 20 74 68 65 20 6e 61 6d 65 73 20 6f 66 nor the names of 20 63 6f 6e 74 72 69 62 75 74 6f 72 73 20 6d 61 contributors ma 79 20 62 65 20 75 73 65 64 0a 20 20 74 6f 20 65 y be used. to e 6e 64 6f 72 73 65 20 6f 72 20 70 72 6f 6d 6f 74 ndorse or promot 65 20 70 72 6f 64 75 63 74 73 20 64 65 72 69 76 e products deriv 65 64 20 66 72 6f 6d 20 74 68 69 73 20 73 6f 66 ed from this sof 74 77 61 72 65 20 77 69 74 68 6f 75 74 20 73 70 tware without sp 65 63 69 66 69 63 0a 20 20 70 72 69 6f 72 20 77 ecific. prior w 72 69 74 74 65 6e 20 70 65 72 6d 69 73 73 69 6f ritten permissio 6e 2e 0a 0a 54 48 49 53 20 53 4f 46 54 57 41 52 n...THIS SOFTWAR 45 20 49 53 20 50 52 4f 56 49 44 45 44 20 42 59 E IS PROVIDED BY 20 54 48 45 20 43 4f 50 59 52 49 47 48 54 20 48 THE COPYRIGHT H 4f 4c 44 45 52 53 20 41 4e 44 20 43 4f 4e 54 52 OLDERS AND CONTR 49 42 55 54 4f 52 53 20 60 60 41 53 20 49 53 27 IBUTORS ``AS IS' 27 0a 41 4e 44 20 41 4e 59 20 45 58 50 52 45 53 '.AND ANY EXPRES 53 20 4f 52 20 49 4d 50 4c 49 45 44 20 57 41 52 S OR IMPLIED WAR 52 41 4e 54 49 45 53 2c 20 49 4e 43 4c 55 44 49 RANTIES, INCLUDI 4e 47 2c 20 42 55 54 20 4e 4f 54 20 4c 49 4d 49 NG, BUT NOT LIMI 54 45 44 20 54 4f 2c 20 54 48 45 0a 49 4d 50 4c TED TO, THE.IMPL 49 45 44 20 57 41 52 52 41 4e 54 49 45 53 20 4f IED WARRANTIES O 46 20 4d 45 52 43 48 41 4e 54 41 42 49 4c 49 54 F MERCHANTABILIT 59 20 41 4e 44 20 46 49 54 4e 45 53 53 20 46 4f Y AND FITNESS FO 52 20 41 20 50 41 52 54 49 43 55 4c 41 52 20 50 R A PARTICULAR P 55 52 50 4f 53 45 0a 41 52 45 20 44 49 53 43 4c URPOSE.ARE DISCL 41 49 4d 45 44 2e 0a 49 4e 20 4e 4f 20 45 56 45 AIMED..IN NO EVE 4e 54 20 53 48 41 4c 4c 20 54 48 45 20 43 4f 50 NT SHALL THE COP 59 52 49 47 48 54 20 4f 57 4e 45 52 20 4f 52 20 YRIGHT OWNER OR 43 4f 4e 54 52 49 42 55 54 4f 52 53 20 42 45 20 CONTRIBUTORS BE 4c 49 41 42 4c 45 20 46 4f 52 20 41 4e 59 0a 44 LIABLE FOR ANY.D 49 52 45 43 54 2c 20 49 4e 44 49 52 45 43 54 2c IRECT, INDIRECT, 20 49 4e 43 49 44 45 4e 54 41 4c 2c 20 53 50 45 INCIDENTAL, SPE 43 49 41 4c 2c 20 45 58 45 4d 50 4c 41 52 59 2c CIAL, EXEMPLARY, 20 4f 52 20 43 4f 4e 53 45 51 55 45 4e 54 49 41 OR CONSEQUENTIA 4c 20 44 41 4d 41 47 45 53 0a 28 49 4e 43 4c 55 L DAMAGES.(INCLU 44 49 4e 47 2c 20 42 55 54 20 4e 4f 54 20 4c 49 DING, BUT NOT LI 4d 49 54 45 44 20 54 4f 2c 20 50 52 4f 43 55 52 MITED TO, PROCUR 45 4d 45 4e 54 20 4f 46 20 53 55 42 53 54 49 54 EMENT OF SUBSTIT 55 54 45 20 47 4f 4f 44 53 20 4f 52 20 53 45 52 UTE GOODS OR SER 56 49 43 45 53 3b 0a 4c 4f 53 53 20 4f 46 20 55 VICES;.LOSS OF U 53 45 2c 20 44 41 54 41 2c 20 4f 52 20 50 52 4f SE, DATA, OR PRO 46 49 54 53 3b 20 4f 52 20 42 55 53 49 4e 45 53 FITS; OR BUSINES 53 20 49 4e 54 45 52 52 55 50 54 49 4f 4e 29 20 S INTERRUPTION) 48 4f 57 45 56 45 52 20 43 41 55 53 45 44 20 41 HOWEVER CAUSED A 4e 44 0a 4f 4e 20 41 4e 59 20 54 48 45 4f 52 59 ND.ON ANY THEORY 20 4f 46 20 4c 49 41 42 49 4c 49 54 59 2c 20 57 OF LIABILITY, W 48 45 54 48 45 52 20 49 4e 20 43 4f 4e 54 52 41 HETHER IN CONTRA 43 54 2c 20 53 54 52 49 43 54 20 4c 49 41 42 49 CT, STRICT LIABI 4c 49 54 59 2c 20 4f 52 20 54 4f 52 54 0a 28 49 LITY, OR TORT.(I 4e 43 4c 55 44 49 4e 47 20 4e 45 47 4c 49 47 45 NCLUDING NEGLIGE 4e 43 45 20 4f 52 20 4f 54 48 45 52 57 49 53 45 NCE OR OTHERWISE 29 20 41 52 49 53 49 4e 47 20 49 4e 20 41 4e 59 ) ARISING IN ANY 20 57 41 59 20 4f 55 54 20 4f 46 20 54 48 45 20 WAY OUT OF THE 55 53 45 20 4f 46 0a 54 48 49 53 20 53 4f 46 54 USE OF.THIS SOFT 57 41 52 45 2c 20 45 56 45 4e 20 49 46 20 41 44 WARE, EVEN IF AD 56 49 53 45 44 20 4f 46 20 54 48 45 20 50 4f 53 VISED OF THE POS 53 49 42 49 4c 49 54 59 20 4f 46 20 53 55 43 48 SIBILITY OF SUCH 20 44 41 4d 41 47 45 2e 0a 2a 2f 0a 0a 2f 2a 2a DAMAGE..*/../** 09 40 66 69 6c 65 20 2a 2f 0a 0a 23 69 66 6e 64 .@file */..#ifnd 65 66 20 44 4b 33 55 43 32 4c 5f 48 5f 49 4e 43 ef DK3UC2L_H_INC 4c 55 44 45 44 0a 2f 2a 2a 20 41 76 6f 69 64 20 LUDED./** Avoid 6d 75 6c 74 69 70 6c 65 20 69 6e 63 6c 75 73 69 multiple inclusi 6f 6e 73 2e 20 2a 2f 0a 23 64 65 66 69 6e 65 20 ons. */.#define 44 4b 33 55 43 32 4c 5f 48 5f 49 4e 43 4c 55 44 DK3UC2L_H_INCLUD 45 44 20 31 0a 0a 0a 23 6c 69 6e 65 20 31 30 20 ED 1...#line 10 22 64 6b 33 75 63 32 6c 2e 63 74 72 22 0a 0a 23 "dk3uc2l.ctr"..# 69 6e 63 6c 75 64 65 20 22 64 6b 33 63 6f 6e 66 include "dk3conf 2e 68 22 0a 23 69 6e 63 6c 75 64 65 20 22 64 6b .h".#include "dk 33 74 79 70 65 73 2e 68 22 0a 0a 23 69 66 64 65 3types.h"..#ifde 66 20 5f 5f 63 70 6c 75 73 70 6c 75 73 0a 65 78 f __cplusplus.ex 74 65 72 6e 20 22 43 22 20 7b 0a 23 65 6e 64 69 tern "C" {.#endi 66 0a 0a 2f 2a 2a 09 4f 70 65 6e 20 4c 61 54 65 f../**.Open LaTe 58 20 65 6e 63 6f 64 65 72 2e 0a 09 40 70 61 72 X encoder...@par 61 6d 09 64 09 44 69 72 65 63 74 6f 72 79 20 63 am.d.Directory c 6f 6e 74 61 69 6e 69 6e 67 20 74 68 65 20 74 61 ontaining the ta 62 6c 65 73 2e 0a 09 40 70 61 72 61 6d 09 66 5f bles...@param.f_ 64 65 73 63 09 46 6c 61 67 3a 20 41 74 74 65 6d desc.Flag: Attem 70 74 20 74 6f 20 6c 6f 61 64 20 67 6c 79 70 68 pt to load glyph 20 64 65 73 63 72 69 70 74 69 6f 6e 73 2e 0a 09 descriptions... 40 70 61 72 61 6d 09 66 5f 75 74 66 38 09 46 6c @param.f_utf8.Fl 61 67 3a 20 55 54 46 2d 38 20 6f 75 74 70 75 74 ag: UTF-8 output 20 65 6e 63 6f 64 69 6e 67 2e 0a 09 40 70 61 72 encoding...@par 61 6d 09 61 70 70 09 41 70 70 6c 69 63 61 74 69 am.app.Applicati 6f 6e 20 73 74 72 75 63 74 75 72 65 66 6f 72 20 on structurefor 64 69 61 67 6e 6f 73 74 69 63 73 2c 20 6d 61 79 diagnostics, may 20 62 65 20 4e 55 4c 4c 2e 0a 09 40 72 65 74 75 be NULL...@retu 72 6e 09 50 6f 69 6e 74 65 72 20 74 6f 20 6e 65 rn.Pointer to ne 77 20 65 6e 63 6f 64 65 72 20 6f 6e 20 73 75 63 w encoder on suc 63 65 73 73 2c 20 4e 55 4c 4c 20 6f 6e 20 65 72 cess, NULL on er 72 6f 72 2e 0a 2a 2f 0a 64 6b 33 5f 75 63 32 6c ror..*/.dk3_uc2l 61 74 5f 74 20 2a 0a 64 6b 33 75 63 32 6c 61 74 at_t *.dk3uc2lat 5f 6f 70 65 6e 5f 61 70 70 28 64 6b 43 68 61 72 _open_app(dkChar 20 63 6f 6e 73 74 20 2a 64 2c 20 69 6e 74 20 66 const *d, int f 5f 64 65 73 63 2c 20 69 6e 74 20 66 5f 75 74 66 _desc, int f_utf 38 2c 20 64 6b 33 5f 61 70 70 5f 74 20 2a 61 70 8, dk3_app_t *ap 70 29 3b 0a 0a 2f 2a 2a 09 43 6c 6f 73 65 20 4c p);../**.Close L 61 54 65 58 20 65 6e 63 6f 64 65 72 2e 0a 09 40 aTeX encoder...@ 70 61 72 61 6d 09 75 09 45 6e 63 6f 64 65 72 20 param.u.Encoder 74 6f 20 63 6c 6f 73 65 2e 0a 2a 2f 0a 76 6f 69 to close..*/.voi 64 0a 64 6b 33 75 63 32 6c 61 74 5f 63 6c 6f 73 d.dk3uc2lat_clos 65 28 64 6b 33 5f 75 63 32 6c 61 74 5f 74 20 2a e(dk3_uc2lat_t * 75 29 3b 0a 0a 2f 2a 2a 09 52 65 74 72 69 65 76 u);../**.Retriev 65 20 4c 61 54 65 58 20 65 6e 63 6f 64 69 6e 67 e LaTeX encoding 20 66 6f 72 20 6f 6e 65 20 33 32 2d 62 69 74 20 for one 32-bit 63 68 61 72 61 63 74 65 72 2e 0a 09 40 70 61 72 character...@par 61 6d 09 75 09 4c 61 54 65 58 20 65 6e 63 6f 64 am.u.LaTeX encod 65 72 2e 0a 09 40 70 61 72 61 6d 09 63 33 32 09 er...@param.c32. 43 68 61 72 61 63 74 65 72 20 74 6f 20 6f 62 74 Character to obt 61 69 6e 20 4c 61 54 65 58 20 65 6e 63 6f 64 69 ain LaTeX encodi 6e 67 20 66 6f 72 2e 0a 09 40 70 61 72 61 6d 09 ng for...@param. 69 73 6d 61 74 68 09 46 6c 61 67 3a 20 49 6e 20 ismath.Flag: In 6d 61 74 68 20 6d 6f 64 65 2e 0a 09 40 72 65 74 math mode...@ret 75 72 6e 09 50 6f 69 6e 74 65 72 20 74 6f 20 65 urn.Pointer to e 6e 63 6f 64 69 6e 67 20 6f 6e 20 73 75 63 63 65 ncoding on succe 73 73 2c 20 4e 55 4c 4c 20 6f 6e 20 65 72 72 6f ss, NULL on erro 72 2e 0a 2a 2f 0a 63 68 61 72 20 63 6f 6e 73 74 r..*/.char const 20 2a 0a 64 6b 33 75 63 32 6c 61 74 5f 67 65 74 *.dk3uc2lat_get 28 64 6b 33 5f 75 63 32 6c 61 74 5f 74 20 2a 75 (dk3_uc2lat_t *u 2c 20 64 6b 33 5f 63 33 32 5f 74 20 63 33 32 2c , dk3_c32_t c32, 20 69 6e 74 20 69 73 6d 61 74 68 29 3b 0a 0a 2f int ismath);../ 2a 2a 09 43 68 65 63 6b 20 77 68 65 74 68 65 72 **.Check whether 20 61 20 63 68 61 72 61 63 74 65 72 20 63 61 6e a character can 20 62 65 20 77 72 69 74 74 65 6e 20 74 6f 20 61 be written to a 20 4c 61 54 65 58 20 66 69 6c 65 20 64 69 72 65 LaTeX file dire 63 74 6c 79 2e 0a 09 40 70 61 72 61 6d 09 63 33 ctly...@param.c3 32 09 43 68 61 72 61 63 74 65 72 20 74 6f 20 63 2.Character to c 68 65 63 6b 2e 0a 09 40 72 65 74 75 72 6e 09 31 heck...@return.1 20 66 6f 72 20 79 65 73 2c 20 30 20 66 6f 72 20 for yes, 0 for 6e 6f 2e 0a 2a 2f 0a 69 6e 74 0a 64 6b 33 75 63 no..*/.int.dk3uc 32 6c 61 74 5f 64 69 72 65 63 74 28 64 6b 33 5f 2lat_direct(dk3_ 63 33 32 5f 74 20 63 33 32 29 3b 0a 0a 2f 2a 2a c32_t c32);../** 09 57 72 69 74 65 20 4c 61 54 65 58 20 65 6e 63 .Write LaTeX enc 6f 64 69 6e 67 20 66 6f 72 20 61 20 73 74 72 69 oding for a stri 6e 67 20 74 6f 20 61 20 73 74 72 65 61 6d 2e 0a ng to a stream.. 09 40 70 61 72 61 6d 09 75 09 4c 61 54 65 58 20 .@param.u.LaTeX 65 6e 63 6f 64 65 72 2e 0a 09 40 70 61 72 61 6d encoder...@param 09 73 74 09 53 74 72 65 61 6d 20 74 6f 20 77 72 .st.Stream to wr 69 74 65 20 74 6f 2e 0a 09 40 70 61 72 61 6d 09 ite to...@param. 74 09 54 65 78 74 20 74 6f 20 77 72 69 74 65 20 t.Text to write 28 41 53 43 49 49 2f 49 53 4f 2d 4c 41 54 49 4e (ASCII/ISO-LATIN 2d 31 20 65 6e 63 6f 64 65 64 29 2e 0a 09 40 72 -1 encoded)...@r 65 74 75 72 6e 09 31 20 6f 6e 20 73 75 63 63 65 eturn.1 on succe 73 73 2c 20 30 20 6f 6e 20 65 72 72 6f 72 2e 0a ss, 0 on error.. 2a 2f 0a 69 6e 74 0a 64 6b 33 75 63 32 6c 61 74 */.int.dk3uc2lat 5f 63 38 5f 70 6c 61 69 6e 5f 73 74 70 75 74 73 _c8_plain_stputs 28 64 6b 33 5f 75 63 32 6c 61 74 5f 74 20 2a 75 (dk3_uc2lat_t *u 2c 20 64 6b 33 5f 73 74 72 65 61 6d 5f 74 20 2a , dk3_stream_t * 73 74 2c 20 63 68 61 72 20 63 6f 6e 73 74 20 2a st, char const * 74 29 3b 0a 0a 2f 2a 2a 09 57 72 69 74 65 20 4c t);../**.Write L 61 54 65 58 20 65 6e 63 6f 64 69 6e 67 20 66 6f aTeX encoding fo 72 20 61 20 73 74 72 69 6e 67 20 74 6f 20 61 20 r a string to a 73 74 72 65 61 6d 2e 0a 09 40 70 61 72 61 6d 09 stream...@param. 75 09 4c 61 54 65 58 20 65 6e 63 6f 64 65 72 2e u.LaTeX encoder. 0a 09 40 70 61 72 61 6d 09 73 74 09 53 74 72 65 ..@param.st.Stre 61 6d 20 74 6f 20 77 72 69 74 65 20 74 6f 2e 0a am to write to.. 09 40 70 61 72 61 6d 09 74 09 54 65 78 74 20 74 .@param.t.Text t 6f 20 77 72 69 74 65 20 28 55 54 46 2d 38 20 65 o write (UTF-8 e 6e 63 6f 64 65 64 29 2e 0a 09 40 72 65 74 75 72 ncoded)...@retur 6e 09 31 20 6f 6e 20 73 75 63 63 65 73 73 2c 20 n.1 on success, 30 20 6f 6e 20 65 72 72 6f 72 2e 0a 2a 2f 0a 69 0 on error..*/.i 6e 74 0a 64 6b 33 75 63 32 6c 61 74 5f 63 38 5f nt.dk3uc2lat_c8_ 75 74 66 38 5f 73 74 70 75 74 73 28 64 6b 33 5f utf8_stputs(dk3_ 75 63 32 6c 61 74 5f 74 20 2a 75 2c 20 64 6b 33 uc2lat_t *u, dk3 5f 73 74 72 65 61 6d 5f 74 20 2a 73 74 2c 20 63 _stream_t *st, c 68 61 72 20 63 6f 6e 73 74 20 2a 74 29 3b 0a 0a har const *t);.. 2f 2a 2a 09 57 72 69 74 65 20 4c 61 54 65 58 20 /**.Write LaTeX 65 6e 63 6f 64 69 6e 67 20 66 6f 72 20 61 20 73 encoding for a s 74 72 69 6e 67 20 74 6f 20 61 20 73 74 72 65 61 tring to a strea 6d 2e 0a 09 40 70 61 72 61 6d 09 75 09 4c 61 54 m...@param.u.LaT 65 58 20 65 6e 63 6f 64 65 72 2e 0a 09 40 70 61 eX encoder...@pa 72 61 6d 09 73 74 09 53 74 72 65 61 6d 20 74 6f ram.st.Stream to 20 77 72 69 74 65 20 74 6f 2e 0a 09 40 70 61 72 write to...@par 61 6d 09 74 09 54 65 78 74 20 74 6f 20 77 72 69 am.t.Text to wri 74 65 20 28 55 54 46 2d 31 36 20 65 6e 63 6f 64 te (UTF-16 encod 65 64 29 2e 0a 09 40 72 65 74 75 72 6e 09 31 20 ed)...@return.1 6f 6e 20 73 75 63 63 65 73 73 2c 20 30 20 6f 6e on success, 0 on 20 65 72 72 6f 72 2e 0a 2a 2f 0a 69 6e 74 0a 64 error..*/.int.d 6b 33 75 63 32 6c 61 74 5f 63 31 36 5f 73 74 70 k3uc2lat_c16_stp 75 74 73 28 64 6b 33 5f 75 63 32 6c 61 74 5f 74 uts(dk3_uc2lat_t 20 2a 75 2c 20 64 6b 33 5f 73 74 72 65 61 6d 5f *u, dk3_stream_ 74 20 2a 73 74 2c 20 64 6b 33 5f 63 31 36 5f 74 t *st, dk3_c16_t 20 63 6f 6e 73 74 20 2a 74 29 3b 0a 0a 2f 2a 2a const *t);../** 09 57 72 69 74 65 20 4c 61 54 65 58 20 65 6e 63 .Write LaTeX enc 6f 64 69 6e 67 20 66 6f 72 20 61 20 73 74 72 69 oding for a stri 6e 67 20 74 6f 20 61 20 73 74 72 65 61 6d 2e 0a ng to a stream.. 09 40 70 61 72 61 6d 09 75 09 4c 61 54 65 58 20 .@param.u.LaTeX 65 6e 63 6f 64 65 72 2e 0a 09 40 70 61 72 61 6d encoder...@param 09 73 74 09 53 74 72 65 61 6d 20 74 6f 20 77 72 .st.Stream to wr 69 74 65 20 74 6f 2e 0a 09 40 70 61 72 61 6d 09 ite to...@param. 74 09 54 65 78 74 20 74 6f 20 77 72 69 74 65 20 t.Text to write 28 33 32 2d 62 69 74 20 63 68 61 72 61 63 74 65 (32-bit characte 72 73 29 2e 0a 09 40 72 65 74 75 72 6e 09 31 20 rs)...@return.1 6f 6e 20 73 75 63 63 65 73 73 2c 20 30 20 6f 6e on success, 0 on 20 65 72 72 6f 72 2e 0a 2a 2f 0a 69 6e 74 0a 64 error..*/.int.d 6b 33 75 63 32 6c 61 74 5f 63 33 32 5f 73 74 70 k3uc2lat_c32_stp 75 74 73 28 64 6b 33 5f 75 63 32 6c 61 74 5f 74 uts(dk3_uc2lat_t 20 2a 75 2c 20 64 6b 33 5f 73 74 72 65 61 6d 5f *u, dk3_stream_ 74 20 2a 73 74 2c 20 64 6b 33 5f 63 33 32 5f 74 t *st, dk3_c32_t 20 63 6f 6e 73 74 20 2a 74 29 3b 0a 0a 2f 2a 2a const *t);../** 09 57 72 69 74 65 20 4c 61 54 65 58 20 65 6e 63 .Write LaTeX enc 6f 64 69 6e 67 20 66 6f 72 20 61 20 73 74 72 69 oding for a stri 6e 67 20 74 6f 20 61 20 73 74 72 65 61 6d 2e 0a ng to a stream.. 09 40 70 61 72 61 6d 09 75 09 4c 61 54 65 58 20 .@param.u.LaTeX 65 6e 63 6f 64 65 72 2e 0a 09 40 70 61 72 61 6d encoder...@param 09 73 74 09 53 74 72 65 61 6d 20 74 6f 20 77 72 .st.Stream to wr 69 74 65 20 74 6f 2e 0a 09 40 70 61 72 61 6d 09 ite to...@param. 74 09 54 65 78 74 20 74 6f 20 77 72 69 74 65 20 t.Text to write 28 64 6b 43 68 61 72 20 63 68 61 72 61 63 74 65 (dkChar characte 72 73 29 2e 0a 09 40 70 61 72 61 6d 09 65 09 45 rs)...@param.e.E 6e 63 6f 64 69 6e 67 20 28 6f 6e 6c 79 20 75 73 ncoding (only us 65 64 20 66 6f 72 20 38 2d 62 69 74 20 63 68 61 ed for 8-bit cha 72 61 63 74 65 72 73 29 2e 0a 09 40 72 65 74 75 racters)...@retu 72 6e 09 31 20 6f 6e 20 73 75 63 63 65 73 73 2c rn.1 on success, 20 30 20 6f 6e 20 65 72 72 6f 72 2e 0a 2a 2f 0a 0 on error..*/. 69 6e 74 0a 64 6b 33 75 63 32 6c 61 74 5f 73 74 int.dk3uc2lat_st 70 75 74 73 28 64 6b 33 5f 75 63 32 6c 61 74 5f puts(dk3_uc2lat_ 74 20 2a 75 2c 20 64 6b 33 5f 73 74 72 65 61 6d t *u, dk3_stream 5f 74 20 2a 73 74 2c 20 64 6b 43 68 61 72 20 63 _t *st, dkChar c 6f 6e 73 74 20 2a 74 2c 20 69 6e 74 20 65 29 3b onst *t, int e); 0a 0a 2f 2a 2a 09 50 72 65 70 61 72 65 20 4c 61 ../**.Prepare La 54 65 58 20 65 6e 63 6f 64 65 72 20 74 6f 20 72 TeX encoder to r 65 74 72 69 65 76 65 20 70 61 63 6b 61 67 65 20 etrieve package 69 6e 66 6f 72 6d 61 74 69 6f 6e 2e 0a 09 40 70 information...@p 61 72 61 6d 09 75 09 4c 61 54 65 58 20 65 6e 63 aram.u.LaTeX enc 6f 64 65 72 2e 0a 2a 2f 0a 76 6f 69 64 0a 64 6b oder..*/.void.dk 33 75 63 32 6c 61 74 5f 70 61 63 6b 61 67 65 5f 3uc2lat_package_ 72 65 73 65 74 28 64 6b 33 5f 75 63 32 6c 61 74 reset(dk3_uc2lat 5f 74 20 2a 75 29 3b 0a 0a 2f 2a 2a 09 52 65 74 _t *u);../**.Ret 72 69 65 76 65 20 6e 65 78 74 20 70 61 63 6b 61 rieve next packa 67 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 66 ge information f 72 6f 6d 20 4c 61 54 65 58 20 65 6e 63 6f 64 65 rom LaTeX encode 72 2e 0a 09 40 70 61 72 61 6d 09 75 09 4c 61 54 r...@param.u.LaT 65 58 20 65 6e 63 6f 64 65 72 2e 0a 09 40 72 65 eX encoder...@re 74 75 72 6e 09 50 6f 69 6e 74 65 72 20 74 6f 20 turn.Pointer to 6e 65 78 74 20 70 61 63 6b 61 67 65 20 69 6e 66 next package inf 6f 72 6d 61 74 69 6f 6e 20 6f 72 20 4e 55 4c 4c ormation or NULL 2e 0a 2a 2f 0a 64 6b 33 5f 75 63 32 6c 61 74 5f ..*/.dk3_uc2lat_ 70 6b 67 5f 74 20 2a 0a 64 6b 33 75 63 32 6c 61 pkg_t *.dk3uc2la 74 5f 70 61 63 6b 61 67 65 5f 6e 65 78 74 28 64 t_package_next(d 6b 33 5f 75 63 32 6c 61 74 5f 74 20 2a 75 29 3b k3_uc2lat_t *u); 0a 0a 23 69 66 64 65 66 20 5f 5f 63 70 6c 75 73 ..#ifdef __cplus 70 6c 75 73 0a 7d 0a 23 65 6e 64 69 66 0a 0a 0a plus.}.#endif... 0a 0a 23 65 6e 64 69 66 0a ..#endif.