/
LIB3/
LIB3/D/ADMIN/
LIB3/D/ADMIN/OBJ/
LIB3/D/ADMIN/ROOM/W/
LIB3/D/HOME/
LIB3/D/HOME/CITY/ARENA/
LIB3/D/HOME/CITY/ITEMS/
LIB3/D/HOME/CITY/POSTOFFI/
LIB3/DOC/
LIB3/GLOBAL/SPECIAL/
LIB3/GLOBAL/VIRTUAL/
LIB3/NET/
LIB3/NET/CONFIG/
LIB3/NET/DAEMON/CHARS/
LIB3/NET/GOPHER/
LIB3/NET/INHERIT/
LIB3/NET/OBJ/
LIB3/NET/SAVE/
LIB3/NET/VIRTUAL/
LIB3/OBJ/B_DAY/
LIB3/OBJ/HANDLERS/TERM_TYP/
LIB3/PLAYERS/B/
LIB3/PLAYERS/N/
LIB3/ROOM/
LIB3/SAVE/
LIB3/SAVE/BOARDS/
LIB3/SAVE/ENVIRON/
LIB3/SAVE/POST/
LIB3/STD/COMMANDS/SHADOWS/
LIB3/STD/CREATOR/
LIB3/STD/DOM/
LIB3/STD/EFFECTS/
LIB3/STD/EFFECTS/HEALING/
LIB3/STD/EFFECTS/OTHER/
LIB3/STD/EFFECTS/POISONS/
LIB3/STD/ENVIRON/
LIB3/STD/GUILDS/
LIB3/STD/LIQUIDS/
LIB3/STD/ROOM/
LIB3/STD/TRIGGER/SHADOW/
LIB3/W/
LIB3/W/BANNOR/
LIB3/W/NEWSTYLE/
varargs mixed find_match(string str, mixed ob) {
mixed *array, test;
int i, num;
string nick, type;

  if (stringp(ob)) {
    ob -> dummy();
    ob = find_object(ob);
  }
  test = ({ });
  nick = (string)this_object()->expand_nickname(str);
  if (!nick && this_player())
    nick = (string)this_player()->expand_nickname(str);
  if (nick && nick!="")
    str = nick;
  parse_command(str,all_inventory(ob),"%i",test);
  if (!test || !sizeof(test))
    return ({ });
  if (test[0] == 0)
    return test[1..sizeof(test)];
  if (test[0]<0)
    return ({ test[-test[0]] });
  return filter_array(test[1..sizeof(test)], "query_simul_efun_id",
                         this_object(), ({ test[0], str }) );
}

int query_simul_efun_id(object ob, mixed *arr) { 
  return (int)ob->query_parse_id(arr);
}

/*
 * What the hell would need this???
 *
 * vowel(int i) {
 *     return (i == 'a' || i == 'e' || i == 'i' || i == 'o' || i == 'u');
 *     }
 */

/*
 * I want to find where this is called and change it.
 * when (if) I implement this the params will be the other way around!!
 * consistent with bindex!!
 *
 * int index(mixed *array, mixed match) {
 * int i;
 *     log_file("INDEX", "Called from "+file_name(previous_object()) + "\n");
 *     for (i=0;i<sizeof(array);i++)
 *     if (array[i] == match) return i;
 *         return -1;
 *     }
 */

/*
 * use print_object() ;)
 *
 * write_object_array(ob) {
 * int i;
 *     if (!pointerp(ob)) { write(ob); write(" "); return; }
 *     write("({ ");
 *     for (i=0;i<sizeof(ob);++i) write_object_array(ob[i]);
 *     write(" })\n");
 *     }
 */

/* 
 * I want to find what uses this code so I can change it!
 *
 * private static string *numbers;
 * 
 * string write_number(int i) {
 *     if (!sizeof(numbers))
 *         numbers = ({
 *             "Zero","One","Two","Three","Four","Five","Six",
 *             "Seven","Eight","Nine","Ten","Eleven","Twelve"
 *             });
 *     if (i>12) return "many";
 *     return numbers[i];
 *     }
 */
 
shout(string str, object avoid) {
object ob;
int i;
    ob = users();
    for (i=0;i<sizeof(ob);i++)
        if (ob[i] != avoid && !ob[i] -> query_earmuffs())
        tell_object(ob[i], str);
    }

mixed *delete(mixed *arr, int start, int len) {
  return arr[0..start-1]+arr[start+len..sizeof(arr)];
}

mixed *slice_array(mixed *arr, int start, int fin) {
  return arr[start..fin];
}

mixed *insert(mixed *arr, mixed el, int pos) {
  return arr[0..pos-1]+({ el })+arr[pos..sizeof(arr)];
}

int bindex(mixed el, mixed *array) {
int i, j, k;
 
    if (!pointerp(array)) return -1;
    k = sizeof(array)-1;
    if (el < array[0]) return -1;
    else if (el > array[k]) return -(k+2);
    do {
	i = (j+k)/2;
	if (array[i] == el) return i;
	else if (el>array[i]) j = i;
	else k = i;
	} while (j+1 < k);
    return -j-2;
    }
 
mixed *binsert(mixed el, mixed *array) {
int i;
    if (!pointerp(array)) return ({ el });
    i = bindex(el, array);
    if (i >= 0) array = insert(array, el, i);
    else array = insert(array, el, -i-1);
    return array;
    }