Messages in this thread | | | Date | Tue, 27 Jan 1998 00:49:22 -0500 | From | Adam Heath <> | Subject | Patch: 2.1.81: Index Configure.help(using mmap and C) |
| |
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.[unhandled content-type:application/octet-stream] | |