Generated from the greek.def file:


/*
 * EDIT THIS FILE WITH CAUTION  (greek-hdlr.c)
 * 
 * It has been AutoGen-ed  Saturday May 24, 2008 at 11:49:30 AM PDT
 * From the definitions    /home/bkorb/ag/addon/dispatch/greek.def
 * and the template file   dispatch.tpl
 *
 *  Recognizer generation options:
 *
 *  external scope
 *  gperf generated
 *  partial name matches are matched, if the match is unique
 *  A dispatch routine is generated that will call handler routines
 */

#include <stdio.h>
#include "greek.h"
static int fumble;

int
do_alpha(char const * cmd, void * cookie)
{
#ifdef DEBUG
    printf("handling alpha (1) cmd - args:  '%s'\n", cmd);
#else
    fputs("alpha\n", stdout);
#endif
    return (int)0;
}


int
do_beta(char const * cmd, void * cookie)
{
#ifdef DEBUG
    printf("handling beta  (2) cmd - args:  '%s'\n", cmd);
#else
    fputs("beta\n", stdout);
#endif
    return (int)0;
}


int
do_gamma(char const * cmd, void * cookie)
{
#ifdef DEBUG
    printf("handling gamma (3) cmd - args:  '%s'\n", cmd);
#else
    fputs("gamma\n", stdout);
#endif
    return (int)0;
}


int
do_delta(char const * cmd, void * cookie)
{
#ifdef DEBUG
    printf("handling delta (4) cmd - args:  '%s'\n", cmd);
#else
    fputs("delta\n", stdout);
#endif
    return (int)0;
}


int
do_omega(char const * cmd, void * cookie)
{
#ifdef DEBUG
    printf("handling omega (5) cmd - args:  '%s'\n", cmd);
#else
    fputs("omega\n", stdout);
#endif
    return (int)0;
}


int
do_help(char const * cmd, void * cookie)
{
    static char const h_txt[ 164 ] =
       "alpha   this is the first greek letter\n"
       "beta    beta customers are helpful\n"
       "omega   this is the end.\n"
       "help    The help text skips secret commands 'gamma' and 'delta'.\n";
    if (*cmd != '\0')
        printf("help args:  %s\n", cmd);
    fwrite(h_txt, 164, 1, stdout);
    return (int)0;
}


int
do_inval_greek(char const * cmd, void * cookie)
{
    char z[9];
    {
        char * p = z;
        int    l = 0;
        for (;;) {
            int ch = *(cmd++);
            if ((! isalnum(ch)) &&
                (ch != '-') &&
                (ch != '_'))
                break;
            *(p++) = ch;
            if (++l >= 5) {
                *(p++) = '.';
                *(p++) = '.';
                *(p++) = '.';
                break;
            }
        }
        *p = '\0';
    }
    printf("Invalid command:  '%s'\n", z);
    return (int)~0;
}
/*
 *  You are encouraged to remove this main procedure, fill out the
 *  dispatch procedures and not regenerate this again.
 */
int
main( int argc, char** argv )
{
    while (--argc > 0)
        dispatch_greek( *++argv, 0 );
    return 0;
}