![]() |
Crossfire Server, Trunk
1.75.0
|
#include <string.h>
Include dependency graph for compat.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Macros | |
| #define | CALLOC(x, y) calloc(x, y) |
| #define | FALSE false |
| #define | FMT64 PRId64 |
| #define | FMT64U PRIu64 |
| #define | MAX(x, y) ((x) > (y) ? (x) : (y)) |
| #define | MIN(x, y) ((x) < (y) ? (x) : (y)) |
| #define | object_decrease_nrof_by_one(xyz) object_decrease_nrof(xyz, 1) |
| #define | safe_strncpy strlcpy |
| #define | strcasestr_local strcasestr |
| #define | strdup_local strdup |
| #define | TRUE true |
Functions | |
| void | safe_strcat (char *dest, const char *orig, size_t *curlen, size_t maxlen) |
| Simple function we use below to keep adding to the same string but also make sure we don't overwrite that string. More... | |
| size_t | strlcpy (char *dst, const char *src, size_t size) |
| Portable implementation of strlcpy(3). More... | |
Compatibility implementations of useful nonstandard types and functions.
Definition in file compat.h.
| #define object_decrease_nrof_by_one | ( | xyz | ) | object_decrease_nrof(xyz, 1) |
| #define strcasestr_local strcasestr |
| void safe_strcat | ( | char * | dest, |
| const char * | orig, | ||
| size_t * | curlen, | ||
| size_t | maxlen | ||
| ) |
Simple function we use below to keep adding to the same string but also make sure we don't overwrite that string.
| dest | string to append to. | |
| orig | string to append. | |
| [out] | curlen | current length of dest. Will be updated by this function. |
| maxlen | maximum length of dest buffer. |
Definition at line 202 of file porting.cpp.
Referenced by display_motd(), query_base_name(), query_name(), query_short_name(), send_new_char_info(), send_news(), send_rules(), spellbook_type_describe(), and while().
Here is the caller graph for this function:| size_t strlcpy | ( | char * | dst, |
| const char * | src, | ||
| size_t | size | ||
| ) |
Portable implementation of strlcpy(3).
Definition at line 222 of file porting.cpp.
Referenced by apply_race_and_class(), cfapi_map_set_map_property(), cfapi_object_get_property(), check_login(), check_path(), clean_path(), command_reset(), command_use(), compute_face_name(), do_tell(), dump_alchemy(), dump_alchemy_costs(), enter_fixed_template_map(), enter_random_map(), enter_random_template_map(), enter_unique_map(), esrv_update_item(), find_style(), get_who_escape_code_value(), init_dynamic(), key_change_class(), knowledge_player_knows(), make_map_walls(), nstrtok(), party_form(), party_set_password(), path_combine(), player_get_title(), player_set_own_title(), query_base_name(), query_short_name(), replace(), save_map(), strtoktolin(), and unclean_path().
Here is the caller graph for this function: