1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-07 08:40:21 +02:00
guile/libguile/guile-snarf.awk.in
Greg J. Badros e8e9b690b4 * backtrace.c (scm_set_print_params_x): Renamed from
set_print_params_x.

* guile-doc-snarf.in: Use guile-snarf.awk, not
guile-doc-snarf.awk.  Pass the basename of $filename

* load.h: Added prototypes for scm_sys_library_dir,
scm_sys_site_dir.

* load.c (scm_sys_library_dir, scm_sys_site_dir):  Added these
functions, and took out the old scm_library_dir, scm_site_dir,
scm_pkgdata_dir.  Now the primitives are %package-data-dir
(already existed), %library-dir, and %site-dir.

* debug.c: Use SCM_MISC_ERROR when possible instead of using
s_scm_* in a scm_misc_error() call.

* Makefile.am: Use guile-snarf.awk, not guile-doc-snarf.awk.  Make
using guile-doc-snarf send stdout to $@ to create the .x file like
guile-snarf does.

* guile-snarf.awk.in: Added.
1999-12-14 17:41:59 +00:00

52 lines
1.8 KiB
Awk
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/awk -f
# Written by Greg J. Badros, <gjb@cs.washington.edu>
# 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 "";
printf "" > dot_doc_file;
}
/^[ \t]*%%%/ { copy = $0;
gsub(/[ \t]*%%%/, "", copy);
gsub(/\$\$\$.*$/, "", copy);
print copy; }
/\$\$\$/,/@@@/ { copy = $0;
if (match(copy,/\$\$\$R/)) { registering = 1; }
else {registering = 0; }
gsub(/.*\$\$\$./,"", copy);
gsub(/@@@.*/,"",copy);
gsub(/[ \t]+/," ", copy);
sub(/^[ \t]*/,"(", copy);
gsub(/\"/,"",copy);
numargs = gsub(/\([ \t]*void[ \t]*\)/,"()", 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" > /dev/stderr; }
print " \n" copy (registering?")":"") > dot_doc_file ; }
/@@@/,/@!!!.*$/ { copy = $0;
gsub(/.*@@@/,"",copy);
sub(/^[ \t]*"?/,"", copy);
sub(/\"?[ \t]*@!!!.*$/,"", copy);
gsub(/\\\"/,"\"",copy);
gsub(/[ \t]*$/,"", copy);
if (copy != "") { print copy > dot_doc_file } }
/@!!![ \t]/ { print "[" location "]" >> dot_doc_file; }