makedefs --grep prep, misc cleanup (TRUNK ONLY)
use makedefs --grep in Makefile.doc call make clean in doc from make clean in top add commented out rule to produce mdgrep.h from mdgrep.pl macosx1.5: don't chown/chgrp for single-user install unixmain.c: work around C90 warning for Mac-specific code, fix last fix makedefs.c: temporarily disallow blank after control introducer until docs catch up mdgrep.pl: add ALLDOCS, clean up generated file's header
This commit is contained in:
+7
-1
@@ -488,6 +488,8 @@ do_ext_makedefs(int argc, char **argv){
|
||||
|
||||
Any line starting with a caret is a control line; as in C, zero or more spaces
|
||||
may be embedded in the line almost anywhere; the caret MUST be in column 1.
|
||||
(XXX for the moment, no white space is allowed after the caret because
|
||||
existing lines in the docs look like that)
|
||||
|
||||
Control lines:
|
||||
^^ a line starting with a (single) literal caret
|
||||
@@ -585,7 +587,11 @@ do_grep_control(buf)
|
||||
{
|
||||
int isif = 1;
|
||||
char *buf0 = buf;
|
||||
#if 1
|
||||
if(isspace(buf[0])) return &buf[-1]; /* XXX see docs above */
|
||||
#else
|
||||
while(buf[0] && isspace(buf[0])) buf++;
|
||||
#endif
|
||||
switch(buf[0]){
|
||||
case '#': /* comment */
|
||||
break;
|
||||
@@ -678,7 +684,7 @@ do_grep(){
|
||||
char *buf1;
|
||||
|
||||
if(fgets(buf, sizeof(buf), inputfp) == 0) break;
|
||||
if(tmp=strchr(buf,'\n')) *tmp = '\0';
|
||||
if( (tmp=strchr(buf,'\n')) ) *tmp = '\0';
|
||||
grep_lineno++;
|
||||
if(grep_trace){
|
||||
Fprintf(outputfp, "%04d %c >%s\n",
|
||||
|
||||
+12
-2
@@ -28,6 +28,10 @@
|
||||
# Miscellaneous
|
||||
@misc = qw/BETA/;
|
||||
|
||||
# Meta
|
||||
@meta = qw/ALLDOCS/; # convention: use --grep-define ALLDOCS to notate
|
||||
# items that are conditionally available
|
||||
|
||||
# JUNK:
|
||||
# MICRO BSD __GNUC__ NHSTDC TERMLIB __linux__ LINUX WIN32CON NO_TERMS
|
||||
# ULTRIX_PROTO TERMINFO _DCC DISPMAP OPT_DISPMAP TARGET_API_MAC_CARBON
|
||||
@@ -52,9 +56,15 @@ $outfile = "mdgrep.h";
|
||||
sub start_file {
|
||||
($rev) = ('$Revision$') =~ m/: (.*) .$/;
|
||||
open(OUT, ">$outfile") || die "open $outfile: $!";
|
||||
# NB: Date and Revision below will be modified when mdgrep.h is written to
|
||||
# cvs - this is correct (but it means you must commit changes to mdgrep.pl
|
||||
# before generating mdgrep.h and committing that file.
|
||||
print OUT <<E_O_M;
|
||||
/*
|
||||
* $outfile
|
||||
* NetHack 3.5 $outfile $Date$ $Revision$
|
||||
* Copyright (c) Kenneth Lorber, Kensington, Maryland, 2008
|
||||
* NetHack may be freely redistributed. See license for details.
|
||||
*
|
||||
* This file generated by mdgrep.pl version $rev.
|
||||
* DO NOT EDIT! Your changes will be lost.
|
||||
*/
|
||||
@@ -107,6 +117,6 @@ sub gen_commands {
|
||||
&start_file;
|
||||
&gen_magic(0, @const_false);
|
||||
&gen_magic(1, @const_true);
|
||||
&gen_file(sort(@os,@win,@feature,@misc,@const_false,@const_true));
|
||||
&gen_file(sort(@os,@win,@feature,@misc,@meta,@const_false,@const_true));
|
||||
&gen_commands;
|
||||
&end_file;
|
||||
|
||||
Reference in New Issue
Block a user