#!/bin/sh
 
 # g_wel
 # =====

 # This file is part of Gerolf Markup Shredder,
 # written by G. D. Brettschneider (1999-2006).
 
 GMSdateG_WEL=20060927
 
 # Prologue: ==================================================================
 
 # Not running:
 
 if [ "$GMS_SHELL" = "" ]; then
   echo "This is Gerolf Markup Shredder (g_wel)."
   exit
 fi 
 
 # Debug: ---------------------------------------------------------------------
   
 if [ "$GMS_DEBUG" = "X" -o "$GMS_DEBUG" = "Y" ]; then
   source "$GMS_SHELL/l_banner" -debug g_wel $1 $2 $3 $4
 elif  [ "$GMS_DEBUG" = "Z" ]; then
   echo " g_wel ($1) ($2) ($3) ($4) ($5) ($6) ($7) ($8) ($9)" >> "$Z"
 fi 
 
 # Chapters: ==================================================================
 
 # Not defined:
 
 if [ "$1" = "" ]; then source "$GMS_SHELL/l_banner" -no_action g_wel
   
 # Resize: --------------------------------------------------------------------
 
 elif [ $1 = -resize ]; then 
   export REPLY_OFFSET=2
   export REPLY_SIZE=25
   export REPLY_ITEMS=1
 
 # Build: ---------------------------------------------------------------------
 
 elif [ $1 = -build ]; then
   source "$GMS_SHELL/g_wel" -resize called_by g_wel -build
   source "$GMS_SHELL/l_wel" -build called_by g_wel -build
   export GMS_RECEIVE=1 
 
 # Remove: --------------------------------------------------------------------
   
 elif [ $1 = -remove ]; then
   source "$GMS_SHELL/g_wel" -resize called_by g_wel -remove
   source "$GMS_SHELL/l_wel" -remove called_by g_wel -remove
   source "$GMS_SHELL/l_banner" -upper -first called_by g_wel -remove
   source "$GMS_SHELL/l_banner" -lower -first called_by g_wel -remove
   source "$GMS_SHELL/g_menu" -build called_by g_wel -remove
   
 # Not found: -----------------------------------------------------------------
 
 else
   source "$GMS_SHELL/l_banner" -no_action g_wel $1   
 fi
