#!/bin/sh
# Find fvwm commands from function.c struct functions
# Written by Toshi Isogai

echo "# $ff"
echo "# Collection of fvwm2 builtin commands for FvwmCommand"
echo ""

echo "alias FvwmCommand='$1/FvwmCommand'"
echo 'AM () { '
echo 'FvwmCommand "+ $*"'
echo '}'


awk 'BEGIN { OFS=""; }
     /struct function/,/""/ {
        if ( $0 ~ /\{ *"[a-zA-Z_]/ ) {
	  split ( $0, a, "\"" );
	  print  a[2]," () {"
	  print  "FvwmCommand \"", a[2], " $*\""
	  print  "}" ;
        }
}'
