Project

General

Profile

« Previous | Next » 

Revision 14726

lib/sh/util.sh: get_stack_frame_after(): renamed to skip_stack_frames() for clarity

View differences:

trunk/lib/sh/util.sh
306 306
alias get_stack_frame='declare func file line && "get_stack_frame"'
307 307
	# && instead of ; so it can be used as a while cond
308 308

  
309
get_stack_frame_after() # usage: exclude=_* get_stack_frame_after
309
skip_stack_frames() # usage: exclude=_* skip_stack_frames
310 310
{
311 311
	: "${exclude:?}"; skip_stack_frame; init_i
312 312
	while get_stack_frame && matches "$exclude" "$func"; do # matching frame
......
897 897
	log "$(
898 898
		log+ 2 # hide internal logging commands
899 899
		skip_stack_frame # must be inside () to limit its effects
900
		exclude='log*' get_stack_frame_after # remove log* prefix to echo_func
900
		exclude='log*' skip_stack_frames # remove log* prefix to echo_func
901 901
		format_stack_frame "$@"
902 902
	)"
903 903
}

Also available in: Unified diff