File interpreter.c

* Routines to handle aliasing *

References Functions:
  • do_action() : act.social.c
  • do_advance() : act.wizard.c
  • do_alias() : interpreter.c
  • do_assist() : act.offensive.c
  • do_at() : act.wizard.c
  • do_backstab() : act.offensive.c
  • do_ban() : ban.c
  • do_bash() : act.offensive.c
  • do_cast() : spell_parser.c
  • do_color() : act.informative.c
  • do_commands() : act.informative.c
  • do_consider() : act.informative.c
  • do_date() : act.wizard.c
  • do_dc() : act.wizard.c
  • do_diagnose() : act.informative.c
  • do_display() : act.other.c
  • do_drink() : act.item.c
  • do_drop() : act.item.c
  • do_eat() : act.item.c
  • do_echo() : act.wizard.c
  • do_enter() : act.movement.c
  • do_equipment() : act.informative.c
  • do_examine() : act.informative.c
  • do_exits() : act.informative.c
  • do_flee() : act.offensive.c
  • do_follow() : act.movement.c
  • do_force() : act.wizard.c
  • do_gecho() : act.wizard.c
  • do_gen_comm() : act.comm.c
  • do_gen_door() : act.movement.c
  • do_gen_ps() : act.informative.c
  • do_gen_tog() : act.other.c
  • do_gen_write() : act.other.c
  • do_get() : act.item.c
  • do_give() : act.item.c
  • do_gold() : act.informative.c
  • do_goto() : act.wizard.c
  • do_grab() : act.item.c
  • do_group() : act.other.c
  • do_gsay() : act.comm.c
  • do_hcontrol() : house.c
  • do_help() : act.informative.c
  • do_hide() : act.other.c
  • do_hit() : act.offensive.c
  • do_house() : house.c
  • do_insult() : act.social.c
  • do_inventory() : act.informative.c
  • do_invis() : act.wizard.c
  • do_kick() : act.offensive.c
  • do_kill() : act.offensive.c
  • do_last() : act.wizard.c
  • do_leave() : act.movement.c
  • do_levels() : act.informative.c
  • do_load() : act.wizard.c
  • do_look() : act.informative.c
  • do_move() : act.movement.c
  • do_not_here() : act.other.c
  • do_olc() : olc.c
  • do_order() : act.offensive.c
  • do_page() : act.comm.c
  • do_poofset() : act.wizard.c
  • do_pour() : act.item.c
  • do_practice() : act.other.c
  • do_purge() : act.wizard.c
  • do_put() : act.item.c
  • do_qcomm() : act.comm.c
  • do_quit() : act.other.c
  • do_reboot() : db.c
  • do_remove() : act.item.c
  • do_reply() : act.comm.c
  • do_report() : act.other.c
  • do_rescue() : act.offensive.c
  • do_rest() : act.movement.c
  • do_restore() : act.wizard.c
  • do_return() : act.wizard.c
  • do_save() : act.other.c
  • do_say() : act.comm.c
  • do_score() : act.informative.c
  • do_send() : act.wizard.c
  • do_set() : act.wizard.c
  • do_show() : act.wizard.c
  • do_shutdown() : act.wizard.c
  • do_sit() : act.movement.c
  • do_skillset() : modify.c
  • do_sleep() : act.movement.c
  • do_sneak() : act.other.c
  • do_snoop() : act.wizard.c
  • do_spec_comm() : act.comm.c
  • do_split() : act.other.c
  • do_stand() : act.movement.c
  • do_stat() : act.wizard.c
  • do_steal() : act.other.c
  • do_switch() : act.wizard.c
  • do_syslog() : act.wizard.c
  • do_teleport() : act.wizard.c
  • do_tell() : act.comm.c
  • do_time() : act.informative.c
  • do_title() : act.other.c
  • do_toggle() : act.informative.c
  • do_track() : graph.c
  • do_trans() : act.wizard.c
  • do_unban() : ban.c
  • do_ungroup() : act.other.c
  • do_use() : act.other.c
  • do_users() : act.informative.c
  • do_visible() : act.other.c
  • do_vnum() : act.wizard.c
  • do_vstat() : act.wizard.c
  • do_wake() : act.movement.c
  • do_wear() : act.item.c
  • do_weather() : act.informative.c
  • do_where() : act.informative.c
  • do_who() : act.informative.c
  • do_wield() : act.item.c
  • do_wimpy() : act.other.c
  • do_wizlock() : act.wizard.c
  • do_wiznet() : act.wizard.c
  • do_wizutil() : act.wizard.c
  • do_write() : act.comm.c
  • do_zreset() : act.wizard.c

  • Included Files

  • #include "conf.h"
  • #include "sysdep.h"
  • #include <stdio.h>
  • #include <ctype.h>
  • #include <stdlib.h>
  • #include <string.h>
  • #include <sys/types.h>
  • #include <unistd.h>
  • #include <limits.h>
  • #include <sys/time.h>
  • #include <assert.h>
  • #include "structs.h"
  • #include "comm.h"
  • #include "interpreter.h"
  • #include "db.h"
  • #include "utils.h"
  • #include "spells.h"
  • #include "handler.h"
  • #include "mail.h"
  • #include "screen.h"

  • Preprocessor definitions

    #define __INTERPRETER_C__

    #define NUM_TOKENS 9

    #define RECON 1

    #define USURP 2

    #define UNSWITCH 3


    Global Variable cmd_info

    struct command_info cmd_info[]
    Visible in:
  • act.comm.c
  • act.informative.c
  • act.item.c
  • act.movement.c
  • act.offensive.c
  • act.other.c
  • act.social.c
  • act.wizard.c
  • ban.c
  • boards.c
  • castle.c
  • class.c
  • comm.c
  • db.c
  • fight.c
  • graph.c
  • handler.c
  • house.c
  • interpreter.c
  • mail.c
  • mobact.c
  • modify.c
  • objsave.c
  • olc.c
  • shop.c
  • spec_assign.c
  • spec_procs.c
  • spell_parser.c
  • weather.c
  • Used in:
  • bank() : spec_procs.c
  • boot_social_messages() : act.social.c
  • command_interpreter() : interpreter.c
  • do_commands() : act.informative.c
  • do_gen_write() : act.other.c
  • do_qcomm() : act.comm.c
  • do_use() : act.other.c
  • dump() : spec_procs.c
  • find_command() : interpreter.c
  • gen_receptionist() : objsave.c
  • guild() : spec_procs.c
  • pet_shops() : spec_procs.c
  • postmaster() : mail.c
  • shop_keeper() : shop.c
  • sort_commands() : act.informative.c

  • Global Variable fill

    char* fill[]
    Visible in:
  • interpreter.c
  • Used in:
  • fill_word() : interpreter.c

  • Global Variable reserved

    char* reserved[]
    Visible in:
  • interpreter.c
  • Used in:
  • reserved_word() : interpreter.c

  • External Variables

    titles
    extern struct title_type titles[4][34]

    motd
    extern char* motd

    Defined in:
  • db.c
  • imotd
    extern char* imotd

    Defined in:
  • db.c
  • background
    extern char* background

    Defined in:
  • db.c
  • MENU
    extern char* MENU

    Defined in:
  • config.c
  • WELC_MESSG
    extern char* WELC_MESSG

    Defined in:
  • config.c
  • START_MESSG
    extern char* START_MESSG

    Defined in:
  • config.c
  • character_list
    extern struct char_data* character_list

    Defined in:
  • db.c
  • descriptor_list
    extern struct descriptor_data* descriptor_list

    Defined in:
  • comm.c
  • player_table
    extern struct player_index_element* player_table

    Defined in:
  • db.c
  • top_of_p_table
    extern int top_of_p_table

    Defined in:
  • db.c
  • restrict
    extern int restrict

    Defined in:
  • db.c
  • mob_index
    extern struct index_data* mob_index

    Defined in:
  • db.c
  • obj_index
    extern struct index_data* obj_index

    Defined in:
  • db.c
  • world
    extern struct room_data* world

    Defined in:
  • db.c
  • no_specials
    extern int no_specials

    Defined in:
  • comm.c
  • r_mortal_start_room
    extern sh_int r_mortal_start_room

    Defined in:
  • db.c
  • r_immort_start_room
    extern sh_int r_immort_start_room

    Defined in:
  • db.c
  • r_frozen_start_room
    extern sh_int r_frozen_start_room

    Defined in:
  • db.c
  • class_menu
    extern char* class_menu

    Defined in:
  • class.c
  • max_bad_pws
    extern int max_bad_pws

    Defined in:
  • config.c

  • Global Function _parse_name()

    int _parse_name ( char* arg, char* name )
    Called by:
  • nanny() : interpreter.c

  • Global Function any_one_arg()

    char* any_one_arg ( char* argument, char* first_arg )
    Prototyped in:
  • interpreter.h
  • Calls:
  • skip_spaces() : interpreter.c
  • Called by:
  • command_interpreter() : interpreter.c
  • do_alias() : interpreter.c
  • find_skill_num() : spell_parser.c
  • half_chop() : interpreter.c
  • perform_alias() : interpreter.c

  • Global Function command_interpreter()

    void command_interpreter ( struct char_data* ch, char* argument )
    Prototyped in:
  • interpreter.h
  • Calls:
  • any_one_arg() : interpreter.c
  • send_to_char() : comm.c
  • skip_spaces() : interpreter.c
  • special() : interpreter.c
  • strlen(), strncmp()
  • Called by:
  • do_at() : act.wizard.c
  • do_force() : act.wizard.c
  • do_order() : act.offensive.c
  • game_loop() : comm.c
  • References Variables:
  • cmd_info : interpreter.c
  • no_specials : comm.c
  • arg

  • Global Function delete_doubledollar()

    char* delete_doubledollar ( char* string )
    Prototyped in:
  • interpreter.h
  • Calls:
  • strchr()
  • Called by:
  • Board_write_message() : boards.c
  • do_alias() : interpreter.c
  • do_gecho() : act.wizard.c
  • do_gen_write() : act.other.c
  • do_title() : act.other.c
  • do_wiznet() : act.wizard.c
  • string_add() : modify.c

  • Global Function do_alias()

    void do_alias ( struct char_data* ch, char* argument, int cmd, int subcmd )
    Prototyped in:
  • interpreter.c
  • Calls:
  • any_one_arg() : interpreter.c
  • delete_doubledollar() : interpreter.c
  • find_alias() : interpreter.c
  • free_alias() : interpreter.c
  • send_to_char() : comm.c
  • str_cmp() : utils.c
  • str_dup() : utils.c
  • __gnu_calloc(), abort(), perror(), sprintf(), strchr()
  • Used in:
  • interpreter.c
  • References Variables:
  • arg, buf

  • Global Function fill_word()

    int fill_word ( char* argument )
    Prototyped in:
  • interpreter.h
  • Calls:
  • search_block() : interpreter.c
  • Called by:
  • nanny() : interpreter.c
  • one_argument() : interpreter.c
  • one_word() : interpreter.c
  • References Variables:
  • fill : interpreter.c

  • Global Function find_alias()

    struct alias* find_alias ( struct alias* alias_list, char* str )
    Calls:
  • strcmp()
  • Called by:
  • do_alias() : interpreter.c
  • perform_alias() : interpreter.c

  • Global Function find_command()

    int find_command ( char* command )
    Prototyped in:
  • interpreter.h
  • Calls:
  • strcmp()
  • Called by:
  • assign_the_shopkeepers() : shop.c
  • boot_social_messages() : act.social.c
  • gen_receptionist() : objsave.c
  • init_boards() : boards.c
  • sort_commands() : act.informative.c
  • References Variables:
  • cmd_info : interpreter.c

  • Global Function find_name()

    int find_name ( char* name )
    Calls:
  • str_cmp() : utils.c
  • References Variables:
  • player_table : db.c
  • top_of_p_table : db.c

  • Global Function free_alias()

    void free_alias ( struct alias* a )
    Calls:
  • free()
  • Called by:
  • do_alias() : interpreter.c

  • Global Function half_chop()

    void half_chop ( char* string, char* arg1, char* arg2 )
    Prototyped in:
  • interpreter.h
  • Calls:
  • any_one_arg() : interpreter.c
  • skip_spaces() : interpreter.c
  • strcpy()
  • Called by:
  • do_at() : act.wizard.c
  • do_force() : act.wizard.c
  • do_hcontrol() : house.c
  • do_look() : act.informative.c
  • do_olc() : olc.c
  • do_order() : act.offensive.c
  • do_page() : act.comm.c
  • do_send() : act.wizard.c
  • do_set() : act.wizard.c
  • do_spec_comm() : act.comm.c
  • do_stat() : act.wizard.c
  • do_tell() : act.comm.c
  • do_use() : act.other.c
  • do_users() : act.informative.c
  • do_who() : act.informative.c
  • do_wiznet() : act.wizard.c
  • olc_interpreter() : olc.c

  • Global Function is_abbrev()

    int is_abbrev ( char* arg1, char* arg2 )
    Prototyped in:
  • interpreter.h
  • Called by:
  • do_hcontrol() : house.c
  • do_load() : act.wizard.c
  • do_look() : act.informative.c
  • do_order() : act.offensive.c
  • do_stat() : act.wizard.c
  • do_vnum() : act.wizard.c
  • do_vstat() : act.wizard.c
  • find_skill_num() : spell_parser.c

  • Global Function is_number()

    int is_number ( char* str )
    Prototyped in:
  • interpreter.h
  • Called by:
  • do_drop() : act.item.c
  • do_give() : act.item.c
  • do_show() : act.wizard.c
  • do_split() : act.other.c
  • do_wiznet() : act.wizard.c
  • get_hash_obj_vis() : shop.c
  • perform_set() : act.wizard.c
  • show_shops() : shop.c
  • transaction_amt() : shop.c

  • Global Function nanny()

    void nanny ( struct descriptor_data* d, char* arg )
    Prototyped in:
  • interpreter.h
  • Calls:
  • Crash_delete_file() : objsave.c
  • Crash_load() : objsave.c
  • MAX() : utils.c
  • Valid_Name() : ban.c
  • _parse_name() : interpreter.c
  • act() : comm.c
  • basic_mud_log() : utils.c
  • char_to_room() : handler.c
  • clear_char() : db.c
  • close_socket() : comm.c
  • create_entry() : db.c
  • do_start() : class.c
  • echo_off() : comm.c
  • echo_on() : comm.c
  • fill_word() : interpreter.c
  • free_char() : db.c
  • has_mail() : mail.c
  • init_char() : db.c
  • isbanned() : ban.c
  • look_at_room() : act.informative.c
  • mudlog() : utils.c
  • page_string() : modify.c
  • perform_dupe_check() : interpreter.c
  • real_room() : db.c
  • reserved_word() : interpreter.c
  • reset_char() : db.c
  • save_char() : db.c
  • send_to_char() : comm.c
  • skip_spaces() : interpreter.c
  • store_to_char() : db.c
  • str_cmp() : utils.c
  • write_to_output() : comm.c
  • __gnu_calloc(), abort(), crypt(), free(), perror(), sprintf(), strcmp(), strcpy(), strlen(), strncmp(), strncpy()
  • Called by:
  • game_loop() : comm.c
  • References Variables:
  • MENU : config.c
  • START_MESSG : config.c
  • WELC_MESSG : config.c
  • background : db.c
  • character_list : db.c
  • class_menu : class.c
  • imotd : db.c
  • max_bad_pws : config.c
  • motd : db.c
  • r_frozen_start_room : db.c
  • r_immort_start_room : db.c
  • r_mortal_start_room : db.c
  • restrict : db.c

  • Global Function one_argument()

    char* one_argument ( char* argument, char* first_arg )
    Prototyped in:
  • interpreter.h
  • Calls:
  • fill_word() : interpreter.c
  • skip_spaces() : interpreter.c
  • Called by:
  • Board_display_msg() : boards.c
  • Board_remove_msg() : boards.c
  • Board_show_board() : boards.c
  • do_action() : act.social.c
  • do_assist() : act.offensive.c
  • do_backstab() : act.offensive.c
  • do_bash() : act.offensive.c
  • do_cast() : spell_parser.c
  • do_color() : act.informative.c
  • do_commands() : act.informative.c
  • do_consider() : act.informative.c
  • do_dc() : act.wizard.c
  • do_diagnose() : act.informative.c
  • do_drink() : act.item.c
  • do_drop() : act.item.c
  • do_eat() : act.item.c
  • do_enter() : act.movement.c
  • do_examine() : act.informative.c
  • do_follow() : act.movement.c
  • do_give() : act.item.c
  • do_grab() : act.item.c
  • do_group() : act.other.c
  • do_hit() : act.offensive.c
  • do_house() : house.c
  • do_insult() : act.social.c
  • do_invis() : act.wizard.c
  • do_kick() : act.offensive.c
  • do_kill() : act.offensive.c
  • do_last() : act.wizard.c
  • do_olc() : olc.c
  • do_practice() : act.other.c
  • do_purge() : act.wizard.c
  • do_reboot() : db.c
  • do_remove() : act.item.c
  • do_rescue() : act.offensive.c
  • do_restore() : act.wizard.c
  • do_shutdown() : act.wizard.c
  • do_skillset() : modify.c
  • do_snoop() : act.wizard.c
  • do_split() : act.other.c
  • do_steal() : act.other.c
  • do_switch() : act.wizard.c
  • do_syslog() : act.wizard.c
  • do_track() : graph.c
  • do_trans() : act.wizard.c
  • do_unban() : ban.c
  • do_ungroup() : act.other.c
  • do_users() : act.informative.c
  • do_wake() : act.movement.c
  • do_where() : act.informative.c
  • do_wield() : act.item.c
  • do_wimpy() : act.other.c
  • do_wizlock() : act.wizard.c
  • do_wiznet() : act.wizard.c
  • do_wizutil() : act.wizard.c
  • do_zreset() : act.wizard.c
  • find_target_room() : act.wizard.c
  • generic_find() : handler.c
  • get_id_by_name() : db.c
  • get_purchase_obj() : shop.c
  • hcontrol_build_house() : house.c
  • mag_objectmagic() : spell_parser.c
  • olc_bitvector() : olc.c
  • pet_shops() : spec_procs.c
  • postmaster_send_mail() : mail.c
  • shopping_list() : shop.c
  • shopping_sell() : shop.c
  • shopping_value() : shop.c
  • show_string() : modify.c
  • transaction_amt() : shop.c
  • two_arguments() : interpreter.c

  • Global Function one_word()

    char* one_word ( char* argument, char* first_arg )
    Prototyped in:
  • interpreter.h
  • Calls:
  • fill_word() : interpreter.c
  • skip_spaces() : interpreter.c
  • Called by:
  • load_help() : db.c

  • Global Function perform_alias()

    int perform_alias ( struct descriptor_data* d, char* orig )
    Calls:
  • any_one_arg() : interpreter.c
  • find_alias() : interpreter.c
  • perform_complex_alias() : interpreter.c
  • strcpy()
  • Called by:
  • game_loop() : comm.c

  • Global Function perform_complex_alias()

    void perform_complex_alias ( struct txt_q* input_q, char* orig, struct alias* a )
    Calls:
  • write_to_q() : comm.c
  • strcpy(), strlen(), strtok()
  • Called by:
  • perform_alias() : interpreter.c
  • References Variables:
  • buf, buf

  • Global Function perform_dupe_check()

    int perform_dupe_check ( struct descriptor_data* d )
    Calls:
  • MAX() : utils.c
  • act() : comm.c
  • char_from_room() : handler.c
  • char_to_room() : handler.c
  • extract_char() : handler.c
  • free_char() : db.c
  • mudlog() : utils.c
  • write_to_output() : comm.c
  • sprintf()
  • Called by:
  • nanny() : interpreter.c
  • References Variables:
  • character_list : db.c
  • descriptor_list : comm.c
  • buf

  • Global Function reserved_word()

    int reserved_word ( char* argument )
    Calls:
  • search_block() : interpreter.c
  • Called by:
  • nanny() : interpreter.c
  • References Variables:
  • reserved : interpreter.c

  • Global Function search_block()

    int search_block ( char* arg, char** list, bool exact )
    Prototyped in:
  • interpreter.h
  • Calls:
  • strcmp(), strncmp()
  • Called by:
  • do_color() : act.informative.c
  • do_look() : act.informative.c
  • do_olc() : olc.c
  • do_syslog() : act.wizard.c
  • fill_word() : interpreter.c
  • find_door() : act.movement.c
  • find_eq_pos() : act.item.c
  • hcontrol_build_house() : house.c
  • olc_bitvector() : olc.c
  • olc_interpreter() : olc.c
  • reserved_word() : interpreter.c

  • Global Function skip_spaces()

    void skip_spaces ( char** string )
    Prototyped in:
  • interpreter.h
  • Called by:
  • Board_write_message() : boards.c
  • any_one_arg() : interpreter.c
  • command_interpreter() : interpreter.c
  • do_cast() : spell_parser.c
  • do_display() : act.other.c
  • do_echo() : act.wizard.c
  • do_gecho() : act.wizard.c
  • do_gen_comm() : act.comm.c
  • do_gen_door() : act.movement.c
  • do_gen_write() : act.other.c
  • do_gsay() : act.comm.c
  • do_help() : act.informative.c
  • do_poofset() : act.wizard.c
  • do_qcomm() : act.comm.c
  • do_reply() : act.comm.c
  • do_say() : act.comm.c
  • do_show() : act.wizard.c
  • do_skillset() : modify.c
  • do_title() : act.other.c
  • do_who() : act.informative.c
  • do_wiznet() : act.wizard.c
  • guild() : spec_procs.c
  • half_chop() : interpreter.c
  • load_zones() : db.c
  • nanny() : interpreter.c
  • olc_bitvector() : olc.c
  • olc_string() : olc.c
  • one_argument() : interpreter.c
  • one_word() : interpreter.c

  • Global Function special()

    int special ( struct char_data* ch, int cmd, char* arg )
    Prototyped in:
  • interpreter.c
  • Called by:
  • command_interpreter() : interpreter.c
  • References Variables:
  • mob_index : db.c
  • obj_index : db.c
  • world : db.c

  • Global Function two_arguments()

    char* two_arguments ( char* argument, char* first_arg, char* second_arg )
    Prototyped in:
  • interpreter.h
  • Calls:
  • one_argument() : interpreter.c
  • Called by:
  • do_advance() : act.wizard.c
  • do_ban() : ban.c
  • do_gen_door() : act.movement.c
  • do_get() : act.item.c
  • do_load() : act.wizard.c
  • do_pour() : act.item.c
  • do_put() : act.item.c
  • do_show() : act.wizard.c
  • do_teleport() : act.wizard.c
  • do_vnum() : act.wizard.c
  • do_vstat() : act.wizard.c
  • do_wear() : act.item.c
  • do_write() : act.comm.c