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)  

aptex-mruby.c
Go to the documentation of this file.
1 /*
2  Copyright 2017, 2018 Clerk Ma
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful, but
10  WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17  02110-1301 USA.
18 */
19 
20 #include "mruby.h"
21 #include <kpathsea/expand.h>
22 #include <kpathsea/progname.h>
23 #include <kpathsea/proginit.h>
24 #include <kpathsea/readable.h>
25 #include <kpathsea/tex-file.h>
26 #include <kpathsea/tex-hush.h>
27 #include <kpathsea/tex-make.h>
28 #include <kpathsea/lib.h>
29 #include <kpathsea/variable.h>
30 
31 #include <ptexenc/ptexenc.h>
32 #include <ptexenc/unicode.h>
33 
35 {
36  char * path;
37  mrb_get_args(mrb, "z!", &path);
38  return mrb_str_new_cstr(mrb, kpse_brace_expand(path));
39 }
40 
42 {
43  char * path;
44  mrb_get_args(mrb, "z!", &path);
45  return mrb_str_new_cstr(mrb, kpse_path_expand(path));
46 }
47 
49 {
50  char * var;
51  char * value;
52  mrb_get_args(mrb, "z!z!", &var, &value);
53  xputenv(var, value);
54  return mrb_nil_value();
55 }
56 
58 {
59  char * var;
60  mrb_int value;
61  mrb_get_args(mrb, "z!i", &var, &value);
62  xputenv_int(var, value);
63  return mrb_nil_value();
64 }
65 
67 {
68  char * prefix;
69  mrb_int dpi;
70  char * mode;
71  char * fallback;
72  mrb_get_args(mrb, "z!iz!z!", &prefix, &dpi, &mode, &fallback);
73  kpse_init_prog(prefix, dpi, mode, fallback);
74  return mrb_nil_value();
75 }
76 
78 {
79  char * name;
80  mrb_get_args(mrb, "z!", &name);
81  return mrb_str_new_cstr(mrb, kpse_readable_file(name));
82 }
83 
85 {
86  char * argv0, * program;
87  mrb_get_args(mrb, "z!z!", &argv0, &program);
88  kpse_set_program_name((const string) argv0, (const string) program);
89  return mrb_nil_value();
90 }
91 
93 {
94  char * var;
95  mrb_get_args(mrb, "z!", &var);
96  return mrb_str_new_cstr(mrb, kpse_var_value((const string) var));
97 }
98 
100 {
101  char * src;
102  mrb_get_args(mrb, "z!", &src);
103  return mrb_str_new_cstr(mrb, kpse_var_expand((const string) src));
104 }
105 
107 {
108  mrb_int fmt;
109  mrb_bool value;
110  mrb_int level;
111  mrb_get_args(mrb, "ibi", &fmt, &value, &level);
112  kpse_set_program_enabled(fmt, value, level);
113  return mrb_nil_value();
114 }
115 
117 {
118  char * fmtname;
119  mrb_bool value;
120  mrb_get_args(mrb, "z!b", &fmtname, &value);
121  return mrb_nil_value();
122 }
123 
125 {
126  mrb_int fmt;
127  mrb_get_args(mrb, "i", &fmt);
128  return mrb_str_new_cstr(mrb, kpse_init_format(fmt));
129 }
130 
132 {
133  char * name;
134  mrb_int format;
136  mrb_get_args(mrb, "z!ib", &name, &format, &must_exist);
137  return mrb_str_new_cstr(mrb, kpse_find_file(name, format, must_exist));
138 }
139 
141 {
142  char * fname;
143  mrb_get_args(mrb, "z!", &fname);
144  return mrb_bool_value(kpse_in_name_ok(fname));
145 }
146 
148 {
149  char * fname;
150  mrb_get_args(mrb, "z!", &fname);
151  return mrb_bool_value(kpse_out_name_ok(fname));
152 }
153 
155 {
156  char * progname;
157  mrb_get_args(mrb, "z!", &progname);
158  kpse_reset_program_name(progname);
159  return mrb_nil_value();
160 }
161 
163 {
164  char * what;
165  mrb_get_args(mrb, "z!", &what);
166  return mrb_bool_value(kpse_tex_hush(what));
167 }
168 
170 {
171  mrb_int format;
172  char * base_file;
173  mrb_get_args(mrb, "iz!", &format, &base_file);
174  return mrb_str_new_cstr(mrb, kpse_make_tex(format, base_file));
175 }
176 
178 {
179  struct RClass * klass = mrb_define_module(mrb, "Kpathsea");
180  /* types.h, kpse_file_format_type */
181  mrb_define_const(mrb, klass, "GF_FORMAT", mrb_fixnum_value(kpse_gf_format));
182  mrb_define_const(mrb, klass, "PK_FORMAT", mrb_fixnum_value(kpse_pk_format));
183  mrb_define_const(mrb, klass, "ANY_GLYPH_FORMAT", mrb_fixnum_value(kpse_any_glyph_format));
184  mrb_define_const(mrb, klass, "TFM_FORMAT", mrb_fixnum_value(kpse_tfm_format));
185  mrb_define_const(mrb, klass, "AFM_FORMAT", mrb_fixnum_value(kpse_afm_format));
186  mrb_define_const(mrb, klass, "BASE_FORMAT", mrb_fixnum_value(kpse_base_format));
187  mrb_define_const(mrb, klass, "BIB_FORMAT", mrb_fixnum_value(kpse_bib_format));
188  mrb_define_const(mrb, klass, "BST_FORMAT", mrb_fixnum_value(kpse_bst_format));
189  mrb_define_const(mrb, klass, "CNF_FORMAT", mrb_fixnum_value(kpse_cnf_format));
190  mrb_define_const(mrb, klass, "DB_FORMAT", mrb_fixnum_value(kpse_db_format));
191  mrb_define_const(mrb, klass, "FMT_FORMAT", mrb_fixnum_value(kpse_fmt_format));
192  mrb_define_const(mrb, klass, "FONTMAP_FORMAT", mrb_fixnum_value(kpse_fontmap_format));
193  mrb_define_const(mrb, klass, "MEM_FORMAT", mrb_fixnum_value(kpse_mem_format));
194  mrb_define_const(mrb, klass, "MF_FORMAT", mrb_fixnum_value(kpse_mf_format));
195  mrb_define_const(mrb, klass, "MFPOOL_FORMAT", mrb_fixnum_value(kpse_mfpool_format));
196  mrb_define_const(mrb, klass, "MFT_FORMAT", mrb_fixnum_value(kpse_mft_format));
197  mrb_define_const(mrb, klass, "MP_FORMAT", mrb_fixnum_value(kpse_mp_format));
198  mrb_define_const(mrb, klass, "MPPOOL_FORMAT", mrb_fixnum_value(kpse_mppool_format));
199  mrb_define_const(mrb, klass, "MPSUPPORT_FORMAT", mrb_fixnum_value(kpse_mpsupport_format));
200  mrb_define_const(mrb, klass, "OCP_FORMAT", mrb_fixnum_value(kpse_ocp_format));
201  mrb_define_const(mrb, klass, "OFM_FORMAT", mrb_fixnum_value(kpse_ofm_format));
202  mrb_define_const(mrb, klass, "OPL_FORMAT", mrb_fixnum_value(kpse_opl_format));
203  mrb_define_const(mrb, klass, "OTP_FORMAT", mrb_fixnum_value(kpse_otp_format));
204  mrb_define_const(mrb, klass, "OVF_FORMAT", mrb_fixnum_value(kpse_ovf_format));
205  mrb_define_const(mrb, klass, "OVP_FORMAT", mrb_fixnum_value(kpse_ovp_format));
206  mrb_define_const(mrb, klass, "PICT_FORMAT", mrb_fixnum_value(kpse_pict_format));
207  mrb_define_const(mrb, klass, "TEX_FORMAT", mrb_fixnum_value(kpse_tex_format));
208  mrb_define_const(mrb, klass, "TEXDOC_FORMAT", mrb_fixnum_value(kpse_texdoc_format));
209  mrb_define_const(mrb, klass, "TEXPOOL_FORMAT", mrb_fixnum_value(kpse_texpool_format));
210  mrb_define_const(mrb, klass, "TEXSOURCE_FORMAT", mrb_fixnum_value(kpse_texsource_format));
211  mrb_define_const(mrb, klass, "TEX_PS_HEADER_FORMAT", mrb_fixnum_value(kpse_tex_ps_header_format));
212  mrb_define_const(mrb, klass, "TROFF_FONT_FORMAT", mrb_fixnum_value(kpse_troff_font_format));
213  mrb_define_const(mrb, klass, "TYPE1_FORMAT", mrb_fixnum_value(kpse_type1_format));
214  mrb_define_const(mrb, klass, "VF_FORMAT", mrb_fixnum_value(kpse_vf_format));
215  mrb_define_const(mrb, klass, "DVIPS_CONFIG_FORMAT", mrb_fixnum_value(kpse_dvips_config_format));
216  mrb_define_const(mrb, klass, "IST_FORMAT", mrb_fixnum_value(kpse_ist_format));
217  mrb_define_const(mrb, klass, "TRUETYPE_FORMAT", mrb_fixnum_value(kpse_truetype_format));
218  mrb_define_const(mrb, klass, "TYPE42_FORMAT", mrb_fixnum_value(kpse_type42_format));
219  mrb_define_const(mrb, klass, "WEB2C_FORMAT", mrb_fixnum_value(kpse_web2c_format));
220  mrb_define_const(mrb, klass, "PROGRAM_TEXT_FORMAT", mrb_fixnum_value(kpse_program_text_format));
221  mrb_define_const(mrb, klass, "PROGRAM_BINARY_FORMAT", mrb_fixnum_value(kpse_program_binary_format));
222  mrb_define_const(mrb, klass, "MISCFONTS_FORMAT", mrb_fixnum_value(kpse_miscfonts_format));
223  mrb_define_const(mrb, klass, "WEB_FORMAT", mrb_fixnum_value(kpse_web_format));
224  mrb_define_const(mrb, klass, "CWEB_FORMAT", mrb_fixnum_value(kpse_cweb_format));
225  mrb_define_const(mrb, klass, "ENC_FORMAT", mrb_fixnum_value(kpse_enc_format));
226  mrb_define_const(mrb, klass, "CMAP_FORMAT", mrb_fixnum_value(kpse_cmap_format));
227  mrb_define_const(mrb, klass, "SFD_FORMAT", mrb_fixnum_value(kpse_sfd_format));
228  mrb_define_const(mrb, klass, "OPENTYPE_FORMAT", mrb_fixnum_value(kpse_opentype_format));
229  mrb_define_const(mrb, klass, "PDFTEX_CONFIG_FORMAT", mrb_fixnum_value(kpse_pdftex_config_format));
230  mrb_define_const(mrb, klass, "LIG_FORMAT", mrb_fixnum_value(kpse_lig_format));
231  mrb_define_const(mrb, klass, "TEXMFSCRIPTS_FORMAT", mrb_fixnum_value(kpse_texmfscripts_format));
232  mrb_define_const(mrb, klass, "LUA_FORMAT", mrb_fixnum_value(kpse_lua_format));
233  mrb_define_const(mrb, klass, "FEA_FORMAT", mrb_fixnum_value(kpse_fea_format));
234  mrb_define_const(mrb, klass, "CID_FORMAT", mrb_fixnum_value(kpse_cid_format));
235  mrb_define_const(mrb, klass, "MLBIB_FORMAT", mrb_fixnum_value(kpse_mlbib_format));
236  mrb_define_const(mrb, klass, "MLBST_FORMAT", mrb_fixnum_value(kpse_mlbst_format));
237  mrb_define_const(mrb, klass, "CLUA_FORMAT", mrb_fixnum_value(kpse_clua_format));
238  mrb_define_const(mrb, klass, "RIS_FORMAT", mrb_fixnum_value(kpse_ris_format));
239  mrb_define_const(mrb, klass, "BLTXML_FORMAT", mrb_fixnum_value(kpse_bltxml_format));
240  mrb_define_const(mrb, klass, "LAST_FORMAT", mrb_fixnum_value(kpse_last_format));
241  /* types.h, kpse_src_type */
242  mrb_define_const(mrb, klass, "SRC_IMPLICIT", mrb_fixnum_value(kpse_src_implicit));
243  mrb_define_const(mrb, klass, "SRC_COMPILE", mrb_fixnum_value(kpse_src_compile));
244  mrb_define_const(mrb, klass, "SRC_TEXMF_CNF", mrb_fixnum_value(kpse_src_texmf_cnf));
245  mrb_define_const(mrb, klass, "SRC_CLIENT_CNF", mrb_fixnum_value(kpse_src_client_cnf));
246  mrb_define_const(mrb, klass, "SRC_ENV", mrb_fixnum_value(kpse_src_env));
247  mrb_define_const(mrb, klass, "SRC_X", mrb_fixnum_value(kpse_src_x));
248  mrb_define_const(mrb, klass, "SRC_CMDLINE", mrb_fixnum_value(kpse_src_cmdline));
249  /* expand.h */
250  mrb_define_class_method(mrb, klass, "brace_expand", mrb_kpse_brace_expand, MRB_ARGS_REQ(1));
251  mrb_define_class_method(mrb, klass, "path_expand", mrb_kpse_path_expand, MRB_ARGS_REQ(1));
252  /* lib.h */
253  mrb_define_class_method(mrb, klass, "xputenv", mrb_kpse_xputenv, MRB_ARGS_REQ(2));
254  mrb_define_class_method(mrb, klass, "xputenv_int", mrb_kpse_xputenv_int, MRB_ARGS_REQ(2));
255  /* proginit.h */
256  mrb_define_class_method(mrb, klass, "init_prog", mrb_kpse_init_prog, MRB_ARGS_REQ(4));
257  /* progname.h */
258  mrb_define_class_method(mrb, klass, "set_program_name", mrb_kpse_set_program_name, MRB_ARGS_REQ(2));
259  /* readable.h */
260  mrb_define_class_method(mrb, klass, "readable_file", mrb_kpse_readable_file, MRB_ARGS_REQ(1));
261  /* tex-file.h */
262  mrb_define_class_method(mrb, klass, "set_program_enabled", mrb_kpse_set_program_enabled, MRB_ARGS_REQ(3));
263  mrb_define_class_method(mrb, klass, "maketex_option", mrb_kpse_maketex_option, MRB_ARGS_REQ(2));
264  mrb_define_class_method(mrb, klass, "init_format", mrb_kpse_init_format, MRB_ARGS_REQ(1));
265  mrb_define_class_method(mrb, klass, "in_name_ok", mrb_kpse_in_name_ok, MRB_ARGS_REQ(1));
266  mrb_define_class_method(mrb, klass, "out_name_ok", mrb_kpse_out_name_ok, MRB_ARGS_REQ(1));
267  mrb_define_class_method(mrb, klass, "find_file", mrb_kpse_find_file, MRB_ARGS_REQ(3));
268  mrb_define_class_method(mrb, klass, "reset_program_name", mrb_kpse_reset_program_name, MRB_ARGS_REQ(1));
269  /* tex-make.h */
270  mrb_define_class_method(mrb, klass, "make_tex", mrb_kpse_make_tex, MRB_ARGS_REQ(2));
271  /* variable.h */
272  mrb_define_class_method(mrb, klass, "var_value", mrb_kpse_var_value, MRB_ARGS_REQ(1));
273  mrb_define_class_method(mrb, klass, "var_expand", mrb_kpse_var_expand, MRB_ARGS_REQ(1));
274 }
275 
277 {
278 }
279 
281 {
283  mrb_get_args(mrb, "b", &enable);
284  return mrb_nil_value();
285 }
286 
288 {
289  return mrb_str_new_cstr(mrb, get_enc_string());
290 }
291 
293 {
294  char * file;
295  char * inter;
296  mrb_get_args(mrb, "z!z!", &file, &inter);
297  return mrb_bool_value(set_enc_string(file, inter));
298 }
299 
301 {
302  mrb_int kcode;
303  mrb_get_args(mrb, "i", &kcode);
304  return mrb_fixnum_value(toDVI(kcode));
305 }
306 
308 {
309  mrb_int kcode;
310  mrb_get_args(mrb, "i", &kcode);
311  return mrb_fixnum_value(fromDVI(kcode));
312 }
313 
315 {
316  mrb_int kcode;
317  mrb_get_args(mrb, "i", &kcode);
318  return mrb_fixnum_value(toJIS(kcode));
319 }
320 
322 {
323  mrb_int jis;
324  mrb_get_args(mrb, "i", &jis);
325  return mrb_fixnum_value(fromJIS(jis));
326 }
327 
329 {
330  mrb_int euc;
331  mrb_get_args(mrb, "i", &euc);
332  return mrb_fixnum_value(fromEUC(euc));
333 }
334 
336 {
337  mrb_int sjis;
338  mrb_get_args(mrb, "i", &sjis);
339  return mrb_fixnum_value(fromSJIS(sjis));
340 }
341 
343 {
344  mrb_int kuten;
345  mrb_get_args(mrb, "i", &kuten);
346  return mrb_fixnum_value(fromKUTEN(kuten));
347 }
348 
350 {
351  mrb_int ucs;
352  mrb_get_args(mrb, "i", &ucs);
353  return mrb_fixnum_value(fromUCS(ucs));
354 }
355 
357 {
358  mrb_int kcode;
359  mrb_get_args(mrb, "i", &kcode);
360  return mrb_fixnum_value(toUCS(kcode));
361 }
362 
364 {
365  mrb_int ucs;
366  mrb_get_args(mrb, "i", &ucs);
367  return mrb_fixnum_value(UCStoUTF8(ucs));
368 }
369 
371 {
372  struct RClass * klass = mrb_define_module(mrb, "PTEXENC");
373  mrb_define_class_method(mrb, klass, "enable_UPTEX", mrb_ptexenc_enable_UPTEX, MRB_ARGS_REQ(1));
374  mrb_define_class_method(mrb, klass, "get_enc_string", mrb_ptexenc_get_enc_string, MRB_ARGS_NONE());
375  mrb_define_class_method(mrb, klass, "set_enc_string", mrb_ptexenc_set_enc_string, MRB_ARGS_REQ(2));
376  mrb_define_class_method(mrb, klass, "toDVI", mrb_ptexenc_toDVI, MRB_ARGS_REQ(1));
377  mrb_define_class_method(mrb, klass, "fromDVI", mrb_ptexenc_fromDVI, MRB_ARGS_REQ(1));
378  mrb_define_class_method(mrb, klass, "toJIS", mrb_ptexenc_toJIS, MRB_ARGS_REQ(1));
379  mrb_define_class_method(mrb, klass, "fromJIS", mrb_ptexenc_fromJIS, MRB_ARGS_REQ(1));
380  mrb_define_class_method(mrb, klass, "fromEUC", mrb_ptexenc_fromEUC, MRB_ARGS_REQ(1));
381  mrb_define_class_method(mrb, klass, "fromSJIS", mrb_ptexenc_fromSJIS, MRB_ARGS_REQ(1));
382  mrb_define_class_method(mrb, klass, "fromKUTEN", mrb_ptexenc_fromKUTEN, MRB_ARGS_REQ(1));
383  mrb_define_class_method(mrb, klass, "fromUCS", mrb_ptexenc_fromUCS, MRB_ARGS_REQ(1));
384  mrb_define_class_method(mrb, klass, "toUCS", mrb_ptexenc_toUCS, MRB_ARGS_REQ(1));
385  mrb_define_class_method(mrb, klass, "UCStoUTF8", mrb_ptexenc_UCStoUTF8, MRB_ARGS_REQ(1));
386 }
387 
389 {
390 }
391 
393 {
396 }
398 {
401 }
int level
Definition: afm2pl.c:1694
@ kpse_lig_format
Definition: afm2pl.c:372
@ kpse_enc_format
Definition: afm2pl.c:372
@ kpse_afm_format
Definition: afm2pl.c:372
#define name
#define mode
Definition: aptex-macros.h:510
static mrb_value mrb_kpse_path_expand(mrb_state *mrb, mrb_value self)
Definition: aptex-mruby.c:41
static mrb_value mrb_kpse_readable_file(mrb_state *mrb, mrb_value self)
Definition: aptex-mruby.c:77
void mrb_mruby_aptex_gem_init(mrb_state *mrb)
Definition: aptex-mruby.c:392
static mrb_value mrb_kpse_brace_expand(mrb_state *mrb, mrb_value self)
Definition: aptex-mruby.c:34
void mrb_mruby_aptex_gem_final(mrb_state *mrb)
Definition: aptex-mruby.c:397
static mrb_value mrb_kpse_make_tex(mrb_state *mrb, mrb_value self)
Definition: aptex-mruby.c:169
static mrb_value mrb_kpse_init_format(mrb_state *mrb, mrb_value self)
Definition: aptex-mruby.c:124
static mrb_value mrb_ptexenc_fromDVI(mrb_state *mrb, mrb_value self)
Definition: aptex-mruby.c:307
static mrb_value mrb_kpse_tex_hush(mrb_state *mrb, mrb_value self)
Definition: aptex-mruby.c:162
static mrb_value mrb_kpse_var_expand(mrb_state *mrb, mrb_value self)
Definition: aptex-mruby.c:99
static mrb_value mrb_kpse_out_name_ok(mrb_state *mrb, mrb_value self)
Definition: aptex-mruby.c:147
static mrb_value mrb_ptexenc_set_enc_string(mrb_state *mrb, mrb_value self)
Definition: aptex-mruby.c:292
static void mrb_mruby_ptexenc_gem_init(mrb_state *mrb)
Definition: aptex-mruby.c:370
static mrb_value mrb_kpse_init_prog(mrb_state *mrb, mrb_value self)
Definition: aptex-mruby.c:66
static mrb_value mrb_ptexenc_toUCS(mrb_state *mrb, mrb_value self)
Definition: aptex-mruby.c:356
static mrb_value mrb_kpse_find_file(mrb_state *mrb, mrb_value self)
Definition: aptex-mruby.c:131
static mrb_value mrb_ptexenc_enable_UPTEX(mrb_state *mrb, mrb_value self)
Definition: aptex-mruby.c:280
static void mrb_mruby_kpathsea_gem_init(mrb_state *mrb)
Definition: aptex-mruby.c:177
static mrb_value mrb_kpse_maketex_option(mrb_state *mrb, mrb_value self)
Definition: aptex-mruby.c:116
static mrb_value mrb_ptexenc_UCStoUTF8(mrb_state *mrb, mrb_value self)
Definition: aptex-mruby.c:363
static mrb_value mrb_ptexenc_fromSJIS(mrb_state *mrb, mrb_value self)
Definition: aptex-mruby.c:335
static mrb_value mrb_kpse_reset_program_name(mrb_state *mrb, mrb_value self)
Definition: aptex-mruby.c:154
static mrb_value mrb_ptexenc_fromUCS(mrb_state *mrb, mrb_value self)
Definition: aptex-mruby.c:349
static mrb_value mrb_kpse_set_program_enabled(mrb_state *mrb, mrb_value self)
Definition: aptex-mruby.c:106
static mrb_value mrb_kpse_in_name_ok(mrb_state *mrb, mrb_value self)
Definition: aptex-mruby.c:140
static mrb_value mrb_kpse_xputenv(mrb_state *mrb, mrb_value self)
Definition: aptex-mruby.c:48
static mrb_value mrb_kpse_set_program_name(mrb_state *mrb, mrb_value self)
Definition: aptex-mruby.c:84
static void mrb_mruby_kpathsea_gem_final(mrb_state *mrb)
Definition: aptex-mruby.c:276
static mrb_value mrb_ptexenc_fromEUC(mrb_state *mrb, mrb_value self)
Definition: aptex-mruby.c:328
static mrb_value mrb_kpse_var_value(mrb_state *mrb, mrb_value self)
Definition: aptex-mruby.c:92
static mrb_value mrb_ptexenc_toDVI(mrb_state *mrb, mrb_value self)
Definition: aptex-mruby.c:300
static void mrb_mruby_ptexenc_gem_final(mrb_state *mrb)
Definition: aptex-mruby.c:388
static mrb_value mrb_ptexenc_fromJIS(mrb_state *mrb, mrb_value self)
Definition: aptex-mruby.c:321
static mrb_value mrb_ptexenc_fromKUTEN(mrb_state *mrb, mrb_value self)
Definition: aptex-mruby.c:342
static mrb_value mrb_kpse_xputenv_int(mrb_state *mrb, mrb_value self)
Definition: aptex-mruby.c:57
static mrb_value mrb_ptexenc_toJIS(mrb_state *mrb, mrb_value self)
Definition: aptex-mruby.c:314
static mrb_value mrb_ptexenc_get_enc_string(mrb_state *mrb, mrb_value self)
Definition: aptex-mruby.c:287
int euc
Definition: bkmk2uni.c:1534
const char * program
Definition: dv2dt.c:152
static const char * progname
Definition: cjpeg.c:136
static const char argv0[]
Definition: webpng.c:25
int must_exist
Definition: cidtype2.c:87
@ kpse_src_x
Definition: types.h:175
@ kpse_src_cmdline
Definition: types.h:176
@ kpse_src_compile
Definition: types.h:171
@ kpse_src_client_cnf
Definition: types.h:173
@ kpse_src_texmf_cnf
Definition: types.h:172
@ kpse_src_implicit
Definition: types.h:170
@ kpse_src_env
Definition: types.h:174
@ kpse_web2c_format
Definition: types.h:141
@ kpse_db_format
Definition: types.h:112
@ kpse_vf_format
Definition: types.h:136
@ kpse_bltxml_format
Definition: types.h:161
@ kpse_mft_format
Definition: types.h:118
@ kpse_truetype_format
Definition: types.h:139
@ kpse_fmt_format
Definition: types.h:113
@ kpse_sfd_format
Definition: types.h:149
@ kpse_cnf_format
Definition: types.h:111
@ kpse_tex_ps_header_format
Definition: types.h:133
@ kpse_texpool_format
Definition: types.h:131
@ kpse_troff_font_format
Definition: types.h:134
@ kpse_mem_format
Definition: types.h:115
@ kpse_texsource_format
Definition: types.h:132
@ kpse_miscfonts_format
Definition: types.h:144
@ kpse_opl_format
Definition: types.h:124
@ kpse_dvips_config_format
Definition: types.h:137
@ kpse_program_text_format
Definition: types.h:142
@ kpse_ris_format
Definition: types.h:160
@ kpse_ocp_format
Definition: types.h:122
@ kpse_type1_format
Definition: types.h:135
@ kpse_mlbib_format
Definition: types.h:157
@ kpse_texdoc_format
Definition: types.h:130
@ kpse_tex_format
Definition: types.h:129
@ kpse_cweb_format
Definition: types.h:146
@ kpse_fontmap_format
Definition: types.h:114
@ kpse_pk_format
Definition: types.h:104
@ kpse_program_binary_format
Definition: types.h:143
@ kpse_tfm_format
Definition: types.h:106
@ kpse_texmfscripts_format
Definition: types.h:153
@ kpse_bib_format
Definition: types.h:109
@ kpse_mlbst_format
Definition: types.h:158
@ kpse_otp_format
Definition: types.h:125
@ kpse_mpsupport_format
Definition: types.h:121
@ kpse_gf_format
Definition: types.h:103
@ kpse_ist_format
Definition: types.h:138
@ kpse_pdftex_config_format
Definition: types.h:151
@ kpse_any_glyph_format
Definition: types.h:105
@ kpse_last_format
Definition: types.h:162
@ kpse_cmap_format
Definition: types.h:148
@ kpse_mf_format
Definition: types.h:116
@ kpse_fea_format
Definition: types.h:155
@ kpse_opentype_format
Definition: types.h:150
@ kpse_ovf_format
Definition: types.h:126
@ kpse_lua_format
Definition: types.h:154
@ kpse_base_format
Definition: types.h:108
@ kpse_mppool_format
Definition: types.h:120
@ kpse_pict_format
Definition: types.h:128
@ kpse_web_format
Definition: types.h:145
@ kpse_bst_format
Definition: types.h:110
@ kpse_type42_format
Definition: types.h:140
@ kpse_ofm_format
Definition: types.h:123
@ kpse_mp_format
Definition: types.h:119
@ kpse_cid_format
Definition: types.h:156
@ kpse_clua_format
Definition: types.h:159
@ kpse_ovp_format
Definition: types.h:127
@ kpse_mfpool_format
Definition: types.h:117
long UCStoUTF8(long ucs)
Definition: unicode.c:99
const_string get_enc_string(void)
Definition: ptexenc.c:171
long toUCS(long kcode)
Definition: ptexenc.c:390
long fromUCS(long kcode)
Definition: ptexenc.c:381
long toJIS(long kcode)
Definition: ptexenc.c:335
long toDVI(long kcode)
Definition: ptexenc.c:319
long fromEUC(long kcode)
Definition: ptexenc.c:344
boolean set_enc_string(const_string file_str, const_string internal_str)
Definition: ptexenc.c:185
long fromSJIS(long kcode)
Definition: ptexenc.c:359
long fromDVI(long kcode)
Definition: ptexenc.c:311
long fromJIS(long kcode)
Definition: ptexenc.c:327
long fromKUTEN(long kcode)
Definition: ptexenc.c:374
#define prefix
Definition: cwebboot.c:154
long ucs
Definition: main-euc.c:16
mrb_int mrb_get_args(mrb_state *mrb, mrb_args_format format,...)
Definition: class.c:891
mrb_value mrb_str_new_cstr(mrb_state *, const char *)
Definition: string.c:203
#define MRB_ARGS_NONE()
Definition: mruby.h:879
#define MRB_ARGS_REQ(n)
Definition: mruby.h:837
union value value
Definition: obx.h:44
static int format
Definition: pbmclean.c:15
static int dpi
Definition: pbmtolj.c:33
char * fname
Definition: plain2.c:121
#define mrb_define_class_method(mrb, c, name, f, a)
Definition: scanning.h:16
#define mrb_define_module(mrb, name)
Definition: scanning.h:20
#define mrb_define_const(mrb, c, name, v)
Definition: scanning.h:23
Definition: class.h:17
Definition: filedef.h:30
Definition: tpic.c:45
Definition: sh.h:1782
pointer path
Definition: t1imager.h:36
char * file
Definition: t4ht.c:931
char fmt[256]
Definition: tex4ht.c:3925
static UBool fallback(char *loc)
Definition: ucurr.cpp:604
Definition: obx.h:51
@ enable
Definition: preamble.c:51
int32_t mrb_int
Definition: value.h:35
static mrb_value mrb_nil_value(void)
Definition: value.h:332
static mrb_value mrb_bool_value(mrb_bool boolean)
Definition: value.h:360
static mrb_value mrb_fixnum_value(mrb_int i)
Definition: value.h:301