skylib_fluffos_v3/
skylib_fluffos_v3/bin/
skylib_fluffos_v3/bin/db/
skylib_fluffos_v3/fluffos-2.9-ds2.04/
skylib_fluffos_v3/fluffos-2.9-ds2.04/ChangeLog.old/
skylib_fluffos_v3/fluffos-2.9-ds2.04/Win32/
skylib_fluffos_v3/fluffos-2.9-ds2.04/compat/
skylib_fluffos_v3/fluffos-2.9-ds2.04/compat/simuls/
skylib_fluffos_v3/fluffos-2.9-ds2.04/include/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/clone/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/command/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/data/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/etc/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/include/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/inherit/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/inherit/master/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/log/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/single/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/single/tests/compiler/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/single/tests/efuns/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/single/tests/operators/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/u/
skylib_fluffos_v3/fluffos-2.9-ds2.04/tmp/
skylib_fluffos_v3/fluffos-2.9-ds2.04/windows/
skylib_fluffos_v3/mudlib/
skylib_fluffos_v3/mudlib/cmds/
skylib_fluffos_v3/mudlib/cmds/admin/
skylib_fluffos_v3/mudlib/cmds/guild-race/
skylib_fluffos_v3/mudlib/cmds/living/broken/
skylib_fluffos_v3/mudlib/cmds/player/group_cmds/
skylib_fluffos_v3/mudlib/cmds/playtester/
skylib_fluffos_v3/mudlib/d/admin/
skylib_fluffos_v3/mudlib/d/admin/room/
skylib_fluffos_v3/mudlib/d/admin/room/we_care/
skylib_fluffos_v3/mudlib/d/admin/save/
skylib_fluffos_v3/mudlib/d/admin/text/
skylib_fluffos_v3/mudlib/d/learning/TinyTown/buildings/
skylib_fluffos_v3/mudlib/d/learning/TinyTown/map/
skylib_fluffos_v3/mudlib/d/learning/TinyTown/roads/
skylib_fluffos_v3/mudlib/d/learning/chars/
skylib_fluffos_v3/mudlib/d/learning/functions/
skylib_fluffos_v3/mudlib/d/learning/handlers/
skylib_fluffos_v3/mudlib/d/learning/help_topics/
skylib_fluffos_v3/mudlib/d/learning/help_topics/npcs/
skylib_fluffos_v3/mudlib/d/learning/help_topics/objects/
skylib_fluffos_v3/mudlib/d/learning/help_topics/rcs_demo/
skylib_fluffos_v3/mudlib/d/learning/help_topics/rcs_demo/RCS/
skylib_fluffos_v3/mudlib/d/learning/help_topics/rooms/
skylib_fluffos_v3/mudlib/d/learning/help_topics/rooms/crowd/
skylib_fluffos_v3/mudlib/d/learning/help_topics/rooms/situations/
skylib_fluffos_v3/mudlib/d/learning/save/
skylib_fluffos_v3/mudlib/d/learning/school/
skylib_fluffos_v3/mudlib/d/learning/school/add_sc/
skylib_fluffos_v3/mudlib/d/learning/school/characters/
skylib_fluffos_v3/mudlib/d/learning/school/general/
skylib_fluffos_v3/mudlib/d/learning/school/getting-started/
skylib_fluffos_v3/mudlib/d/learning/school/getting-started/basic_commands/
skylib_fluffos_v3/mudlib/d/learning/school/getting-started/edtutor/
skylib_fluffos_v3/mudlib/d/learning/school/getting-started/unix_tutor/
skylib_fluffos_v3/mudlib/d/learning/school/items/
skylib_fluffos_v3/mudlib/d/learning/school/npc_school/
skylib_fluffos_v3/mudlib/d/learning/school/room_school/
skylib_fluffos_v3/mudlib/d/learning/school/room_school/room_basic/
skylib_fluffos_v3/mudlib/d/learning/school/room_school/situations/
skylib_fluffos_v3/mudlib/d/learning/school/room_school/terrain_tutor/
skylib_fluffos_v3/mudlib/d/learning/text/
skylib_fluffos_v3/mudlib/d/liaison/
skylib_fluffos_v3/mudlib/d/mudlib/
skylib_fluffos_v3/mudlib/d/mudlib/changes/
skylib_fluffos_v3/mudlib/d/playtesters/
skylib_fluffos_v3/mudlib/d/playtesters/effects/
skylib_fluffos_v3/mudlib/d/playtesters/handlers/
skylib_fluffos_v3/mudlib/d/playtesters/items/
skylib_fluffos_v3/mudlib/d/sage/
skylib_fluffos_v3/mudlib/doc/
skylib_fluffos_v3/mudlib/doc/creator/
skylib_fluffos_v3/mudlib/doc/driver/
skylib_fluffos_v3/mudlib/doc/driver/efuns/arrays/
skylib_fluffos_v3/mudlib/doc/driver/efuns/buffers/
skylib_fluffos_v3/mudlib/doc/driver/efuns/calls/
skylib_fluffos_v3/mudlib/doc/driver/efuns/compile/
skylib_fluffos_v3/mudlib/doc/driver/efuns/filesystem/
skylib_fluffos_v3/mudlib/doc/driver/efuns/floats/
skylib_fluffos_v3/mudlib/doc/driver/efuns/functions/
skylib_fluffos_v3/mudlib/doc/driver/efuns/general/
skylib_fluffos_v3/mudlib/doc/driver/efuns/mappings/
skylib_fluffos_v3/mudlib/doc/driver/efuns/mixed/
skylib_fluffos_v3/mudlib/doc/driver/efuns/mudlib/
skylib_fluffos_v3/mudlib/doc/driver/efuns/numbers/
skylib_fluffos_v3/mudlib/doc/driver/efuns/parsing/
skylib_fluffos_v3/mudlib/doc/login/
skylib_fluffos_v3/mudlib/doc/lpc/basic_manual/
skylib_fluffos_v3/mudlib/doc/lpc/intermediate/
skylib_fluffos_v3/mudlib/doc/new/add_command/
skylib_fluffos_v3/mudlib/doc/new/events/
skylib_fluffos_v3/mudlib/doc/new/handlers/
skylib_fluffos_v3/mudlib/doc/new/living/race/
skylib_fluffos_v3/mudlib/doc/new/living/spells/
skylib_fluffos_v3/mudlib/doc/new/object/
skylib_fluffos_v3/mudlib/doc/new/player/
skylib_fluffos_v3/mudlib/doc/new/room/guild/
skylib_fluffos_v3/mudlib/doc/new/room/outside/
skylib_fluffos_v3/mudlib/doc/new/room/storeroom/
skylib_fluffos_v3/mudlib/doc/object/
skylib_fluffos_v3/mudlib/doc/playtesters/
skylib_fluffos_v3/mudlib/doc/policy/
skylib_fluffos_v3/mudlib/doc/weapons/
skylib_fluffos_v3/mudlib/global/
skylib_fluffos_v3/mudlib/global/creator/
skylib_fluffos_v3/mudlib/handlers/
skylib_fluffos_v3/mudlib/include/casino/
skylib_fluffos_v3/mudlib/include/cmds/
skylib_fluffos_v3/mudlib/include/effects/
skylib_fluffos_v3/mudlib/include/npc/
skylib_fluffos_v3/mudlib/include/room/
skylib_fluffos_v3/mudlib/include/shops/
skylib_fluffos_v3/mudlib/net/daemon/
skylib_fluffos_v3/mudlib/net/daemon/chars/
skylib_fluffos_v3/mudlib/net/inherit/
skylib_fluffos_v3/mudlib/net/obj/
skylib_fluffos_v3/mudlib/net/obj/BACKUPS/
skylib_fluffos_v3/mudlib/obj/amulets/
skylib_fluffos_v3/mudlib/obj/armours/plate/
skylib_fluffos_v3/mudlib/obj/b_day/
skylib_fluffos_v3/mudlib/obj/clothes/transport/horse/
skylib_fluffos_v3/mudlib/obj/faith/symbols/
skylib_fluffos_v3/mudlib/obj/fungi/
skylib_fluffos_v3/mudlib/obj/gatherables/
skylib_fluffos_v3/mudlib/obj/instruments/
skylib_fluffos_v3/mudlib/obj/media/
skylib_fluffos_v3/mudlib/obj/misc/player_shop/
skylib_fluffos_v3/mudlib/obj/monster/godmother/
skylib_fluffos_v3/mudlib/obj/monster/transport/
skylib_fluffos_v3/mudlib/obj/rings/
skylib_fluffos_v3/mudlib/obj/scabbards/
skylib_fluffos_v3/mudlib/obj/spells/
skylib_fluffos_v3/mudlib/obj/stationery/
skylib_fluffos_v3/mudlib/obj/stationery/envelopes/
skylib_fluffos_v3/mudlib/obj/toys/
skylib_fluffos_v3/mudlib/obj/vessels/
skylib_fluffos_v3/mudlib/obj/weapons/axes/
skylib_fluffos_v3/mudlib/obj/weapons/chains/
skylib_fluffos_v3/mudlib/obj/weapons/maces/BACKUPS/
skylib_fluffos_v3/mudlib/save/autodoc/
skylib_fluffos_v3/mudlib/save/book_handler/
skylib_fluffos_v3/mudlib/save/books/history/calarien/
skylib_fluffos_v3/mudlib/save/mail/
skylib_fluffos_v3/mudlib/save/new_soul/data/
skylib_fluffos_v3/mudlib/save/parcels/
skylib_fluffos_v3/mudlib/save/playerinfo/
skylib_fluffos_v3/mudlib/save/players/d/
skylib_fluffos_v3/mudlib/save/players/s/
skylib_fluffos_v3/mudlib/save/random_names/
skylib_fluffos_v3/mudlib/save/random_names/data/
skylib_fluffos_v3/mudlib/save/terrains/
skylib_fluffos_v3/mudlib/save/terrains/tutorial_desert/
skylib_fluffos_v3/mudlib/save/terrains/tutorial_grassy_field/
skylib_fluffos_v3/mudlib/save/terrains/tutorial_mountain/
skylib_fluffos_v3/mudlib/save/todo_lists/
skylib_fluffos_v3/mudlib/secure/
skylib_fluffos_v3/mudlib/secure/cmds/admin/
skylib_fluffos_v3/mudlib/secure/cmds/lord/
skylib_fluffos_v3/mudlib/secure/config/
skylib_fluffos_v3/mudlib/secure/handlers/autodoc/
skylib_fluffos_v3/mudlib/secure/handlers/intermud/
skylib_fluffos_v3/mudlib/secure/include/global/
skylib_fluffos_v3/mudlib/secure/save/
skylib_fluffos_v3/mudlib/secure/save/handlers/
skylib_fluffos_v3/mudlib/secure/std/
skylib_fluffos_v3/mudlib/secure/std/classes/
skylib_fluffos_v3/mudlib/secure/std/modules/
skylib_fluffos_v3/mudlib/std/creator/
skylib_fluffos_v3/mudlib/std/dom/
skylib_fluffos_v3/mudlib/std/effects/
skylib_fluffos_v3/mudlib/std/effects/external/
skylib_fluffos_v3/mudlib/std/effects/fighting/
skylib_fluffos_v3/mudlib/std/effects/magic/
skylib_fluffos_v3/mudlib/std/effects/magic/BACKUPS/
skylib_fluffos_v3/mudlib/std/effects/other/BACKUPS/
skylib_fluffos_v3/mudlib/std/effects/priest/
skylib_fluffos_v3/mudlib/std/effects/room/
skylib_fluffos_v3/mudlib/std/environ/
skylib_fluffos_v3/mudlib/std/guilds/
skylib_fluffos_v3/mudlib/std/guilds/old/
skylib_fluffos_v3/mudlib/std/languages/
skylib_fluffos_v3/mudlib/std/liquids/
skylib_fluffos_v3/mudlib/std/npc/
skylib_fluffos_v3/mudlib/std/npc/goals/
skylib_fluffos_v3/mudlib/std/npc/goals/basic/
skylib_fluffos_v3/mudlib/std/npc/goals/misc/
skylib_fluffos_v3/mudlib/std/npc/plans/
skylib_fluffos_v3/mudlib/std/npc/plans/basic/
skylib_fluffos_v3/mudlib/std/npc/types/
skylib_fluffos_v3/mudlib/std/npc/types/helper/
skylib_fluffos_v3/mudlib/std/npcs/
skylib_fluffos_v3/mudlib/std/outsides/
skylib_fluffos_v3/mudlib/std/races/shadows/
skylib_fluffos_v3/mudlib/std/room/basic/BACKUPS/
skylib_fluffos_v3/mudlib/std/room/basic/topography/
skylib_fluffos_v3/mudlib/std/room/controller/
skylib_fluffos_v3/mudlib/std/room/inherit/topography/
skylib_fluffos_v3/mudlib/std/room/topography/area/
skylib_fluffos_v3/mudlib/std/room/topography/iroom/
skylib_fluffos_v3/mudlib/std/room/topography/milestone/
skylib_fluffos_v3/mudlib/std/shadows/curses/
skylib_fluffos_v3/mudlib/std/shadows/disease/
skylib_fluffos_v3/mudlib/std/shadows/fighting/
skylib_fluffos_v3/mudlib/std/shadows/healing/
skylib_fluffos_v3/mudlib/std/shadows/magic/
skylib_fluffos_v3/mudlib/std/shadows/poison/
skylib_fluffos_v3/mudlib/std/shadows/room/
skylib_fluffos_v3/mudlib/std/shops/controllers/
skylib_fluffos_v3/mudlib/std/shops/objs/
skylib_fluffos_v3/mudlib/std/shops/player_shop/
skylib_fluffos_v3/mudlib/std/socket/
skylib_fluffos_v3/mudlib/std/soul/d/
skylib_fluffos_v3/mudlib/std/soul/e/
skylib_fluffos_v3/mudlib/std/soul/i/
skylib_fluffos_v3/mudlib/std/soul/j/
skylib_fluffos_v3/mudlib/std/soul/k/
skylib_fluffos_v3/mudlib/std/soul/l/
skylib_fluffos_v3/mudlib/std/soul/n/
skylib_fluffos_v3/mudlib/std/soul/o/
skylib_fluffos_v3/mudlib/std/soul/q/
skylib_fluffos_v3/mudlib/std/soul/r/
skylib_fluffos_v3/mudlib/std/soul/u/
skylib_fluffos_v3/mudlib/std/soul/v/
skylib_fluffos_v3/mudlib/std/soul/y/
skylib_fluffos_v3/mudlib/std/soul/z/
skylib_fluffos_v3/mudlib/std/stationery/
skylib_fluffos_v3/mudlib/w/
skylib_fluffos_v3/mudlib/w/default/
skylib_fluffos_v3/mudlib/w/default/armour/
skylib_fluffos_v3/mudlib/w/default/clothes/
skylib_fluffos_v3/mudlib/w/default/item/
skylib_fluffos_v3/mudlib/w/default/npc/
skylib_fluffos_v3/mudlib/w/default/room/
skylib_fluffos_v3/mudlib/w/default/weapon/
skylib_fluffos_v3/mudlib/www/
skylib_fluffos_v3/mudlib/www/java/
skylib_fluffos_v3/mudlib/www/secure/
skylib_fluffos_v3/mudlib/www/secure/lpc/advanced/
skylib_fluffos_v3/mudlib/www/secure/lpc/intermediate/
skylib_fluffos_v3/win32/
/**
 * This class keepos track of all the aliases, names and adjectives
 * which are used to match the object.
 * @see /global/player->add_command()
 * @see /std/basic/desc.c
 */
#include <parse_command.h>

inherit "/std/basic/id_match";

private nosave string _name;
private nosave string *_alias;
private nosave string *_adjectives;
private nosave string *_plurals;

/* name handleing stuff */
/**
 * This method sets the name of the object.   The name is the basic handle
 * used to reference the object.   It should not have any spaces
 * in it.
 * @example
 * set_name("rabbit");
 * @param str the name
 * @see query_name()
 * @see add_alias()
 * @see add_adjective()
 */
void set_name(string str) { _name = str; }
/**
 * This method returns the name of the object.
 * @return the name of the object
 * @see set_name()
 * @see add_alias()
 * @see add_adjective()
 */
string query_name() { return _name; }

/**
 * This method returns the capitalized name.   It calls the function
 * capitalize() on the name
 * @see query_name()
 * @see set_name()
 * @see efun::capitalize()
 */
string query_cap_name() {
    return ( !_name ? "Someone" : CAP(_name) );
} /* query_cap_name() */

void create() {
   _alias = ({ });
   _plurals = ({ });
   _adjectives = ({ });
   _name = "object";
} /* create() */

/* alias stuff */
/**
 * This method sets the entire alias array.   It overrides any current alias
 * definitions and sets the alias arry.   This should be used carefully
 * if at all.   Use add_alias instead.
 * @param str the new alias array
 */
void set_aliases(string *str) {
   _alias = str;
} /* set_aliases() */

/**
 * This method adds an alias to the object.   An alias for the object is the
 * part used as the main noun for the object. ie in the case of a "green
 * bath tub", "bathtub" might be an alias for the object. and "green"
 * and "bath" would be adjectives. The value set with add_alias is also
 * used with present. This means you can make up an alias for an object
 * that players cannot normaly access but you can
 * get a handle on with present. For an exmple of this look at the money
 * object.
 * <p>
 * The function takes an array or a string as an argument.   If an array
 * is passed in each element of the array is added to the alias
 * array, if it is a string then the string elemnt is added to the
 * array.
 * @param str the alias(s) to add
 * @see set_name()
 * @see remove_alias()
 * @see set_aliases()
 * @see query_alias()
 * @example
 * set_name("tub");
 * set_short("green bath tub");
 * add_alias("bathtub");
 * add_adjective("green");
 * add_adjective("bath");
 */
void add_alias( mixed str ) {
   string tmp;

   if( pointerp( str ) ) {
       foreach( tmp in str )
         add_alias( tmp );
   } else if( member_array( str, _alias ) == -1 )
       _alias += ({ str });
} /* add_alias() */

/**
 * This method removes an alias from the object.
 * @see add_alias()
 * @see query_alias()
 * @param str the alias to remove
 * @return 1 if the alias is found, 0 if not
 */
int remove_alias(string str) {
   int i;

   if( ( i = member_array(str, _alias) ) == -1 )
       return 0;
   _alias = delete( _alias, i, 1 );
   return 1;
} /* remove_alias() */

/**
 * This method returns the current list of aliases.
 * @see add_alias()
 * @see remove_alias()
 * @return the array of aliases (array of strings)
 */
string *query_alias() { return _alias; }

/**
 * This method is used by the present efun.   It determines if the
 * passed in string is an alias or the name of the object.
 * @param str the value to check
 * @return 1 if the name matches
 */
int id( string str ) {
   if( !pointerp(_alias) )
       _alias = ({ });
   return ( str == _name ) || ( member_array( str, _alias ) != -1 );
} /* id() */

/**
 * This method sets the compete array of plurals.   This shod
 * not be used, use add_plural and remove_plural instead.
 * @see add_plural()
 * @see remove_plural()
 * @see query_plurals()
 */
void set_plurals(string *str) {
   _plurals = str;
} /* set_plurals() */

/**
 * This method adds a plural onto the object.   The plurals will be
 * used in plural name matching by thje find_match simul_efun
 * @see /secure/simul_efun->find_match()
 * @see set_plurals()
 * @see remove_plural()
 * @see query_plurals()
 * @see add_plurals()
 */
void add_plural( mixed str ) {
    string tmp;

    if( pointerp( str ) ) {
        foreach( tmp in str )
          add_plural( tmp );
    } else if( member_array( str, _plurals ) == -1 )
        _plurals += ({ str });

} /* add_plural() */

/**
 * This method removes a plural from the object.
 * @param str the plural to remove
 * @see add_plural()
 * @see query_plurals()
 * @see set_plurals()
 */
void remove_plural(string str) {
   int i;

   if( ( i = member_array( str, _plurals ) ) != -1 )
       _plurals = delete( _plurals, i, 1 );
} /* remove_plurals() */

/**
 * This method adds multiple plurals to the object.
 * @param str the array of plurals to add
 * @see add_plural()
 * @see remove_plural()
 * @see query_plurals()
 */
void add_plurals( string *str ) {
    string tmp;

    foreach( tmp in str )
      add_plural( tmp );
} /* add_plurals() */

/**
 * This method returns the complete list of plurals for the
 * object.
 * @return the complete array of plurals
 */
string *query_plurals() { return _plurals; }

/**
 * This method is similar to the id function, except this will check the
 * plural names instead of the aliases and the name.
 * @param str the name to check
 * @return 1 if the name matches one of the plurals, 0 otherwise
 * @see id()
 * @see id_adjective()
 */
int id_plural(string str) {
   return ( member_array( str, _plurals ) != -1 );
} /* id_plural() */

/**
 * This method sets all the adjectives for the object.   This method
 * should not be used, please use add_adjective instead.
 * @see add_adjective()
 * @see remove_adjective()
 * @see query_adjectives()
 * @param str the array of adjectives
 */
void set_adjectives(string *str) {
   _adjectives = str;
} /* set_adjectives() */

/**
 * This method adds an adjective to the object.   The adjectives are used for the
 * object matching routines.    Fort example, if you have a "green
 * bath tun" then "green" and "bath" are adjectives.
 * @see add_alias()
 * @see remove_adjective()
 * @see query_adjectives()
 * @see set_adjectives()
 */
void add_adjective( mixed str ) {
   string tmp;

   if( pointerp(str) ) {
       foreach( tmp in str )
         add_adjective( tmp );
       return;
   }

   if( stringp(str) )
       str = explode( str, " " );

   foreach( tmp in str )
     if( member_array( tmp, _adjectives ) == -1 )
         _adjectives += ({ tmp });

} /* add_adjective() */

/**
 * This method will remove an adjective from the object.
 * @see add_alias()
 * @see add_adjective()
 * @see query_adjectives()
 * @param str the adective(s) to remove
 */
void remove_adjective(mixed str) {
   string tmp;
   int i;

   if( pointerp(str) ) {
       foreach( tmp in str )
         remove_adjective( tmp );
   } else if( ( i = member_array( str, _adjectives ) ) != -1 ) {
         _adjectives = delete( _adjectives, i, 1 );
   }
} /* remove_adjective() */

/**
 * This method returns the current list of adjectives associated with
 * this object.
 * @return the complete list of adjectives
 */
string *query_adjectives() { return _adjectives; }

/**
 * This method is similar to the id function, except this will check the
 * adjectives instead of the aliases and the name.
 * @param word the word to check
 * @return 1 if the word matches one of the adjectives, 0 otherwise
 * @see id()
 * @see id_plural()
 */
int id_adjective( string word ) {
   return ( member_array( word, _adjectives ) != -1 );
} /* id_adjective() */

/** @ignore yes */
string *parse_command_id_list() {
    return ({ _name, file_name(TO) }) + query_alias();
} /* parse_command_id_list() */

/** @ignore yes */
string *parse_command_plural_id_list() { return query_plurals(); }
/** @ignore yes */
string *parse_command_adjectiv_id_list() { return query_adjectives(); }

/** @ignore yes */
object query_parse_id( mixed *arr ) {
   if( arr[P_THING] == 0 )
       return TO;
   if( arr[P_THING] < 0 ) { /* specific object case */
       arr[P_THING]++;
       if( arr[P_THING] != 0 )
           return 0;
       arr[P_THING] = -10321;
       return TO;
   }
   arr[P_THING]--; /* lots of objects case */
   if( arr[P_THING] != 0 )
       return TO;
   arr[P_THING] = -10101;
   return TO;
} /* query_parse_id() */

/** @ignore yes */
object query_frac_parse_id( mixed *arr ) {
   if( arr[P_THING] < 0 ) {
       arr[P_THING]++;
       if( arr[P_THING] != 0 )
           return 0;
       arr[P_THING] = -10235;
       return 0; /* it refered to me and I am pretty depressed about it.
                  * I want to break free! */
   }
   if( arr[P_THING] == 0 ) {
       if( ( arr[P_MAX_NUM]*arr[P_TOP])/arr[P_BOT] > arr[P_CUR_NUM]++ )
           return TO;
       else
           return 0;
   }
   if( ( arr[P_THING]*arr[P_TOP])/arr[P_BOT] > arr[P_CUR_NUM]++ )
       return TO;
   return 0;
} /* query_frac_parse_id() */