JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
man pages section 3: Extended Library Functions, Volume 4     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

Extended Library Functions, Volume 4

acl_check(3SEC)

aclcheck(3SEC)

acl_free(3SEC)

aclfrommode(3SEC)

acl_fromtext(3SEC)

aclfromtext(3SEC)

acl_get(3SEC)

acl_set(3SEC)

aclsort(3SEC)

acl_strip(3SEC)

acltomode(3SEC)

acl_totext(3SEC)

acltotext(3SEC)

acl_trivial(3SEC)

bcleartoh(3TSOL)

bcleartoh_r(3TSOL)

bcleartos(3TSOL)

blcompare(3TSOL)

bldominates(3TSOL)

blequal(3TSOL)

blinrange(3TSOL)

blmaximum(3TSOL)

blminimum(3TSOL)

blminmax(3TSOL)

blstrictdom(3TSOL)

bltocolor(3TSOL)

bltocolor_r(3TSOL)

bltos(3TSOL)

bsltoh(3TSOL)

bsltoh_r(3TSOL)

bsltos(3TSOL)

btohex(3TSOL)

cfc_file_start(3TECLA)

cfc_literal_escapes(3TECLA)

cfc_set_check_fn(3TECLA)

cpl_add_completion(3TECLA)

cpl_check_exe(3TECLA)

cpl_complete_word(3TECLA)

cpl_file_completions(3TECLA)

cpl_last_error(3TECLA)

cpl_list_completions(3TECLA)

cpl_recall_matches(3TECLA)

cpl_record_error(3TECLA)

del_CplFileConf(3TECLA)

del_ExpandFile(3TECLA)

del_GetLine(3TECLA)

del_PathCache(3TECLA)

del_PcaPathConf(3TECLA)

del_WordCompletion(3TECLA)

ef_expand_file(3TECLA)

ef_last_error(3TECLA)

ef_list_expansions(3TECLA)

facl_get(3SEC)

facl_set(3SEC)

getpathbylabel(3TSOL)

getplabel(3TSOL)

getuserrange(3TSOL)

getzoneidbylabel(3TSOL)

getzonelabelbyid(3TSOL)

getzonelabelbyname(3TSOL)

getzonerootbyid(3TSOL)

getzonerootbylabel(3TSOL)

getzonerootbyname(3TSOL)

gl_abandon_line(3TECLA)

gl_append_history(3TECLA)

gl_automatic_history(3TECLA)

gl_bind_keyseq(3TECLA)

gl_catch_blocked(3TECLA)

gl_change_terminal(3TECLA)

gl_clear_history(3TECLA)

gl_completion_action(3TECLA)

gl_configure_getline(3TECLA)

gl_customize_completion(3TECLA)

gl_display_text(3TECLA)

gl_echo_mode(3TECLA)

gl_erase_terminal(3TECLA)

gl_error_message(3TECLA)

gl_get_line(3TECLA)

gl_group_history(3TECLA)

gl_handle_signal(3TECLA)

gl_ignore_signal(3TECLA)

gl_inactivity_timeout(3TECLA)

gl_io_mode(3TECLA)

gl_last_signal(3TECLA)

gl_limit_history(3TECLA)

gl_list_signals(3TECLA)

gl_load_history(3TECLA)

gl_lookup_history(3TECLA)

gl_normal_io(3TECLA)

gl_pending_io(3TECLA)

gl_prompt_style(3TECLA)

gl_query_char(3TECLA)

gl_range_of_history(3TECLA)

gl_raw_io(3TECLA)

gl_read_char(3TECLA)

gl_register_action(3TECLA)

gl_replace_prompt(3TECLA)

gl_resize_history(3TECLA)

gl_return_status(3TECLA)

gl_save_history(3TECLA)

gl_set_term_size(3TECLA)

gl_show_history(3TECLA)

gl_size_of_history(3TECLA)

gl_state_of_history(3TECLA)

gl_terminal_size(3TECLA)

gl_toggle_history(3TECLA)

gl_trap_signal(3TECLA)

gl_tty_signals(3TECLA)

gl_watch_fd(3TECLA)

h_alloc(3TSOL)

hextob(3TSOL)

h_free(3TSOL)

htobclear(3TSOL)

htobsl(3TSOL)

labelclipping(3TSOL)

label_to_str(3TSOL)

libtecla_version(3TECLA)

media_findname(3VOLMGT)

media_getattr(3VOLMGT)

media_getid(3VOLMGT)

media_setattr(3VOLMGT)

m_label(3TSOL)

m_label_alloc(3TSOL)

m_label_dup(3TSOL)

m_label_free(3TSOL)

new_CplFileConf(3TECLA)

new_ExpandFile(3TECLA)

new_GetLine(3TECLA)

new_PathCache(3TECLA)

new_PcaPathConf(3TECLA)

new_WordCompletion(3TECLA)

pca_last_error(3TECLA)

pca_lookup_file(3TECLA)

pca_path_completions(3TECLA)

pca_scan_path(3TECLA)

pca_set_check_fn(3TECLA)

ppc_file_start(3TECLA)

ppc_literal_escapes(3TECLA)

sbcleartos(3TSOL)

sbltos(3TSOL)

sbsltos(3TSOL)

scf_count_ranges_destroy(3SCF)

scf_decoration_create(3SCF)

scf_decoration_destroy(3SCF)

scf_decoration_get_bundle(3SCF)

scf_decoration_get_layer(3SCF)

scf_decoration_get_value(3SCF)

scf_decoration_handle(3SCF)

scf_decoration_is_type(3SCF)

scf_decoration_layer_from_string(3SCF)

scf_decoration_layer_to_string(3SCF)

scf_decoration_type(3SCF)

scf_entry_add_value(3SCF)

scf_entry_create(3SCF)

scf_entry_destroy(3SCF)

scf_entry_destroy_children(3SCF)

scf_entry_handle(3SCF)

scf_entry_reset(3SCF)

scf_error(3SCF)

scf_handle_bind(3SCF)

scf_handle_create(3SCF)

scf_handle_decode_fmri(3SCF)

scf_handle_decorate(3SCF)

scf_handle_destroy(3SCF)

scf_handle_get_scope(3SCF)

scf_handle_unbind(3SCF)

scf_instance_add_pg(3SCF)

scf_instance_create(3SCF)

scf_instance_delcust(3SCF)

scf_instance_delete(3SCF)

scf_instance_destroy(3SCF)

scf_instance_get_decoration(3SCF)

scf_instance_get_name(3SCF)

scf_instance_get_parent(3SCF)

scf_instance_get_pg(3SCF)

scf_instance_get_pg_composed(3SCF)

scf_instance_get_snapshot(3SCF)

scf_instance_handle(3SCF)

scf_instance_is_complete(3SCF)

scf_instance_is_masked(3SCF)

scf_instance_to_fmri(3SCF)

scf_int_ranges_destroy(3SCF)

scf_iter_create(3SCF)

scf_iter_decoration_values(3SCF)

scf_iter_destroy(3SCF)

scf_iter_handle(3SCF)

scf_iter_handle_scopes(3SCF)

scf_iter_instance_decorations(3SCF)

scf_iter_instance_pgs(3SCF)

scf_iter_instance_pgs_composed(3SCF)

scf_iter_instance_pgs_typed(3SCF)

scf_iter_instance_pgs_typed_composed(3SCF)

scf_iter_instance_snapshots(3SCF)

scf_iter_next_decoration(3SCF)

scf_iter_next_instance(3SCF)

scf_iter_next_pg(3SCF)

scf_iter_next_property(3SCF)

scf_iter_next_scope(3SCF)

scf_iter_next_service(3SCF)

scf_iter_next_snapshot(3SCF)

scf_iter_next_value(3SCF)

scf_iter_pg_decorations(3SCF)

scf_iter_pg_properties(3SCF)

scf_iter_property_decorations(3SCF)

scf_iter_property_values(3SCF)

scf_iter_reset(3SCF)

scf_iter_scope_services(3SCF)

scf_iter_service_decorations(3SCF)

scf_iter_service_instances(3SCF)

scf_iter_service_pgs(3SCF)

scf_iter_service_pgs_typed(3SCF)

scf_iter_snaplevel_pgs(3SCF)

scf_iter_snaplevel_pgs_typed(3SCF)

scf_limit(3SCF)

scf_myname(3SCF)

scf_pg_create(3SCF)

scf_pg_delcust(3SCF)

scf_pg_delete(3SCF)

scf_pg_destroy(3SCF)

scf_pg_get_decoration(3SCF)

scf_pg_get_flags(3SCF)

scf_pg_get_name(3SCF)

scf_pg_get_parent_instance(3SCF)

scf_pg_get_parent_service(3SCF)

scf_pg_get_parent_snaplevel(3SCF)

scf_pg_get_property(3SCF)

scf_pg_get_type(3SCF)

scf_pg_get_underlying_pg(3SCF)

scf_pg_handle(3SCF)

scf_pg_is_masked(3SCF)

scf_pg_to_fmri(3SCF)

scf_pg_update(3SCF)

scf_property_create(3SCF)

scf_property_delcust(3SCF)

scf_property_destroy(3SCF)

scf_property_get_decoration(3SCF)

scf_property_get_name(3SCF)

scf_property_get_value(3SCF)

scf_property_get_value_at_layer(3SCF)

scf_property_handle(3SCF)

scf_property_is_masked(3SCF)

scf_property_is_type(3SCF)

scf_property_to_fmri(3SCF)

scf_property_type(3SCF)

scf_scope_add_service(3SCF)

scf_scope_create(3SCF)

scf_scope_destroy(3SCF)

scf_scope_get_name(3SCF)

scf_scope_get_service(3SCF)

scf_scope_handle(3SCF)

scf_scope_to_fmri(3SCF)

scf_service_add_instance(3SCF)

scf_service_add_pg(3SCF)

scf_service_create(3SCF)

scf_service_delcust(3SCF)

scf_service_delete(3SCF)

scf_service_destroy(3SCF)

scf_service_get_decoration(3SCF)

scf_service_get_instance(3SCF)

scf_service_get_name(3SCF)

scf_service_get_parent(3SCF)

scf_service_get_pg(3SCF)

scf_service_handle(3SCF)

scf_service_is_masked(3SCF)

scf_service_to_fmri(3SCF)

scf_simple_app_props_free(3SCF)

scf_simple_app_props_get(3SCF)

scf_simple_app_props_next(3SCF)

scf_simple_app_props_search(3SCF)

scf_simple_prop_free(3SCF)

scf_simple_prop_get(3SCF)

scf_simple_prop_name(3SCF)

scf_simple_prop_next_astring(3SCF)

scf_simple_prop_next_boolean(3SCF)

scf_simple_prop_next_count(3SCF)

scf_simple_prop_next_integer(3SCF)

scf_simple_prop_next_opaque(3SCF)

scf_simple_prop_next_reset(3SCF)

scf_simple_prop_next_time(3SCF)

scf_simple_prop_next_ustring(3SCF)

scf_simple_prop_numvalues(3SCF)

scf_simple_prop_pgname(3SCF)

scf_simple_prop_type(3SCF)

scf_simple_walk_instances(3SCF)

scf_snaplevel_create(3SCF)

scf_snaplevel_destroy(3SCF)

scf_snaplevel_get_instance_name(3SCF)

scf_snaplevel_get_next_snaplevel(3SCF)

scf_snaplevel_get_parent(3SCF)

scf_snaplevel_get_pg(3SCF)

scf_snaplevel_get_scope_name(3SCF)

scf_snaplevel_get_service_name(3SCF)

scf_snaplevel_handle(3SCF)

scf_snapshot_create(3SCF)

scf_snapshot_destroy(3SCF)

scf_snapshot_get_base_snaplevel(3SCF)

scf_snapshot_get_name(3SCF)

scf_snapshot_get_parent(3SCF)

scf_snapshot_handle(3SCF)

scf_snapshot_update(3SCF)

scf_strerror(3SCF)

scf_string_to_type(3SCF)

scf_tmpl_error_pg(3SCF)

scf_tmpl_error_pg_tmpl(3SCF)

scf_tmpl_error_prop(3SCF)

scf_tmpl_error_prop_tmpl(3SCF)

scf_tmpl_errors_destroy(3SCF)

scf_tmpl_error_source_fmri(3SCF)

scf_tmpl_error_type(3SCF)

scf_tmpl_error_value(3SCF)

scf_tmpl_get_by_pg(3SCF)

scf_tmpl_get_by_pg_name(3SCF)

scf_tmpl_get_by_prop(3SCF)

scf_tmpl_iter_pgs(3SCF)

scf_tmpl_iter_props(3SCF)

scf_tmpl_next_error(3SCF)

scf_tmpl_pg_common_name(3SCF)

scf_tmpl_pg_create(3SCF)

scf_tmpl_pg_description(3SCF)

scf_tmpl_pg_destroy(3SCF)

scf_tmpl_pg_name(3SCF)

scf_tmpl_pg_required(3SCF)

scf_tmpl_pg_reset(3SCF)

scf_tmpl_pg_target(3SCF)

scf_tmpl_pg_type(3SCF)

scf_tmpl_prop_cardinality(3SCF)

scf_tmpl_prop_common_name(3SCF)

scf_tmpl_prop_create(3SCF)

scf_tmpl_prop_description(3SCF)

scf_tmpl_prop_destroy(3SCF)

scf_tmpl_prop_internal_seps(3SCF)

scf_tmpl_prop_name(3SCF)

scf_tmpl_prop_required(3SCF)

scf_tmpl_prop_reset(3SCF)

scf_tmpl_prop_type(3SCF)

scf_tmpl_prop_units(3SCF)

scf_tmpl_prop_visibility(3SCF)

scf_tmpl_reset_errors(3SCF)

scf_tmpl_strerror(3SCF)

scf_tmpl_validate_fmri(3SCF)

scf_tmpl_value_common_name(3SCF)

scf_tmpl_value_count_range_choices(3SCF)

scf_tmpl_value_count_range_constraints(3SCF)

scf_tmpl_value_description(3SCF)

scf_tmpl_value_in_constraint(3SCF)

scf_tmpl_value_int_range_choices(3SCF)

scf_tmpl_value_int_range_constraints(3SCF)

scf_tmpl_value_name_choices(3SCF)

scf_tmpl_value_name_constraints(3SCF)

scf_tmpl_visibility_to_string(3SCF)

scf_transaction_commit(3SCF)

scf_transaction_create(3SCF)

scf_transaction_destroy(3SCF)

scf_transaction_destroy_children(3SCF)

scf_transaction_handle(3SCF)

scf_transaction_property_change(3SCF)

scf_transaction_property_change_type(3SCF)

scf_transaction_property_delete(3SCF)

scf_transaction_property_new(3SCF)

scf_transaction_reset(3SCF)

scf_transaction_reset_all(3SCF)

scf_transaction_start(3SCF)

scf_type_base_type(3SCF)

scf_type_to_string(3SCF)

scf_value_base_type(3SCF)

scf_value_create(3SCF)

scf_value_destroy(3SCF)

scf_value_get_as_string(3SCF)

scf_value_get_as_string_typed(3SCF)

scf_value_get_astring(3SCF)

scf_value_get_boolean(3SCF)

scf_value_get_count(3SCF)

scf_value_get_integer(3SCF)

scf_value_get_opaque(3SCF)

scf_value_get_time(3SCF)

scf_value_get_ustring(3SCF)

scf_value_handle(3SCF)

scf_value_is_type(3SCF)

scf_value_reset(3SCF)

scf_values_destroy(3SCF)

scf_value_set_astring(3SCF)

scf_value_set_boolean(3SCF)

scf_value_set_count(3SCF)

scf_value_set_from_string(3SCF)

scf_value_set_integer(3SCF)

scf_value_set_opaque(3SCF)

scf_value_set_time(3SCF)

scf_value_set_ustring(3SCF)

scf_value_type(3SCF)

setflabel(3TSOL)

smf_degrade_instance(3SCF)

smf_disable_instance(3SCF)

smf_enable_instance(3SCF)

smf_get_state(3SCF)

smf_maintain_instance(3SCF)

smf_method_exit(3SCF)

smf_notify_del_params(3SCF)

smf_notify_get_params(3SCF)

smf_notify_set_params(3SCF)

smf_refresh_instance(3SCF)

smf_restart_instance(3SCF)

smf_restore_instance(3SCF)

smf_state_from_string(3SCF)

smf_state_to_string(3SCF)

srpt_GetDefaultState(3SRPT)

srpt_GetTargetState(3SRPT)

srpt_ResetTarget(3SRPT)

srpt_SetDefaultState(3SRPT)

srpt_SetTargetState(3SRPT)

SSAAgentIsAlive(3SNMP)

SSAGetTrapPort(3SNMP)

SSAOidCmp(3SNMP)

SSAOidCpy(3SNMP)

SSAOidDup(3SNMP)

SSAOidFree(3SNMP)

SSAOidInit(3SNMP)

SSAOidNew(3SNMP)

SSAOidString(3SNMP)

SSAOidStrToOid(3SNMP)

SSAOidZero(3SNMP)

SSARegSubagent(3SNMP)

SSARegSubtable(3SNMP)

SSARegSubtree(3SNMP)

SSASendTrap(3SNMP)

SSAStringCpy(3SNMP)

SSAStringInit(3SNMP)

SSAStringToChar(3SNMP)

SSAStringZero(3SNMP)

SSASubagentOpen(3SNMP)

stmfAddToHostGroup(3STMF)

stmfAddToHostGroupList(3STMF)

stmfAddToTargetGroup(3STMF)

stmfAddViewEntry(3STMF)

stmfAddViewEntryList(3STMF)

stmfCheckHostGroupInUse(3STMF)

stmfCheckTargetGroupInUse(3STMF)

stmfClearProviderData(3STMF)

stmfCreateHostGroup(3STMF)

stmfCreateLu(3STMF)

stmfCreateLuResource(3STMF)

stmfCreateTargetGroup(3STMF)

stmfDeleteHostGroup(3STMF)

stmfDeleteLu(3STMF)

stmfDeleteTargetGroup(3STMF)

stmfDestroyProxyDoor(3STMF)

stmfDevidFromIscsiName(3STMF)

stmfDevidFromWwn(3STMF)

stmfFreeLuResource(3STMF)

stmfFreeMemory(3STMF)

stmfFreeViewResourceList(3STMF)

stmfGetAluaState(3STMF)

stmfGetHostGroupList(3STMF)

stmfGetHostGroupMembers(3STMF)

stmfGetLogicalUnitList(3STMF)

stmfGetLogicalUnitProperties(3STMF)

stmfGetLuProp(3STMF)

stmfGetLuResource(3STMF)

stmfGetPersistMethod(3STMF)

stmfGetProviderData(3STMF)

stmfGetProviderDataProt(3STMF)

stmfGetState(3STMF)

stmfGetStmfProp(3STMF)

stmfGetTargetGroupList(3STMF)

stmfGetTargetGroupMembers(3STMF)

stmfGetTargetList(3STMF)

stmfGetTargetProperties(3STMF)

stmfGetViewEntryList(3STMF)

stmfGetViewLuNumberList(3STMF)

stmfGetViewProp(3STMF)

stmfGetViewResourceList(3STMF)

stmfImportLu(3STMF)

stmfInitProxyDoor(3STMF)

stmfLuStandby(3STMF)

stmfModifyLu(3STMF)

stmfModifyLuByFname(3STMF)

stmfOfflineLogicalUnit(3STMF)

stmfOfflineTarget(3STMF)

stmfOnlineLogicalUnit(3STMF)

stmfOnlineTarget(3STMF)

stmfPostProxyMsg(3STMF)

stmfRemoveFromHostGroup(3STMF)

stmfRemoveFromTargetGroup(3STMF)

stmfRemoveViewEntry(3STMF)

stmfSetAluaState(3STMF)

stmfSetLuProp(3STMF)

stmfSetPersistMethod(3STMF)

stmfSetProviderData(3STMF)

stmfSetProviderDataProt(3STMF)

stmfSetStmfProp(3STMF)

stmfValidateView(3STMF)

stobclear(3TSOL)

stobl(3TSOL)

stobsl(3TSOL)

str_to_label(3TSOL)

sysevent_bind_handle(3SYSEVENT)

sysevent_free(3SYSEVENT)

sysevent_get_attr_list(3SYSEVENT)

sysevent_get_class_name(3SYSEVENT)

sysevent_get_pid(3SYSEVENT)

sysevent_get_pub_name(3SYSEVENT)

sysevent_get_seq(3SYSEVENT)

sysevent_get_size(3SYSEVENT)

sysevent_get_subclass_name(3SYSEVENT)

sysevent_get_time(3SYSEVENT)

sysevent_get_vendor_name(3SYSEVENT)

sysevent_post_event(3SYSEVENT)

sysevent_subscribe_event(3SYSEVENT)

sysevent_unbind_handle(3SYSEVENT)

sysevent_unsubscribe_event(3SYSEVENT)

tsol_getrhtype(3TSOL)

uuid_clear(3UUID)

uuid_compare(3UUID)

uuid_copy(3UUID)

uuid_generate(3UUID)

uuid_generate_random(3UUID)

uuid_generate_time(3UUID)

uuid_is_null(3UUID)

uuid_parse(3UUID)

uuid_time(3UUID)

uuid_unparse(3UUID)

volmgt_acquire(3VOLMGT)

volmgt_check(3VOLMGT)

volmgt_feature_enabled(3VOLMGT)

volmgt_inuse(3VOLMGT)

volmgt_ownspath(3VOLMGT)

volmgt_release(3VOLMGT)

volmgt_root(3VOLMGT)

volmgt_running(3VOLMGT)

volmgt_symdev(3VOLMGT)

volmgt_symname(3VOLMGT)

Xbcleartos(3TSOL)

Xbsltos(3TSOL)

XTSOLgetClientAttributes(3XTSOL)

XTSOLgetPropAttributes(3XTSOL)

XTSOLgetPropLabel(3XTSOL)

XTSOLgetPropUID(3XTSOL)

XTSOLgetResAttributes(3XTSOL)

XTSOLgetResLabel(3XTSOL)

XTSOLgetResUID(3XTSOL)

XTSOLgetSSHeight(3XTSOL)

XTSOLgetWorkstationOwner(3XTSOL)

XTSOLIsWindowTrusted(3XTSOL)

XTSOLMakeTPWindow(3XTSOL)

XTSOLsetPolyInstInfo(3XTSOL)

XTSOLsetPropLabel(3XTSOL)

XTSOLsetPropUID(3XTSOL)

XTSOLsetResLabel(3XTSOL)

XTSOLsetResUID(3XTSOL)

XTSOLsetSessionHI(3XTSOL)

XTSOLsetSessionLO(3XTSOL)

XTSOLsetSSHeight(3XTSOL)

XTSOLsetWorkstationOwner(3XTSOL)

zs_close(3ZONESTAT)

zs_open(3ZONESTAT)

zs_property(3ZONESTAT)

zs_property_double(3ZONESTAT)

zs_property_int(3ZONESTAT)

zs_property_int64(3ZONESTAT)

zs_property_string(3ZONESTAT)

zs_property_type(3ZONESTAT)

zs_property_uint(3ZONESTAT)

zs_property_uint64(3ZONESTAT)

zs_pset(3ZONESTAT)

zs_pset_list(3ZONESTAT)

zs_pset_property(3ZONESTAT)

zs_pset_total_cpus(3ZONESTAT)

zs_pset_total_time(3ZONESTAT)

zs_pset_used_cpus(3ZONESTAT)

zs_pset_used_pct(3ZONESTAT)

zs_pset_used_time(3ZONESTAT)

zs_pset_walk(3ZONESTAT)

zs_pset_zone(3ZONESTAT)

zs_pset_zone_get_pset(3ZONESTAT)

zs_pset_zone_get_zone(3ZONESTAT)

zs_pset_zone_list(3ZONESTAT)

zs_pset_zone_property(3ZONESTAT)

zs_pset_zone_used_cpus(3ZONESTAT)

zs_pset_zone_used_pct(3ZONESTAT)

zs_pset_zone_used_time(3ZONESTAT)

zs_pset_zone_walk(3ZONESTAT)

zs_resource(3ZONESTAT)

zs_resource_property(3ZONESTAT)

zs_resource_total_time(3ZONESTAT)

zs_resource_total_uint64(3ZONESTAT)

zs_resource_type(3ZONESTAT)

zs_resource_used_pct(3ZONESTAT)

zs_resource_used_time(3ZONESTAT)

zs_resource_used_uint64(3ZONESTAT)

zs_resource_used_zone_pct(3ZONESTAT)

zs_resource_used_zone_time(3ZONESTAT)

zs_resource_used_zone_uint64(3ZONESTAT)

zs_usage(3ZONESTAT)

zs_usage_diff(3ZONESTAT)

zs_usage_free(3ZONESTAT)

zs_usage_read(3ZONESTAT)

zs_zone(3ZONESTAT)

zs_zone_limit_time(3ZONESTAT)

zs_zone_limit_type(3ZONESTAT)

zs_zone_limit_uint64(3ZONESTAT)

zs_zone_limit_used_pct(3ZONESTAT)

zs_zone_limit_used_time(3ZONESTAT)

zs_zone_limit_used_uint64(3ZONESTAT)

zs_zone_list(3ZONESTAT)

zs_zone_property(3ZONESTAT)

zs_zone_walk(3ZONESTAT)

ef_expand_file

, del_ExpandFile

, ef_last_error

, ef_list_expansions

, new_ExpandFile

- expand filename and wildcard expressions

Synopsis

cc [ flag… ] file-ltecla [ library… ] 
#include <libtecla.h>

ExpandFile *ef_expand_file(void);
ExpandFile *del_ExpandFile(ExpandFile *ef);
FileExpansion *ef_last_error(ExpandFile *ef, const char *path,
     int pathlen);
int ef_list_expansions(FileExpansion *result, FILE *fp, int term_width);
const char *new_ExpandFile(ExpandFile *ef);

Description

The ef_expand_file() function is part of the libtecla(3LIB) library. It expands a specified filename, converting ~user/ and ~/ expressions at the start of the filename to the corresponding home directories, replacing $envvar with the value of the corresponding environment variable, and then, if there are any wildcards, matching these against existing filenames. Backslashes in the input filename are interpreted as escaping any special meanings of the characters that follow them. Only backslashes that are themselves preceded by backslashes are preserved in the expanded filename.

In the presence of wildcards, the returned list of filenames includes only the names of existing files which match the wildcards. Otherwise, the original filename is returned after expansion of tilde and dollar expressions, and the result is not checked against existing files. This mimics the file-globbing behavior of the UNIX tcsh shell.

The supported wildcards and their meanings are:

*

Match any sequence of zero or more characters.

?

Match any single character.

[chars]

Match any single character that appears in chars. If chars contains an expression of the form a-b, then any character between a and b, including a and b, matches. The '-' character loses its special meaning as a range specifier when it appears at the start of the sequence of characters. The ']' character also loses its significance as the terminator of the range expression if it appears immediately after the opening '[', at which point it is treated one of the characters of the range. If you want both '-' and ']' to be part of the range, the '-' should come first and the ']' second.

[^chars]

The same as [chars] except that it matches any single character that does not appear in chars.

Note that wildcards never match the initial dot in filenames that start with '.'. The initial '.' must be explicitly specified in the filename. This again mimics the globbing behavior of most UNIX shells, and its rational is based in the fact that in UNIX, files with names that start with '.' are usually hidden configuration files, which are not listed by default by the ls(1) command.

The new_ExpandFile() function creates the resources used by the ef_expand_file() function. In particular, it maintains the memory that is used to record the array of matching file names that is returned by ef_expand_file(). This array is expanded as needed, so there is no builtin limit to the number of files that can be matched.

The del_ExpandFile() function deletes the resources that were returned by a previous call to new_ExpandFile(). It always returns NULL (that is, a deleted object). It does nothing if the ef argument is NULL.

The ef_expand_file() function performs filename expansion. Its first argument is a resource object returned by new_ExpandFile(). A pointer to the start of the filename to be matched is passed by the path argument. This must be a normal null-terminated string, but unless a length of -1 is passed in pathlen, only the first pathlen characters will be used in the filename expansion. If the length is specified as -1, the whole of the string will be expanded. A container of the following type is returned by ef_expand_file().

typedef struct {
    int exists;   /* True if the files in files[] exist */
    int nfile;    /* The number of files in files[] */
    char **files; /* An array of 'nfile' filenames. */
} FileExpansion;

The ef_expand_file() function returns a pointer to a container whose contents are the results of the expansion. If there were no wildcards in the filename, the nfile member will be 1, and the exists member should be queried if it is important to know if the expanded file currently exists. If there were wild cards, then the contained files[] array will contain the names of the nfile existing files that matched the wild-carded filename, and the exists member will have the value 1. Note that the returned container belongs to the specified ef object, and its contents will change on each call, so if you need to retain the results of more than one call to ef_expand_file(), you should either make a private copy of the returned results, or create multiple file-expansion resource objects with multiple calls to new_ExpandFile().

On error, NULL is returned, and an explanation of the error can be determined by calling ef_last_error(ef).

The ef_last_error() function returns the message which describes the error that occurred on the last call to ef_expand_file(), for the given (ExpandFile *ef) resource object.

The ef_list_expansions() function provides a convenient way to list the filename expansions returned by ef_expand_file(). Like the ls utility, it arranges the filenames into equal width columns, each column having the width of the largest file. The number of columns used is thus determined by the length of the longest filename, and the specified terminal width. Beware that filenames that are longer than the specified terminal width are printed without being truncated, so output longer than the specified terminal width can occur. The list is written to the stdio stream specified by the fp argument.

Thread Safety

It is safe to use the facilities of this module in multiple threads, provided that each thread uses a separately allocated ExpandFile object. In other words, if two threads want to do file expansion, they should each call new_ExpandFile() to allocate their own file-expansion objects.

Examples

Example 1 Use of file expansion function.

The following is a complete example of how to use the file expansion function.

#include <stdio.h>
#include <libtecla.h>
 
int main(int argc, char *argv[])
{
    ExpandFile *ef;      /* The expansion resource object */
    char *filename;      /* The filename being expanded */
    FileExpansion *expn; /* The results of the expansion */
    int i;
 
    ef = new_ExpandFile();
    if(!ef)
        return 1;
 
    for(arg = *(argv++); arg; arg = *(argv++)) {
       if((expn = ef_expand_file(ef, arg, -1)) == NULL) {
          fprintf(stderr, "Error expanding %s (%s).\n", arg,
              ef_last_error(ef));
       } else {
          printf("%s matches the following files:\n", arg);
          for(i=0; i<expn->nfile; i++)
              printf(" %s\n", expn->files[i]);
       }
    }
 
    ef = del_ExpandFile(ef);
    return 0;
}

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Committed
MT-Level
MT-Safe

See Also

cpl_complete_word(3TECLA), gl_get_line(3TECLA), libtecla(3LIB), pca_lookup_file(3TECLA), attributes(5)