The only pdftex 1.50 info I know about is from here:
http://tug.org/svn/pdftex/branches/qstex/README.qstex
which are actually some changes over 1.50, but it's all I've got.
Doing a diff against the qstex branch pdftex.web from the "stable"
(which I really must move back to trunk) branch, I see stuff relating to
pdf layers and not much else in terms of primitives.
Martin or Thanh, maybe you can elucidate a bit? -k
--- stable/source/src/texk/web2c/pdftexdir/pdftex.web 2018-04-22 17:47:12.314859000 +0200
+++ qstex/source/src/texk/web2c/pdftexdir/pdftex.web 2010-10-11 16:27:54.737983000 +0200
@@ -1,2 +1,3 @@
-% Copyright 1996-2018 Han Th\^e\llap{\raise 0.5ex\hbox{\'{}}} Th\`anh,
-%
+% Copyright (c) 1996-2008 Han Th\^e\llap{\raise 0.5ex\hbox{\'{}}} Th\`anh,
+% Copyright (c) 2008-2009 Martin Schröder,
+% $Id: pdftex.web 627 2010-10-11 14:27:54Z oneiros $
@@ -16 +17,2 @@
-% this program. If not, see http://www.gnu.org/licenses/.
+% pdfTeX; if not, write to the Free Software Foundation, Inc., 51 Franklin
+% Street, Fifth Floor, Boston, MA 02110-1301 USA.
@@ -18 +20 @@
-% e-TeX is copyright (C) 1999-2015 by P. Breitenlohner (1994,98 by the NTS
+% e-TeX is copyright (C) 1999-2008 by P. Breitenlohner (1994,98 by the NTS
@@ -72 +73,0 @@
-% Version 3.14159265 was similar (January 2014).
@@ -104 +105 @@
-% Version 2.3 development was started in Feb 2008; released in Apr 2011.
+% Version 2.3 development was started in Feb 2008; released in Mon Year.
@@ -107,15 +107,0 @@
-% fixed the error messages for improper use of \protected,
-% reported by Heiko Oberdiek
-% , May 2010.
-% some rearrangements to reduce interferences between
-% e-TeX and pTeX, in part suggested by Hironori Kitagawa
-% , Mar 2011.
-% Version 2.4 fixed an uninitialized line number bug, released in May 2012.
-% Version 2.5 development was started in Aug 2012; released in Feb 2013.
-% better tracing of font definitions, reported by
-% Bruno Le Floch , Jul 2012.
-% Version 2.6 development was started in Mar 2013; released in ??? 201?.
-% enable hyphenation of text between \beginL and \endL or
-% between \beginR and \endR, problem reported by
-% Vafa Khalighi , Nov 2013.
-% better handling of right-to-left text -- to be done.
@@ -187 +173 @@
-\let\maybe=\iftrue % print only changed modules
+\let\maybe=\iffalse % print only changed modules
@@ -302,2 +288,2 @@
-@d eTeX_revision==".6" { \.{\\eTeXrevision} }
-@d eTeX_version_string=='-2.6' {current \eTeX\ version}
+@d eTeX_revision==".2" { \.{\\eTeXrevision} }
+@d eTeX_version_string=='-2.2' {current \eTeX\ version}
@@ -305 +291 @@
-@d eTeX_banner=='This is e-TeX, Version 3.14159265',eTeX_version_string
+@d eTeX_banner=='This is e-TeX, Version 3.1415926',eTeX_version_string
@@ -308,3 +294,3 @@
-@d pdftex_version==140 { \.{\\pdftexversion} }
-@d pdftex_revision=="19" { \.{\\pdftexrevision} }
-@d pdftex_version_string=='-1.40.19' {current \pdfTeX\ version}
+@d pdftex_version==150 { \.{\\pdftexversion} }
+@d pdftex_revision=="0" { \.{\\pdftexrevision} }
+@d pdftex_version_string=='-1.50.0-alpha-20091006-qs20091006' {current \pdfTeX\ version}
@@ -312 +298,4 @@
-@d pdfTeX_banner=='This is pdfTeX, Version 3.14159265',eTeX_version_string,pdftex_version_string
+@d pdfeTeX_banner=='This is pdfeTeX, Version 3.1415926',pdftex_version_string,eTeX_version_string
+ {printed when \pdfeTeX\ starts}
+@#
+@d pdfTeX_banner=='This is pdfTeX, Version 3.1415926',pdftex_version_string
@@ -315 +304 @@
-@d TeX_banner=='This is TeX, Version 3.14159265' {printed when \TeX\ starts}
+@d TeX_banner=='This is TeX, Version 3.1415926' {printed when \TeX\ starts}
@@ -317 +306 @@
-@d banner==pdfTeX_banner
+@d banner==pdfeTeX_banner
@@ -319 +308 @@
-@d TEX==PDFTEX {change program name into |PDFTEX|}
+@d TEX==ETEX {change program name into |ETEX|}
@@ -1394 +1382,0 @@
-@!m,@!n:text_char; {characters input from |pool_file|}
@@ -1396,2 +1383,0 @@
-@!a:integer; {accumulator for check sum}
-@!c:boolean; {check sum has been checked}
@@ -3216,0 +3203 @@
+@;
@@ -3393,2 +3380,3 @@
-|fil|, |fill|, or |filll|). The |subtype| field is not used in \TeX.
-In \eTeX\ the |subtype| field records the box direction mode |box_lr|.
+|fil|, |fill|, or |filll|). The |subtype| field is not used.
+
+@d synctex_field_size=2 {Declare the {\sl synctex} field size to store the {\sl synctex} information: 2 integers for file tag and line}
@@ -3397 +3385 @@
-@d box_node_size=7 {number of words to allocate for a box node}
+@d box_node_size=7+synctex_field_size {a |box_node| is a synchronized node}
@@ -3482,0 +3471 @@
+@d medium_node_size=small_node_size+synctex_field_size {|math_node|, |kern_node| and |glue_node| are synchronized nodes}
@@ -3493 +3482 @@
-@d adjust_pre == subtype {<>0 => pre-adjustment}
+@d adjust_pre == subtype {pre-adjustment?}
@@ -3615 +3604 @@
-begin p:=get_node(small_node_size); type(p):=math_node;
+begin p:=get_node(medium_node_size); type(p):=math_node; {{\sl synctex} watch point: proper size}
@@ -3711 +3700 @@
-begin p:=get_node(small_node_size); type(p):=glue_node; subtype(p):=n+1;
+begin p:=get_node(medium_node_size); type(p):=glue_node; subtype(p):=n+1; {{\sl synctex} watch point: proper size}
@@ -3723 +3712 @@
-begin p:=get_node(small_node_size); type(p):=glue_node; subtype(p):=normal;
+begin p:=get_node(medium_node_size); type(p):=glue_node; subtype(p):=normal; {{\sl synctex} watch point: proper size}
@@ -3790 +3779 @@
-begin p:=get_node(small_node_size); type(p):=kern_node;
+begin p:=get_node(medium_node_size); type(p):=kern_node; {{\sl synctex} whatch point: proper |kern_node| size}
@@ -4528 +4517 @@
- free_node(p,box_node_size); goto done;
+ free_node(p,box_node_size); goto done;
@@ -4533,2 +4522,2 @@
- delete_glue_ref(split_top_ptr(p));
- free_node(p,ins_node_size); goto done;
+ delete_glue_ref(split_top_ptr(p));
+ free_node(p,ins_node_size); goto done;
@@ -4538 +4527,7 @@
- if leader_ptr(p)<>null then flush_node_list(leader_ptr(p));
+ if leader_ptr(p)<>null then flush_node_list(leader_ptr(p));
+ free_node(p, medium_node_size); {{\sl synctex} watch point: proper size}
+ goto done;
+ end;
+ kern_node,math_node:begin
+ free_node(p, medium_node_size); {{\sl synctex} watch point: proper size}
+ goto done;
@@ -4540 +4535 @@
- kern_node,math_node,penalty_node: do_nothing;
+ penalty_node: do_nothing;
@@ -4549 +4544 @@
- flush_node_list(post_break(p));
+ flush_node_list(post_break(p));
@@ -4612,0 +4608 @@
+ @;
@@ -4626 +4622,2 @@
-glue_node: begin r:=get_node(small_node_size); add_glue_ref(glue_ptr(p));
+glue_node: begin r:=get_node(medium_node_size); add_glue_ref(glue_ptr(p)); {{\sl synctex} watch point: proper size}
+ @;
@@ -4629 +4626,6 @@
-kern_node,math_node,penalty_node: begin r:=get_node(small_node_size);
+kern_node,math_node:
+begin
+ words:=medium_node_size; {{\sl synctex}: proper size, do not copy the {\sl synctex} information}
+ r:=get_node(words);
+end;
+penalty_node: begin r:=get_node(small_node_size);
@@ -5179 +5180,0 @@
-@d prim_size=2100 {maximum number of primitives }
@@ -5184 +5184,0 @@
-@d prim_eqtb_base=frozen_primitive+1
@@ -5669 +5669 @@
-@d pdf_unique_resname_code = pdftex_first_integer_code + 6 {generate unique names for resouces}
+@d pdf_unique_resname_code = pdftex_first_integer_code + 6 {generate unique names for resources}
@@ -5684,12 +5684,8 @@
-@d pdf_adjust_interword_glue_code = pdftex_first_integer_code + 21 {adjust interword glue?}
-@d pdf_prepend_kern_code = pdftex_first_integer_code + 22 {prepend kern before certain characters?}
-@d pdf_append_kern_code = pdftex_first_integer_code + 23 {append kern before certain characters?}
-@d pdf_gen_tounicode_code = pdftex_first_integer_code + 24 {generate ToUnicode for fonts?}
-@d pdf_draftmode_code = pdftex_first_integer_code + 25 {switch on draftmode if positive}
-@d pdf_inclusion_copy_font_code = pdftex_first_integer_code + 26 {generate ToUnicode for fonts?}
-@d pdf_suppress_warning_dup_dest_code = pdftex_first_integer_code + 27 {suppress warning about duplicated destinations}
-@d pdf_suppress_warning_dup_map_code = pdftex_first_integer_code + 28 {suppress warning about duplicated map lines}
-@d pdf_suppress_warning_page_group_code = pdftex_first_integer_code + 29 {suppress warning about multiple pdfs with page group}
-@d pdf_info_omit_date_code = pdftex_first_integer_code + 30 {omit generating CreationDate and ModDate}
-@d pdf_suppress_ptex_info_code = pdftex_first_integer_code + 31 {suppress /PTEX.* entries in PDF dictionaries}
-@d pdf_int_pars=pdftex_first_integer_code + 32 {total number of \pdfTeX's integer parameters}
+@d pdf_suppress_ptex_info_code = pdftex_first_integer_code + 21 {suppress /PTEX.* entries in PDF dictionaries}
+@d pdf_adjust_interword_glue_code = pdftex_first_integer_code + 22 {adjust interword glue?}
+@d pdf_prepend_kern_code = pdftex_first_integer_code + 23 {prepend kern before certain characters?}
+@d pdf_append_kern_code = pdftex_first_integer_code + 24 {append kern before certain characters?}
+@d pdf_gen_tounicode_code = pdftex_first_integer_code + 25 {generate ToUnicode for fonts?}
+@d pdf_draftmode_code = pdftex_first_integer_code + 26 {switch on draftmode if positive}
+@d pdf_inclusion_copy_font_code = pdftex_first_integer_code + 27 {generate ToUnicode for fonts?}
+@d pdf_int_pars=pdftex_first_integer_code + 28 {total number of \pdfTeX's integer parameters}
@@ -5707 +5703,2 @@
-@d eTeX_state_code=etex_int_base+9 {\eTeX\ state variables}
+@d suppress_fontnotfound_error_code=etex_int_base+9 {surpress errors for missing fonts}
+@d eTeX_state_code=etex_int_base+10 {\eTeX\ state variables}
@@ -5710 +5707,4 @@
-@d int_pars=etex_int_pars {total number of integer parameters}
+@d synctex_code=etex_int_pars {{\sl synctex}: for the \.{\\synctex} macro}
+@d synctex_int_pars=synctex_code+1 {total number of \TeX's integer parameters}
+@#
+@d int_pars=synctex_int_pars {total number of integer parameters}
@@ -5783,0 +5784 @@
+@d pdf_suppress_ptex_info == int_par(pdf_suppress_ptex_info_code)
@@ -5801,5 +5802,2 @@
-@d pdf_suppress_warning_dup_dest == int_par(pdf_suppress_warning_dup_dest_code)
-@d pdf_suppress_warning_dup_map == int_par(pdf_suppress_warning_dup_map_code)
-@d pdf_suppress_warning_page_group == int_par(pdf_suppress_warning_page_group_code)
-@d pdf_info_omit_date == int_par(pdf_info_omit_date_code)
-@d pdf_suppress_ptex_info == int_par(pdf_suppress_ptex_info_code)
+@#
+@d synctex == int_par(synctex_code)
@@ -5815,0 +5814 @@
+@d suppress_fontnotfound_error==int_par(suppress_fontnotfound_error_code)
@@ -5883,0 +5883 @@
+pdf_suppress_ptex_info_code: print_esc("pdfsuppressptexinfo");
@@ -5907,6 +5907,2 @@
-pdf_inclusion_copy_font_code: print_esc("pdfinclusioncopyfonts");
-pdf_suppress_warning_dup_dest_code: print_esc("pdfsuppresswarningdupdest");
-pdf_suppress_warning_dup_map_code: print_esc("pdfsuppresswarningdupmap");
-pdf_suppress_warning_page_group_code:print_esc("pdfsuppresswarningpagegroup");
-pdf_info_omit_date_code:print_esc("pdfinfoomitdate");
-pdf_suppress_ptex_info_code: print_esc("pdfsuppressptexinfo");
+pdf_inclusion_copy_font_code: print_esc("pdfinclusioncopyfonts");
+@/@@/
@@ -6039,0 +6036,2 @@
+primitive("pdfsuppressptexinfo",assign_int,int_base+pdf_suppress_ptex_info_code);@/
+@!@:pdf_suppress_ptex_info__}{\.{\\pdfsuppressptexinfo} primitive@>
@@ -6091,13 +6088,0 @@
-primitive("pdfsuppresswarningdupdest",assign_int,int_base+pdf_suppress_warning_dup_dest_code);@/
-@!@:pdf_suppress_warning_dup_dest_}{\.{\\pdfsuppresswarningdupdest} primitive@>
-
-primitive("pdfsuppresswarningdupmap",assign_int,int_base+pdf_suppress_warning_dup_map_code);@/
-@!@:pdf_suppress_warning_dup_map_}{\.{\\pdfsuppresswarningdupmap} primitive@>
-
-primitive("pdfsuppresswarningpagegroup",assign_int,int_base+pdf_suppress_warning_page_group_code);@/
-@!@:pdf_suppress_warning_page_group_}{\.{\\pdfsuppresswarningpagegroup} primitive@>
-primitive("pdfinfoomitdate",assign_int,int_base+pdf_info_omit_date_code);@/
-@!@:pdf_info_omit_date_}{\.{\\pdfinfoomitdate} primitive@>
-primitive("pdfsuppressptexinfo",assign_int,int_base+pdf_suppress_ptex_info_code);@/
-@!@:pdf_suppress_ptex_info_}{\.{\\pdfsuppressptexinfo} primitive@>
-
@@ -6459,0 +6445 @@
+@d prim_size=2100 {maximum number of primitives }
@@ -6463 +6449 @@
-@d prim_text(#) == prim[#].rh {string number for control sequence name, plus one}
+@d prim_text(#) == prim[#].rh {string number for control sequence name}
@@ -6468,3 +6454,3 @@
-@d prim_eq_level(#)==prim_eq_level_field(eqtb[prim_eqtb_base+#]) {level of definition}
-@d prim_eq_type(#)==prim_eq_type_field(eqtb[prim_eqtb_base+#]) {command code for equivalent}
-@d prim_equiv(#)==prim_equiv_field(eqtb[prim_eqtb_base+#]) {equivalent value}
+@d prim_eq_level(#)==prim_eq_level_field(prim_eqtb[#]) {level of definition}
+@d prim_eq_type(#)==prim_eq_type_field(prim_eqtb[#]) {command code for equivalent}
+@d prim_equiv(#)==prim_equiv_field(prim_eqtb[#]) {equivalent value}
@@ -6472 +6457,0 @@
-@d biggest_char=255 { 65535 in XeTeX }
@@ -6476,0 +6462 @@
+@!prim_eqtb:array[0..prim_size] of memory_word;
@@ -6481,0 +6468,4 @@
+prim_eq_level(0) := level_zero;
+prim_eq_type(0) := undefined_cs;
+prim_equiv(0) := null;
+for k:=1 to prim_size do prim_eqtb[k]:=prim_eqtb[0];
@@ -6566,4 +6556,5 @@
-if s<=biggest_char then begin
- if s<0 then begin p:=undefined_primitive; goto found; end
- else p:=(s mod prim_prime)+prim_base; {we start searching here}
- end
+if s<256 then begin
+ p := s;
+ if (p<0) or (prim_eq_level(p)<>level_one) then
+ p := undefined_primitive;
+end
@@ -6574,14 +6565,11 @@
- p:=h+prim_base; {we start searching here; note that |0<=h1+biggest_char then { |p| points a multi-letter primitive }
- begin if length(prim_text(p)-1)=l then
- if str_eq_str(prim_text(p)-1,s) then goto found;
- end
- else if prim_text(p)=1+s then goto found; { |p| points a single-letter primitive }
- if prim_next(p)=0 then
- begin if no_new_control_sequence then
- p:=undefined_primitive
- else @;
- goto found;
+ p:=h+prim_base; {we start searching here; note that |0<=h0 then if length(prim_text(p))=l then
+ if str_eq_str(prim_text(p),s) then goto found;
+ if prim_next(p)=0 then
+ begin if no_new_control_sequence then
+ p:=undefined_primitive
+ else @;
+ goto found;
+ end;
+ p:=prim_next(p);
@@ -6589 +6576,0 @@
- p:=prim_next(p);
@@ -6602 +6589 @@
-prim_text(p):=s+1;
+prim_text(p):=s;
@@ -6630 +6617 @@
- begin print_esc("csname"); print_esc("endcsname"); print_char(" ");
+ begin print_esc("csname"); print_esc("endcsname");
@@ -6641,3 +6628 @@
-else begin
- if (p>=prim_eqtb_base)and(p=prim_eqtb_base)and(p=cs_token_flag|, $t$ points to an |eqtb| location
-|t - cs_token_flag|.
-
-\textindent{--} If |t;
@@ -8891 +8825,0 @@
-@!b:boolean; {keep track of nested csnames}
@@ -8976 +8910 @@
- cur_cs := prim_lookup(cur_cs-single_base)
+ cur_cs := prim_lookup(cur_cs-257)
@@ -8996,29 +8929,0 @@
-@ This block deals with unexpandable \.{\\primitive} appearing at a spot where
-an integer or an internal values should have been found. It fetches the
-next token then resets |cur_cmd|, |cur_cs|, and |cur_tok|, based on the
-primitive value of that token. No expansion takes place, because the
-next token may be all sorts of things. This could trigger further
-expansion creating new errors.
-
-@=
-begin
-get_token;
-if cur_cs < hash_base then
- cur_cs := prim_lookup(cur_cs-single_base)
-else
- cur_cs := prim_lookup(text(cur_cs));
-if cur_cs<>undefined_primitive then begin
- cur_cmd := prim_eq_type(cur_cs);
- cur_chr := prim_equiv(cur_cs);
- cur_cs := prim_eqtb_base+cur_cs;
- cur_tok := cs_token_flag+cur_cs;
- end
-else begin
- cur_cmd := relax;
- cur_chr := 0;
- cur_tok := cs_token_flag+frozen_relax;
- cur_cs := frozen_relax;
- end;
-goto restart;
-end
-
@@ -9049 +8954 @@
-b := is_in_csname; is_in_csname := true;
+is_in_csname := true;
@@ -9054 +8959 @@
-is_in_csname := b;
+is_in_csname := false;
@@ -9559 +9463,0 @@
-@!save_cur_cs:pointer; {to save |cur_cs|}
@@ -9561 +9464,0 @@
-save_cur_cs:=cur_cs;
@@ -9572 +9474,0 @@
- cur_cs:=save_cur_cs;
@@ -9673 +9575 @@
-label exit, restart;
+label exit;
@@ -9676,2 +9578 @@
-@!q,@!r:pointer; {general purpose indices}
-@!tx:pointer; {effective tail node}
+@!q:halfword; {general purpose index}
@@ -9680 +9581 @@
-begin restart: m:=cur_chr;
+begin m:=cur_chr;
@@ -9700,2 +9600,0 @@
-ignore_spaces: {trap unexpandable primitives}
- if cur_chr=1 then @;
@@ -9923,2 +9822 @@
-@ Here is where \.{\\lastpenalty}, \.{\\lastkern}, \.{\\lastskip}, and
-\.{\\lastnodetype} are
+@ Here is where \.{\\lastpenalty}, \.{\\lastkern}, and \.{\\lastskip} are
@@ -9925,0 +9824 @@
+A final \.{\\endM} node is temporarily removed.
@@ -9930,15 +9828,0 @@
-The macro |find_effective_tail_eTeX| sets |tx| to the last non-\.{\\endM}
-node of the current list.
-
-@d find_effective_tail_eTeX==
-tx:=tail;
-if not is_char_node(tx) then
- if (type(tx)=math_node)and(subtype(tx)=end_M_code) then
- begin r:=head;
- repeat q:=r; r:=link(q);
- until r=tx;
- tx:=q;
- end
-@#
-@d find_effective_tail==find_effective_tail_eTeX
-
@@ -9971,4 +9855 @@
- if shellenabledp then begin
- if restrictedshell then cur_val :=2
- else cur_val := 1;
- end
+ if shell_enabled_p then cur_val := 1
@@ -9983 +9863,0 @@
- find_effective_tail;
@@ -9986 +9866 @@
- if (tx=head)or(mode=0) then cur_val:=-1;
+ if (tail=head)or(mode=0) then cur_val:=-1;
@@ -9989 +9869,3 @@
- if not is_char_node(tx)and(mode<>0) then
+ if not is_char_node(tail)and(mode<>0) then
+ begin if (type(tail)=math_node)and(subtype(tail)=end_M_code) then
+ remove_end_M;
@@ -9991,10 +9873,14 @@
- int_val: if type(tx)=penalty_node then cur_val:=penalty(tx);
- dimen_val: if type(tx)=kern_node then cur_val:=width(tx);
- glue_val: if type(tx)=glue_node then
- begin cur_val:=glue_ptr(tx);
- if subtype(tx)=mu_glue then cur_val_level:=mu_val;
- end;
- last_node_type_code: if type(tx)<=unset_node then cur_val:=type(tx)+1
- else cur_val:=unset_node+2;
- end {there are no other cases}
- else if (mode=vmode)and(tx=head) then
+ int_val: if type(tail)=penalty_node then cur_val:=penalty(tail);
+ dimen_val: if type(tail)=kern_node then cur_val:=width(tail);
+ glue_val: if type(tail)=glue_node then
+ begin cur_val:=glue_ptr(tail);
+ if subtype(tail)=mu_glue then cur_val_level:=mu_val;
+ end;
+ last_node_type_code:
+ if (type(tail)<>math_node)or(subtype(tail)<>end_M_code) then
+ if type(tail)<=unset_node then cur_val:=type(tail)+1
+ else cur_val:=unset_node+2;
+ end; {there are no other cases}
+ if LR_temp<>null then insert_end_M;
+ end
+ else if (mode=vmode)and(tail=head) then
@@ -10200 +10086 @@
-label done, restart;
+label done;
@@ -10208 +10093,0 @@
-restart:
@@ -10210,2 +10094,0 @@
-else if cur_tok=cs_token_flag+frozen_primitive then
- @
@@ -10515 +10398 @@
-The new Cicero follows the new Didot point; $\rm 1\,nc=12\,nd$.
+The new Cicero follows the new Didot point; $\rm 1\,nc=12\,nd$.
@@ -10778 +10661,9 @@
-@d pdftex_convert_codes = pdftex_first_expand_code + 26 {end of \pdfTeX's command codes}
+@d pdf_includelayers_code = pdftex_first_expand_code + 26 {number of layers of the last included pdf}
+@d pdf_layername_code = pdftex_first_expand_code + 27 {name of a layer}
+@d pdf_layernumber_code = pdftex_first_expand_code + 28 {new object number of a layer}
+@d expanded_code = pdftex_first_expand_code + 29 {command code for \.{\\expanded}}
+@d pdf_ocg_numbers_code = pdftex_first_expand_code + 30 {number of ocgs of an included pdf}
+@d pdf_ocg_name_code = pdftex_first_expand_code + 31 {name of an ocg}
+@d pdf_ocg_obj_number_code = pdftex_first_expand_code + 32 {object number an ocg}
+@d pdf_ocg_merge_code = pdftex_first_expand_code + 33 {merge ocgs}
+@d pdftex_convert_codes = pdftex_first_expand_code + 34 {end of \pdfTeX's command codes}
@@ -10818,0 +10710,2 @@
+primitive("expanded",convert,expanded_code);@/
+@!@:expanded_}{\.{\\expanded} primitive@>
@@ -10847,0 +10741,14 @@
+primitive("pdfnumberoflayers",convert,pdf_includelayers_code);@/
+@!@:pdf_includelayers_}{\.{\\pdfnumberoflayers} primitive@>
+primitive("pdflayername",convert,pdf_layername_code);@/
+@!@:pdf_layername_}{\.{\\pdflayername} primitive@>
+primitive("pdflayerobjectnumber",convert,pdf_layernumber_code);@/
+@!@:pdf_layernumber_}{\.{\\pdflayerobjectnumber} primitive@>
+primitive("pdfocgsnumber",convert,pdf_ocg_numbers_code);@/
+@!@:pdf_ocg_numbers_}{\.{\\pdfocgsnumber} primitive@>
+primitive("pdfocgname",convert,pdf_ocg_name_code);@/
+@!@:pdf_ocg_name_}{\.{\\pdfocgname} primitive@>
+primitive("pdfocgobjnumber",convert,pdf_ocg_obj_number_code);@/
+@!@:pdf_ocg_obj_number_}{\.{\\pdfocgobjnumber} primitive@>
+primitive("pdfocgmerge",convert,pdf_ocg_merge_code);@/
+@!@:pdf_ocg_merge_}{\.{\\pdfocgmerge} primitive@>
@@ -10869,0 +10777 @@
+ expanded_code: print_esc("expanded");
@@ -10882,0 +10791,7 @@
+ pdf_includelayers_code: print_esc("pdfnumberoflayers");
+ pdf_layername_code: print_esc("pdflayername");
+ pdf_layernumber_code: print_esc("pdflayerobjectnumber");
+ pdf_ocg_numbers_code: print_esc("pdfocgnumbers");
+ pdf_ocg_name_code: print_esc("pdfocgname");
+ pdf_ocg_obj_number_code: print_esc("pdfocgobjnumber");
+ pdf_ocg_merge_code: print_esc("pdfocgmerge");
@@ -10947,3 +10862,2 @@
- scan_register_num;
- fetch_box(p);
- if (p = null) or (type(p) <> hlist_node) then
+ scan_int;
+ if (box(cur_val) = null) or (type(box(cur_val)) <> hlist_node) then
@@ -11035,0 +10950,14 @@
+expanded_code:
+ begin
+ save_scanner_status := scanner_status;
+ save_warning_index := warning_index;
+ save_def_ref := def_ref;
+ save_cur_string;
+ scan_pdf_ext_toks;
+ warning_index := save_warning_index;
+ scanner_status := save_scanner_status;
+ ins_list(link(def_ref));
+ def_ref := save_def_ref;
+ restore_cur_string;
+ return;
+ end;
@@ -11260,0 +11189,85 @@
+pdf_includelayers_code: do_nothing;
+pdf_layername_code, pdf_layernumber_code:
+ begin
+ scan_int;
+ if pdf_includelayers<1 then
+ pdf_error("pdf inclusion", "No layers found, but trying to select layers");
+ if cur_val<1 then
+ begin
+ print_err("pdf inclusion: Only positive layer numbers allowed");
+ error;
+ end
+ else
+ if cur_val > pdf_includelayers then
+ begin
+ print_err("pdf inclusion: layer ");
+ print_int(cur_val);
+ print(" does not exist (only ");
+ print_int(pdf_includelayers);
+ print(")");
+ help2("The pdf you tried to include does not have as many layers")
+ ("as you think. Please specify a smaller number.");
+ error;
+ end
+ else
+ begin
+ b := pool_ptr;
+ case c of
+ pdf_layername_code: pdflayernamesgetname(cur_val);
+ pdf_layernumber_code: pdflayerobjectnumbersget(cur_val);
+ end;
+ link(garbage) := str_toks(b);
+ ins_list(link(temp_head));
+ end;
+ return;
+ end;
+pdf_ocg_numbers_code, pdf_ocg_name_code, pdf_ocg_obj_number_code, pdf_ocg_merge_code: begin
+ scan_int;
+ pdf_check_obj(obj_type_ximage, cur_val);
+ if c = pdf_ocg_numbers_code then
+ cur_val := pdfocgnumbersget(obj_ximage_data(cur_val))
+ else begin
+ i := obj_ximage_data(cur_val);
+ j := pdfocgnumbersget(i);
+ scan_int;
+ if j = 0 then begin
+ print_err("pdf inclusion: No OCGs found");
+ help1("The pdf you tried to include does not have any OCGs");
+ error;
+ end;
+ if cur_val < 1 then begin
+ print_err("pdf inclusion: Only positive OCG numbers allowed");
+ help1("The OCGs are numbered from one onwards");
+ error;
+ end
+ else
+ if cur_val > j then begin
+ print_err("pdf inclusion: ocg ");
+ print_int(cur_val);
+ print(" does not exist (only ");
+ print_int(j);
+ print(")");
+ help2("The pdf you tried to include does not have as many OCGs")
+ ("as you think. Please specify a smaller number.");
+ error;
+ end
+ else begin
+ case c of
+ pdf_ocg_name_code: begin
+ b := pool_ptr;
+ pdfocggetname(i, cur_val - 1);
+ link(garbage) := str_toks(b);
+ ins_list(link(temp_head));
+ end;
+ pdf_ocg_obj_number_code: begin
+ cur_val := pdfocggetobjnumber(i, cur_val - 1);
+ end;
+ pdf_ocg_merge_code: begin
+ j := cur_val - 1;
+ scan_int;
+ pdfocgmerge(i, j, cur_val);
+ end;
+ end
+ end
+ end
+ end;
@@ -11292,5 +11305,3 @@
- p := list_ptr(p);
- while (p <> null) and
- (cp_skipable(p) or
- ((not is_char_node(p)) and (type(p) = glue_node) and (subtype(p) = left_skip_code + 1)))
- do
+ p := list_ptr(box(cur_val));
+ if (p <> null) and (not is_char_node(p)) and
+ (type(p) = glue_node) and (subtype(p) = left_skip_code + 1) then
@@ -11306,7 +11317,8 @@
- q := list_ptr(p);
- p := prev_rightmost(q, null);
- while (p <> null) and
- (cp_skipable(p) or
- ((not is_char_node(p)) and (type(p) = glue_node) and (subtype(p) = right_skip_code + 1)))
- do
- p := prev_rightmost(q, p);
+ q := list_ptr(box(cur_val));
+ p := null;
+ if q <> null then begin
+ p := prev_rightmost(q, null);
+ if (p <> null) and (not is_char_node(p)) and
+ (type(p) = glue_node) and (subtype(p) = right_skip_code + 1) then
+ p := prev_rightmost(q, p);
+ end;
@@ -11347,0 +11360,3 @@
+pdf_includelayers_code: print_int(pdf_includelayers);
+pdf_ocg_numbers_code: print_int(cur_val);
+pdf_ocg_obj_number_code: print_int(cur_val);
@@ -11794 +11808,0 @@
-@!e:boolean; {keep track of nested csnames}
@@ -11858 +11872 @@
- m := prim_lookup(cur_cs-single_base)
+ m := prim_lookup(cur_cs-257)
@@ -12493,0 +12508 @@
+@;
@@ -13028 +13043,3 @@
-bad_tfm: @;
+bad_tfm: if suppress_fontnotfound_error=0 then begin
+ @;
+ end;
@@ -13229,29 +13246 @@
-@p function store_scaled_f(sq, z: scaled): scaled;
-var a,b,c,d:eight_bits; sw:scaled;
-alpha:integer;
-beta:1..16;
-begin
- alpha:=16;
- if z>=@'1000000000 then pdf_error("font", "size is too large");
- while z>=@'40000000 do
- begin z:=z div 2; alpha:=alpha+alpha;
- end;
- beta:=256 div alpha; alpha:=alpha*z;
- if sq >= 0 then begin
- d:=sq mod 256; sq:=sq div 256; {any "mod 256" not really needed, would typecast alone be safe?}
- c:=sq mod 256; sq:=sq div 256;
- b:=sq mod 256; sq:=sq div 256;
- a:=sq mod 256;
- end else begin
- sq:=(sq+1073741824)+1073741824; {braces for optimizing compiler}
- d:=sq mod 256; sq:=sq div 256;
- c:=sq mod 256; sq:=sq div 256;
- b:=sq mod 256; sq:=sq div 256;
- a:=(sq+128) mod 256;
- end;
- sw:=(((((d*z)div@'400)+(c*z))div@'400)+(b*z))div beta;
- if a=0 then store_scaled_f:=sw@+else if a=255 then store_scaled_f:=sw-alpha@+else pdf_error("store_scaled_f", "vf scaling");
-end;
-
-
-@ @=
+@=
@@ -13269 +13257,0 @@
-if z>=@'1000000000 then pdf_error("font", "size is too large");
@@ -14455,6 +14443,3 @@
-@d reversed=1 {subtype for an |hlist_node| whose hlist has been reversed}
-@d dlist=2 {subtype for an |hlist_node| from display math mode}
-@d box_lr(#) == (qo(subtype(#))) {direction mode of a box}
-@d set_box_lr(#) == subtype(#):=set_box_lr_end
-@d set_box_lr_end(#) == qi(#)
-@#
+@d reversed=min_quarterword+1 {subtype for an |hlist_node| whose hlist
+ has been reversed}
+@d dlist=min_quarterword+2 {subtype for an |hlist_node| from display math mode}
@@ -14562,0 +14548 @@
+@;
@@ -14564,0 +14551 @@
+@;
@@ -14610,4 +14597,13 @@
-glue_node: @;
-margin_kern_node,
-kern_node:cur_h:=cur_h+width(p);
-math_node: @;
+glue_node: begin
+ @
+ @;
+end;
+margin_kern_node:cur_h:=cur_h+width(p);
+kern_node: begin
+ @;
+ cur_h:=cur_h+width(p);
+end;
+math_node: begin
+ @;
+ @;
+end;
@@ -14914 +14910,3 @@
-begin if tracing_output>0 then
+begin
+ @
+ if tracing_output>0 then
@@ -15049,0 +15048 @@
+pdf_suppress_ptex_info := 0;
@@ -15058,0 +15058 @@
+pdf_includelayers := 0;
@@ -15073,10 +15072,0 @@
-function get_pdf_suppress_warning_dup_map: integer;
-begin
- get_pdf_suppress_warning_dup_map := pdf_suppress_warning_dup_map;
-end;
-
-function get_pdf_suppress_warning_page_group: integer;
-begin
- get_pdf_suppress_warning_page_group := pdf_suppress_warning_page_group;
-end;
-
@@ -15303 +15293 @@
-@!pdf_ptr: integer; {pointer to the first unused byte in the PDF buffer or object stream buffer}
+@!pdf_ptr: longinteger; {pointer to the first unused byte in the PDF buffer or object stream buffer}
@@ -15331,0 +15322,2 @@
+@!pdf_includelayers: integer;
+@!page_divert_val: integer;
@@ -15350 +15342,3 @@
-
+pdf_includelayers := 0;
+page_divert_val := 0;
+pdf_page_group_val := -1;
@@ -15464 +15457,0 @@
- pdf_last_byte := 0;
@@ -15489 +15482,2 @@
- pdf_out(pdf_new_line_char);
+ if pdf_last_byte <> pdf_new_line_char then
+ pdf_out(pdf_new_line_char);
@@ -15787 +15781 @@
- if isscalable(f) then begin
+ if hasfmentry(f) then begin
@@ -15878 +15871,0 @@
-@!pdf_dummy_font: internal_font_number; {font used to insert artificial interword spaces}
@@ -15998 +15991 @@
- if not isscalable(b) then
+ if not hasfmentry(b) then
@@ -16009 +16002 @@
- if isscalable(f) then begin
+ if hasfmentry(f) then begin
@@ -16013 +16006 @@
- if isscalable(k) and
+ if hasfmentry(k) and
@@ -16086,16 +16079 @@
-procedure pdf_read_dummy_font;
-begin
- if pdf_dummy_font = null_font then begin
- pdf_dummy_font := read_font_info(null_cs, "dummy-space", "", one_bp);
- pdf_mark_char(pdf_dummy_font, 32);
- end;
-end;
-
-procedure pdf_insert_interword_space;
-{insert an artificial interword space}
-begin
- pdf_read_dummy_font;
- pdf_set_font(pdf_dummy_font);
- pdf_print("( )Tj");
-end;
-
+@ @p
@@ -16105,2 +16082,0 @@
- must_end_string: boolean; {must we end the current string?}
- must_insert_space: boolean; {must we insert an interword space?}
@@ -16141,24 +16117 @@
-
- must_insert_space := false;
- must_end_string := false;
-
-@{ print_nl("s_out = "); print_scaled(s_out); @}
-@{ print_nl("space(f) = "); print_scaled(space(f)); @}
-@{ print_nl("space_shrink(f) = "); print_scaled(space_shrink(f)); @}
-@{ print_nl("x_height(f) = "); print_scaled(x_height(f)); @}
-@{ print_nl("v = "); print_scaled(v); @}
-@{ print_nl("v_out = "); print_scaled(v_out); @}
-
- if gen_faked_interword_space and
- ((abs(v_out) > 2*x_height(f)) or
- (s_out > space(f) - space_shrink(f)) or
- ((f <> pdf_f) and (v = 0))) then
- begin
- must_insert_space := true;
- end;
-
- if (f <> pdf_f) or (v <> 0) or (abs(s) >= @'100000) or must_insert_space then begin
- must_end_string := true;
- end;
-
- if must_end_string then begin
+ if (f <> pdf_f) or (v <> 0) or (abs(s) >= @'100000) then begin
@@ -16166,4 +16118,0 @@
- if must_insert_space then begin
- pdf_insert_interword_space; {this will change |pdf_f|}
- pdf_set_font(f);
- end;
@@ -16174 +16122,0 @@
-
@@ -16180 +16127,0 @@
-
@@ -16191,15 +16137,0 @@
-procedure pdf_insert_fake_space;
-var s: integer; {to save |gen_faked_interword_space|}
-begin
- s := gen_faked_interword_space;
- gen_faked_interword_space := 0; {to prevent inserting another fake space in |pdf_begin_string|}
-
- pdf_read_dummy_font;
- pdf_begin_string(pdf_dummy_font);
- pdf_print(" ");
- pdf_end_string_nl;
-
- gen_faked_interword_space := s;
-end;
-
-
@@ -16220 +16152 @@
- pdf_set_origin_temp(x, y - (h + 1)/2);
+ pdf_set_origin_temp(cur_h, cur_v - (h + 1)/2);
@@ -16226 +16158 @@
- pdf_set_origin_temp(x + (w + 1)/2, y);
+ pdf_set_origin_temp(cur_h + (w + 1)/2, cur_v);
@@ -16232 +16164 @@
- pdf_set_origin_temp(x, y);
+ pdf_set_origin_temp(cur_h, cur_v);
@@ -16252,13 +16183,0 @@
-{Prints first |len| characters of string |s| (if it's that long).
- There must be a better way to print a substring?}
-procedure slow_print_substr(@!s,@!max_len:integer);
-var j:pool_pointer; {current character code position}
-begin if (s>=str_ptr) or (s<256) then print(s)
-else begin j:=str_start[s];
- while (j>");
- pdf_print_ln("endobj");
- end;
+ end else
+ pdf_print_ln(">> endobj");
@@ -17053 +16960,0 @@
-@!pdf_font_nobuiltin_tounicode: ^boolean; {disable generating ToUnicode for this font?}
@@ -17342,3 +17249,3 @@
- if (font_area[k] <> non_existent_path) and
- str_eq_str(font_name[k], s) and
- (font_size[k] = fs) then
+ if (font_area[k] <> non_existent_path) and
+ str_eq_str(font_name[k], s) and
+ (font_size[k] = fs) then
@@ -17353 +17260 @@
- if (font_area[k] <> non_existent_path) and
+ if (font_area[k] <> non_existent_path) and
@@ -17520 +17427 @@
-
+
@@ -17525 +17432 @@
-
+
@@ -17602 +17509 @@
- if w >= 0 then
+ if w > 0 then
@@ -17857,2 +17764 @@
-function vf_read_signed(k: integer): integer;
-{read |k| bytes as an signed integer from \.{VF} file}
+function vf_read(k: integer): integer; {read |k| bytes as an integer from \.{VF} file}
@@ -17863 +17769 @@
- if i >= 128 then
+ if (k = 4) and (i > 127) then
@@ -17870,17 +17776 @@
- vf_read_signed := i;
-end;
-
-function vf_read_unsigned(k: integer): integer;
-{read |k| bytes as an unsigned integer from \.{VF} file}
-var i: integer;
-begin
- pdfassert((k > 0) and (k <= 4));
- i := vf_byte;
- if (k = 4) and (i >= 128) then
- bad_vf("number too big");
- decr(k);
- while k > 0 do begin
- i := i*256 + vf_byte;
- decr(k);
- end;
- vf_read_unsigned := i;
+ vf_read := i;
@@ -17909,2 +17799,2 @@
- fs := store_scaled_f(vf_read_signed(4), font_size[f]);
- ds := vf_read_signed(4) div @'20;
+ fs := sqxfw(vf_read(4), font_size[f]);
+ ds := vf_read(4) div @'20;
@@ -17992 +17882 @@
-if vf_read_signed(4) div @'20 <> font_dsize[f] then begin
+if vf_read(4) div @'20 <> font_dsize[f] then begin
@@ -18004 +17894 @@
- vf_e_fnts[vf_nf] := vf_read_unsigned(cmd - fnt_def1 + 1);
+ vf_e_fnts[vf_nf] := vf_read(cmd - fnt_def1 + 1);
@@ -18017,2 +17907,2 @@
- packet_length := vf_read_unsigned(4);
- cc := vf_read_unsigned(4);
+ packet_length := vf_read(4);
+ cc := vf_read(4);
@@ -18021 +17911 @@
- tfm_width := store_scaled_f(vf_read_signed(4), font_size[f]);
+ tfm_width := sqxfw(vf_read(4), font_size[f]);
@@ -18028 +17918 @@
- tfm_width := store_scaled_f(vf_read_unsigned(3), font_size[f]);
+ tfm_width := sqxfw(vf_read(3), font_size[f]);
@@ -18034 +17924 @@
-if tfm_width <> char_width(f)(char_info(f)(cc)) then begin
+if abs(tfm_width - char_width(f)(char_info(f)(cc))) > 1 then begin
@@ -18070 +17960 @@
- k := vf_read_unsigned(cmd - fnt1 + 1);
+ k := vf_read(cmd - fnt1 + 1);
@@ -18103 +17993 @@
- cmd_length := vf_read_unsigned(cmd - xxx1 + 1);
+ cmd_length := vf_read(cmd - xxx1 + 1);
@@ -18203,2 +18093,2 @@
-@p function packet_read_signed(k: integer): integer;
-{read |k| bytes as a signed integer from character packet}
+@p function packet_read(k: integer): integer; {read |k| bytes as an integer from
+character packet}
@@ -18209 +18099 @@
- if i >= 128 then
+ if (k = 4) and (i > 127) then
@@ -18216,17 +18106 @@
- packet_read_signed := i;
-end;
-
-function packet_read_unsigned(k: integer): integer;
-{read |k| bytes as an unsigned integer from character packet}
-var i: integer;
-begin
- pdfassert((k > 0) and (k <= 4));
- i := packet_byte;
- if (k = 4) and (i >= 128) then
- bad_vf("number too big");
- decr(k);
- while k > 0 do begin
- i := i*256 + packet_byte;
- decr(k);
- end;
- packet_read_unsigned := i;
+ packet_read := i;
@@ -18235,4 +18109,14 @@
-function packet_scaled(k: integer; fs: scaled): scaled;
-{get |k| bytes from packet as scaled}
-begin
- packet_scaled := store_scaled_f(packet_read_signed(k), fs);
+function packet_scaled(k: integer; fs: scaled): scaled; {get |k| bytes from packet as a
+scaled}
+var fw: integer;
+begin
+ fw := packet_read(k);
+ case k of
+ 1: if fw > 127 then
+ fw := fw - 256;
+ 2: if fw > @"8000 then
+ fw := fw - @"10000;
+ 3: if fw > @"800000 then
+ fw := fw - @"1000000;
+ endcases;
+ packet_scaled := sqxfw(fw, fs);
@@ -18330 +18214 @@
- tmp_int := packet_read_unsigned(cmd - set1 + 1);
+ tmp_int := packet_read(cmd - set1 + 1);
@@ -18334 +18218 @@
- tmp_int := packet_read_unsigned(cmd - put1 + 1);
+ tmp_int := packet_read(cmd - put1 + 1);
@@ -18378 +18262 @@
- tmp_int := packet_read_unsigned(cmd - xxx1 + 1);
+ tmp_int := packet_read(cmd - xxx1 + 1);
@@ -18452 +18336 @@
- othercases confusion("pdfcolorstack")
+ othercases do_nothing
@@ -18493,15 +18377,11 @@
- if pdfsetmatrix(str_start[str_ptr], cur_h, cur_page_height - cur_v) = 1 then begin
- str_room(7);
- append_char(" ");
- append_char("0");
- append_char(" ");
- append_char("0");
- append_char(" ");
- append_char("c");
- append_char("m");
- s := make_string;
- literal(s, set_origin, false);
- end
- else begin
- pdf_error("\pdfsetmatrix", "Unrecognized format.");
- end;
+ pdfsetmatrix(str_start[str_ptr], cur_h, cur_page_height - cur_v);
+ str_room(7);
+ append_char(" ");
+ append_char("0");
+ append_char(" ");
+ append_char("0");
+ append_char(" ");
+ append_char("c");
+ append_char("m");
+ s := make_string;
+ literal(s, set_origin, false);
@@ -18589,0 +18470 @@
+@;
@@ -18592,0 +18474 @@
+@;
@@ -18627,4 +18509,13 @@
-glue_node: @<(\pdfTeX) Move right or output leaders@>;
-margin_kern_node,
-kern_node:cur_h:=cur_h+width(p);
-math_node: @;
+glue_node: begin
+ @
+ @<(\pdfTeX) Move right or output leaders@>;
+end;
+margin_kern_node:cur_h:=cur_h+width(p);
+kern_node: begin
+ @;
+ cur_h:=cur_h+width(p);
+end;
+math_node: begin
+ @;
+ @;
+end;
@@ -18887,22 +18777,0 @@
-@ |substr_of_str| is used in |pdf_ship_out| and |pdf_print_info|.
-@p function substr_of_str(s, t: str_number):boolean;
-label continue,exit;
-var j, k, kk: pool_pointer; {running indices}
-begin
- k:=str_start[t];
- while (k < str_start[t+1] - length(s)) do begin
- j:=str_start[s];
- kk:=k;
- while (j < str_start[s+1]) do begin
- if str_pool[j] <> str_pool[kk] then
- goto continue;
- incr(j);
- incr(kk);
- end;
- substr_of_str:=true;
- return;
- continue: incr(k);
- end;
- substr_of_str:=false;
-end;
-
@@ -18916,2 +18784,0 @@
-s: pool_pointer; {index into |str_pool|}
-mediabox_given: boolean;
@@ -18925 +18792,3 @@
-begin if tracing_output>0 then
+begin
+ @
+ if tracing_output>0 then
@@ -18974 +18842,0 @@
-pdf_page_group_val := 0;
@@ -19186,0 +19055 @@
+pdf_last_pages := pdf_do_page_divert(pdf_last_page, page_divert_val);
@@ -19190,12 +19059,4 @@
-mediabox_given:=false;
-if pdf_page_attr <> null then begin
- s:=tokens_to_string(pdf_page_attr);
- mediabox_given:=substr_of_str("/MediaBox", s);
- flush_str(s);
-end;
-if not mediabox_given then begin
- pdf_print("/MediaBox [0 0 ");
- pdf_print_mag_bp(cur_page_width); pdf_out(" ");
- pdf_print_mag_bp(cur_page_height);
- pdf_print_ln("]");
-end;
+pdf_print("/MediaBox [0 0 ");
+pdf_print_mag_bp(cur_page_width); pdf_out(" ");
+pdf_print_mag_bp(cur_page_height);
+pdf_print_ln("]");
@@ -19204 +19065 @@
-@;
+pdf_indirect_ln("Parent", pdf_last_pages);
@@ -19208,0 +19070 @@
+ pdf_page_group_val := -1;
@@ -19213,7 +19074,0 @@
-@ @=
-if total_pages mod pages_tree_kids_max = 1 then begin
- pdf_create_obj(obj_type_pages, pages_tree_kids_max);
- pdf_last_pages := obj_ptr;
-end;
-pdf_indirect_ln("Parent", pdf_last_pages)
-
@@ -19274,6 +19129,2 @@
- if not eof(f) then begin {at least one byte available}
- while not eof(f) do
- pdf_out(getc(f));
- if (not obj_obj_is_stream(n)) and (pdf_ptr > 0) and (pdf_buf[pdf_ptr - 1] <> 10) then
- pdf_out(10);
- end;
+ while not eof(f) do
+ pdf_out(getc(f));
@@ -19313,3 +19163,0 @@
-@ @=
-@!saved_pdf_cur_form: integer;
-
@@ -19325 +19172,0 @@
- saved_pdf_cur_form := pdf_cur_form;
@@ -19330 +19176,0 @@
- pdf_cur_form := saved_pdf_cur_form;
@@ -19634 +19480,2 @@
-kpse_set_program_enabled (kpse_pk_format, 1, kpse_src_compile);
+if not kpse_var_value('MKTEXPK') then
+ kpse_set_program_enabled (kpse_pk_format, 1, kpse_src_cmdline);
@@ -19641,43 +19488,5 @@
-The following procedures sort the table of destination names.
-@d get_next_char(#)==
- c@ := str_pool[j@];
- incr(j@);
- if (c@ = 92) and (j@ < e@) then begin
- c@ := str_pool[j@];
- incr(j@);
- if (c@ >= 48) and (c@ <= 55) then begin
- c@ := c@ - 48;
- if (j@ < e@) and (str_pool[j@] >= 48)
- and (str_pool[j@] <= 55) then begin
- c@ := 8 * c@ + str_pool[j@] - 48;
- incr(j@);
- if (j@ < e@) and (str_pool[j@] >= 48)
- and (str_pool[j@] <= 55)
- and (c@ < 32) then begin
- c@ := 8 * c@ + str_pool[j@] - 48;
- incr(j@);
- end;
- end;
- end else begin
- case c@ of
- 98: c@ := 8; {`\.b': backspace}
- 102: c@ := 12; {`\.f': form feed}
- 110: c@ := 10; {`\.n': line feed}
- 114: c@ := 13; {`\.r': carriage return}
- 116: c@ := 9; {`\.t': horizontal tab}
- {nothing to do for `\.{\\}', `\.(', `\.)'}
- othercases do_nothing
- endcases;
- end;
- end
-
-@p function str_less_str(s1, s2: str_number): boolean; {compare two pdf strings}
-var j1, j2, e1, e2: pool_pointer;
- c1, c2: packed_ASCII_code;
-begin
- {Minimal requirement: output of \.{\\pdfescapestring} must be supported.}
- {This implementation also supports all escape sequences}
- {listed in the table `Escape sequences in literal strings'}
- {of the pdf specification.}
- {End-of-line markers are not detected:}
- {The marker is not replaced by `\.{\\n}' or removed if it is escaped.}
+The following procedures sort the table of destination names
+@p function str_less_str(s1, s2: str_number): boolean; {compare two strings}
+var j1, j2: pool_pointer;
+ l, i: integer;
+begin
@@ -19686,19 +19495,9 @@
- e1 := j1 + length(s1);
- e2 := j2 + length(s2);
- while (j1 < e1) and (j2 < e2) do begin
- {get next character of first string}
- get_next_char(1);
- {get next character of second string}
- get_next_char(2);
- {compare characters}
- if c1 < c2 then begin
- str_less_str := true;
- return;
- end
- else if c1 > c2 then begin
- str_less_str := false;
- return;
- end;
- end;
- {compare string lengths}
- if (j1 >= e1) and (j2 < e2) then
+ if length(s1) < length(s2) then
+ l := length(s1)
+ else
+ l := length(s2);
+ i := 0;
+ while (i < l) and (str_pool[j1 + i] = str_pool[j2 + i]) do
+ incr(i);
+ if ((i < l) and (str_pool[j1 + i] < str_pool[j2 + i])) or
+ ((i = l) and (length(s1) < length(s2))) then
@@ -19708 +19507 @@
-exit: end;
+end;
@@ -19751,3 +19549,0 @@
- if total_pages mod pages_tree_kids_max <> 0 then
- obj_info(pdf_last_pages) := total_pages mod pages_tree_kids_max;
- {last pages object may have less than |pages_tree_kids_max| children}
@@ -19756 +19551,0 @@
- @;
@@ -19759 +19554 @@
- @