#!/bin/sh -
# scwm-snarf
# (C) 1999 Ken Pizzini and Greg J. Badros
# Handle snarfs with embedded %/%/ separating the arglist of procedures
# from the rest.
# See scwm-snarf.h for what expands SCWM_PROC macros to what we process here.
# We need to do a couple of regexp search and replaces:
# s/SCM //g
# s/,[ \t]*//g
# s/"(/"'(/g  # add the Scheme quote to the list -- tricky shell quoting below
# AND we need these to only happen *after* the %/%/ marker on the input lines
# so we use two sed's to do it.
guile-snarf "$@" | \
sed 's@% */ *% */@\
@
       /\n/!b
       h
       s/SCM //g
       s/\$\$\$.*//g
       s/,[ 	]*/ /g
       s/"(/"'\''(/
       x
       G
       s/\n.*\n//' 
