1 7 ˆl–ß=¿J j"T%íÆ^¸ÛÊbÑ¿�þY”Y²ÆèœŒ¸óÀþÉ „ �eïÈÆÅ?  # texindex.awk, generated by jrtangle from ti.twjr. # # Copyright 2014-2021 Free Software Foundation, Inc. # # This file is part of GNU Texinfo. # # Texinfo is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # Texinfo is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # ftrans.awk --- handle data file transitions # # user supplies beginfile() and endfile() functions # # Arnold Robbins, arnold@skeeve.com, Public Domain # November 1992 FNR == 1 { if (_filename_ != "") endfile(_filename_) _filename_ = FILENAME beginfile(FILENAME) } END { endfile(_filename_) } # join.awk --- join an array into a string # # Arnold Robbins, arnold@skeeve.com, Public Domain # May 1993 function join(array, start, end, sep, result, i) { if (sep == "") sep = " " else if (sep == SUBSEP) # magic value sep = "" result = array[start] for (i = start + 1; i <= end; i++) result = result sep array[i] return result } # quicksort --- C.A.R. Hoare's quick sort algorithm. See Wikipedia # or almost any algorithms or computer science text # Adapted from K&R-II, page 110 # function quicksort(data, left, right, compare, # parameters i, last, use_index, lt) # locals { if (left >= right) # do nothing if array contains fewer return # than two elements use_index = (compare == "index") quicksort_swap(data, left, int((left + right) / 2)) last = left for (i = left + 1; i <= right; i++) { lt = (use_index \ ? less_than(data, i, left) \ : key_compare(data[i], data[left]) < 0) if (lt) quicksort_swap(data, ++last, i) } quicksort_swap(data, left, last) quicksort(data, left, last - 1, compare) quicksort(data, last + 1, right, compare) } # quicksort_swap --- quicksort helper function, could be inline # function quicksort_swap(data, i, j, temp) { temp = data[i] data[i] = data[j] data[j] = temp } function del_array(a) { # Portable and faster than # for (i in a) # delete a[i] split("", a) } function check_split_null( n, a) { n = split("abcde", a, "") return (n == 5) } function char_split(string, array, n, i) { if (Can_split_null) return split(string, array, "") # do it the hard way del_array(array) n = length(string) for (i = 1; i <= n; i++) array[i] = substr(string, i, 1) return n } function fatal(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, cat) { cat = "cat 1>&2" # maximal portability printf(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) | cat close(cat) exit EXIT_FAILURE } function isupper(c) { return index("ABCDEFGHIJKLMNOPQRSTUVWXYZ", c) } function islower(c) { return index("abcdefghijklmnopqrstuvwxyz", c) } function isalpha(c) { return islower(c) || isupper(c) } function isdigit(c) { return index("0123456789", c) } function make_regexp(regexp, a, sep, n) { n = split(regexp, a, "%") if (Command_char == "\\") sep = Command_char Command_char else sep = Command_char return join(a, 1, n, sep) } function escape(regexp, a, n) { if (Command_char != "\\") return regexp n = split(regexp, a, "\\") if (n == 1) return regexp return join(a, 1, n, "\\\\") } function min(a, b) { return (a < b ? a : b) } function usage(exit_val) { printf(_"Usage: %s [OPTION]... FILE...\n", Invocation_name) print _"Generate a sorted index for each TeX output FILE." print _"Usually FILE... is specified as `foo.??' for a document `foo.texi'." print "" print _"Options:" print _" -h, --help display this help and exit" print _" --versio