From 4ab4f038c4721ae62ffff8195583317683f52de0 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Fri, 10 Aug 2001 19:24:26 +0000 Subject: [PATCH] updates --- scripts/silcdoc/gen.sh | 7 ++++--- scripts/silcdoc/gen_detail.php | 7 ++----- scripts/silcdoc/gen_toc.php | 3 +-- scripts/silcdoc/index.php | 29 +---------------------------- scripts/silcdoc/silcdoc | 18 +++++------------- util/robodoc/Source/generator.c | 15 ++++++++++++++- 6 files changed, 27 insertions(+), 52 deletions(-) diff --git a/scripts/silcdoc/gen.sh b/scripts/silcdoc/gen.sh index 1b990eeb..b11cff5c 100755 --- a/scripts/silcdoc/gen.sh +++ b/scripts/silcdoc/gen.sh @@ -1,7 +1,8 @@ #!/bin/sh cat << EOF > tmp.php - + EOF -php -f tmp.php >$3 -rm -f tmp.php \ No newline at end of file +php -f tmp.php >$3.tmp +mv $3.tmp $3 +rm -f tmp.php diff --git a/scripts/silcdoc/gen_detail.php b/scripts/silcdoc/gen_detail.php index 6e2f8faa..1ab755bf 100644 --- a/scripts/silcdoc/gen_detail.php +++ b/scripts/silcdoc/gen_detail.php @@ -29,8 +29,7 @@ @@ -46,9 +45,7 @@ width="99%" align=center> /* Get the index for this page */ $len = strcspn($page, "_"); $fname = substr($page, 0, $len); -if (Is_Readable($fname."_index.tmpl")) - require $fname."_index.tmpl"; -eit +require "$fname"."_index.tmpl"; ?> diff --git a/scripts/silcdoc/gen_toc.php b/scripts/silcdoc/gen_toc.php index d91d0c05..48e60e37 100644 --- a/scripts/silcdoc/gen_toc.php +++ b/scripts/silcdoc/gen_toc.php @@ -28,8 +28,7 @@ diff --git a/scripts/silcdoc/index.php b/scripts/silcdoc/index.php index 8842dd56..efb873c4 100644 --- a/scripts/silcdoc/index.php +++ b/scripts/silcdoc/index.php @@ -1,14 +1,3 @@ - - @@ -26,18 +15,6 @@ $SecurityFilter = $HTMLRoot.EReg_Replace('([^a-zA-Z0-9_.])*','',$page); a:active { text-decoration: none; color: #2f486f; } --> - - SILC Secure Internet Live Conferencing - -<?php - -if (Is_Readable($SecurityFilter.".php")) - echo $page; -else - echo "news"; - -?> - - @@ -59,11 +36,7 @@ else diff --git a/scripts/silcdoc/silcdoc b/scripts/silcdoc/silcdoc index 40d16a54..382b1232 100755 --- a/scripts/silcdoc/silcdoc +++ b/scripts/silcdoc/silcdoc @@ -42,8 +42,6 @@ if [ "$TYPE" = "HTML" ]; then mkdir /tmp/silcdoc.html cp $headers /tmp/silcdoc.html - # Generate the first pass of the documentation. This will generate - # the HTML from the headers. path=`pwd` cd /tmp/silcdoc.html headers=`find . -name "silc*.h" |cut -d/ -f2 |cut -d. -f1` @@ -54,23 +52,17 @@ if [ "$TYPE" = "HTML" ]; then # Generate the TOC file sh gen.sh gen_toc.php $DST/$i.html $DST/$i.html + sh gen.sh index.php $DST/$i.html $DST/$i.html - # Generate the details - files=`find $DST -name "silc_*.html"` + # Generate the details and the layour + files=`find $DST -name "$i*_*.html"` for k in $files do - sh gen.sg gen_detail.php $k $k + sh gen.sh gen_detail.php $k $k + sh gen.sh index.php $k $k done done - # Make the second pass to create the actual layout for the files - rm -f $DST/*.tmpl - files=`find $DST -name "silc*.html"` - for i in $files - do - sh gen.sh index.php $i $i - done - rm -rf /tmp/silcdoc.html rm -f $DST/tmp.php fi diff --git a/util/robodoc/Source/generator.c b/util/robodoc/Source/generator.c index 34f3db12..9e3d5825 100644 --- a/util/robodoc/Source/generator.c +++ b/util/robodoc/Source/generator.c @@ -10,7 +10,7 @@ #include "links.h" #include "generator.h" #include "analyser.h" - +#include /****f* ROBODoc/RB_Generate_Documentation [3.0h] * NAME @@ -66,6 +66,11 @@ RB_Generate_Documentation ( { sprintf(fname, "%s_%s.html", doc_base, cur_header->function_name); dest_doc = fopen(fname, "w"); + if (!dest_doc) + { + fprintf(stderr, "%s\n", strerror(errno)); + exit(1); + } } RB_Generate_Header_Start (dest_doc, cur_header); @@ -108,6 +113,9 @@ RB_Generate_Documentation ( whoami, cur_header->name); RB_Generate_Header_End (dest_doc, cur_header); + + if (output_mode == HTML) + fclose(dest_doc); } dest_doc = orig_doc; @@ -266,6 +274,11 @@ RB_Generate_Doc_Start ( /* Generate quick index file, for fast referencing */ sprintf(iname, "%s_index.tmpl", doc_base); index = fopen(iname, "w"); + if (!index) + { + fprintf(stderr, "%s\n", strerror(errno)); + exit(1); + } for (cur_header = first_header; cur_header; -- 2.24.0