Patch: 2.1.81: Index Configure.help(using mmap and C)

Adam Heath (adam.heath@usa.net)
Tue, 27 Jan 1998 00:49:22 -0500


------------B61691E0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

This patch uses a C program to build an index(.help.index). The script then
uses this index to extract the help for the CONFIG_* variables. When the index
is built, the mmap'ed Configure.help is stepped through, line by line, and an
index of the form "<config-var> <start-offset> <end-offset>" is built in
.help.index. When extracting help, strstr is used on a mmap'ed .help.index, and
then extracted from a mmap'ed Configure.help.

This code doesn't handle errors to well. If extract is called, without
.help.index existing, it segfaults. Also, if an error happens when open a file,
mmap'ing, etc, it doesn't exit gracefully. Other than that, the script speeds
up help extraction.

Linux vs. Windows is a no-win situation.

Adam Heath of Borg-Linux adam.heath@usa.net Join the H.323 effort. Email
http://www.debian.org - Get Your Own Linux! h.323-request@cichlid.com with
http://wwp.mirabilis.com/3375265 - Page Me the word subscribe in the body.
------------B61691E0
Content-Type: application/octet-stream; name="2.1.81-index.configure.help"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="2.1.81-index.configure.help"

ZGlmZiAtcnVOIDIuMS44MS1wdXJlL01ha2VmaWxlIDIuMS44MS9NYWtlZmlsZQotLS0gMi4xLjgx
LXB1cmUvTWFrZWZpbGUJRnJpIEphbiAyMyAyMjo1ODoyMSAxOTk4CisrKyAyLjEuODEvTWFrZWZp
bGUJVHVlIEphbiAyNyAwMDozMTo1OSAxOTk4CkBAIC0xMSw3ICsxMSw3IEBACiAjCiAjIE5PVEUh
IFNNUCBpcyBleHBlcmltZW50YWwuIFNlZSB0aGUgZmlsZSBEb2N1bWVudGF0aW9uL1NNUC50eHQK
ICMKLVNNUCA9IDEKKyNTTVAgPSAxCiAjCiAjIFNNUCBwcm9maWxpbmcgb3B0aW9ucwogIyBTTVBf
UFJPRiA9IDEKQEAgLTIwOSwyMSArMjA5LDIxIEBACiAJCW1rZGlyIGluY2x1ZGUvbGludXgvbW9k
dWxlczsgXAogCWZpCiAKLW9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