New upstream version 2017.20170613.44572
Norbert Preining
6 years ago
1 | 1 | # Attempt to guess a canonical system name. |
2 | 2 | # Copyright 1992-2017 Free Software Foundation, Inc. |
3 | 3 | |
4 | timestamp='2017-05-11' | |
4 | timestamp='2017-05-27' | |
5 | 5 | |
6 | 6 | # This file is free software; you can redistribute it and/or modify it |
7 | 7 | # under the terms of the GNU General Public License as published by |
1303 | 1303 | if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then |
1304 | 1304 | if [ "$CC_FOR_BUILD" != no_compiler_found ]; then |
1305 | 1305 | if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ |
1306 | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
1307 | grep IS_64BIT_ARCH >/dev/null | |
1306 | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
1307 | grep IS_64BIT_ARCH >/dev/null | |
1308 | 1308 | then |
1309 | 1309 | case $UNAME_PROCESSOR in |
1310 | 1310 | i386) UNAME_PROCESSOR=x86_64 ;; |
1311 | 1311 | powerpc) UNAME_PROCESSOR=powerpc64 ;; |
1312 | 1312 | esac |
1313 | fi | |
1314 | # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc | |
1315 | if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ | |
1316 | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
1317 | grep IS_PPC >/dev/null | |
1318 | then | |
1319 | UNAME_PROCESSOR=powerpc | |
1313 | 1320 | fi |
1314 | 1321 | fi |
1315 | 1322 | elif test "$UNAME_PROCESSOR" = i386 ; then |
2 | 2 | % Load plain if necessary, i.e., if running under initex. |
3 | 3 | \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi |
4 | 4 | % |
5 | \def\texinfoversion{2017-05-14.14} | |
5 | \def\texinfoversion{2017-06-04.19} | |
6 | 6 | % |
7 | 7 | % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, |
8 | 8 | % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, |
5492 | 5492 | \let\indexlbrace\{ % Likewise, set these sequences for braces |
5493 | 5493 | \let\indexrbrace\} % used in the sort key. |
5494 | 5494 | \begindoublecolumns |
5495 | \let\entrywidowpenalty=\indexwidowpenalty | |
5495 | \let\dotheinsertentrybox\dotheinsertentryboxwithpenalty | |
5496 | 5496 | % |
5497 | 5497 | % Read input from the index file line by line. |
5498 | 5498 | \loopdo |
5499 | \ifeof1 | |
5500 | \let\firsttoken\relax | |
5501 | \else | |
5499 | \ifeof1 \else | |
5502 | 5500 | \read 1 to \nextline |
5503 | \edef\act{\gdef\noexpand\firsttoken{\getfirsttoken\nextline}}% | |
5504 | \act | |
5505 | 5501 | \fi |
5502 | % | |
5503 | \indexinputprocessing | |
5506 | 5504 | \thisline |
5507 | 5505 | % |
5508 | 5506 | \ifeof1\else |
5514 | 5512 | \fi |
5515 | 5513 | \closein 1 |
5516 | 5514 | \endgroup} |
5517 | ||
5515 | \def\loopdo#1\repeat{\def\body{#1}\loopdoxxx} | |
5516 | \def\loopdoxxx{\let\next=\relax\body\let\next=\loopdoxxx\fi\next} | |
5517 | ||
5518 | \def\indexinputprocessing{% | |
5519 | \ifeof1 | |
5520 | \let\firsttoken\relax | |
5521 | \else | |
5522 | \edef\act{\gdef\noexpand\firsttoken{\getfirsttoken\nextline}}% | |
5523 | \act | |
5524 | \fi | |
5525 | } | |
5518 | 5526 | \def\getfirsttoken#1{\expandafter\getfirsttokenx#1\endfirsttoken} |
5519 | 5527 | \long\def\getfirsttokenx#1#2\endfirsttoken{\noexpand#1} |
5520 | 5528 | |
5521 | \def\loopdo#1\repeat{\def\body{#1}\loopdoxxx} | |
5522 | \def\loopdoxxx{\let\next=\relax\body\let\next=\loopdoxxx\fi\next} | |
5523 | 5529 | |
5524 | 5530 | % These macros are used by the sorted index file itself. |
5525 | 5531 | % Change them to control the appearance of the index. |
5596 | 5602 | % For pdfTeX and XeTeX. |
5597 | 5603 | % The redefinition of \domark stops marks being added in \pdflink to |
5598 | 5604 | % preserve coloured links across page boundaries. Otherwise the marks |
5599 | % would get in the way of \lastbox in \insertindexentrybox. | |
5605 | % would get in the way of \lastbox in \insertentrybox. | |
5600 | 5606 | \let\domark\relax |
5601 | 5607 | % |
5602 | 5608 | % Start a new paragraph if necessary, so our assignments below can't |
5657 | 5663 | \fi |
5658 | 5664 | \egroup % end \boxA |
5659 | 5665 | \ifdim\wd\boxB = 0pt |
5660 | \global\setbox\entryindexbox=\vbox{\unhbox\boxA}% | |
5666 | \global\setbox\entrybox=\vbox{\unhbox\boxA}% | |
5661 | 5667 | \else |
5662 | \global\setbox\entryindexbox=\vbox\bgroup | |
5668 | \global\setbox\entrybox=\vbox\bgroup | |
5663 | 5669 | % We want the text of the entries to be aligned to the left, and the |
5664 | 5670 | % page numbers to be aligned to the right. |
5665 | 5671 | % |
5721 | 5727 | \egroup % The \vbox |
5722 | 5728 | \fi |
5723 | 5729 | \endgroup |
5724 | % delay text of entry until after penalty | |
5725 | \bgroup\aftergroup\insertindexentrybox | |
5726 | \entrywidowpenalty | |
5730 | \dotheinsertentrybox | |
5727 | 5731 | }} |
5728 | 5732 | |
5729 | 5733 | \newskip\thinshrinkable |
5730 | 5734 | \skip\thinshrinkable=.15em minus .15em |
5731 | 5735 | |
5732 | \newbox\entryindexbox | |
5733 | \def\insertindexentrybox{% | |
5734 | \ourunvbox\entryindexbox | |
5735 | } | |
5736 | \newbox\entrybox | |
5737 | \def\insertentrybox{% | |
5738 | \ourunvbox\entrybox | |
5739 | } | |
5740 | ||
5741 | % default definition | |
5742 | \let\dotheinsertentrybox\insertentrybox | |
5736 | 5743 | |
5737 | 5744 | % Use \lastbox to take apart vbox box by box, and add each sub-box |
5738 | 5745 | % to the current vertical list. |
5756 | 5763 | \newbox\delayedbox |
5757 | 5764 | \newbox\interbox |
5758 | 5765 | |
5759 | % Default is no penalty | |
5760 | \let\entrywidowpenalty\egroup | |
5761 | ||
5762 | 5766 | % Used from \printindex. \firsttoken should be the first token |
5763 | 5767 | % after the \entry. If it's not another \entry, we are at the last |
5764 | 5768 | % line of a group of index entries, so insert a penalty to discourage |
5765 | 5769 | % widowed index entries. |
5766 | \long\def\indexwidowpenalty{% | |
5767 | \def\isentry{\entry}% | |
5770 | \def\dotheinsertentryboxwithpenalty{% | |
5768 | 5771 | \ifx\firsttoken\isentry |
5769 | 5772 | \else |
5770 | 5773 | \penalty 9000 |
5771 | 5774 | \fi |
5772 | \egroup % now comes the box added with \aftergroup | |
5773 | } | |
5775 | \insertentrybox | |
5776 | } | |
5777 | \def\isentry{\entry}% | |
5774 | 5778 | |
5775 | 5779 | % Like plain.tex's \dotfill, except uses up at least 1 em. |
5776 | 5780 | % The filll stretch here overpowers both the fil and fill stretch to push |
0 | 2017-06-11 Akira Kakuto <kakuto@fuk.kindai.ac.jp> | |
1 | ||
2 | * mktexfmt.c: Use fmtutil-user for consistency with other platforms. | |
3 | ||
4 | 2017-06-04 Akira Kakuto <kakuto@fuk.kindai.ac.jp> | |
5 | ||
6 | * mktexfmt.c: Adapt to the new fmtutil.pl in TeX Live. | |
7 | ||
0 | 8 | 2016-04-06 Akira Kakuto <kakuto@fuk.kindai.ac.jp> |
1 | 9 | |
2 | 10 | * All *.c, *.h files: Copyright year 2016. |
0 | 0 | /* mktexfmt.c |
1 | 1 | |
2 | Copyright 2000, 2016 Akira Kakuto. | |
2 | Copyright 2000, 2017 Akira Kakuto. | |
3 | 3 | |
4 | 4 | This library is free software; you can redistribute it and/or |
5 | 5 | modify it under the terms of the GNU Lesser General Public |
20 | 20 | */ |
21 | 21 | #include <kpathsea/kpathsea.h> |
22 | 22 | |
23 | #define VERSION "0.1" | |
23 | #define VERSION "0.2" | |
24 | 24 | |
25 | 25 | int main(int ac, char **av) |
26 | 26 | { |
33 | 33 | char texbindir[256]; |
34 | 34 | char fullbin[256]; |
35 | 35 | |
36 | int is_w32tex; | |
37 | ||
36 | 38 | kpse_set_program_name(av[0], NULL); |
39 | ||
40 | p = kpse_var_value("jtex_filetype"); | |
41 | ||
42 | if (p) { | |
43 | is_w32tex = 1; | |
44 | free(p); | |
45 | } else { | |
46 | is_w32tex = 0; | |
47 | } | |
37 | 48 | |
38 | 49 | p = kpse_program_name; |
39 | 50 | if(ac != 2) { |
40 | 51 | fprintf(stderr,"%s : Usage %s formatname\n", p, p); |
41 | fprintf(stderr,"formatname : (foo.fmt, foo.nfmt, foo.mem, foo.base)\n"); | |
52 | fprintf(stderr,"formatname : (foo.fmt, foo.base, foo.mem)\n"); | |
42 | 53 | return 1; |
43 | 54 | } |
44 | 55 | if(!strncmp(av[1], "-h", 2) || !strncmp(av[1], "--h", 3)) { |
45 | 56 | fprintf(stderr,"%s : Usage %s formatname\n", p, p); |
46 | fprintf(stderr,"formatname : (foo.fmt, foo.nfmt, foo.mem, foo.base)\n"); | |
57 | fprintf(stderr,"formatname : (foo.fmt, foo.base, foo.mem)\n"); | |
47 | 58 | return 0; |
48 | 59 | } |
49 | 60 | if(!strncmp(av[1], "-v", 2) || !strncmp(av[1], "--v", 3)) { |
76 | 87 | return 1; |
77 | 88 | } |
78 | 89 | |
79 | if(stricmp(p, ".fmt") && stricmp(p, ".nfmt") && | |
80 | stricmp(p, ".base") && stricmp(p, ".mem")) { | |
90 | if(stricmp(p, ".fmt") && stricmp(p, ".base") && stricmp(p, ".mem")) { | |
81 | 91 | fprintf(stderr, "%s : unknown format type.\n", av[1]); |
82 | 92 | return 1; |
83 | 93 | } |
100 | 110 | |
101 | 111 | /* COMMAND */ |
102 | 112 | strcpy(fullbin, texbindir); |
103 | strcat(fullbin, "fmtutil.exe"); | |
104 | fprintf(stderr, "Running the command %s\n", fullbin); | |
105 | _spawnlp(_P_WAIT, fullbin, "fmtutil", "--byfmt", av[1], NULL); | |
106 | ||
113 | if (is_w32tex) { | |
114 | strcat(fullbin, "fmtutil.exe"); | |
115 | fprintf(stderr, "Running the command %s\n", fullbin); | |
116 | _spawnlp(_P_WAIT, fullbin, "fmtutil", "--byfmt", av[1], NULL); | |
117 | } else { | |
118 | strcat(fullbin, "fmtutil-user.exe"); | |
119 | fprintf(stderr, "Running the command %s\n", fullbin); | |
120 | _spawnlp(_P_WAIT, fullbin, "fmtutil-user", "--byfmt", av[1], NULL); | |
121 | } | |
107 | 122 | /* END COMMAND */ |
108 | 123 | |
109 | 124 | /* return to original stdout and stdin */ |
0 | 2017-06-11 TANAKA Takuji <ttk@t-lab.opal.ne.jp> | |
1 | ||
2 | * dvibook.c, dviconcat.c, dviselect.c, dvitodvi.c: | |
3 | Show usage and exit if stdin is set to a keyboard. | |
4 | ||
0 | 5 | 2015-10-05 Peter Breitenlohner <peb@mppmu.mpg.de> |
1 | 6 | |
2 | 7 | * dvitodvi.c (ParseSpecs): Avoid to return the address of a |
445 | 445 | inf = stdin; |
446 | 446 | if (!isatty(fileno(inf))) |
447 | 447 | SET_BINARY(fileno(inf)); |
448 | else | |
449 | goto usage; | |
448 | 450 | } else if ((inf = fopen(DVIFileName, FOPEN_RBIN_MODE)) == 0) |
449 | 451 | error(1, -1, "cannot read %s", DVIFileName); |
450 | 452 | if (outname == NULL) { |
436 | 436 | if (optind >= argc) { |
437 | 437 | if (!isatty(fileno(stdin))) |
438 | 438 | SET_BINARY(fileno(stdin)); |
439 | else | |
440 | goto usage; | |
439 | 441 | doit("`stdin'", stdin); |
440 | 442 | } |
441 | 443 | else { |
444 | 446 | if (*s == '-' && s[1] == 0) { |
445 | 447 | if (!isatty(fileno(stdin))) |
446 | 448 | SET_BINARY(fileno(stdin)); |
449 | else | |
450 | goto usage; | |
447 | 451 | doit("`stdin'", stdin); |
448 | 452 | } |
449 | 453 | else if ((f = fopen(s, FOPEN_RBIN_MODE)) == NULL) { |
574 | 574 | inf = stdin; |
575 | 575 | if (!isatty(fileno(inf))) |
576 | 576 | SET_BINARY(fileno(inf)); |
577 | else | |
578 | goto usage; | |
577 | 579 | } else if ((inf = fopen(DVIFileName, FOPEN_RBIN_MODE)) == 0) |
578 | 580 | error(1, -1, "cannot read %s", DVIFileName); |
579 | 581 |
687 | 687 | inf = stdin; |
688 | 688 | if (!isatty(fileno(inf))) |
689 | 689 | SET_BINARY(fileno(inf)); |
690 | else | |
691 | goto usage; | |
690 | 692 | } else if ((inf = fopen(DVIFileName, FOPEN_RBIN_MODE)) == 0) |
691 | 693 | error(1, -1, "cannot read %s", DVIFileName); |
692 | 694 | if (outname == NULL) { |
107 | 107 | diadia/diadia.lua \ |
108 | 108 | dosepsbin/dosepsbin.pl \ |
109 | 109 | dviasm/dviasm.py \ |
110 | dviinfox/dviinfox.pl \ | |
110 | 111 | ebong/ebong.py \ |
111 | 112 | epspdf/epspdf.tlu \ |
112 | 113 | epspdf/epspdftk.tcl \ |
322 | 322 | diadia/diadia.lua \ |
323 | 323 | dosepsbin/dosepsbin.pl \ |
324 | 324 | dviasm/dviasm.py \ |
325 | dviinfox/dviinfox.pl \ | |
325 | 326 | ebong/ebong.py \ |
326 | 327 | epspdf/epspdf.tlu \ |
327 | 328 | epspdf/epspdftk.tcl \ |
0 | #!/usr/bin/env perl | |
1 | ||
2 | # dviinfox | |
3 | # ======== | |
4 | # | |
5 | # This script is a joint effort of | |
6 | # Dag Langmyhr, Department of Informatics, University of Oslo | |
7 | # (dag at ifi.uio.no) | |
8 | # and | |
9 | # Hironobu Yamashita, Japanese TeX Development Community | |
10 | # (h.y.acetaminophen at gmail.com) | |
11 | # | |
12 | # A program to print information about a DVI file. | |
13 | # | |
14 | # Usage: dviinfox [options] file1 file2 ... | |
15 | # where the flags indicate which information is desired. | |
16 | # -f Give information about the fonts used. | |
17 | # -p Give information about the number of pages. | |
18 | # -v List the program version number. | |
19 | # -h Show help message. | |
20 | # No options will provide all information available. | |
21 | # | |
22 | # Example: | |
23 | # % dviinfox alltt.dvi | |
24 | # alltt.dvi: DVI format 2; 3 pages | |
25 | # Magnification: 1000/1000 | |
26 | # Size unit: 1000x25400000/(1000x473628672)dum = 0.054dum = 1.000sp | |
27 | # Page size: 407ptx682pt = 14.340cmx23.970cm | |
28 | # Stack size: 8 | |
29 | # Comment: " TeX output 1995.07.07:1513" | |
30 | # Font 27: cmr9 at 9.000 (design size 9.000, checksum=1874103239) | |
31 | # Font 26: cmsy6 at 6.000 (design size 6.000, checksum=1906386187) | |
32 | # Font 21: cmr8 at 8.000 (design size 8.000, checksum=2088458503) | |
33 | # Font 20: cmsy10 at 12.000 (design size 10.000, checksum=555887770) | |
34 | # Font 16: cmr12 at 12.000 (design size 12.000, checksum=1487622411) | |
35 | # Font 15: cmtt12 at 17.280 (design size 12.000, checksum=3750147412) | |
36 | # Font 14: cmr17 at 17.280 (design size 17.280, checksum=1154739572) | |
37 | # Font 13: cmsy10 at 10.000 (design size 10.000, checksum=555887770) | |
38 | # Font 7: cmr10 at 10.000 (design size 10.000, checksum=1274110073) | |
39 | # Font 6: cmr7 at 7.000 (design size 7.000, checksum=3650330706) | |
40 | ||
41 | use strict; | |
42 | ||
43 | my $Prog = "dviinfox"; | |
44 | my $Version = "1.04"; | |
45 | my $Author = "Dag Langmyhr and Hironobu Yamashita"; | |
46 | ||
47 | my $True = 1; | |
48 | my $False = 0; | |
49 | ||
50 | my $List_all = $True; | |
51 | my $List_fonts = $False; | |
52 | my $List_pages = $False; | |
53 | ||
54 | # DVI commands: | |
55 | my $DVI_Filler = "\337"; # 223 = 0xdf | |
56 | my $DVI_Font = "\363"; # 243 = 0xf3 | |
57 | my $DVI_Post = "\370"; # 248 = 0xf8 | |
58 | my $DVI_Post_post = "\371"; # 249 = 0xf9 | |
59 | my $DVI_Pre = "\367"; # 247 = 0xf7 | |
60 | my $XDV_Font = "\374"; # 252 = 0xfc | |
61 | ||
62 | my $Unit; | |
63 | ||
64 | if (!@ARGV) { | |
65 | show_usage(); | |
66 | print "Try \"$Prog -h\" for more information.\n"; | |
67 | } | |
68 | ||
69 | Param: | |
70 | foreach (@ARGV) { | |
71 | /^-f$/ && do { | |
72 | $List_fonts = $True; $List_all = $False; next Param; }; | |
73 | /^-p$/ && do { | |
74 | $List_pages = $True; $List_all = $False; next Param; }; | |
75 | /^-v$/ && do { | |
76 | show_version(); next Param; }; | |
77 | /^-h$/ && do { | |
78 | show_help(); next Param; }; | |
79 | /^-/ && do { | |
80 | print STDERR "$Prog: Unknown option '$_' ignored.\n"; next Param; }; | |
81 | ||
82 | &Read_DVI_file($_); | |
83 | } | |
84 | ||
85 | exit 0; | |
86 | ||
87 | # Only sub definitions from here on | |
88 | ||
89 | sub show_version { | |
90 | print "This is $Prog $Version, by $Author\n"; | |
91 | } | |
92 | ||
93 | sub show_usage { | |
94 | show_version(); | |
95 | print "Usage: $Prog [-f][-p][-v] file...\n"; | |
96 | } | |
97 | ||
98 | sub show_help { | |
99 | show_usage(); | |
100 | print "A program to print information about a DVI file.\n"; | |
101 | print "Options:\n"; | |
102 | print " -f Give information about the fonts used.\n"; | |
103 | print " -p Give information about the number of pages.\n"; | |
104 | print " -v List the program version number.\n"; | |
105 | print " -h Show help message.\n"; | |
106 | exit 0; | |
107 | } | |
108 | ||
109 | sub Read_DVI_file { | |
110 | local($_) = @_; | |
111 | my ($c, $cn); | |
112 | my $IS_XDV = 0; | |
113 | ||
114 | print "$_: "; | |
115 | ||
116 | open(F, $_) || do { print STDERR "Could not open!\n\n"; exit 1; }; | |
117 | ||
118 | # First, read info at start of DVI file: | |
119 | ||
120 | if (($c = getc(F)) ne $DVI_Pre) { | |
121 | printf STDERR ("Not a DVI file (first byte is 0x%02x, not 0x%02x)!\n\n", | |
122 | ord($c), ord($DVI_Pre)); | |
123 | close F; exit 1; | |
124 | }; | |
125 | ||
126 | my $Format = ord(getc(F)); | |
127 | my $Numer = &Read4; | |
128 | my $Denom = &Read4; | |
129 | my $Magni = &Read4; | |
130 | my $Comment = &Read_text; | |
131 | ||
132 | # Then, read information at the end of the DVI file: | |
133 | ||
134 | seek(F, -1, 2); | |
135 | while (($c = getc(F)) eq $DVI_Filler) { seek(F, -2, 1); }; | |
136 | my $VersionID = ord($c); | |
137 | # Previously we required equality ($VersionID == $Format). However, | |
138 | # it seems ok even when format id (pre) and version id (post_post) | |
139 | # are different. TeX4ht allows $VersionID <= 10, so we follow it | |
140 | if (($VersionID != $Format) && ($VersionID > 10)) { | |
141 | print STDERR "DVI format error (format: $Format vs id: $VersionID)!\n\n"; | |
142 | close F; exit 1; | |
143 | }; | |
144 | $IS_XDV = 1 if ($Format > 2); | |
145 | ||
146 | seek(F, -6, 1); | |
147 | if (($c = getc(F)) ne $DVI_Post_post) { | |
148 | $cn = ord($c); | |
149 | printf STDERR ("DVI error: Expected POST_POST command, not 0x%02x!\n\n", $cn); | |
150 | close F; exit 1; | |
151 | }; | |
152 | ||
153 | my $Last_post = &Read4; | |
154 | seek(F, $Last_post, 0) || do { | |
155 | print STDERR "Could not locate position $Last_post!\n\n"; | |
156 | close F; exit 1; | |
157 | }; | |
158 | if (($c = getc(F)) ne $DVI_Post) { | |
159 | $cn = ord($c); | |
160 | printf STDERR ("DVI error: Expected POST command, not 0x%02x!\n\n", $cn); | |
161 | close F; exit 1; | |
162 | }; | |
163 | ||
164 | my $Final_page = &Read4; | |
165 | my $Numer2 = &Read4; | |
166 | my $Denom2 = &Read4; | |
167 | my $Magni2 = &Read4; | |
168 | my $Height = &Read4; | |
169 | my $Width = &Read4; | |
170 | my $Stack = &Read2_u; | |
171 | my $Pages = &Read2_u; | |
172 | ||
173 | if ($List_all) { | |
174 | print "DVI format $Format"; | |
175 | print "; id $VersionID" if ($VersionID != $Format); | |
176 | print " (pTeX DVI)" if (($Format == 2) && ($VersionID == 3)); | |
177 | print " (XeTeX XDV)" if ($Format > 2); | |
178 | print "; "; | |
179 | } | |
180 | if ($List_all || $List_pages) { | |
181 | print "$Pages page"; | |
182 | print "s" if ($Pages > 1); | |
183 | }; | |
184 | ||
185 | $Unit = $Magni*$Numer/(1000*$Denom); | |
186 | if ($List_all) { | |
187 | print "\n Magnification: $Magni/1000"; | |
188 | printf("\n Size unit: %dx$Numer/(1000x$Denom)dum = %5.3fdum = %5.3fsp", | |
189 | $Magni, $Unit, &Scale_to_sp(1)); | |
190 | printf("\n Page size: %dptx%dpt = %5.3fcmx%5.3fcm", | |
191 | &Scale_to_pt($Width), &Scale_to_pt($Height), | |
192 | &Scale_to_cm($Width), &Scale_to_cm($Height)); | |
193 | print "\n Stack size: $Stack"; | |
194 | print "\n Comment: \"$Comment\""; | |
195 | } | |
196 | print "\n"; | |
197 | ||
198 | if ($List_all || $List_fonts) { | |
199 | my ($F_count, $F_check, $F_scale, $F_design, $F_name); | |
200 | my ($F_flag, $F_index, $F_colored, $F_extend, $F_slant, $F_embolden); | |
201 | my $F_tempswa; | |
202 | while (($c = getc(F)) eq $DVI_Font || $c eq $XDV_Font) { | |
203 | # initialize | |
204 | $F_count = 0; | |
205 | $F_check = 0; | |
206 | $F_scale = 0; | |
207 | $F_design = 0; | |
208 | $F_name = ''; | |
209 | $F_flag = 0; | |
210 | $F_index = 0; | |
211 | $F_colored = 0; | |
212 | $F_extend = 0; | |
213 | $F_slant = 0; | |
214 | $F_embolden = 0; | |
215 | if ($c eq $DVI_Font) { | |
216 | # standard DVI: TFM font definition command | |
217 | $F_count = ord(getc(F)); | |
218 | $F_check = &Read4_u; | |
219 | $F_scale = &Read4; | |
220 | $F_design = &Read4; | |
221 | $F_name = &Read_text2; | |
222 | printf(" Font %3d: %9s at %6.3f", | |
223 | $F_count, $F_name, &Scale_to_pt($F_scale)); | |
224 | printf(" (design size %6.3f, ", &Scale_to_pt($F_design)); | |
225 | print "checksum=$F_check)\n"; | |
226 | } else { # $c eq $XDV_Font | |
227 | # extended XDV for XeTeX: Native font definition command | |
228 | if (!$IS_XDV) { | |
229 | printf STDERR ("Erorr: Command %d used in non-XDV file!\n", ord($XDV_Font)); | |
230 | close F; exit 1; | |
231 | } | |
232 | $F_count = &Read4_u; | |
233 | $F_scale = &Read4; | |
234 | $F_flag = &Read2_u; | |
235 | $F_name = &Read_text; | |
236 | $F_index = &Read4_u; | |
237 | $F_colored = &Read4_u if ($F_flag & 512); | |
238 | $F_extend = &Read4_u if ($F_flag & 4096); | |
239 | $F_slant = &Read4_u if ($F_flag & 8192); | |
240 | $F_embolden = &Read4_u if ($F_flag & 16384); | |
241 | printf(" Native Font %3d: %s at %6.3f", | |
242 | $F_count, $F_name, &Scale_to_pt($F_scale)); | |
243 | printf(" (flags 0x%04x, face index %d)\n", $F_flag, $F_index); | |
244 | if ($F_flag) { | |
245 | print(" +features: "); | |
246 | $F_tempswa = 0; | |
247 | if ($F_colored) { | |
248 | printf("Colored=0x%x", $F_colored); | |
249 | $F_tempswa = 1; | |
250 | } | |
251 | if ($F_extend) { | |
252 | print(", ") if ($F_tempswa); | |
253 | printf("Extend=0x%x", $F_extend); | |
254 | $F_tempswa = 1; | |
255 | } | |
256 | if ($F_slant) { | |
257 | print(", ") if ($F_tempswa); | |
258 | printf("Slant=0x%x", $F_slant); | |
259 | $F_tempswa = 1; | |
260 | } | |
261 | if ($F_embolden) { | |
262 | print(", ") if ($F_tempswa); | |
263 | printf("Embolden=0x%x", $F_embolden); | |
264 | $F_tempswa = 1; | |
265 | } | |
266 | print("\n"); | |
267 | } | |
268 | } | |
269 | }; | |
270 | ||
271 | if ($c ne $DVI_Post_post) { | |
272 | $cn = ord($c); | |
273 | printf STDERR ("DVI error: Expected POST_POST command, not 0x%02x!\n", $cn); | |
274 | close F; exit 1; | |
275 | }; | |
276 | ||
277 | print "\n"; | |
278 | }; | |
279 | ||
280 | close F; | |
281 | } | |
282 | ||
283 | ||
284 | # Scale_to_pt (Size) | |
285 | # ----- | |
286 | # Give the Size (which is in dum, the standard DVI size) in pt. | |
287 | sub Scale_to_pt { | |
288 | return $Unit*$_[0]*72.27/254000; | |
289 | } | |
290 | ||
291 | ||
292 | # Scale_to_cm (Size) | |
293 | # ----------- | |
294 | # Give the Size (which is in dum, the standard DVI size) in cm. | |
295 | sub Scale_to_cm { | |
296 | return &Scale_to_pt($_[0])*2.54/72.27; | |
297 | } | |
298 | ||
299 | ||
300 | # Scale_to_sp (Size) | |
301 | # ----------- | |
302 | # Give the Size (which is in dum, the standard DVI size) in sp. | |
303 | sub Scale_to_sp { | |
304 | return &Scale_to_pt($_[0])*65536; | |
305 | } | |
306 | ||
307 | ||
308 | # Read2_u | |
309 | # ------- | |
310 | # Read an unsigned two-byte value. | |
311 | sub Read2_u { | |
312 | return ord(getc(F))*256 + ord(getc(F)); | |
313 | } | |
314 | ||
315 | ||
316 | # Read4 | |
317 | # ----- | |
318 | # Read a four-byte value. | |
319 | # (I assume the value is positive and less than 2^31, so the sign bit | |
320 | # won't matter.) | |
321 | sub Read4 { | |
322 | return ((ord(getc(F))*256+ord(getc(F)))*256+ord(getc(F)))*256+ord(getc(F)); | |
323 | } | |
324 | ||
325 | ||
326 | # Read4_u | |
327 | # ----- | |
328 | # Read an unsigned four-byte value. | |
329 | # (I don't know why this works for values >=2^31, and Read4 does not, | |
330 | # but as long as it works...) | |
331 | sub Read4_u { | |
332 | my (@bytes, @sum); | |
333 | ||
334 | $bytes[0] = ord(getc(F)); $bytes[1] = ord(getc(F)); | |
335 | $bytes[2] = ord(getc(F)); $bytes[3] = ord(getc(F)); | |
336 | ||
337 | $sum[0] = $bytes[0]*256 + $bytes[1]; | |
338 | $sum[1] = $bytes[2]*256 + $bytes[3]; | |
339 | ||
340 | return $sum[0]*65536 + $sum[1]; | |
341 | } | |
342 | ||
343 | ||
344 | # Read_text | |
345 | # --------- | |
346 | # Read a text (a one-byte length and the the text byte). | |
347 | sub Read_text { | |
348 | local($_); | |
349 | my ($Leng, $Res); | |
350 | ||
351 | $Leng = ord(getc(F)); read(F, $Res, $Leng); | |
352 | return $Res; | |
353 | } | |
354 | ||
355 | ||
356 | # Read_text2 | |
357 | # ---------- | |
358 | # Like 'Read_text', but the length is the sum of two bytes. | |
359 | sub Read_text2 { | |
360 | local($_); | |
361 | my ($Leng, $Res); | |
362 | ||
363 | $Leng = ord(getc(F)) + ord(getc(F)); read(F, $Res, $Leng); | |
364 | return $Res; | |
365 | } |
1 | 1 | |
2 | 2 | # File : makeglossaries |
3 | 3 | # Author : Nicola Talbot |
4 | # Version : 2.20 | |
4 | # Version : 2.21 | |
5 | 5 | # Description: simple Perl script that calls makeindex or xindy. |
6 | 6 | # Intended for use with "glossaries.sty" (saves having to remember |
7 | 7 | # all the various switches) |
24 | 24 | # and the derived files glossaries.sty, mfirstuc.sty, |
25 | 25 | # glossary-hypernav.sty, glossary-list.sty, glossary-long.sty, |
26 | 26 | # glossary-super.sty, glossaries.perl. |
27 | # Also makeglossaries and makeglossaries. | |
28 | ||
29 | my $version="2.20 (2016-12-16)"; | |
27 | # Also makeglossaries and makeglossaries-lite.lua. | |
28 | ||
29 | my $version="2.21 (2017-05-11)"; | |
30 | 30 | |
31 | 31 | # History: |
32 | # v2.21: | |
33 | # * Fixed spelling of \GlsAddXdyLocation | |
34 | # * Adjusted range encap clash | |
32 | 35 | # v2.20 (2016/12/16) |
33 | 36 | # * Added check for \glsxtr@makeglossaries |
34 | 37 | # v2.19 (2016/05/27) |
221 | 224 | 'nomain' => |
222 | 225 | "\nRemember to use package option 'nomain' if you don't\n". |
223 | 226 | "want to use the main glossary.", |
227 | #v2.21: fixed spelling of \GlsAddXdyLocation | |
224 | 228 | 'badlocation' => |
225 | 229 | "You may have forgotten to add a location \n" |
226 | . "class with \\GlsAddLocation or you may have \n" | |
230 | . "class with \\GlsAddXdyLocation or you may have \n" | |
227 | 231 | . "the format incorrect.\n", |
228 | 232 | 'comp207' => "You may need to add 'compatible-2.07' package option.", |
229 | 233 | 'noxdyfile' => "Style file not found. (Have you used \\noist by mistake?)" |
1005 | 1009 | and $entry{'location'} eq $existing->{'location'} |
1006 | 1010 | and $entry{'encap'} ne $existing->{'encap'}) |
1007 | 1011 | { |
1008 | if (&encap_overrides($entry{'encap'}, | |
1009 | $existing->{'encap'})) | |
1012 | $add = 0 if ($add == 1); | |
1013 | ||
1014 | # Range encaps should take precedence. | |
1015 | ||
1016 | if ($entry{'encap'}=~/^[\(\)]/) | |
1017 | { | |
1018 | $add = 2; | |
1019 | ||
1020 | if ($existing->{'encap'}=~/^[\(\)]/) | |
1021 | { | |
1022 | # too complicated, keep both | |
1023 | ||
1024 | last; | |
1025 | } | |
1026 | else | |
1027 | { | |
1028 | # remove existing | |
1029 | ||
1030 | splice @entries, $idx, 1; | |
1031 | ||
1032 | $idx--; | |
1033 | } | |
1034 | } | |
1035 | elsif ($existing->{'encap'}=~/^[\(\)]/) | |
1036 | { | |
1037 | if ($entry{'encap'}=~/^[\(\)]/) | |
1038 | { | |
1039 | # too complicated, keep both | |
1040 | ||
1041 | $add = 1; | |
1042 | last; | |
1043 | } | |
1044 | # (otherwise drop new entry) | |
1045 | } | |
1046 | elsif (&encap_overrides($entry{'encap'}, | |
1047 | $existing->{'encap'})) | |
1010 | 1048 | { |
1011 | 1049 | $entries[$idx] = \%entry; |
1012 | 1050 | } |
1013 | ||
1014 | $add = 0; | |
1015 | 1051 | } |
1016 | 1052 | } |
1017 | 1053 | |
1018 | push @entries, \%entry if $add; | |
1054 | push @entries, \%entry if $add > 0; | |
1019 | 1055 | } |
1020 | 1056 | else |
1021 | 1057 | { |
1059 | 1095 | # For example, what happens in the event of 'textbf' and 'emph'? |
1060 | 1096 | # Should one override the other or be combined? Combining is harder |
1061 | 1097 | # as it would need a corresponding LaTeX command. |
1062 | # Range encaps should take precedence. | |
1098 | # 2.21 check for range encap moved earlier | |
1063 | 1099 | |
1064 | 1100 | sub encap_overrides{ |
1065 | 1101 | my ($newencap, $existing) = @_; |
1066 | ||
1067 | return 0 if ($existing=~/^[\(\)]/); | |
1068 | ||
1069 | return 1 if ($newencap=~/^[\(\)]/); | |
1070 | 1102 | |
1071 | 1103 | ($existing=~/\\glsnumberformat\s*$/ or $newencap!~/\\glsnumberformat\s*$/ ) |
1072 | 1104 | } |
0 | 0 | #!/usr/bin/env perl |
1 | # latexindent.pl, version 3.0.2, 2017-05-12 | |
1 | # latexindent.pl, version 3.1, 2017-05-27 | |
2 | 2 | # |
3 | 3 | # This program is free software: you can redistribute it and/or modify |
4 | 4 | # it under the terms of the GNU General Public License as published by |
66 | 66 | $switches{readLocalSettings} = 'localSettings.yaml'; |
67 | 67 | } |
68 | 68 | |
69 | my $document = LatexIndent::Document->new(name=>"masterdocument",fileName=>$ARGV[0],switches=>\%switches); | |
69 | my $document = LatexIndent::Document->new(name=>"masterDocument",fileName=>$ARGV[0],switches=>\%switches); | |
70 | 70 | $document->latexindent; |
71 | 71 | exit(0); |
3 | 3 | |
4 | 4 | -- Print the usage of the lwarpmk command: |
5 | 5 | |
6 | printversion = "v0.31" | |
6 | printversion = "v0.32" | |
7 | 7 | |
8 | 8 | function printhelp () |
9 | 9 | print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ; |
60 | 60 | |
61 | 61 | function splitfile (destfile,sourcefile) |
62 | 62 | print ("lwarpmk: Splitting " .. sourcefile .. " into " .. destfile) ; |
63 | io.input(sourcefile) | |
63 | local sfile = io.open(sourcefile) | |
64 | 64 | io.output(destfile) |
65 | for line in io.lines() do | |
65 | for line in sfile:lines() do | |
66 | 66 | i,j,copen,cstart,newfilename = string.find (line,"(.*)|(.*)|(.*)|") ; |
67 | 67 | if ( (i~= nil) and (copen == "<!--") and (cstart == "Start file")) then -- split the file |
68 | 68 | io.output(newfilename) ; |
70 | 70 | io.write (line .. "\n") ; |
71 | 71 | end |
72 | 72 | end -- do |
73 | io.close(sfile) | |
73 | 74 | end -- function |
74 | 75 | |
75 | 76 | -- Incorrect value, so print an error and exit. |
101 | 102 | else -- file exists |
102 | 103 | -- Read the file: |
103 | 104 | print ("lwarpmk: Reading " .. conffile ..".") |
104 | io.input(conffile) ; | |
105 | local cfile = io.open(conffile) | |
105 | 106 | -- Scan each line: |
106 | 107 | local linenum = 0 |
107 | for line in io.lines() do -- scan lines | |
108 | for line in cfile:lines() do -- scan lines | |
108 | 109 | linenum = linenum + 1 |
109 | 110 | i,j,cvarname,cvalue = string.find (line,"([%w-_]*)%s*=%s*\"([%w%-_%.]*)\"") ; |
110 | 111 | -- Error if incorrect enclosing characters: |
145 | 146 | os.exit(1) ; |
146 | 147 | end |
147 | 148 | end -- do scan lines |
149 | io.close(cfile) | |
148 | 150 | end -- file exists |
149 | 151 | -- Select some operating-system commands: |
150 | 152 | if opsystem=="Unix" then -- For Unix / Linux / Mac OS: |
184 | 186 | -- Return true if found. |
185 | 187 | |
186 | 188 | function reruntoget (filesource) |
187 | io.input(filesource) | |
188 | for line in io.lines() do | |
189 | if ( string.find(line,"Rerun to get") ~= nil ) then return true end | |
190 | end | |
189 | local fsource = io.open(filesource) | |
190 | for line in fsource:lines() do | |
191 | if ( string.find(line,"Rerun to get") ~= nil ) then | |
192 | io.close(fsource) | |
193 | return true | |
194 | end | |
195 | end | |
196 | io.close(fsource) | |
191 | 197 | return false |
192 | 198 | end |
193 | 199 | |
254 | 260 | -- Create lateximages based on lateximages.txt: |
255 | 261 | function createlateximages () |
256 | 262 | print ("lwarpmk: Creating lateximages.") |
257 | io.input("lateximages.txt") | |
258 | -- Create the lateximages directory, ignore error if alreadt exists | |
263 | local limagesfile = io.open("lateximages.txt") | |
264 | -- Create the lateximages directory, ignore error if already exists | |
259 | 265 | err = os.execute("mkdir lateximages") |
260 | 266 | -- Scan lateximages.txt |
261 | for line in io.lines() do | |
267 | for line in limagesfile:lines() do | |
262 | 268 | -- lwimgpage is the page number in the PDF which has the image |
263 | 269 | -- lwimgnum is the sequential lateximage number to assign for the image |
264 | 270 | i,j,lwimgpage,lwimgnum = string.find (line,"|(.*)|(.*)|") |
286 | 292 | if ( err ~= 0 ) then print ( "lwarpmk: File error.") ; os.exit(1) ; end |
287 | 293 | end |
288 | 294 | end -- do |
295 | io.close(limagesfile) | |
289 | 296 | end -- function |
290 | 297 | |
291 | 298 | -- Use latexmk to compile source and index: |
0 | 0 | #!/usr/bin/env texlua |
1 | 1 | |
2 | 2 | NAME = "ptex2pdf[.lua]" |
3 | VERSION = "0.9" | |
3 | VERSION = "20170604.0" | |
4 | 4 | AUTHOR = "Norbert Preining" |
5 | 5 | AUTHOREMAIL = "norbert@preining.info" |
6 | 6 | SHORTDESC = "Convert Japanese TeX documents to pdf" |
8 | 8 | Main purpose of the script is easy support of Japanese typesetting |
9 | 9 | engines in TeXworks. As TeXworks typesetting setup does not allow |
10 | 10 | for multistep processing, this script runs one of the ptex based |
11 | programs (ptex, uptex, eptex, platex, uplatex) followed by dvipdfmx. | |
11 | programs (ptex, uptex, eptex, euptex, platex, uplatex) followed | |
12 | by dvipdfmx. | |
12 | 13 | ]] |
13 | 14 | USAGE = [[ |
14 | 15 | [texlua] ptex2pdf[.lua] { option | basename[.tex] } ... |
27 | 28 | LICENSECOPYRIGHT = [[ |
28 | 29 | Originally based on musixtex.lua from Bob Tennent. |
29 | 30 | |
30 | (c) Copyright 2016 by Japanese TeX Development Community | |
31 | (c) Copyright 2013-2016 Norbert Preining norbert@preining.info | |
32 | (c) Copyright 2012 Bob Tennent rdt@cs.queensu.ca | |
31 | (c) Copyright 2016-2017 Japanese TeX Development Community | |
32 | (c) Copyright 2013-2017 Norbert Preining norbert@preining.info | |
33 | (c) Copyright 2012 Bob Tennent rdt@cs.queensu.ca | |
33 | 34 | |
34 | 35 | This program is free software; you can redistribute it and/or modify it |
35 | 36 | under the terms of the GNU General Public License as published by the |
72 | 73 | |
73 | 74 | for ptex files: |
74 | 75 | |
75 | | Setting | Value | | |
76 | |-------------|------------------| | |
77 | | Name: | pTeX to pdf | | |
78 | | Program: | ptex2pdf | | |
79 | | Arguments: | -ot | | |
80 | | | $synctexoption | | |
81 | | | $fullname | | |
82 | ||
76 | | Setting | Value | | |
77 | |-------------|--------------------| | |
78 | | Name: | pTeX (ptex2pdf) | | |
79 | | Program: | ptex2pdf | | |
80 | | Arguments: | -ot | | |
81 | | | $synctexoption | | |
82 | | | $fullname | | |
83 | 83 | |
84 | 84 | for platex files: |
85 | 85 | |
86 | | Setting | Value | | |
87 | |-------------|----------------| | |
88 | | Name: | pLaTeX to pdf | | |
89 | | Program: | ptex2pdf | | |
90 | | Arguments: | -l | | |
91 | | | -ot | | |
92 | | | $synctexoption | | |
93 | | | $fullname | | |
86 | | Setting | Value | | |
87 | |-------------|--------------------| | |
88 | | Name: | pLaTeX (ptex2pdf) | | |
89 | | Program: | ptex2pdf | | |
90 | | Arguments: | -l | | |
91 | | | -ot | | |
92 | | | $synctexoption | | |
93 | | | $fullname | | |
94 | 94 | |
95 | 95 | for uptex files: |
96 | 96 | |
97 | | Setting | Value | | |
98 | |-------------|----------------| | |
99 | | Name: | upTeX to pdf | | |
100 | | Program: | ptex2pdf | | |
101 | | Arguments: | -u | | |
102 | | | -ot | | |
103 | | | $synctexoption | | |
104 | | | $fullname | | |
97 | | Setting | Value | | |
98 | |-------------|--------------------| | |
99 | | Name: | upTeX (ptex2pdf) | | |
100 | | Program: | ptex2pdf | | |
101 | | Arguments: | -u | | |
102 | | | -ot | | |
103 | | | $synctexoption | | |
104 | | | $fullname | | |
105 | 105 | |
106 | 106 | for uplatex files: |
107 | 107 | |
108 | | Setting | Value | | |
109 | |-------------|----------------| | |
110 | | Name: | upLaTeX to pdf | | |
111 | | Program: | ptex2pdf | | |
112 | | Arguments: | -l | | |
113 | | | -u | | |
114 | | | -ot | | |
115 | | | $synctexoption | | |
116 | | | $fullname | | |
108 | | Setting | Value | | |
109 | |-------------|--------------------| | |
110 | | Name: | upLaTeX (ptex2pdf) | | |
111 | | Program: | ptex2pdf | | |
112 | | Arguments: | -l | | |
113 | | | -u | | |
114 | | | -ot | | |
115 | | | $synctexoption | | |
116 | | | $fullname | | |
117 | 117 | |
118 | 118 | If you need special kanji encodings for one of these programs, |
119 | add the respective `-kanji` option after the `$synctexoption`. Example: | |
119 | add the respective `-kanji` option with the `$synctexoption`. Example: | |
120 | 120 | |
121 | 121 | for platex files in SJIS encoding: |
122 | 122 | |
123 | | Setting | Value | | |
124 | |-------------|-----------------------------| | |
125 | | Name: | pLaTeX/SJIS to pdf | | |
126 | | Program: | ptex2pdf | | |
127 | | Arguments: | -l | | |
128 | | | -ot | | |
129 | | | $synctexoption -kanji=sjis | | |
130 | | | $fullname | | |
123 | | Setting | Value | | |
124 | |-------------|----------------------------| | |
125 | | Name: | pLaTeX/SJIS (ptex2pdf) | | |
126 | | Program: | ptex2pdf | | |
127 | | Arguments: | -l | | |
128 | | | -ot | | |
129 | | | -kanji=sjis $synctexoption | | |
130 | | | $fullname | | |
131 | 131 | ]] |
132 | 132 | |
133 | 133 | DEVELPLACE = "http://github.com/texjporg/ptex2pdf" |
167 | 167 | update copyright and development place (now in texjp) |
168 | 168 | support 'flag=val' to specify option values |
169 | 169 | only allow one (1) filename argument |
170 | - version 20170603.0 | |
171 | start version number in the format YYYYMMDD.0 | |
172 | better support for cp932 windows filenames | |
173 | first replace all backslash chars to slash chars | |
170 | 174 | ]] |
171 | 175 | |
172 | 176 | |
239 | 243 | |
240 | 244 | function whoami () |
241 | 245 | print("This is " .. NAME .. " version ".. VERSION .. ".") |
246 | end | |
247 | ||
248 | function print_ifdebug(message) -- for debugging: accepts only one argument | |
249 | --print("DEBUG: " .. message) -- uncomment for debugging | |
250 | end | |
251 | ||
252 | function slashify(str) -- replace "\" with "/", mainly for path strings on cp932 windows | |
253 | return (tostring(str):gsub("[\x81-\x9f\xe0-\xfc]?.", { ["\\"] = "/" })) | |
242 | 254 | end |
243 | 255 | |
244 | 256 | if #arg == 0 then |
359 | 371 | if ( filename == "" ) then |
360 | 372 | print("No filename argument given, exiting.") |
361 | 373 | os.exit(1) |
362 | else | |
374 | else | |
375 | filename = slashify(filename) | |
363 | 376 | if ( kpse.find_file(filename) == nil ) then |
364 | 377 | -- try .tex extension |
365 | 378 | if ( kpse.find_file(filename .. ".tex") == nil ) then |
379 | 392 | -- if it has already an extension, we need to drop it to get the dvi name |
380 | 393 | bname = string.gsub(filename, "^(.*)%.[^.]+$", "%1") |
381 | 394 | end |
382 | -- filename may contain "/" or "\", but the intermediate output is written | |
395 | -- filename may contain "/", but the intermediate output is written | |
383 | 396 | -- in current directory, so we need to drop it |
384 | bname = string.gsub(bname, "^.*[/\\](.*)$", "%1") | |
397 | -- note that all "\" has been replaced with "/" | |
398 | bname = string.gsub(bname, "^.*/(.*)$", "%1") | |
385 | 399 | end |
386 | 400 | |
387 | 401 | -- we are still here, so we found a file |
409 | 423 | end |
410 | 424 | else |
411 | 425 | print("ptex2pdf processing of " .. filename .. " failed.\n") |
412 | --[[ uncomment for debugging | |
413 | print("tex = ", tex) | |
414 | print("dvipdf = ", dvipdf) | |
415 | --]] | |
426 | print_ifdebug("tex = " .. tex) | |
427 | print_ifdebug("dvipdf = " .. dvipdf) | |
416 | 428 | os.exit(2) |
417 | 429 | end |
418 | 430 |
52 | 52 | diadia/diadia.lua |
53 | 53 | dosepsbin/dosepsbin.pl |
54 | 54 | dviasm/dviasm.py |
55 | dviinfox/dviinfox.pl | |
55 | 56 | ebong/ebong.py |
56 | 57 | epspdf/epspdf.tlu |
57 | 58 | epspdf/epspdftk.tcl |
0 | 0 | #!/usr/bin/env perl |
1 | # $Id: tlmgr.pl 44422 2017-05-19 15:07:25Z karl $ | |
1 | # $Id: tlmgr.pl 44452 2017-06-04 23:45:39Z karl $ | |
2 | 2 | # |
3 | 3 | # Copyright 2008-2017 Norbert Preining |
4 | 4 | # This file is licensed under the GNU General Public License version 2 |
5 | 5 | # or any later version. |
6 | 6 | # |
7 | 7 | |
8 | my $svnrev = '$Revision: 44422 $'; | |
9 | my $datrev = '$Date: 2017-05-19 17:07:25 +0200 (Fri, 19 May 2017) $'; | |
8 | my $svnrev = '$Revision: 44452 $'; | |
9 | my $datrev = '$Date: 2017-06-05 01:45:39 +0200 (Mon, 05 Jun 2017) $'; | |
10 | 10 | my $tlmgrrevision; |
11 | 11 | my $prg; |
12 | 12 | if ($svnrev =~ m/: ([0-9]+) /) { |
2558 | 2558 | # if --list is given: nothing |
2559 | 2559 | # other options just change the behavior |
2560 | 2560 | if (!($opts{"list"} || @ARGV || $opts{"all"} || $opts{"self"})) { |
2561 | tlwarn("$prg update: specify --list, --all, --self, or a list of package names.\n"); | |
2562 | return ($F_ERROR); | |
2561 | if ($opts{"dry-run"}) { | |
2562 | $opts{"list"} = 1; # update -n same as update -n --list | |
2563 | } else { | |
2564 | tlwarn("$prg update: specify --list, --all, --self, or a list of package names.\n"); | |
2565 | return ($F_ERROR); | |
2566 | } | |
2563 | 2567 | } |
2564 | 2568 | |
2565 | 2569 | init_tlmedia_or_die(); |
8882 | 8886 | distribution (L<http://tug.org/texlive>) and both are licensed under the |
8883 | 8887 | GNU General Public License Version 2 or later. |
8884 | 8888 | |
8885 | $Id: tlmgr.pl 44422 2017-05-19 15:07:25Z karl $ | |
8889 | $Id: tlmgr.pl 44452 2017-06-04 23:45:39Z karl $ | |
8886 | 8890 | =cut |
8887 | 8891 | |
8888 | 8892 | # to remake HTML version: pod2html --cachedir=/tmp tlmgr.pl >/tmp/tlmgr.html |
0 | 0 | #!/bin/sh |
1 | 1 | |
2 | 2 | |
3 | jarpath=`kpsewhich --progname=texosquery --format=texmfscripts texosquery-jre5.jar` | |
3 | kernel=`uname -s` | |
4 | if test "${kernel#*CYGWIN}" != "$kernel" | |
5 | then | |
6 | jarpath=`cygpath -w $(kpsewhich --progname=texosquery --format=texmfscripts texosquery-jre5.jar)` | |
7 | else | |
8 | jarpath=`kpsewhich --progname=texosquery --format=texmfscripts texosquery-jre5.jar` | |
9 | fi | |
4 | 10 | java -jar "$jarpath" "$@" |
0 | 0 | #!/bin/sh |
1 | 1 | |
2 | 2 | |
3 | jarpath=`kpsewhich --progname=texosquery --format=texmfscripts texosquery-jre8.jar` | |
3 | kernel=`uname -s` | |
4 | if test "${kernel#*CYGWIN}" != "$kernel" | |
5 | then | |
6 | jarpath=`cygpath -w $(kpsewhich --progname=texosquery --format=texmfscripts texosquery-jre8.jar)` | |
7 | else | |
8 | jarpath=`kpsewhich --progname=texosquery --format=texmfscripts texosquery-jre8.jar` | |
9 | fi | |
4 | 10 | java -Djava.locale.providers=CLDR,JRE -jar "$jarpath" "$@" |
0 | 0 | #!/bin/sh |
1 | 1 | |
2 | 2 | |
3 | jarpath=`kpsewhich --progname=texosquery --format=texmfscripts texosquery.jar` | |
3 | kernel=`uname -s` | |
4 | if test "${kernel#*CYGWIN}" != "$kernel" | |
5 | then | |
6 | jarpath=`cygpath -w $(kpsewhich --progname=texosquery --format=texmfscripts texosquery.jar)` | |
7 | else | |
8 | jarpath=`kpsewhich --progname=texosquery --format=texmfscripts texosquery.jar` | |
9 | fi | |
4 | 10 | java -jar "$jarpath" "$@" |
364 | 364 | lua_pushliteral(L,"all command execution is disabled"); |
365 | 365 | } else if (restrictedshell == 0) { |
366 | 366 | lua_pushboolean(L,1); |
367 | lua_pushliteral(L,"all commands are permitted"); | |
367 | lua_pushstring(L,filename); | |
368 | 368 | } else { |
369 | 369 | char *safecmd = NULL; |
370 | 370 | char *cmdname = NULL; |
372 | 372 | case 0: |
373 | 373 | lua_pushboolean(L,0); |
374 | 374 | lua_pushliteral(L, "specific command execution disabled"); |
375 | break; | |
376 | case 1: | |
377 | lua_pushboolean(L,1); | |
378 | lua_pushstring(L,filename); | |
379 | 375 | break; |
380 | 376 | case 2: |
381 | 377 | lua_pushboolean(L,1); |
51 | 51 | 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x69, 0x6f, 0x5f, |
52 | 52 | 0x70, 0x6f, 0x70, 0x65, 0x6e, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, |
53 | 53 | 0x20, 0x3d, 0x20, 0x69, 0x6f, 0x2e, 0x70, 0x6f, 0x70, 0x65, 0x6e, 0x0a, 0x6c, 0x6f, 0x63, 0x61, |
54 | 0x6c, 0x20, 0x69, 0x6f, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, | |
54 | 0x6c, 0x20, 0x69, 0x6f, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, | |
55 | 55 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x69, 0x6f, 0x2e, 0x6c, 0x69, 0x6e, 0x65, 0x73, |
56 | 56 | 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x69, 0x6f, 0x5f, 0x72, 0x65, 0x61, 0x64, |
57 | 57 | 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x66, 0x69, |
83 | 83 | 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, |
84 | 84 | 0x20, 0x20, 0x3d, 0x20, 0x69, 0x6f, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x20, 0x20, 0x2d, 0x2d, 0x20, |
85 | 85 | 0x63, 0x61, 0x6e, 0x20, 0x62, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, |
86 | 0x0a, 0x69, 0x6f, 0x2e, 0x73, 0x61, 0x76, 0x65, 0x64, 0x5f, 0x70, 0x6f, 0x70, 0x65, 0x6e, 0x20, | |
87 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x69, 0x6f, 0x5f, | |
88 | 0x70, 0x6f, 0x70, 0x65, 0x6e, 0x20, 0x2d, 0x2d, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x62, 0x65, 0x20, | |
89 | 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x0a, 0x69, 0x6f, 0x2e, 0x73, 0x61, 0x76, | |
90 | 0x65, 0x64, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, | |
91 | 0x20, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x69, 0x6f, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x20, 0x2d, | |
92 | 0x2d, 0x20, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x20, 0x72, 0x65, 0x61, 0x64, 0x6f, 0x6e, 0x6c, | |
93 | 0x79, 0x0a, 0x6d, 0x74, 0x2e, 0x73, 0x61, 0x76, 0x65, 0x64, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x73, | |
94 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x6d, 0x74, | |
95 | 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x20, 0x2d, 0x2d, 0x20, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, | |
96 | 0x20, 0x72, 0x65, 0x61, 0x64, 0x6f, 0x6e, 0x6c, 0x79, 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, | |
97 | 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x78, | |
98 | 0x5f, 0x69, 0x6f, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x68, 0x6f, | |
99 | 0x77, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x6f, | |
100 | 0x77, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, | |
101 | 0x6f, 0x77, 0x20, 0x3d, 0x20, 0x27, 0x72, 0x27, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, | |
102 | 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x20, 0x3d, 0x20, 0x69, | |
86 | 0x0a, 0x2d, 0x2d, 0x20, 0x28, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, | |
87 | 0x20, 0x74, 0x6c, 0x31, 0x37, 0x20, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x29, 0x20, 0x69, | |
88 | 0x6f, 0x2e, 0x73, 0x61, 0x76, 0x65, 0x64, 0x5f, 0x70, 0x6f, 0x70, 0x65, 0x6e, 0x20, 0x20, 0x20, | |
89 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x69, 0x6f, 0x5f, 0x70, 0x6f, | |
90 | 0x70, 0x65, 0x6e, 0x20, 0x2d, 0x2d, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x62, 0x65, 0x20, 0x70, 0x72, | |
91 | 0x6f, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x0a, 0x69, 0x6f, 0x2e, 0x73, 0x61, 0x76, 0x65, 0x64, | |
92 | 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, | |
93 | 0x20, 0x20, 0x3d, 0x20, 0x69, 0x6f, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x20, 0x2d, 0x2d, 0x20, | |
94 | 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x20, 0x72, 0x65, 0x61, 0x64, 0x6f, 0x6e, 0x6c, 0x79, 0x0a, | |
95 | 0x6d, 0x74, 0x2e, 0x73, 0x61, 0x76, 0x65, 0x64, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x20, 0x20, | |
96 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x6d, 0x74, 0x5f, 0x6c, | |
97 | 0x69, 0x6e, 0x65, 0x73, 0x20, 0x2d, 0x2d, 0x20, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x20, 0x72, | |
98 | 0x65, 0x61, 0x64, 0x6f, 0x6e, 0x6c, 0x79, 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, | |
99 | 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x78, 0x5f, 0x69, | |
103 | 100 | 0x6f, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x68, 0x6f, 0x77, 0x29, |
104 | 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x66, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, | |
105 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x74, 0x79, 0x70, 0x65, 0x28, 0x68, | |
106 | 0x6f, 0x77, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x27, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x27, 0x20, | |
107 | 0x61, 0x6e, 0x64, 0x20, 0x66, 0x69, 0x6e, 0x64, 0x28, 0x68, 0x6f, 0x77, 0x2c, 0x27, 0x77, 0x27, | |
108 | 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, | |
109 | 0x20, 0x20, 0x20, 0x66, 0x69, 0x6f, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x66, 0x69, 0x6c, | |
110 | 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x27, 0x77, 0x27, 0x29, 0x0a, | |
111 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, | |
112 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x69, 0x6f, 0x5f, 0x72, 0x65, 0x63, | |
113 | 0x6f, 0x72, 0x64, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x28, 0x6e, 0x61, 0x6d, 0x65, | |
114 | 0x2c, 0x27, 0x72, 0x27, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, | |
115 | 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, | |
116 | 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, | |
117 | 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x75, 0x61, 0x74, 0x65, | |
118 | 0x78, 0x5f, 0x69, 0x6f, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x6f, 0x6e, | |
119 | 0x6c, 0x79, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x68, 0x6f, 0x77, 0x29, 0x0a, 0x20, 0x20, 0x20, | |
120 | 0x20, 0x69, 0x66, 0x20, 0x68, 0x6f, 0x77, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, | |
121 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x6f, 0x77, 0x20, 0x3d, 0x20, 0x27, 0x72, 0x27, 0x0a, 0x20, | |
122 | 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, | |
123 | 0x68, 0x6f, 0x77, 0x20, 0x3d, 0x20, 0x67, 0x73, 0x75, 0x62, 0x28, 0x68, 0x6f, 0x77, 0x2c, 0x27, | |
124 | 0x5b, 0x5e, 0x72, 0x62, 0x5d, 0x27, 0x2c, 0x27, 0x27, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, | |
125 | 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x68, 0x6f, 0x77, 0x20, 0x3d, 0x3d, 0x20, 0x27, 0x27, 0x20, | |
126 | 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, | |
127 | 0x20, 0x68, 0x6f, 0x77, 0x20, 0x3d, 0x20, 0x27, 0x72, 0x27, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, | |
128 | 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, | |
101 | 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x6f, 0x77, 0x20, | |
102 | 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x6f, 0x77, | |
103 | 0x20, 0x3d, 0x20, 0x27, 0x72, 0x27, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, | |
129 | 104 | 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x20, 0x3d, 0x20, 0x69, 0x6f, 0x5f, |
130 | 105 | 0x6f, 0x70, 0x65, 0x6e, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x68, 0x6f, 0x77, 0x29, 0x0a, 0x20, |
131 | 106 | 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x66, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, |
132 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x69, 0x6f, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x66, | |
133 | 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x27, 0x72, 0x27, | |
134 | 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, | |
135 | 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, | |
136 | 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x75, 0x61, 0x74, 0x65, | |
137 | 0x78, 0x5f, 0x69, 0x6f, 0x5f, 0x70, 0x6f, 0x70, 0x65, 0x6e, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x2c, | |
138 | 0x2e, 0x2e, 0x2e, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6f, | |
139 | 0x6b, 0x61, 0x79, 0x2c, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x3d, 0x20, 0x66, 0x69, 0x6f, | |
140 | 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, | |
141 | 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6f, 0x6b, | |
142 | 0x61, 0x79, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, | |
143 | 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, | |
144 | 0x20, 0x69, 0x6f, 0x5f, 0x70, 0x6f, 0x70, 0x65, 0x6e, 0x28, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x2c, | |
145 | 0x2e, 0x2e, 0x2e, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, | |
146 | 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, | |
147 | 0x20, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x78, 0x5f, 0x69, 0x6f, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x73, | |
148 | 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, | |
149 | 0x20, 0x66, 0x20, 0x3d, 0x20, 0x69, 0x6f, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x28, 0x6e, 0x61, 0x6d, | |
150 | 0x65, 0x2c, 0x27, 0x72, 0x27, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x66, 0x20, | |
151 | 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, | |
152 | 0x75, 0x72, 0x6e, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x0a, 0x20, | |
153 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, | |
107 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x74, 0x79, 0x70, 0x65, 0x28, 0x68, 0x6f, 0x77, | |
108 | 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x27, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x27, 0x20, 0x61, 0x6e, | |
109 | 0x64, 0x20, 0x66, 0x69, 0x6e, 0x64, 0x28, 0x68, 0x6f, 0x77, 0x2c, 0x27, 0x77, 0x27, 0x29, 0x20, | |
110 | 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, | |
111 | 0x20, 0x66, 0x69, 0x6f, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x66, 0x69, 0x6c, 0x65, 0x6e, | |
112 | 0x61, 0x6d, 0x65, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x27, 0x77, 0x27, 0x29, 0x0a, 0x20, 0x20, | |
113 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, | |
114 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x69, 0x6f, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, | |
115 | 0x64, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x27, | |
116 | 0x72, 0x27, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, | |
117 | 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, | |
118 | 0x72, 0x6e, 0x20, 0x66, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, | |
119 | 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x78, 0x5f, | |
120 | 0x69, 0x6f, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x6f, 0x6e, 0x6c, 0x79, | |
121 | 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x68, 0x6f, 0x77, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, | |
122 | 0x66, 0x20, 0x68, 0x6f, 0x77, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, | |
123 | 0x20, 0x20, 0x20, 0x68, 0x6f, 0x77, 0x20, 0x3d, 0x20, 0x27, 0x72, 0x27, 0x0a, 0x20, 0x20, 0x20, | |
124 | 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x6f, | |
125 | 0x77, 0x20, 0x3d, 0x20, 0x67, 0x73, 0x75, 0x62, 0x28, 0x68, 0x6f, 0x77, 0x2c, 0x27, 0x5b, 0x5e, | |
126 | 0x72, 0x62, 0x5d, 0x27, 0x2c, 0x27, 0x27, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, | |
127 | 0x20, 0x69, 0x66, 0x20, 0x68, 0x6f, 0x77, 0x20, 0x3d, 0x3d, 0x20, 0x27, 0x27, 0x20, 0x74, 0x68, | |
128 | 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, | |
129 | 0x6f, 0x77, 0x20, 0x3d, 0x20, 0x27, 0x72, 0x27, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, | |
130 | 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, | |
131 | 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x20, 0x3d, 0x20, 0x69, 0x6f, 0x5f, 0x6f, 0x70, | |
132 | 0x65, 0x6e, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x68, 0x6f, 0x77, 0x29, 0x0a, 0x20, 0x20, 0x20, | |
133 | 0x20, 0x69, 0x66, 0x20, 0x66, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, | |
134 | 0x20, 0x20, 0x20, 0x66, 0x69, 0x6f, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x66, 0x69, 0x6c, | |
135 | 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x27, 0x72, 0x27, 0x29, 0x0a, | |
136 | 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, | |
137 | 0x72, 0x6e, 0x20, 0x66, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, | |
138 | 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x78, 0x5f, | |
139 | 0x69, 0x6f, 0x5f, 0x70, 0x6f, 0x70, 0x65, 0x6e, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x2e, 0x2e, | |
140 | 0x2e, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6f, 0x6b, 0x61, | |
141 | 0x79, 0x2c, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x3d, 0x20, 0x66, 0x69, 0x6f, 0x5f, 0x63, | |
142 | 0x68, 0x65, 0x63, 0x6b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x28, 0x6e, | |
143 | 0x61, 0x6d, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6f, 0x6b, 0x61, 0x79, | |
144 | 0x20, 0x61, 0x6e, 0x64, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, | |
145 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x69, | |
146 | 0x6f, 0x5f, 0x70, 0x6f, 0x70, 0x65, 0x6e, 0x28, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x2c, 0x2e, 0x2e, | |
147 | 0x2e, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, | |
148 | 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, | |
149 | 0x75, 0x61, 0x74, 0x65, 0x78, 0x5f, 0x69, 0x6f, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x28, 0x6e, | |
150 | 0x61, 0x6d, 0x65, 0x2c, 0x68, 0x6f, 0x77, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, | |
151 | 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, | |
152 | 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x20, 0x3d, 0x20, 0x69, 0x6f, 0x5f, 0x6f, | |
153 | 0x70, 0x65, 0x6e, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x68, 0x6f, 0x77, 0x20, 0x6f, 0x72, 0x20, | |
154 | 0x27, 0x72, 0x27, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, | |
155 | 0x66, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, | |
156 | 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, | |
157 | 0x6f, 0x6e, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, | |
158 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x69, 0x6f, 0x5f, | |
159 | 0x72, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x28, 0x66, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, | |
160 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, | |
161 | 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, | |
162 | 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, | |
163 | 0x69, 0x6f, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, | |
164 | 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, | |
165 | 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x78, 0x5f, 0x69, 0x6f, | |
166 | 0x5f, 0x72, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x28, 0x66, 0x29, 0x0a, 0x20, 0x20, 0x20, | |
167 | 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, | |
168 | 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, | |
154 | 169 | 0x6e, 0x20, 0x66, 0x69, 0x6f, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x28, 0x66, |
155 | 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, | |
156 | 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, | |
157 | 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x78, | |
158 | 0x5f, 0x69, 0x6f, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x28, 0x66, 0x29, 0x0a, | |
159 | 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, | |
160 | 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, | |
161 | 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x69, 0x6f, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, | |
162 | 0x65, 0x28, 0x66, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, | |
163 | 0x0a, 0x0a, 0x69, 0x6f, 0x2e, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x6c, 0x75, 0x61, | |
164 | 0x74, 0x65, 0x78, 0x5f, 0x69, 0x6f, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x0a, 0x6d, 0x74, 0x2e, | |
165 | 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x78, 0x5f, 0x69, | |
166 | 0x6f, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x57, | |
167 | 0x65, 0x20, 0x61, 0x73, 0x73, 0x75, 0x6d, 0x65, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, | |
168 | 0x65, 0x6e, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, | |
169 | 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, | |
170 | 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x6b, 0x70, 0x73, 0x65, 0x2e, 0x20, 0x54, | |
171 | 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x2d, 0x2d, 0x20, 0x63, 0x61, | |
172 | 0x73, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x43, 0x6f, 0x6e, 0x54, 0x65, 0x58, 0x74, 0x2e, 0x0a, 0x0a, | |
173 | 0x69, 0x66, 0x20, 0x6b, 0x70, 0x73, 0x65, 0x75, 0x73, 0x65, 0x64, 0x20, 0x3d, 0x3d, 0x20, 0x31, | |
174 | 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x6f, 0x2e, 0x6f, 0x70, | |
175 | 0x65, 0x6e, 0x20, 0x20, 0x3d, 0x20, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x78, 0x5f, 0x69, 0x6f, 0x5f, | |
176 | 0x6f, 0x70, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x6f, 0x2e, 0x70, 0x6f, 0x70, 0x65, | |
177 | 0x6e, 0x20, 0x3d, 0x20, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x78, 0x5f, 0x69, 0x6f, 0x5f, 0x70, 0x6f, | |
178 | 0x70, 0x65, 0x6e, 0x0a, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x69, 0x66, 0x20, 0x73, 0x61, 0x66, | |
179 | 0x65, 0x72, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x3d, 0x20, 0x31, 0x20, 0x74, 0x68, | |
180 | 0x65, 0x6e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x73, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, | |
181 | 0x74, 0x65, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x73, 0x2e, | |
182 | 0x73, 0x70, 0x61, 0x77, 0x6e, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x20, 0x20, | |
183 | 0x20, 0x20, 0x6f, 0x73, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x20, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x6e, | |
184 | 0x69, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x65, 0x6e, 0x76, | |
185 | 0x20, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x73, 0x2e, 0x74, | |
186 | 0x65, 0x6d, 0x70, 0x64, 0x69, 0x72, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x0a, 0x20, 0x20, | |
187 | 0x20, 0x20, 0x69, 0x6f, 0x2e, 0x70, 0x6f, 0x70, 0x65, 0x6e, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x6e, | |
188 | 0x69, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x20, 0x20, | |
189 | 0x20, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x73, 0x2e, | |
190 | 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x20, 0x20, | |
191 | 0x20, 0x20, 0x6f, 0x73, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x20, 0x20, 0x3d, 0x20, 0x6e, | |
192 | 0x69, 0x6c, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x6f, 0x2e, 0x74, 0x6d, 0x70, 0x66, 0x69, | |
193 | 0x6c, 0x65, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x6f, 0x2e, | |
194 | 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x0a, 0x20, | |
195 | 0x20, 0x20, 0x20, 0x6c, 0x66, 0x73, 0x2e, 0x63, 0x68, 0x64, 0x69, 0x72, 0x20, 0x20, 0x3d, 0x20, | |
196 | 0x6e, 0x69, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x66, 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x6b, | |
197 | 0x20, 0x20, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x66, 0x73, | |
198 | 0x2e, 0x74, 0x6f, 0x75, 0x63, 0x68, 0x20, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x20, 0x20, | |
199 | 0x20, 0x20, 0x6c, 0x66, 0x73, 0x2e, 0x72, 0x6d, 0x64, 0x69, 0x72, 0x20, 0x20, 0x3d, 0x20, 0x6e, | |
200 | 0x69, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x66, 0x73, 0x2e, 0x6d, 0x6b, 0x64, 0x69, 0x72, | |
201 | 0x20, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x6f, 0x2e, | |
202 | 0x73, 0x61, 0x76, 0x65, 0x64, 0x5f, 0x70, 0x6f, 0x70, 0x65, 0x6e, 0x20, 0x3d, 0x20, 0x6e, 0x69, | |
203 | 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x6f, 0x2e, 0x73, 0x61, 0x76, 0x65, 0x64, 0x5f, 0x6f, | |
204 | 0x70, 0x65, 0x6e, 0x20, 0x20, 0x3d, 0x20, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x78, 0x5f, 0x69, 0x6f, | |
205 | 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x6f, 0x6e, 0x6c, 0x79, 0x0a, 0x0a, | |
206 | 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x69, 0x66, 0x20, 0x73, 0x61, 0x66, 0x65, 0x72, 0x6f, 0x70, 0x74, | |
207 | 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x3d, 0x20, 0x31, 0x20, 0x6f, 0x72, 0x20, 0x73, 0x68, 0x65, 0x6c, | |
208 | 0x6c, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x20, 0x7e, 0x3d, 0x20, 0x31, 0x20, 0x74, 0x68, 0x65, | |
209 | 0x6e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x66, 0x69, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, | |
210 | 0x75, 0x69, 0x72, 0x65, 0x28, 0x27, 0x66, 0x66, 0x69, 0x27, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, | |
211 | 0x66, 0x6f, 0x72, 0x20, 0x6b, 0x2c, 0x20, 0x76, 0x20, 0x69, 0x6e, 0x20, 0x6e, 0x65, 0x78, 0x74, | |
212 | 0x2c, 0x20, 0x66, 0x66, 0x69, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, | |
213 | 0x20, 0x69, 0x66, 0x20, 0x6b, 0x20, 0x7e, 0x3d, 0x20, 0x27, 0x67, 0x63, 0x27, 0x20, 0x74, 0x68, | |
214 | 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, | |
215 | 0x66, 0x69, 0x5b, 0x6b, 0x5d, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, | |
216 | 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, | |
217 | 0x20, 0x20, 0x20, 0x20, 0x66, 0x66, 0x69, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x0a, 0x65, | |
218 | 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x6f, 0x73, 0x2e, 0x5b, 0x65, 0x78, 0x65, 0x63, 0x75, | |
219 | 0x74, 0x65, 0x7c, 0x6f, 0x73, 0x2e, 0x73, 0x70, 0x61, 0x77, 0x6e, 0x7c, 0x6f, 0x73, 0x2e, 0x65, | |
220 | 0x78, 0x65, 0x63, 0x5d, 0x20, 0x61, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x20, 0x61, 0x72, 0x65, | |
221 | 0x20, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x20, 0x61, 0x77, 0x61, | |
222 | 0x72, 0x65, 0x29, 0x0a, 0x0a, 0x0a, 0x69, 0x66, 0x20, 0x6d, 0x64, 0x35, 0x20, 0x74, 0x68, 0x65, | |
223 | 0x6e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x75, 0x6d, | |
224 | 0x20, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x6d, 0x64, 0x35, 0x2e, 0x73, 0x75, 0x6d, 0x0a, 0x20, 0x20, | |
225 | 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x67, 0x73, 0x75, 0x62, 0x20, 0x20, 0x20, 0x3d, | |
226 | 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x0a, 0x20, 0x20, 0x20, | |
227 | 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x20, 0x3d, 0x20, | |
228 | 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x0a, 0x20, 0x20, | |
229 | 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x62, 0x79, 0x74, 0x65, 0x20, 0x20, 0x20, 0x3d, | |
230 | 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x0a, 0x0a, 0x20, 0x20, | |
231 | 0x20, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x64, 0x35, 0x2e, 0x73, | |
232 | 0x75, 0x6d, 0x68, 0x65, 0x78, 0x61, 0x28, 0x6b, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, | |
233 | 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x28, 0x67, 0x73, 0x75, 0x62, 0x28, 0x73, | |
234 | 0x75, 0x6d, 0x28, 0x6b, 0x29, 0x2c, 0x20, 0x22, 0x2e, 0x22, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, | |
235 | 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x63, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, | |
236 | 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, | |
237 | 0x74, 0x28, 0x22, 0x25, 0x30, 0x32, 0x78, 0x22, 0x2c, 0x62, 0x79, 0x74, 0x65, 0x28, 0x63, 0x29, | |
238 | 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x29, 0x29, 0x0a, | |
239 | 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x75, 0x6e, | |
240 | 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x64, 0x35, 0x2e, 0x73, 0x75, 0x6d, 0x48, 0x45, 0x58, | |
241 | 0x41, 0x28, 0x6b, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, | |
242 | 0x75, 0x72, 0x6e, 0x20, 0x28, 0x67, 0x73, 0x75, 0x62, 0x28, 0x73, 0x75, 0x6d, 0x28, 0x6b, 0x29, | |
243 | 0x2c, 0x20, 0x22, 0x2e, 0x22, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, | |
244 | 0x63, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, | |
245 | 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x22, 0x25, 0x30, | |
246 | 0x32, 0x58, 0x22, 0x2c, 0x62, 0x79, 0x74, 0x65, 0x28, 0x63, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, | |
247 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, | |
248 | 0x6e, 0x64, 0x0a, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x00 | |
170 | 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x69, | |
171 | 0x6f, 0x2e, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x78, | |
172 | 0x5f, 0x69, 0x6f, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x0a, 0x6d, 0x74, 0x2e, 0x6c, 0x69, 0x6e, | |
173 | 0x65, 0x73, 0x20, 0x3d, 0x20, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x78, 0x5f, 0x69, 0x6f, 0x5f, 0x72, | |
174 | 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x57, 0x65, 0x20, 0x61, | |
175 | 0x73, 0x73, 0x75, 0x6d, 0x65, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, | |
176 | 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, | |
177 | 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, | |
178 | 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x6b, 0x70, 0x73, 0x65, 0x2e, 0x20, 0x54, 0x68, 0x69, 0x73, | |
179 | 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x2d, 0x2d, 0x20, 0x63, 0x61, 0x73, 0x65, 0x20, | |
180 | 0x69, 0x6e, 0x20, 0x43, 0x6f, 0x6e, 0x54, 0x65, 0x58, 0x74, 0x2e, 0x0a, 0x0a, 0x69, 0x66, 0x20, | |
181 | 0x6b, 0x70, 0x73, 0x65, 0x75, 0x73, 0x65, 0x64, 0x20, 0x3d, 0x3d, 0x20, 0x31, 0x20, 0x74, 0x68, | |
182 | 0x65, 0x6e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x20, | |
183 | 0x20, 0x3d, 0x20, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x78, 0x5f, 0x69, 0x6f, 0x5f, 0x6f, 0x70, 0x65, | |
184 | 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x6f, 0x2e, 0x70, 0x6f, 0x70, 0x65, 0x6e, 0x20, 0x3d, | |
185 | 0x20, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x78, 0x5f, 0x69, 0x6f, 0x5f, 0x70, 0x6f, 0x70, 0x65, 0x6e, | |
186 | 0x0a, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x69, 0x66, 0x20, 0x73, 0x61, 0x66, 0x65, 0x72, 0x6f, | |
187 | 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x3d, 0x20, 0x31, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, | |
188 | 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x73, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x20, | |
189 | 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x73, 0x2e, 0x73, 0x70, 0x61, | |
190 | 0x77, 0x6e, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, | |
191 | 0x73, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x20, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, | |
192 | 0x20, 0x20, 0x20, 0x20, 0x6f, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x65, 0x6e, 0x76, 0x20, 0x20, 0x3d, | |
193 | 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x73, 0x2e, 0x74, 0x65, 0x6d, 0x70, | |
194 | 0x64, 0x69, 0x72, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, | |
195 | 0x6f, 0x2e, 0x70, 0x6f, 0x70, 0x65, 0x6e, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, | |
196 | 0x20, 0x20, 0x20, 0x20, 0x69, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x20, 0x20, 0x20, 0x20, 0x3d, | |
197 | 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x73, 0x2e, 0x72, 0x65, 0x6e, | |
198 | 0x61, 0x6d, 0x65, 0x20, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, | |
199 | 0x73, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x20, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, | |
200 | 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x6f, 0x2e, 0x74, 0x6d, 0x70, 0x66, 0x69, 0x6c, 0x65, 0x20, | |
201 | 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x6f, 0x2e, 0x6f, 0x75, 0x74, | |
202 | 0x70, 0x75, 0x74, 0x20, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, | |
203 | 0x6c, 0x66, 0x73, 0x2e, 0x63, 0x68, 0x64, 0x69, 0x72, 0x20, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, | |
204 | 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x66, 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x6b, 0x20, 0x20, 0x20, | |
205 | 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x66, 0x73, 0x2e, 0x74, 0x6f, | |
206 | 0x75, 0x63, 0x68, 0x20, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, | |
207 | 0x66, 0x73, 0x2e, 0x72, 0x6d, 0x64, 0x69, 0x72, 0x20, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, | |
208 | 0x20, 0x20, 0x20, 0x20, 0x6c, 0x66, 0x73, 0x2e, 0x6d, 0x6b, 0x64, 0x69, 0x72, 0x20, 0x20, 0x3d, | |
209 | 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x6f, 0x2e, 0x73, 0x61, 0x76, | |
210 | 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x20, 0x20, 0x3d, 0x20, 0x6c, 0x75, 0x61, 0x74, 0x65, | |
211 | 0x78, 0x5f, 0x69, 0x6f, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x6f, 0x6e, | |
212 | 0x6c, 0x79, 0x0a, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x69, 0x66, 0x20, 0x73, 0x61, 0x66, 0x65, | |
213 | 0x72, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x3d, 0x20, 0x31, 0x20, 0x6f, 0x72, 0x20, | |
214 | 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x20, 0x7e, 0x3d, 0x20, 0x31, | |
215 | 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x66, 0x69, 0x20, 0x3d, | |
216 | 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x27, 0x66, 0x66, 0x69, 0x27, 0x29, 0x0a, | |
217 | 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x6b, 0x2c, 0x20, 0x76, 0x20, 0x69, 0x6e, 0x20, | |
218 | 0x6e, 0x65, 0x78, 0x74, 0x2c, 0x20, 0x66, 0x66, 0x69, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, | |
219 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6b, 0x20, 0x7e, 0x3d, 0x20, 0x27, 0x67, 0x63, | |
220 | 0x27, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, | |
221 | 0x20, 0x20, 0x20, 0x66, 0x66, 0x69, 0x5b, 0x6b, 0x5d, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, | |
222 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, | |
223 | 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x66, 0x69, 0x20, 0x3d, 0x20, 0x6e, 0x69, | |
224 | 0x6c, 0x0a, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x6f, 0x73, 0x2e, 0x5b, 0x65, | |
225 | 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x7c, 0x6f, 0x73, 0x2e, 0x73, 0x70, 0x61, 0x77, 0x6e, 0x7c, | |
226 | 0x6f, 0x73, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x5d, 0x20, 0x61, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, | |
227 | 0x20, 0x61, 0x72, 0x65, 0x20, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, | |
228 | 0x20, 0x61, 0x77, 0x61, 0x72, 0x65, 0x29, 0x0a, 0x0a, 0x0a, 0x69, 0x66, 0x20, 0x6d, 0x64, 0x35, | |
229 | 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, | |
230 | 0x20, 0x73, 0x75, 0x6d, 0x20, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x6d, 0x64, 0x35, 0x2e, 0x73, 0x75, | |
231 | 0x6d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x67, 0x73, 0x75, 0x62, | |
232 | 0x20, 0x20, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, | |
233 | 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, | |
234 | 0x74, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, | |
235 | 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x62, 0x79, 0x74, 0x65, | |
236 | 0x20, 0x20, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x62, 0x79, 0x74, 0x65, | |
237 | 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, | |
238 | 0x64, 0x35, 0x2e, 0x73, 0x75, 0x6d, 0x68, 0x65, 0x78, 0x61, 0x28, 0x6b, 0x29, 0x0a, 0x20, 0x20, | |
239 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x28, 0x67, 0x73, | |
240 | 0x75, 0x62, 0x28, 0x73, 0x75, 0x6d, 0x28, 0x6b, 0x29, 0x2c, 0x20, 0x22, 0x2e, 0x22, 0x2c, 0x20, | |
241 | 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x63, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, | |
242 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, | |
243 | 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x22, 0x25, 0x30, 0x32, 0x78, 0x22, 0x2c, 0x62, 0x79, 0x74, | |
244 | 0x65, 0x28, 0x63, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, | |
245 | 0x64, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x20, 0x20, 0x20, | |
246 | 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x64, 0x35, 0x2e, 0x73, 0x75, | |
247 | 0x6d, 0x48, 0x45, 0x58, 0x41, 0x28, 0x6b, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, | |
248 | 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x28, 0x67, 0x73, 0x75, 0x62, 0x28, 0x73, 0x75, | |
249 | 0x6d, 0x28, 0x6b, 0x29, 0x2c, 0x20, 0x22, 0x2e, 0x22, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, | |
250 | 0x69, 0x6f, 0x6e, 0x28, 0x63, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, | |
251 | 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, | |
252 | 0x28, 0x22, 0x25, 0x30, 0x32, 0x58, 0x22, 0x2c, 0x62, 0x79, 0x74, 0x65, 0x28, 0x63, 0x29, 0x29, | |
253 | 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x29, 0x29, 0x0a, 0x20, | |
254 | 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x00 | |
249 | 255 | }; |
250 | 256 | return luaL_dostring(L, (const char*) luatex_core_lua); |
251 | 257 | }⏎ |
15 | 15 | |
16 | 16 | local io_open = io.open |
17 | 17 | local io_popen = io.popen |
18 | local io_line = io.lines | |
18 | local io_lines = io.lines | |
19 | 19 | |
20 | 20 | local fio_readline = fio.readline |
21 | 21 | local fio_checkpermission = fio.checkpermission |
28 | 28 | local kpseused = status.kpse_used -- 0 1 |
29 | 29 | |
30 | 30 | io.saved_open = io_open -- can be protected |
31 | io.saved_popen = io_popen -- can be protected | |
31 | -- (deleted for tl17 rebuild) io.saved_popen = io_popen -- can be protected | |
32 | 32 | io.saved_lines = io_lines -- always readonly |
33 | 33 | mt.saved_lines = mt_lines -- always readonly |
34 | 34 | |
70 | 70 | end |
71 | 71 | end |
72 | 72 | |
73 | local function luatex_io_lines(name) | |
74 | local f = io_open(name,'r') | |
75 | if f then | |
76 | return function() | |
77 | return fio_readline(f) | |
78 | end | |
73 | local function luatex_io_lines(name,how) | |
74 | if name then | |
75 | local f = io_open(name,how or 'r') | |
76 | if f then | |
77 | return function() | |
78 | return fio_readline(f) | |
79 | end | |
80 | end | |
81 | else | |
82 | return io_lines() | |
79 | 83 | end |
80 | 84 | end |
81 | 85 | |
121 | 125 | lfs.rmdir = nil |
122 | 126 | lfs.mkdir = nil |
123 | 127 | |
124 | io.saved_popen = nil | |
125 | 128 | io.saved_open = luatex_io_open_readonly |
126 | 129 | |
127 | 130 | end |
27 | 27 | |
28 | 28 | #define TeX |
29 | 29 | |
30 | /* for tl17 update, change luatex_date_info but nothing else, | |
31 | as context depends on the numeric version number. */ | |
30 | 32 | int luatex_version = 100; /* \.{\\luatexversion} */ |
31 | 33 | int luatex_revision = '4'; /* \.{\\luatexrevision} */ |
32 | int luatex_date_info = 2017033109; /* the compile date is now hardwired :YEAR MONTH DAY HOUR*/ | |
34 | int luatex_date_info = 2017060901; /* the compile date is now hardwired :YEAR MONTH DAY HOUR*/ | |
33 | 35 | const char *luatex_version_string = "1.0.4"; |
34 | 36 | const char *engine_name = my_name; /* the name of this engine */ |
35 | 37 |