lkml.org 
[lkml]   [1998]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectPatch: 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]
\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.066 / U:0.784 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site