From fb7641163fd558d8e96de41bea91bd8b0cf8ce95 Mon Sep 17 00:00:00 2001 From: "Greg J. Badros" Date: Tue, 14 Dec 1999 00:29:42 +0000 Subject: [PATCH] * guile-doc-snarf.awk: Use sub instead of gsub in ^ anchored replacement for docstrings. Fixes problem Ryan Yeske observed with using mawk on his system. Thanks Ryan! --- libguile/guile-doc-snarf.awk | 51 ------------------------------------ 1 file changed, 51 deletions(-) diff --git a/libguile/guile-doc-snarf.awk b/libguile/guile-doc-snarf.awk index 3e4a5c388..e69de29bb 100644 --- a/libguile/guile-doc-snarf.awk +++ b/libguile/guile-doc-snarf.awk @@ -1,51 +0,0 @@ -#!/usr/bin/awk -f -# Written by Greg J. Badros, -# 12-Dec-1999 - -BEGIN { FS="|"; - filename = ARGV[1]; ARGV[1] = ""; - dot_x_file = filename; dot_doc_file = filename; - sub(/\..*$/,".x",dot_x_file); - sub(/\..*$/,".doc",dot_doc_file); - # be sure to put something in the files to help make out - print "" > dot_x_file; - printf "" > dot_doc_file; -} - -/^[ \t]*%%%/ { copy = $0; - gsub(/[ \t]*%%%/, "", copy); - gsub(/\$\$\$.*$/, "", copy); - print copy > dot_x_file } - -/\$\$\$/,/@@@/ { copy = $0; - if (match(copy,/\$\$\$R/)) { registering = 1; } - else {registering = 0; } - gsub(/.*\$\$\$./,"", copy); - gsub(/@@@.*/,"",copy); - gsub(/[ \t]+/," ", copy); - sub(/^[ \t]*/,"(", copy); - gsub(/\"/,"",copy); - sub(/ \(/," ",copy); - numargs = gsub(/SCM /,"", copy); - numcommas = gsub(/,/,"", copy); - numactuals = $2 + $3 + $4; - location = $5; - gsub(/\"/,"",location); - sub(/^[ \t]*/,"",location); - sub(/[ \t]*$/,"",location); - sub(/: /,":",location); - gsub(/[ \t]*\|.*$/,"",copy); - sub(/ \)/,")",copy); - if (numargs != numactuals && !registering) - { print location ":*** `" copy "' is improperly registered as having " numactuals " arguments"; } - print " \n" copy (registering?")":"") > dot_doc_file ; } - -/@@@/,/@!!!.*$/ { copy = $0; - gsub(/.*@@@/,"",copy); - gsub(/^[ \t]*"?/,"", copy); - gsub(/\"?[ \t]*@!!!.*$/,"", copy); - gsub(/\\\"/,"\"",copy); - gsub(/[ \t]*$/,"", copy); - if (copy != "") { print copy > dot_doc_file } } -/@!!![ \t]/ { print "[" location "]" >> dot_doc_file; } -