mux/src/match.h

Go to the documentation of this file.
00001 // match.h
00002 //
00003 // $Id: match.h,v 1.2 2003/02/05 06:20:59 jake Exp $
00004 //
00005 
00006 #include "copyright.h"
00007 
00008 #ifndef M_MATCH_H
00009 #define M_MATCH_H
00010 
00011 typedef struct match_state MSTATE;
00012 struct match_state {
00013     int     confidence;     /* How confident are we?  CON_xx */
00014     int     count;          /* # of matches at this confidence */
00015     int     pref_type;      /* The preferred object type */
00016     bool    check_keys;     /* Should we test locks? */
00017     dbref   absolute_form;  /* If #num, then the number */
00018     dbref   match;          /* What I've found so far */
00019     dbref   player;         /* Who is performing match */
00020     char    *string;        /* The string to search for */
00021 };
00022 
00023 /* Match functions
00024  * Usage:
00025  *  init_match(player, name, type);
00026  *  match_this();
00027  *  match_that();
00028  *  ...
00029  *  thing = match_result()
00030  */
00031 
00032 extern void init_match(dbref, const char *, int);
00033 extern void init_match_check_keys(dbref, const char *, int);
00034 extern void match_player(void);
00035 extern void match_absolute(void);
00036 extern void match_me(void);
00037 extern void match_here(void);
00038 extern void match_possession(void);
00039 extern void match_neighbor(void);
00040 extern void match_exit(void);
00041 extern void match_exit_with_parents(void);
00042 extern void match_carried_exit(void);
00043 extern void match_carried_exit_with_parents(void);
00044 extern void match_master_exit(void);
00045 extern void match_everything(int);
00046 extern dbref match_result(void);
00047 extern dbref last_match_result(void);
00048 extern dbref match_status(dbref, dbref);
00049 extern dbref noisy_match_result(void);
00050 extern void save_match_state(MSTATE *);
00051 extern void restore_match_state(MSTATE *);
00052 extern void match_zone_exit(void);
00053 extern dbref match_thing(dbref player, char *name);
00054 extern dbref match_thing_quiet(dbref player, char *name);
00055 extern void safe_match_result(dbref it, char *buff, char **bufc);
00056 
00057 #define MAT_NO_EXITS        1   /* Don't check for exits */
00058 #define MAT_EXIT_PARENTS    2   /* Check for exits in parents */
00059 #define MAT_NUMERIC         4   /* Check for un-#ified dbrefs */
00060 #define MAT_HOME            8   /* Check for 'home' */
00061 
00062 #endif // !M_MATCH_H

Generated on Mon May 28 04:40:10 2007 for MUX by  doxygen 1.4.7