Fix for UBSan build
[platform/upstream/doxygen.git] / src / doxygen_bst.h
1 "       % $Id: html-btxbst.doc 1.5 2010/12/08 19:02:34 dds Exp $\n"
2 "       % \n"
3 "       % This file is either \"html-btxbst.doc\" or was derived from\n"
4 "       % \"html-btxbst.doc\" using cpp.  \"html-btxbst.doc\" itself was edited\n"
5 "       % from \"btxbst.doc\" and \"named.bst\".\n"
6 "       % The following copyright information is from btxbst.doc:\n"
7 "       % version 0.99b for BibTeX versions 0.99a or later, LaTeX version 2.09.\n"
8 "       % Copyright (C) 1985, all rights reserved.\n"
9 "       % Copying of this file is authorized only if either\n"
10 "       % (1) you make absolutely no changes to your copy, including name, or\n"
11 "       % (2) if you do make changes, you name it something other than\n"
12 "       % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.\n"
13 "       % This restriction helps ensure that all standard styles are identical.\n"
14 "       % The file btxbst.doc has the documentation for this style.\n"
15 " % \"named\" style (sorted keys of the form [name, year])\n"
16 " % Some code for this was taken from \"named.bst\".\n"
17 "\n"
18 "ENTRY\n"
19 "  { address\n"
20 "    author\n"
21 "    booktitle\n"
22 "    chapter\n"
23 "    edition\n"
24 "    editor\n"
25 "    howpublished\n"
26 "    institution\n"
27 "    journal\n"
28 "    key\n"
29 "    month\n"
30 "    note\n"
31 "    number\n"
32 "    organization\n"
33 "    pages\n"
34 "    publisher\n"
35 "    school\n"
36 "    series\n"
37 "    title\n"
38 "    type\n"
39 "    volume\n"
40 "    year\n"
41 "    dvi\n"
42 "    html\n"
43 "    keywords\n"
44 "    pdf\n"
45 "    postscript\n"
46 "    url\n"
47 "    doi\n"
48 "    mailto\n"
49 "  }\n"
50 "  {}\n"
51 "  { label extra.label sort.label }\n"
52 "\n"
53 "INTEGERS { output.state before.all mid.sentence after.sentence after.block }\n"
54 "\n"
55 "FUNCTION {init.state.consts}\n"
56 "{ #0 'before.all :=\n"
57 "  #1 'mid.sentence :=\n"
58 "  #2 'after.sentence :=\n"
59 "  #3 'after.block :=\n"
60 "}\n"
61 "\n"
62 "STRINGS { s t }\n"
63 "\n"
64 "FUNCTION {output.nonnull}\n"
65 "{ 's :=\n"
66 "  output.state mid.sentence =\n"
67 "    { \", \" * write$ }\n"
68 "    { output.state after.block =\n"
69 "       { add.period$ write$\n"
70 "         newline$\n"
71 "       }\n"
72 "       { output.state before.all =\n"
73 "           'write$\n"
74 "           { add.period$ \" \" * write$ }\n"
75 "         if$\n"
76 "       }\n"
77 "      if$\n"
78 "      mid.sentence 'output.state :=\n"
79 "    }\n"
80 "  if$\n"
81 "  s\n"
82 "}\n"
83 "\n"
84 "FUNCTION {output}\n"
85 "{ duplicate$ empty$\n"
86 "    'pop$\n"
87 "    'output.nonnull\n"
88 "  if$\n"
89 "}\n"
90 "\n"
91 "FUNCTION {output.check}\n"
92 "{ 't :=\n"
93 "  duplicate$ empty$\n"
94 "    { pop$ \"empty \" t * \" in \" * cite$ * warning$ }\n"
95 "    'output.nonnull\n"
96 "  if$\n"
97 "}\n"
98 "\n"
99 "FUNCTION {output.bibitem}\n"
100 "{ newline$\n"
101 "  author empty$\n"
102 "    { editor empty$\n"
103 "       { organization empty$\n"
104 "           'skip$\n"
105 "           { \"<!-- Authors: \" organization purify$ * \" -->\" * write$ newline$ }\n"
106 "          if$\n"
107 "       } \n"
108 "        { \"<!-- Authors: \" editor purify$ * \" -->\" * write$ newline$ }\n"
109 "      if$\n"
110 "    }\n"
111 "    { \"<!-- Authors: \" author purify$ * \" -->\" * write$ newline$ }\n"
112 "  if$\n"
113 "  keywords empty$\n"
114 "    'skip$\n"
115 "    { \"<!-- Keywords: \" keywords * \" -->\" * write$ newline$ }\n"
116 "  if$\n"
117 "  \"<dt><a name=\" quote$ * \"CITEREF_\" * cite$ * quote$ * \">[\" * label * \"]</a></dt><dd>\" * write$\n"
118 "  \"\"\n"
119 "  before.all 'output.state :=\n"
120 "}\n"
121 "\n"
122 "FUNCTION {fin.entry}\n"
123 "{ add.period$\n"
124 "  write$\n"
125 "  postscript empty$\n"
126 "    'skip$\n"
127 "    { newline$ \"<!-- PostScript: \" postscript * \" -->\" * write$ }\n"
128 "  if$\n"
129 "  pdf empty$\n"
130 "    'skip$\n"
131 "    { newline$ \"<!-- PDF: \" pdf * \" -->\" * write$ }\n"
132 "  if$\n"
133 "  dvi empty$\n"
134 "    'skip$\n"
135 "    { newline$ \"<!-- DVI: \" dvi * \" -->\" * write$ }\n"
136 "  if$\n"
137 "  doi empty$\n"
138 "    'skip$\n"
139 "    { newline$ \"<!-- DOI: \" doi * \" -->\" * write$ }\n"
140 "  if$\n"
141 "  \"</dd>\" write$\n"
142 "  newline$\n"
143 "  newline$\n"
144 "}\n"
145 "\n"
146 "FUNCTION {new.block}\n"
147 "{ output.state before.all =\n"
148 "    'skip$\n"
149 "    { after.block 'output.state := }\n"
150 "  if$\n"
151 "}\n"
152 "\n"
153 "FUNCTION {new.sentence}\n"
154 "{ output.state after.block =\n"
155 "    'skip$\n"
156 "    { output.state before.all =\n"
157 "       'skip$\n"
158 "       { after.sentence 'output.state := }\n"
159 "      if$\n"
160 "    }\n"
161 "  if$\n"
162 "}\n"
163 "\n"
164 "FUNCTION {not}\n"
165 "{   { #0 }\n"
166 "    { #1 }\n"
167 "  if$\n"
168 "}\n"
169 "\n"
170 "FUNCTION {and}\n"
171 "{   'skip$\n"
172 "    { pop$ #0 }\n"
173 "  if$\n"
174 "}\n"
175 "\n"
176 "FUNCTION {or}\n"
177 "{   { pop$ #1 }\n"
178 "    'skip$\n"
179 "  if$\n"
180 "}\n"
181 "\n"
182 "FUNCTION {str.to.int}\n"
183 "{\n"
184 "  's :=\n"
185 "  #0\n"
186 "    { s empty$ not }\n"
187 "    { % Multiply the number on the top of the stack by 10 = 1010 binary\n"
188 "      duplicate$ +                     % x2\n"
189 "      duplicate$                       % x2 x2\n"
190 "      duplicate$ + duplicate$ +                % x2 x8\n"
191 "      +\n"
192 "      s #1 #1 substring$ chr.to.int$ #48 - + % #48 is ascii for '0'\n"
193 "      s #2 global.max$ substring$ 's :=\n"
194 "    }\n"
195 "  while$\n"
196 "}\n"
197 "\n"
198 "FUNCTION {new.block.checka}\n"
199 "{ empty$\n"
200 "    'skip$\n"
201 "    'new.block\n"
202 "  if$\n"
203 "}\n"
204 "\n"
205 "FUNCTION {new.block.checkb}\n"
206 "{ empty$\n"
207 "  swap$ empty$\n"
208 "  and\n"
209 "    'skip$\n"
210 "    'new.block\n"
211 "  if$\n"
212 "}\n"
213 "\n"
214 "FUNCTION {new.sentence.checka}\n"
215 "{ empty$\n"
216 "    'skip$\n"
217 "    'new.sentence\n"
218 "  if$\n"
219 "}\n"
220 "\n"
221 "FUNCTION {new.sentence.checkb}\n"
222 "{ empty$\n"
223 "  swap$ empty$\n"
224 "  and\n"
225 "    'skip$\n"
226 "    'new.sentence\n"
227 "  if$\n"
228 "}\n"
229 "\n"
230 "FUNCTION {field.or.null}\n"
231 "{ duplicate$ empty$\n"
232 "    { pop$ \"\" }\n"
233 "    'skip$\n"
234 "  if$\n"
235 "}\n"
236 "\n"
237 "FUNCTION {emphasize}\n"
238 "{ duplicate$ empty$\n"
239 "    { pop$ \"\" }\n"
240 "    { \"<em>\" swap$ * \"</em>\" * }\n"
241 "  if$\n"
242 "}\n"
243 "\n"
244 "FUNCTION {add.link} % title\n"
245 "{\n"
246 "  't :=\n"
247 "  t empty$\n"
248 "    { \"\" }\n"
249 "    { url empty$\n"
250 "       { html empty$\n"
251 "           { t }\n"
252 "           { \"<a href=\" quote$ * html * quote$ * \">\" * t * \"</a>\" * }\n"
253 "         if$ }\n"
254 "       { \"<a href=\" quote$ * url * quote$ * \">\" * t * \"</a>\" * }\n"
255 "      if$\n"
256 "    }\n"
257 "  if$\n"
258 "}\n"
259 "\n"
260 "FUNCTION {add.mailto} % authors\n"
261 "{\n"
262 "  't :=\n"
263 "  t empty$\n"
264 "    { \"\" }\n"
265 "    { mailto empty$\n"
266 "        { t }\n"
267 "        { \"<a href=\" quote$ * \"mailto:\" * mailto * quote$ * \">\" * t * \"</a>\" * }\n"
268 "      if$\n"
269 "    }\n"
270 "  if$\n"
271 "}\n"
272 "\n"
273 "INTEGERS { nameptr namesleft numnames }\n"
274 "\n"
275 "FUNCTION {format.names}\n"
276 "{ 's :=\n"
277 "  #1 'nameptr :=\n"
278 "  s num.names$ 'numnames :=\n"
279 "  numnames 'namesleft :=\n"
280 "    { namesleft #0 > }\n"
281 "    { s nameptr \"{ff~}{vv~}{ll}{, jj}\" format.name$ 't :=\n"
282 "      \"\\bibxhtmlname{\" t * \"}\" * 't :=\n"
283 "      nameptr #1 >\n"
284 "       { namesleft #1 >\n"
285 "           { \", \" * t * }\n"
286 "           { numnames #2 >\n"
287 "               { \",\" * }\n"
288 "               'skip$\n"
289 "             if$\n"
290 "             t \"others\" =\n"
291 "               { \" et~al.\" * }\n"
292 "               { \" and \" * t * }\n"
293 "             if$\n"
294 "           }\n"
295 "         if$\n"
296 "       }\n"
297 "       't\n"
298 "      if$\n"
299 "      nameptr #1 + 'nameptr :=\n"
300 "      namesleft #1 - 'namesleft :=\n"
301 "    }\n"
302 "  while$\n"
303 "}\n"
304 "\n"
305 "FUNCTION {format.authors}\n"
306 "{ author empty$\n"
307 "    { \"\" }\n"
308 "    { author format.names }\n"
309 "  if$\n"
310 "  add.mailto\n"
311 "}\n"
312 "\n"
313 "FUNCTION {format.editors}\n"
314 "{ editor empty$\n"
315 "    { \"\" }\n"
316 "    { editor format.names\n"
317 "      editor num.names$ #1 >\n"
318 "       { \", editors\" * }\n"
319 "       { \", editor\" * }\n"
320 "      if$\n"
321 "    }\n"
322 "  if$\n"
323 "}\n"
324 "\n"
325 "FUNCTION {format.title}\n"
326 "{ title empty$\n"
327 "    { \"\" }\n"
328 "    { title \"t\" change.case$ }\n"
329 "  if$\n"
330 "  add.link\n"
331 "}\n"
332 "\n"
333 "FUNCTION {n.dashify}\n"
334 "{ 't :=\n"
335 "  \"\"\n"
336 "    { t empty$ not }\n"
337 "    { t #1 #1 substring$ \"-\" =\n"
338 "       { t #1 #2 substring$ \"--\" = not\n"
339 "           { \"--\" *\n"
340 "             t #2 global.max$ substring$ 't :=\n"
341 "           }\n"
342 "           {   { t #1 #1 substring$ \"-\" = }\n"
343 "               { \"-\" *\n"
344 "                 t #2 global.max$ substring$ 't :=\n"
345 "               }\n"
346 "             while$\n"
347 "           }\n"
348 "         if$\n"
349 "       }\n"
350 "       { t #1 #1 substring$ *\n"
351 "         t #2 global.max$ substring$ 't :=\n"
352 "       }\n"
353 "      if$\n"
354 "    }\n"
355 "  while$\n"
356 "}\n"
357 "\n"
358 "FUNCTION {format.date}\n"
359 "{ year empty$\n"
360 "    { month empty$\n"
361 "       { \"\" }\n"
362 "       { \"there's a month but no year in \" cite$ * warning$\n"
363 "         month\n"
364 "       }\n"
365 "      if$\n"
366 "    }\n"
367 "    { month empty$\n"
368 "       'year\n"
369 "       { month \" \" * year * }\n"
370 "      if$\n"
371 "    }\n"
372 "  if$\n"
373 "}\n"
374 "\n"
375 "FUNCTION {format.btitle}\n"
376 "{ title emphasize\n"
377 "  add.link\n"
378 "}\n"
379 "\n"
380 "FUNCTION {tie.or.space.connect}\n"
381 "{ duplicate$ text.length$ #3 <\n"
382 "    { \"~\" }\n"
383 "    { \" \" }\n"
384 "  if$\n"
385 "  swap$ * *\n"
386 "}\n"
387 "\n"
388 "FUNCTION {either.or.check}\n"
389 "{ empty$\n"
390 "    'pop$\n"
391 "    { \"can't use both \" swap$ * \" fields in \" * cite$ * warning$ }\n"
392 "  if$\n"
393 "}\n"
394 "\n"
395 "FUNCTION {format.bvolume}\n"
396 "{ volume empty$\n"
397 "    { \"\" }\n"
398 "    { \"volume\" volume tie.or.space.connect\n"
399 "      series empty$\n"
400 "       'skip$\n"
401 "       { \" of \" * series emphasize * }\n"
402 "      if$\n"
403 "      \"volume and number\" number either.or.check\n"
404 "    }\n"
405 "  if$\n"
406 "}\n"
407 "\n"
408 "FUNCTION {format.number.series}\n"
409 "{ volume empty$\n"
410 "    { number empty$\n"
411 "       { series field.or.null }\n"
412 "       { output.state mid.sentence =\n"
413 "           { \"number\" }\n"
414 "           { \"Number\" }\n"
415 "         if$\n"
416 "         number tie.or.space.connect\n"
417 "         series empty$\n"
418 "           { \"there's a number but no series in \" cite$ * warning$ }\n"
419 "           { \" in \" * series * }\n"
420 "         if$\n"
421 "       }\n"
422 "      if$\n"
423 "    }\n"
424 "    { \"\" }\n"
425 "  if$\n"
426 "}\n"
427 "\n"
428 "FUNCTION {format.edition}\n"
429 "{ edition empty$\n"
430 "    { \"\" }\n"
431 "    { output.state mid.sentence =\n"
432 "       { edition \"l\" change.case$ \" edition\" * }\n"
433 "       { edition \"t\" change.case$ \" edition\" * }\n"
434 "      if$\n"
435 "    }\n"
436 "  if$\n"
437 "}\n"
438 "\n"
439 "INTEGERS { multiresult }\n"
440 "\n"
441 "FUNCTION {multi.page.check}\n"
442 "{ 't :=\n"
443 "  #0 'multiresult :=\n"
444 "    { multiresult not\n"
445 "      t empty$ not\n"
446 "      and\n"
447 "    }\n"
448 "    { t #1 #1 substring$\n"
449 "      duplicate$ \"-\" =\n"
450 "      swap$ duplicate$ \",\" =\n"
451 "      swap$ \"+\" =\n"
452 "      or or\n"
453 "       { #1 'multiresult := }\n"
454 "       { t #2 global.max$ substring$ 't := }\n"
455 "      if$\n"
456 "    }\n"
457 "  while$\n"
458 "  multiresult\n"
459 "}\n"
460 "\n"
461 "FUNCTION {format.pages}\n"
462 "{ pages empty$\n"
463 "    { \"\" }\n"
464 "    { pages multi.page.check\n"
465 "       { \"pages\" pages n.dashify tie.or.space.connect }\n"
466 "       { \"page\" pages tie.or.space.connect }\n"
467 "      if$\n"
468 "    }\n"
469 "  if$\n"
470 "}\n"
471 "\n"
472 "FUNCTION {format.vol.num.pages}\n"
473 "{ volume field.or.null\n"
474 "  number empty$\n"
475 "    'skip$\n"
476 "    { \"(\" number * \")\" * *\n"
477 "      volume empty$\n"
478 "       { \"there's a number but no volume in \" cite$ * warning$ }\n"
479 "       'skip$\n"
480 "      if$\n"
481 "    }\n"
482 "  if$\n"
483 "  pages empty$\n"
484 "    'skip$\n"
485 "    { duplicate$ empty$\n"
486 "       { pop$ format.pages }\n"
487 "       { \":\" * pages n.dashify * }\n"
488 "      if$\n"
489 "    }\n"
490 "  if$\n"
491 "}\n"
492 "\n"
493 "FUNCTION {format.chapter.pages}\n"
494 "{ chapter empty$\n"
495 "    'format.pages\n"
496 "    { type empty$\n"
497 "       { \"chapter\" }\n"
498 "       { type \"l\" change.case$ }\n"
499 "      if$\n"
500 "      chapter tie.or.space.connect\n"
501 "      pages empty$\n"
502 "       'skip$\n"
503 "       { \", \" * format.pages * }\n"
504 "      if$\n"
505 "    }\n"
506 "  if$\n"
507 "}\n"
508 "\n"
509 "FUNCTION {format.in.ed.booktitle}\n"
510 "{ booktitle empty$\n"
511 "    { \"\" }\n"
512 "    { editor empty$\n"
513 "       { \"In \" booktitle emphasize * }\n"
514 "       { \"In \" format.editors * \", \" * booktitle emphasize * }\n"
515 "      if$\n"
516 "    }\n"
517 "  if$\n"
518 "}\n"
519 "\n"
520 "FUNCTION {empty.misc.check}\n"
521 "{ author empty$ title empty$ howpublished empty$\n"
522 "  month empty$ year empty$ note empty$\n"
523 "  and and and and and\n"
524 "  key empty$ not and\n"
525 "    { \"all relevant fields are empty in \" cite$ * warning$ }\n"
526 "    'skip$\n"
527 "  if$\n"
528 "}\n"
529 "\n"
530 "FUNCTION {format.thesis.type}\n"
531 "{ type empty$\n"
532 "    'skip$\n"
533 "    { pop$\n"
534 "      type \"t\" change.case$\n"
535 "    }\n"
536 "  if$\n"
537 "}\n"
538 "\n"
539 "FUNCTION {format.tr.number}\n"
540 "{ type empty$\n"
541 "    { \"Technical Report\" }\n"
542 "    'type\n"
543 "  if$\n"
544 "  number empty$\n"
545 "    { \"t\" change.case$ }\n"
546 "    { number tie.or.space.connect }\n"
547 "  if$\n"
548 "}\n"
549 "\n"
550 "FUNCTION {format.article.crossref}\n"
551 "{\n"
552 "  \"In <a href=\" quote$ * \"#\" * crossref * quote$ * \">\" *\n"
553 "  key empty$\n"
554 "    { journal empty$\n"
555 "       { \"need key or journal for \" cite$ * \" to crossref \" * crossref *\n"
556 "         warning$\n"
557 "         \"\"\n"
558 "       }\n"
559 "        { \"<cite>\" * journal * \"</cite>\" * }\n"
560 "      if$\n"
561 "    }\n"
562 "    { key * }\n"
563 "  if$\n"
564 "  \"</a> \\citelabel{\" * crossref * \"}\" *\n"
565 "}\n"
566 "\n"
567 "FUNCTION {format.crossref.editor}\n"
568 "{ editor #1 \"{vv~}{ll}\" format.name$\n"
569 "  editor num.names$ duplicate$\n"
570 "  #2 >\n"
571 "    { pop$ \" et~al.\" * }\n"
572 "    { #2 <\n"
573 "       'skip$\n"
574 "       { editor #2 \"{ff }{vv }{ll}{ jj}\" format.name$ \"others\" =\n"
575 "           { \" et~al.\" * }\n"
576 "           { \" and \" * editor #2 \"{vv~}{ll}\" format.name$ * }\n"
577 "         if$\n"
578 "       }\n"
579 "      if$\n"
580 "    }\n"
581 "  if$\n"
582 "}\n"
583 "\n"
584 "FUNCTION {format.book.crossref}\n"
585 "{ volume empty$\n"
586 "    { \"empty volume in \" cite$ * \"'s crossref of \" * crossref * warning$\n"
587 "      \"In \"\n"
588 "    }\n"
589 "    { \"Volume\" volume tie.or.space.connect\n"
590 "      \" of \" *\n"
591 "    }\n"
592 "  if$\n"
593 "  \"<a href=\" * quote$ * \"#\" * crossref * quote$ * \">\" *\n"
594 "  editor empty$\n"
595 "  editor field.or.null author field.or.null =\n"
596 "  or\n"
597 "    { key empty$\n"
598 "       { series empty$\n"
599 "           { \"need editor, key, or series for \" cite$ * \" to crossref \" *\n"
600 "             crossref * warning$\n"
601 "             \"\" *\n"
602 "           }\n"
603 "            { \"<cite>\" * series * \"</cite>\" * }\n"
604 "         if$\n"
605 "       }\n"
606 "       { key * }\n"
607 "      if$\n"
608 "    }\n"
609 "    { format.crossref.editor * }\n"
610 "  if$\n"
611 "  \"</a> \\citelabel{\" * crossref * \"}\" *\n"
612 "}\n"
613 "\n"
614 "FUNCTION {format.incoll.inproc.crossref}\n"
615 "{\n"
616 "  \"In <a href=\" quote$ * \"#\" * crossref * quote$ * \">\" *\n"
617 "  editor empty$\n"
618 "  editor field.or.null author field.or.null =\n"
619 "  or\n"
620 "    { key empty$\n"
621 "       { booktitle empty$\n"
622 "           { \"need editor, key, or booktitle for \" cite$ * \" to crossref \" *\n"
623 "             crossref * warning$\n"
624 "             \"\"\n"
625 "           }\n"
626 "            { \"<cite>\" * booktitle * \"</cite>\" * }\n"
627 "         if$\n"
628 "       }\n"
629 "        { key * }\n"
630 "      if$\n"
631 "    }\n"
632 "    { format.crossref.editor * }\n"
633 "  if$\n"
634 "  \"</a> \\citelabel{\" * crossref * \"}\" *\n"
635 "}\n"
636 "\n"
637 "FUNCTION {article}\n"
638 "{ output.bibitem\n"
639 "  format.authors \"author\" output.check\n"
640 "  new.block\n"
641 "  format.title \"title\" output.check\n"
642 "  new.block\n"
643 "  crossref missing$\n"
644 "    { journal emphasize \"journal\" output.check\n"
645 "      format.vol.num.pages output\n"
646 "      format.date \"year\" output.check\n"
647 "    }\n"
648 "    { format.article.crossref output.nonnull\n"
649 "      format.pages output\n"
650 "    }\n"
651 "  if$\n"
652 "  new.block\n"
653 "  note output\n"
654 "  fin.entry\n"
655 "}\n"
656 "\n"
657 "FUNCTION {book}\n"
658 "{ output.bibitem\n"
659 "  author empty$\n"
660 "    { format.editors \"author and editor\" output.check }\n"
661 "    { format.authors output.nonnull\n"
662 "      crossref missing$\n"
663 "       { \"author and editor\" editor either.or.check }\n"
664 "       'skip$\n"
665 "      if$\n"
666 "    }\n"
667 "  if$\n"
668 "  new.block\n"
669 "  format.btitle \"title\" output.check\n"
670 "  crossref missing$\n"
671 "    { format.bvolume output\n"
672 "      new.block\n"
673 "      format.number.series output\n"
674 "      new.sentence\n"
675 "      publisher \"publisher\" output.check\n"
676 "      address output\n"
677 "    }\n"
678 "    { new.block\n"
679 "      format.book.crossref output.nonnull\n"
680 "    }\n"
681 "  if$\n"
682 "  format.edition output\n"
683 "  format.date \"year\" output.check\n"
684 "  new.block\n"
685 "  note output\n"
686 "  fin.entry\n"
687 "}\n"
688 "\n"
689 "FUNCTION {booklet}\n"
690 "{ output.bibitem\n"
691 "  format.authors output\n"
692 "  new.block\n"
693 "  format.title \"title\" output.check\n"
694 "  howpublished address new.block.checkb\n"
695 "  howpublished output\n"
696 "  address output\n"
697 "  format.date output\n"
698 "  new.block\n"
699 "  note output\n"
700 "  fin.entry\n"
701 "}\n"
702 "\n"
703 "FUNCTION {inbook}\n"
704 "{ output.bibitem\n"
705 "  author empty$\n"
706 "    { format.editors \"author and editor\" output.check }\n"
707 "    { format.authors output.nonnull\n"
708 "      crossref missing$\n"
709 "       { \"author and editor\" editor either.or.check }\n"
710 "       'skip$\n"
711 "      if$\n"
712 "    }\n"
713 "  if$\n"
714 "  new.block\n"
715 "  format.btitle \"title\" output.check\n"
716 "  crossref missing$\n"
717 "    { format.bvolume output\n"
718 "      format.chapter.pages \"chapter and pages\" output.check\n"
719 "      new.block\n"
720 "      format.number.series output\n"
721 "      new.sentence\n"
722 "      publisher \"publisher\" output.check\n"
723 "      address output\n"
724 "    }\n"
725 "    { format.chapter.pages \"chapter and pages\" output.check\n"
726 "      new.block\n"
727 "      format.book.crossref output.nonnull\n"
728 "    }\n"
729 "  if$\n"
730 "  format.edition output\n"
731 "  format.date \"year\" output.check\n"
732 "  new.block\n"
733 "  note output\n"
734 "  fin.entry\n"
735 "}\n"
736 "\n"
737 "FUNCTION {incollection}\n"
738 "{ output.bibitem\n"
739 "  format.authors \"author\" output.check\n"
740 "  new.block\n"
741 "  format.title \"title\" output.check\n"
742 "  new.block\n"
743 "  crossref missing$\n"
744 "    { format.in.ed.booktitle \"booktitle\" output.check\n"
745 "      format.bvolume output\n"
746 "      format.number.series output\n"
747 "      format.chapter.pages output\n"
748 "      new.sentence\n"
749 "      publisher \"publisher\" output.check\n"
750 "      address output\n"
751 "      format.edition output\n"
752 "      format.date \"year\" output.check\n"
753 "    }\n"
754 "    { format.incoll.inproc.crossref output.nonnull\n"
755 "      format.chapter.pages output\n"
756 "    }\n"
757 "  if$\n"
758 "  new.block\n"
759 "  note output\n"
760 "  fin.entry\n"
761 "}\n"
762 "\n"
763 "FUNCTION {inproceedings}\n"
764 "{ output.bibitem\n"
765 "  format.authors \"author\" output.check\n"
766 "  new.block\n"
767 "  format.title \"title\" output.check\n"
768 "  new.block\n"
769 "  crossref missing$\n"
770 "    { format.in.ed.booktitle \"booktitle\" output.check\n"
771 "      format.bvolume output\n"
772 "      format.number.series output\n"
773 "      format.pages output\n"
774 "      address empty$\n"
775 "       { organization publisher new.sentence.checkb\n"
776 "         organization output\n"
777 "         publisher output\n"
778 "         format.date \"year\" output.check\n"
779 "       }\n"
780 "       { address output.nonnull\n"
781 "         format.date \"year\" output.check\n"
782 "         new.sentence\n"
783 "         organization output\n"
784 "         publisher output\n"
785 "       }\n"
786 "      if$\n"
787 "    }\n"
788 "    { format.incoll.inproc.crossref output.nonnull\n"
789 "      format.pages output\n"
790 "    }\n"
791 "  if$\n"
792 "  new.block\n"
793 "  note output\n"
794 "  fin.entry\n"
795 "}\n"
796 "\n"
797 "FUNCTION {conference} { inproceedings }\n"
798 "\n"
799 "FUNCTION {manual}\n"
800 "{ output.bibitem\n"
801 "  author empty$\n"
802 "    { organization empty$\n"
803 "       'skip$\n"
804 "       { organization output.nonnull\n"
805 "         address output\n"
806 "       }\n"
807 "      if$\n"
808 "    }\n"
809 "    { format.authors output.nonnull }\n"
810 "  if$\n"
811 "  new.block\n"
812 "  format.btitle \"title\" output.check\n"
813 "  author empty$\n"
814 "    { organization empty$\n"
815 "       { address new.block.checka\n"
816 "         address output\n"
817 "       }\n"
818 "       'skip$\n"
819 "      if$\n"
820 "    }\n"
821 "    { organization address new.block.checkb\n"
822 "      organization output\n"
823 "      address output\n"
824 "    }\n"
825 "  if$\n"
826 "  format.edition output\n"
827 "  format.date output\n"
828 "  new.block\n"
829 "  note output\n"
830 "  fin.entry\n"
831 "}\n"
832 "\n"
833 "FUNCTION {mastersthesis}\n"
834 "{ output.bibitem\n"
835 "  format.authors \"author\" output.check\n"
836 "  new.block\n"
837 "  format.title \"title\" output.check\n"
838 "  new.block\n"
839 "  \"Master's thesis\" format.thesis.type output.nonnull\n"
840 "  school \"school\" output.check\n"
841 "  address output\n"
842 "  format.date \"year\" output.check\n"
843 "  new.block\n"
844 "  note output\n"
845 "  fin.entry\n"
846 "}\n"
847 "\n"
848 "FUNCTION {misc}\n"
849 "{ output.bibitem\n"
850 "  format.authors output\n"
851 "  title howpublished new.block.checkb\n"
852 "  format.title output\n"
853 "  howpublished new.block.checka\n"
854 "  howpublished output\n"
855 "  format.date output\n"
856 "  new.block\n"
857 "  note output\n"
858 "  fin.entry\n"
859 "  empty.misc.check\n"
860 "}\n"
861 "\n"
862 "FUNCTION {phdthesis}\n"
863 "{ output.bibitem\n"
864 "  format.authors \"author\" output.check\n"
865 "  new.block\n"
866 "  format.btitle \"title\" output.check\n"
867 "  new.block\n"
868 "  \"PhD thesis\" format.thesis.type output.nonnull\n"
869 "  school \"school\" output.check\n"
870 "  address output\n"
871 "  format.date \"year\" output.check\n"
872 "  new.block\n"
873 "  note output\n"
874 "  fin.entry\n"
875 "}\n"
876 "\n"
877 "FUNCTION {proceedings}\n"
878 "{ output.bibitem\n"
879 "  editor empty$\n"
880 "    { organization output }\n"
881 "    { format.editors output.nonnull }\n"
882 "  if$\n"
883 "  new.block\n"
884 "  format.btitle \"title\" output.check\n"
885 "  format.bvolume output\n"
886 "  format.number.series output\n"
887 "  address empty$\n"
888 "    { editor empty$\n"
889 "       { publisher new.sentence.checka }\n"
890 "       { organization publisher new.sentence.checkb\n"
891 "         organization output\n"
892 "       }\n"
893 "      if$\n"
894 "      publisher output\n"
895 "      format.date \"year\" output.check\n"
896 "    }\n"
897 "    { address output.nonnull\n"
898 "      format.date \"year\" output.check\n"
899 "      new.sentence\n"
900 "      editor empty$\n"
901 "       'skip$\n"
902 "       { organization output }\n"
903 "      if$\n"
904 "      publisher output\n"
905 "    }\n"
906 "  if$\n"
907 "  new.block\n"
908 "  note output\n"
909 "  fin.entry\n"
910 "}\n"
911 "\n"
912 "FUNCTION {techreport}\n"
913 "{ output.bibitem\n"
914 "  format.authors \"author\" output.check\n"
915 "  new.block\n"
916 "  format.title \"title\" output.check\n"
917 "  new.block\n"
918 "  format.tr.number output.nonnull\n"
919 "  institution \"institution\" output.check\n"
920 "  address output\n"
921 "  format.date \"year\" output.check\n"
922 "  new.block\n"
923 "  note output\n"
924 "  fin.entry\n"
925 "}\n"
926 "\n"
927 "FUNCTION {unpublished}\n"
928 "{ output.bibitem\n"
929 "  format.authors \"author\" output.check\n"
930 "  new.block\n"
931 "  format.title \"title\" output.check\n"
932 "  new.block\n"
933 "  note \"note\" output.check\n"
934 "  format.date output\n"
935 "  fin.entry\n"
936 "}\n"
937 "\n"
938 "FUNCTION {default.type} { misc }\n"
939 "\n"
940 "MACRO {jan} {\"January\"}\n"
941 "\n"
942 "MACRO {feb} {\"February\"}\n"
943 "\n"
944 "MACRO {mar} {\"March\"}\n"
945 "\n"
946 "MACRO {apr} {\"April\"}\n"
947 "\n"
948 "MACRO {may} {\"May\"}\n"
949 "\n"
950 "MACRO {jun} {\"June\"}\n"
951 "\n"
952 "MACRO {jul} {\"July\"}\n"
953 "\n"
954 "MACRO {aug} {\"August\"}\n"
955 "\n"
956 "MACRO {sep} {\"September\"}\n"
957 "\n"
958 "MACRO {oct} {\"October\"}\n"
959 "\n"
960 "MACRO {nov} {\"November\"}\n"
961 "\n"
962 "MACRO {dec} {\"December\"}\n"
963 "\n"
964 "MACRO {acmcs} {\"ACM Computing Surveys\"}\n"
965 "\n"
966 "MACRO {acta} {\"Acta Informatica\"}\n"
967 "\n"
968 "MACRO {cacm} {\"Communications of the ACM\"}\n"
969 "\n"
970 "MACRO {ibmjrd} {\"IBM Journal of Research and Development\"}\n"
971 "\n"
972 "MACRO {ibmsj} {\"IBM Systems Journal\"}\n"
973 "\n"
974 "MACRO {ieeese} {\"IEEE Transactions on Software Engineering\"}\n"
975 "\n"
976 "MACRO {ieeetc} {\"IEEE Transactions on Computers\"}\n"
977 "\n"
978 "MACRO {ieeetcad}\n"
979 " {\"IEEE Transactions on Computer-Aided Design of Integrated Circuits\"}\n"
980 "\n"
981 "MACRO {ipl} {\"Information Processing Letters\"}\n"
982 "\n"
983 "MACRO {jacm} {\"Journal of the ACM\"}\n"
984 "\n"
985 "MACRO {jcss} {\"Journal of Computer and System Sciences\"}\n"
986 "\n"
987 "MACRO {scp} {\"Science of Computer Programming\"}\n"
988 "\n"
989 "MACRO {sicomp} {\"SIAM Journal on Computing\"}\n"
990 "\n"
991 "MACRO {tocs} {\"ACM Transactions on Computer Systems\"}\n"
992 "\n"
993 "MACRO {tods} {\"ACM Transactions on Database Systems\"}\n"
994 "\n"
995 "MACRO {tog} {\"ACM Transactions on Graphics\"}\n"
996 "\n"
997 "MACRO {toms} {\"ACM Transactions on Mathematical Software\"}\n"
998 "\n"
999 "MACRO {toois} {\"ACM Transactions on Office Information Systems\"}\n"
1000 "\n"
1001 "MACRO {toplas} {\"ACM Transactions on Programming Languages and Systems\"}\n"
1002 "\n"
1003 "MACRO {tcs} {\"Theoretical Computer Science\"}\n"
1004 "\n"
1005 "READ\n"
1006 "\n"
1007 "FUNCTION {sortify}\n"
1008 "{ purify$\n"
1009 "  \"l\" change.case$\n"
1010 "}\n"
1011 "\n"
1012 "INTEGERS { len }\n"
1013 "\n"
1014 "FUNCTION {chop.word}\n"
1015 "{ 's :=\n"
1016 "  'len :=\n"
1017 "  s #1 len substring$ =\n"
1018 "    { s len #1 + global.max$ substring$ }\n"
1019 "    's\n"
1020 "  if$\n"
1021 "}\n"
1022 "\n"
1023 "\n"
1024 "FUNCTION {format.lab.names}\n"
1025 "{ 's :=\n"
1026 "  s num.names$ 'numnames :=\n"
1027 "  numnames #1 =\n"
1028 "    { s #1 \"{vv }{ll}\" format.name$ }\n"
1029 "    { numnames #2 =\n"
1030 "        { s #1 \"{vv }{ll }and \" format.name$ s #2 \"{vv }{ll}\" format.name$ * }\n"
1031 "        { s #1 \"{vv }{ll }\" format.name$ \"et~al.\" * }\n"
1032 "      if$\n"
1033 "    }\n"
1034 "  if$\n"
1035 "}\n"
1036 "\n"
1037 "FUNCTION {author.key.label}\n"
1038 "{ author empty$\n"
1039 "    { key empty$\n"
1040 "       { cite$ #1 #3 substring$ }\n"
1041 "       { key }\n"
1042 "      if$\n"
1043 "    }\n"
1044 "    { author format.lab.names }\n"
1045 "  if$\n"
1046 "}\n"
1047 "\n"
1048 "FUNCTION {author.editor.key.label}\n"
1049 "{ author empty$\n"
1050 "    { editor empty$\n"
1051 "       { key empty$\n"
1052 "           { cite$ #1 #3 substring$ }\n"
1053 "           { key }\n"
1054 "         if$\n"
1055 "       }\n"
1056 "       { editor format.lab.names }\n"
1057 "      if$\n"
1058 "    }\n"
1059 "    { author format.lab.names }\n"
1060 "  if$\n"
1061 "}\n"
1062 "\n"
1063 "FUNCTION {author.key.organization.label}\n"
1064 "{ author empty$\n"
1065 "    { key empty$\n"
1066 "       { organization empty$\n"
1067 "           { cite$ #1 #3 substring$ }\n"
1068 "           { \"The \" #4 organization chop.word #3 text.prefix$ }\n"
1069 "         if$\n"
1070 "       }\n"
1071 "       { key }\n"
1072 "      if$\n"
1073 "    }\n"
1074 "    { author format.lab.names }\n"
1075 "  if$\n"
1076 "}\n"
1077 "\n"
1078 "FUNCTION {editor.key.organization.label}\n"
1079 "{ editor empty$\n"
1080 "    { key empty$\n"
1081 "       { organization empty$\n"
1082 "           { cite$ #1 #3 substring$ }\n"
1083 "           { \"The \" #4 organization chop.word #3 text.prefix$ }\n"
1084 "         if$\n"
1085 "       }\n"
1086 "       { key }\n"
1087 "      if$\n"
1088 "    }\n"
1089 "    { editor format.lab.names }\n"
1090 "  if$\n"
1091 "}\n"
1092 "\n"
1093 "FUNCTION {month.to.int}\n"
1094 "{\n"
1095 "       \"l\" change.case$ #3 text.prefix$\n"
1096 "       's :=\n"
1097 "       s \"jan\" = { #1 }  {\n"
1098 "       s \"feb\" = { #2 }  {\n"
1099 "       s \"mar\" = { #3 }  {\n"
1100 "       s \"apr\" = { #4 }  {\n"
1101 "       s \"may\" = { #5 }  {\n"
1102 "       s \"jun\" = { #6 }  {\n"
1103 "       s \"jul\" = { #7 }  {\n"
1104 "       s \"aug\" = { #8 }  {\n"
1105 "       s \"sep\" = { #9 }  {\n"
1106 "       s \"oct\" = { #10 } {\n"
1107 "       s \"nov\" = { #11 } {\n"
1108 "    s \"dec\" = { #12 } { #13 }  % 13 if nothing matches\n"
1109 "    if$}if$}if$}if$}if$}if$}if$}if$}if$}if$}if$}if$\n"
1110 "}\n"
1111 "\n"
1112 "INTEGERS { done c } \n"
1113 "FUNCTION { get.day }\n"
1114 "{ month field.or.null 's :=\n"
1115 "  \n"
1116 "  % Strip out month name\n"
1117 "  #0 'done := \n"
1118 "  { s \"\" = not done not and }\n"
1119 "  { s #1 #1 substring$ \" \" = 'done :=\n"
1120 "    s #2 global.max$ substring$ 's :=\n"
1121 "  }\n"
1122 "  while$\n"
1123 "\n"
1124 "  % Build up first number in t\n"
1125 "  \"0\" 't :=\n"
1126 "  #0 'done :=\n"
1127 "  { s \"\" = not done not and }\n"
1128 "  { s #1 #1 substring$ chr.to.int$ 'c :=\n"
1129 "    c #47 > c #58 < and\n"
1130 "      { t c int.to.chr$ * 't := }\n"
1131 "      { #1 'done := }\n"
1132 "    if$\n"
1133 "    s #2 global.max$ substring$ 's :=\n"
1134 "  }\n"
1135 "  while$\n"
1136 "\n"
1137 "  t str.to.int\n"
1138 "}\n"
1139 "\n"
1140 "FUNCTION { sortify.fourdigit }\n"
1141 "{ 's :=\n"
1142 "  s empty$\n"
1143 "    { \"0000\" }\n"
1144 "    { s\n"
1145 "    }\n"
1146 "  if$\n"
1147 "}\n"
1148 "\n"
1149 "FUNCTION { sortify.twodigit }\n"
1150 "{ 's :=\n"
1151 "  s empty$\n"
1152 "    { \"00\" }\n"
1153 "    { s\n"
1154 "      str.to.int #10 + int.to.str$\n"
1155 "    }\n"
1156 "  if$\n"
1157 "}\n"
1158 "\n"
1159 "FUNCTION {calc.label}\n"
1160 "{ type$ \"book\" =\n"
1161 "  type$ \"inbook\" =\n"
1162 "  or\n"
1163 "    'author.editor.key.label\n"
1164 "    { type$ \"proceedings\" =\n"
1165 "       'editor.key.organization.label\n"
1166 "       { type$ \"manual\" =\n"
1167 "           'author.key.organization.label\n"
1168 "           'author.key.label\n"
1169 "         if$\n"
1170 "       }\n"
1171 "      if$\n"
1172 "    }\n"
1173 "  if$\n"
1174 "  duplicate$\n"
1175 "\n"
1176 "  year empty$\n"
1177 "    'skip$\n"
1178 "    { \", \" * }\n"
1179 "  if$\n"
1180 "  year field.or.null purify$ *  % CHANGED - pfps - 15 Feb 1989\n"
1181 "  'label :=\n"
1182 "\n"
1183 "  year field.or.null purify$\n"
1184 "  #-1 #4 substring$ \n"
1185 "  sortify.fourdigit \n"
1186 "  \"  \" *\n"
1187 "  month field.or.null month.to.int int.to.str$ sortify.twodigit *\n"
1188 "  \"  \" *  \n"
1189 "  get.day int.to.str$ sortify.twodigit *\n"
1190 "  \"  \" *\n"
1191 "  * sortify 'sort.label :=\n"
1192 "}\n"
1193 "\n"
1194 "FUNCTION {sort.format.names}\n"
1195 "{ 's :=\n"
1196 "  #1 'nameptr :=\n"
1197 "  \"\"\n"
1198 "  s num.names$ 'numnames :=\n"
1199 "  numnames 'namesleft :=\n"
1200 "    { namesleft #0 > }\n"
1201 "    { nameptr #1 >\n"
1202 "       { \"   \" * }\n"
1203 "       'skip$\n"
1204 "      if$\n"
1205 "      s nameptr \"{vv{ } }{ll{ }}{  ff{ }}{  jj{ }}\" format.name$ 't :=\n"
1206 "      nameptr numnames = t \"others\" = and\n"
1207 "       { \"et al.\" * }\n"
1208 "       { t sortify * }\n"
1209 "      if$\n"
1210 "      nameptr #1 + 'nameptr :=\n"
1211 "      namesleft #1 - 'namesleft :=\n"
1212 "    }\n"
1213 "  while$\n"
1214 "}\n"
1215 "\n"
1216 "FUNCTION {sort.format.title}\n"
1217 "{ 't :=\n"
1218 "  \"A \" #2\n"
1219 "    \"An \" #3\n"
1220 "      \"The \" #4 t chop.word\n"
1221 "    chop.word\n"
1222 "  chop.word\n"
1223 "  sortify\n"
1224 "  #1 global.max$ substring$\n"
1225 "}\n"
1226 "\n"
1227 "FUNCTION {author.sort}\n"
1228 "{ author empty$\n"
1229 "    { key empty$\n"
1230 "       { \"to sort, need author or key in \" cite$ * warning$\n"
1231 "         \"\"\n"
1232 "       }\n"
1233 "       { key sortify }\n"
1234 "      if$\n"
1235 "    }\n"
1236 "    { author sort.format.names }\n"
1237 "  if$\n"
1238 "}\n"
1239 "\n"
1240 "FUNCTION {author.editor.sort}\n"
1241 "{ author empty$\n"
1242 "    { editor empty$\n"
1243 "       { key empty$\n"
1244 "           { \"to sort, need author, editor, or key in \" cite$ * warning$\n"
1245 "             \"\"\n"
1246 "           }\n"
1247 "           { key sortify }\n"
1248 "         if$\n"
1249 "       }\n"
1250 "       { editor sort.format.names }\n"
1251 "      if$\n"
1252 "    }\n"
1253 "    { author sort.format.names }\n"
1254 "  if$\n"
1255 "}\n"
1256 "\n"
1257 "FUNCTION {author.organization.sort}\n"
1258 "{ author empty$\n"
1259 "    { organization empty$\n"
1260 "       { key empty$\n"
1261 "           { \"to sort, need author, organization, or key in \" cite$ * warning$\n"
1262 "             \"\"\n"
1263 "           }\n"
1264 "           { key sortify }\n"
1265 "         if$\n"
1266 "       }\n"
1267 "       { \"The \" #4 organization chop.word sortify }\n"
1268 "      if$\n"
1269 "    }\n"
1270 "    { author sort.format.names }\n"
1271 "  if$\n"
1272 "}\n"
1273 "\n"
1274 "FUNCTION {editor.organization.sort}\n"
1275 "{ editor empty$\n"
1276 "    { organization empty$\n"
1277 "       { key empty$\n"
1278 "           { \"to sort, need editor, organization, or key in \" cite$ * warning$\n"
1279 "             \"\"\n"
1280 "           }\n"
1281 "           { key sortify }\n"
1282 "         if$\n"
1283 "       }\n"
1284 "       { \"The \" #4 organization chop.word sortify }\n"
1285 "      if$\n"
1286 "    }\n"
1287 "    { editor sort.format.names }\n"
1288 "  if$\n"
1289 "}\n"
1290 "\n"
1291 "FUNCTION {presort}\n"
1292 "{ calc.label\n"
1293 "  sort.label\n"
1294 "  \"    \"\n"
1295 "  *\n"
1296 "  type$ \"book\" =\n"
1297 "  type$ \"inbook\" =\n"
1298 "  or\n"
1299 "    'author.editor.sort\n"
1300 "    { type$ \"proceedings\" =\n"
1301 "       'editor.organization.sort\n"
1302 "       { type$ \"manual\" =\n"
1303 "           'author.organization.sort\n"
1304 "           'author.sort\n"
1305 "         if$\n"
1306 "       }\n"
1307 "      if$\n"
1308 "    }\n"
1309 "  if$\n"
1310 "  *\n"
1311 "  \"    \"\n"
1312 "  *\n"
1313 "  year field.or.null sortify\n"
1314 "  *\n"
1315 "  \"    \"\n"
1316 "  *\n"
1317 "  title field.or.null\n"
1318 "  sort.format.title\n"
1319 "  *\n"
1320 "  #1 entry.max$ substring$\n"
1321 "  'sort.key$ :=\n"
1322 "}\n"
1323 "\n"
1324 "ITERATE {presort}\n"
1325 "\n"
1326 "SORT\n"
1327 "\n"
1328 "STRINGS { longest.label last.sort.label next.extra }\n"
1329 "\n"
1330 "INTEGERS { longest.label.width last.extra.num }\n"
1331 "\n"
1332 "FUNCTION {initialize.longest.label}\n"
1333 "{ \"\" 'longest.label :=\n"
1334 "  #0 int.to.chr$ 'last.sort.label :=\n"
1335 "  \"\" 'next.extra :=\n"
1336 "  #0 'longest.label.width :=\n"
1337 "  #0 'last.extra.num :=\n"
1338 "}\n"
1339 "\n"
1340 "FUNCTION {forward.pass}\n"
1341 "{ last.sort.label sort.label =\n"
1342 "    { last.extra.num #1 + 'last.extra.num :=\n"
1343 "      last.extra.num int.to.chr$ 'extra.label :=\n"
1344 "    }\n"
1345 "    { \"a\" chr.to.int$ 'last.extra.num :=\n"
1346 "      \"\" 'extra.label :=\n"
1347 "      sort.label 'last.sort.label :=\n"
1348 "    }\n"
1349 "  if$\n"
1350 "}\n"
1351 "\n"
1352 "FUNCTION {reverse.pass}\n"
1353 "{ next.extra \"b\" =\n"
1354 "    { \"a\" 'extra.label := }\n"
1355 "    'skip$\n"
1356 "  if$\n"
1357 "  label extra.label * 'label :=\n"
1358 "  label width$ longest.label.width >\n"
1359 "    { label 'longest.label :=\n"
1360 "      label width$ 'longest.label.width :=\n"
1361 "    }\n"
1362 "    'skip$\n"
1363 "  if$\n"
1364 "  extra.label 'next.extra :=\n"
1365 "}\n"
1366 "\n"
1367 "EXECUTE {initialize.longest.label}\n"
1368 "\n"
1369 "ITERATE {forward.pass}\n"
1370 "\n"
1371 "REVERSE {reverse.pass}\n"
1372 "\n"
1373 "FUNCTION {begin.bib}\n"
1374 "{\n"
1375 "  \"# label-style: default\" write$ newline$\n"
1376 "}\n"
1377 "\n"
1378 "EXECUTE {begin.bib}\n"
1379 "\n"
1380 "EXECUTE {init.state.consts}\n"
1381 "\n"
1382 "ITERATE {call.type$}\n"
1383 "\n"
1384 "FUNCTION {end.bib}\n"
1385 "{ newline$\n"
1386 "}\n"
1387 "\n"
1388 "EXECUTE {end.bib}\n"