In file globalcmd.h:

typedef int (*gcs_t)

(void)

Declaration for a GCS handler.

Documentation

Declaration for a GCS handler.

This is a pointer to a function similar to:

    int handler (void)
    

The handler takes no arguments. Its duties include parsing a user command that has already been input. You may use any means provided by the BBS library to this effect. I usually use the margc and margv technique because it's more elegant (and because I started my BBS programming days writing for the Major BBS, where this was right about the only decent way of parsing input).

The handler must check to see if the user input is the command it implements. If so, it must perform any processing and return a value of 1 to the caller. If the command is not the one dealt with by the handler, the handler must return 0 to the caller.

Please do not modify the user input in any way until you make sure is contains the command you service.

Alphabetic index



This page was generated with the help of DOC++.