#include <sys/types.h>
#include <stdio.h>
#include <time.h>
#include <string.h>
#include "merc.h"
#include "tables.h"
Include dependency graph for lookup.c:

Go to the source code of this file.
Functions | |
| int | clan_lookup (const char *name) |
| int | cont_lookup (const char *name) |
| int | dragon_lookup (const char *name) |
| int | flag_lookup (const char *name, const struct flag_type *flag_table) |
| HELP_AREA * | had_lookup (char *arg) |
| HELP_DATA * | help_lookup (char *keyword) |
| int | item_lookup (const char *name) |
| int | kingdom_lookup (const char *name) |
| int | liq_lookup (const char *name) |
| int | position_lookup (const char *name) |
| int | race_lookup (const char *name) |
| int | sex_lookup (const char *name) |
| int | size_lookup (const char *name) |
|
|
Definition at line 67 of file lookup.c. References clan_table, LOWER, MAX_CLAN, and str_prefix(). Referenced by cmd_eval(), do_enhanced_disable(), do_guild(), do_set_leader(), do_who(), do_who_clan(), fread_char(), fread_pet(), load_rooms(), and REDIT(). 00068 {
00069 int clan;
00070
00071 if (name == NULL)
00072 return 0;
00073
00074 for (clan = 0; clan < MAX_CLAN; clan++)
00075 {
00076 if (LOWER (name[0]) == LOWER (clan_table[clan].name[0])
00077 && !str_prefix (name, clan_table[clan].name))
00078 return clan;
00079 }
00080
00081 return 0;
00082 }
|
Here is the call graph for this function:

|
|
Definition at line 52 of file lookup.c. References conts_table, LOWER, MAX_CONT, and str_prefix(). Referenced by AEDIT(), and save_area(). 00053 {
00054 int cont;
00055 if (name == NULL)
00056 return 0;
00057
00058 for (cont = 0; cont < MAX_CONT; cont++)
00059 {
00060 if (LOWER(name[0]) == LOWER(conts_table[cont].name[0])
00061 && !str_prefix (name, conts_table[cont].name))
00062 return cont;
00063 }
00064 return 0;
00065 }
|
Here is the call graph for this function:

|
|
Definition at line 84 of file lookup.c. References dragon(), dragon_table, LOWER, and str_prefix(). 00085 {
00086 int dragon;
00087
00088 for (dragon =0; dragon < 2; dragon++)
00089 {
00090 if(LOWER(name[0]) == LOWER(dragon_table[dragon].name[0])
00091 && !str_prefix(name, dragon_table[dragon].name))
00092 return dragon;
00093 }
00094 return 0;
00095 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 39 of file lookup.c. References LOWER, NO_FLAG, and str_prefix(). Referenced by cmd_eval(), do_flag(), flag_value(), and load_mobiles(). 00040 {
00041 int flag;
00042
00043 for (flag = 0; flag_table[flag].name != NULL; flag++)
00044 {
00045 if (LOWER (name[0]) == LOWER (flag_table[flag].name[0])
00046 && !str_prefix (name, flag_table[flag].name))
00047 return flag_table[flag].bit;
00048 }
00049
00050 return NO_FLAG;
00051 }
|
Here is the call graph for this function:

|
|
Definition at line 218 of file lookup.c. References help_area_data::filename, had_list, help_area_data::next, and str_cmp(). 00219 {
00220 HELP_AREA *temp;
00221 extern HELP_AREA *had_list;
00222
00223 for (temp = had_list; temp; temp = temp->next)
00224 if (!str_cmp (arg, temp->filename))
00225 return temp;
00226
00227 return NULL;
00228 }
|
Here is the call graph for this function:

|
|
Definition at line 196 of file lookup.c. References help_first, is_name(), help_data::keyword, MIL, help_data::next, and one_argument(). 00197 {
00198 HELP_DATA *pHelp;
00199 char temp[MIL], argall[MIL];
00200
00201 argall[0] = '\0';
00202
00203 while (keyword[0] != '\0')
00204 {
00205 keyword = one_argument (keyword, temp);
00206 if (argall[0] != '\0')
00207 strcat (argall, " ");
00208 strcat (argall, temp);
00209 }
00210
00211 for (pHelp = help_first; pHelp != NULL; pHelp = pHelp->next)
00212 if (is_name (argall, pHelp->keyword))
00213 return pHelp;
00214
00215 return NULL;
00216 }
|
Here is the call graph for this function:

|
|
Definition at line 168 of file lookup.c. References item_table, LOWER, str_prefix(), and item_type::type. Referenced by cmd_eval(), and load_objects(). 00169 {
00170 int type;
00171
00172 for (type = 0; item_table[type].name != NULL; type++)
00173 {
00174 if (LOWER (name[0]) == LOWER (item_table[type].name[0])
00175 && !str_prefix (name, item_table[type].name))
00176 return item_table[type].type;
00177 }
00178
00179 return -1;
00180 }
|
Here is the call graph for this function:

|
|
Definition at line 97 of file lookup.c. References kingdom_table, LOWER, MAX_KINGDOM, and str_prefix(). Referenced by do_enhanced_disable(), do_kingdom_guild(), do_who_kingdom(), and fread_char(). 00098 {
00099 int kingdom;
00100 if (name == NULL)
00101 return 0;
00102 for (kingdom =0; kingdom < MAX_KINGDOM; kingdom++)
00103 {
00104 if (LOWER (name[0]) == LOWER (kingdom_table[kingdom].name[0])
00105 && !str_prefix (name, kingdom_table[kingdom].name))
00106 return kingdom;
00107 }
00108 return 0;
00109 }
|
Here is the call graph for this function:

|
|
Definition at line 182 of file lookup.c. References liq_table, LOWER, and str_prefix(). Referenced by load_objects(), and set_obj_values(). 00183 {
00184 int liq;
00185
00186 for (liq = 0; liq_table[liq].liq_name != NULL; liq++)
00187 {
00188 if (LOWER (name[0]) == LOWER (liq_table[liq].liq_name[0])
00189 && !str_prefix (name, liq_table[liq].liq_name))
00190 return liq;
00191 }
00192
00193 return -1;
00194 }
|
Here is the call graph for this function:

|
|
Definition at line 111 of file lookup.c. References LOWER, position_table, and str_prefix(). Referenced by cmd_eval(), and load_mobiles(). 00112 {
00113 int pos;
00114
00115 for (pos = 0; position_table[pos].name != NULL; pos++)
00116 {
00117 if (LOWER (name[0]) == LOWER (position_table[pos].name[0])
00118 && !str_prefix (name, position_table[pos].name))
00119 return pos;
00120 }
00121
00122 return -1;
00123 }
|
Here is the call graph for this function:

|
|
Definition at line 154 of file lookup.c. References LOWER, race_table, and str_prefix(). Referenced by cmd_eval(), do_enhanced_disable(), do_mset(), do_roar(), do_who(), fread_char(), fread_pet(), get_curr_stat(), get_max_train(), load_char_obj(), load_mobiles(), load_old_mob(), MEDIT(), nanny(), and new_mob_index(). 00155 {
00156 int race;
00157
00158 for (race = 0; race_table[race].name != NULL; race++)
00159 {
00160 if (LOWER (name[0]) == LOWER (race_table[race].name[0])
00161 && !str_prefix (name, race_table[race].name))
00162 return race;
00163 }
00164
00165 return 0;
00166 }
|
Here is the call graph for this function:

|
|
Definition at line 125 of file lookup.c. References LOWER, sex_table, and str_prefix(). Referenced by load_mobiles(). 00126 {
00127 int sex;
00128
00129 for (sex = 0; sex_table[sex].name != NULL; sex++)
00130 {
00131 if (LOWER (name[0]) == LOWER (sex_table[sex].name[0])
00132 && !str_prefix (name, sex_table[sex].name))
00133 return sex;
00134 }
00135
00136 return -1;
00137 }
|
Here is the call graph for this function:

|
|
Definition at line 139 of file lookup.c. References LOWER, size_table, and str_prefix(). Referenced by load_mobiles(). 00140 {
00141 int size;
00142
00143 for (size = 0; size_table[size].name != NULL; size++)
00144 {
00145 if (LOWER (name[0]) == LOWER (size_table[size].name[0])
00146 && !str_prefix (name, size_table[size].name))
00147 return size;
00148 }
00149
00150 return -1;
00151 }
|
Here is the call graph for this function:

1.4.0