#include "asterisk/compiler.h"
#include <inttypes.h>
#include <limits.h>
#include <unistd.h>
#include <stddef.h>
#include <stdint.h>
#include <sys/types.h>
#include <stdarg.h>
#include <stdlib.h>
#include <alloca.h>
#include <stdio.h>
#include <string.h>
#include <sys/poll.h>
#include <errno.h>
#include <glob.h>
Go to the source code of this file.
Defines | |
#define | __STDC_VERSION__ 0 |
#define | MY_GLOB_FLAGS GLOB_NOCHECK |
Functions | |
int | asprintf (char **str, const char *fmt,...) |
int | getloadavg (double *list, int nelem) |
int | setenv (const char *name, const char *value, int overwrite) |
char * | strcasestr (const char *, const char *) |
size_t | strlcat (char *dst, const char *src, size_t siz) |
size_t | strlcpy (char *dst, const char *src, size_t siz) |
char * | strndup (const char *, size_t) |
size_t | strnlen (const char *, size_t) |
char * | strsep (char **str, const char *delims) |
uint64_t | strtoq (const char *nptr, char **endptr, int base) |
int | unsetenv (const char *name) |
int | vasprintf (char **strp, const char *fmt, va_list ap) |
Definition in file compat.h.
#define MY_GLOB_FLAGS GLOB_NOCHECK |
int asprintf | ( | char ** | str, | |
const char * | fmt, | |||
... | ||||
) |
int getloadavg | ( | double * | list, | |
int | nelem | |||
) |
Referenced by increase_call_count(), and sysinfo_helper().
int setenv | ( | const char * | name, | |
const char * | value, | |||
int | overwrite | |||
) |
Referenced by env_write(), launch_script(), load_odbc_config(), read_environment(), and reload().
char* strcasestr | ( | const char * | , | |
const char * | ||||
) |
Referenced by action_originate(), anti_injection(), common_exec(), find_sdp(), get_rdnis(), get_refer_info(), gettag(), handle_request_invite(), handle_response_register(), handle_show_applications(), modlist_modentry(), parse_moved_contact(), parse_register_contact(), playback_exec(), realtime_multi_odbc(), realtime_odbc(), reqprep(), respprep(), search_directory(), sip_do_debug(), sip_prune_realtime(), sip_sipredirect(), sip_uri_headers_cmp(), and word_match().
size_t strlcat | ( | char * | dst, | |
const char * | src, | |||
size_t | siz | |||
) |
Definition at line 375 of file main/strcompat.c.
00376 { 00377 register char *d = dst; 00378 register const char *s = src; 00379 register size_t n = siz; 00380 size_t dlen; 00381 00382 /* Find the end of dst and adjust bytes left but don't go past end */ 00383 while (n-- != 0 && *d != '\0') 00384 d++; 00385 dlen = d - dst; 00386 n = siz - dlen; 00387 00388 if (n == 0) 00389 return dlen + strlen(s); 00390 00391 while (*s != '\0') { 00392 if (n != 1) { 00393 *d++ = *s; 00394 n--; 00395 } 00396 s++; 00397 } 00398 *d = '\0'; 00399 00400 return dlen + (s - src); /* count does not include NUL */ 00401 }
size_t strlcpy | ( | char * | dst, | |
const char * | src, | |||
size_t | siz | |||
) |
Definition at line 439 of file main/strcompat.c.
00440 { 00441 register char *d = dst; 00442 register const char *s = src; 00443 register size_t n = siz; 00444 00445 /* Copy as many bytes as will fit */ 00446 if (n != 0 && --n != 0) { 00447 do { 00448 if ((*d++ = *s++) == 0) 00449 break; 00450 } while (--n != 0); 00451 } 00452 00453 /* Not enough room in dst, add NUL and traverse rest of src */ 00454 if (n == 0) { 00455 if (siz != 0) 00456 *d = '\0'; /* NUL-terminate dst */ 00457 while (*s++) 00458 ; 00459 } 00460 00461 return s - src - 1; /* count does not include NUL */ 00462 }
char* strndup | ( | const char * | , | |
size_t | ||||
) |
size_t strnlen | ( | const char * | , | |
size_t | ||||
) |
char* strsep | ( | char ** | str, | |
const char * | delims | |||
) |
Referenced by __ast_play_and_record(), _ast_device_state(), _build_port_config(), _macro_exec(), _parse(), acf_vmcount_exec(), add_peer_mailboxes(), add_realm_authentication(), add_redirect(), adsi_message(), append_history_va(), append_mailbox(), append_mailbox_mapping(), apply_options(), apply_outgoing(), ast_aji_get_client(), ast_app_getdata(), ast_build_timing(), ast_eivr_getvariable(), ast_eivr_setvariable(), ast_el_strtoarr(), ast_extension_state2(), ast_filehelper(), ast_get_group(), ast_netsock_bind(), ast_parse_allow_disallow(), ast_parse_arg(), ast_playtones_start(), ast_read_image(), ast_remotecontrol(), astman_get_variables(), authenticate_verify(), build_channels(), build_device(), build_gateway(), build_peer(), builtin_atxfer(), callerid_read(), check_auth(), check_blacklist(), check_user_full(), check_via_response(), cleanup_stale_contexts(), complete_dialplan_add_ignorepat(), complete_dialplan_add_include(), complete_dialplan_remove_ignorepat(), complete_dialplan_remove_include(), complete_meetmecmd(), conf_exec(), conf_run(), config_curl(), console_dial(), cut_internal(), dahdi_request(), decrypt_frame(), del_exec(), deltree_exec(), dial_exec_full(), dial_trunk(), do_timelimit(), exec_exec(), exts_compare(), extstate_read(), feature_interpret_helper(), fileexists_core(), find_gtalk(), forward_message(), function_fieldqty(), function_sippeer(), get_destination(), get_rdnis(), gettag(), gosub_exec(), gtalk_alloc(), gtalk_request(), handle_cli_dialplan_add_extension(), handle_common_options(), handle_request_invite(), handle_show_dialplan(), handle_statechange(), handle_uri(), has_voicemail(), hint_read(), httpd_helper_thread(), iax2_register(), iftime(), inboxcount(), ind_load_module(), is_prefix(), ivr_dispatch(), jingle_request(), load_column_config(), load_config(), load_values_config(), make_components(), metermaidstate(), misdn_set_opt_exec(), notify_message(), notify_new_message(), orig_app(), orig_exten(), page_exec(), parkandannounce_exec(), parse_cookies(), parse_dial_string(), parse_register_contact(), parse_session_expires(), parse_uri(), pbx_builtin_background(), pbx_builtin_execiftime(), pbx_builtin_gotoif(), pbx_builtin_gotoiftime(), pbx_builtin_importvar(), pbx_builtin_saynumber(), pbx_builtin_setvar(), pbx_load_config(), pbx_load_users(), pbx_parseable_goto(), peer_set_srcaddr(), pickup_exec(), pickupchan_exec(), playback_exec(), process_dahdi(), process_sdp(), process_text_line(), queue_mwi_event(), queue_set_param(), read_config_maps(), readfile_exec(), realtime_curl(), realtime_multi_curl(), realtime_multi_odbc(), realtime_multi_pgsql(), realtime_odbc(), realtime_pgsql(), reg_source_db(), register_exten(), register_peer_exten(), register_verify(), reload_agents(), reload_config(), reload_queue_members(), reply_digest(), rpt_tele_thread(), search_directory(), send_tone_telemetry(), set(), set_config_flags(), set_insecure_flags(), sip_do_debug_ip(), sip_sipredirect(), sip_uri_cmp(), sip_uri_headers_cmp(), sla_add_trunk_to_station(), sla_check_device(), sla_queue_event_conf(), sla_ring_station(), sla_state(), sla_station_exec(), sort_internal(), spawn_mp3(), spawn_ras(), speech_background(), ss_thread(), stat_read(), timezone_add(), transmit_fake_auth_response(), transmit_state_notify(), tryexec_exec(), unistim_send_mwi_to_peer(), unregister_exten(), update_registry(), vmauthenticate(), write_htmldump(), and xml_translate().
uint64_t strtoq | ( | const char * | nptr, | |
char ** | endptr, | |||
int | base | |||
) |
int unsetenv | ( | const char * | name | ) |
Referenced by env_write().
int vasprintf | ( | char ** | strp, | |
const char * | fmt, | |||
va_list | ap | |||
) |