tf5-5.0beta8/.git/
tf5-5.0beta8/.git/info/
tf5-5.0beta8/.git/logs/
tf5-5.0beta8/.git/logs/refs/heads/
tf5-5.0beta8/.git/objects/00/
tf5-5.0beta8/.git/objects/01/
tf5-5.0beta8/.git/objects/04/
tf5-5.0beta8/.git/objects/05/
tf5-5.0beta8/.git/objects/07/
tf5-5.0beta8/.git/objects/09/
tf5-5.0beta8/.git/objects/0a/
tf5-5.0beta8/.git/objects/0c/
tf5-5.0beta8/.git/objects/0e/
tf5-5.0beta8/.git/objects/12/
tf5-5.0beta8/.git/objects/13/
tf5-5.0beta8/.git/objects/14/
tf5-5.0beta8/.git/objects/16/
tf5-5.0beta8/.git/objects/17/
tf5-5.0beta8/.git/objects/19/
tf5-5.0beta8/.git/objects/1c/
tf5-5.0beta8/.git/objects/1d/
tf5-5.0beta8/.git/objects/1e/
tf5-5.0beta8/.git/objects/1f/
tf5-5.0beta8/.git/objects/20/
tf5-5.0beta8/.git/objects/21/
tf5-5.0beta8/.git/objects/23/
tf5-5.0beta8/.git/objects/27/
tf5-5.0beta8/.git/objects/29/
tf5-5.0beta8/.git/objects/2a/
tf5-5.0beta8/.git/objects/2b/
tf5-5.0beta8/.git/objects/2f/
tf5-5.0beta8/.git/objects/30/
tf5-5.0beta8/.git/objects/33/
tf5-5.0beta8/.git/objects/34/
tf5-5.0beta8/.git/objects/35/
tf5-5.0beta8/.git/objects/39/
tf5-5.0beta8/.git/objects/3c/
tf5-5.0beta8/.git/objects/3d/
tf5-5.0beta8/.git/objects/3f/
tf5-5.0beta8/.git/objects/40/
tf5-5.0beta8/.git/objects/41/
tf5-5.0beta8/.git/objects/42/
tf5-5.0beta8/.git/objects/44/
tf5-5.0beta8/.git/objects/46/
tf5-5.0beta8/.git/objects/47/
tf5-5.0beta8/.git/objects/48/
tf5-5.0beta8/.git/objects/4a/
tf5-5.0beta8/.git/objects/4d/
tf5-5.0beta8/.git/objects/4f/
tf5-5.0beta8/.git/objects/53/
tf5-5.0beta8/.git/objects/54/
tf5-5.0beta8/.git/objects/58/
tf5-5.0beta8/.git/objects/5b/
tf5-5.0beta8/.git/objects/5c/
tf5-5.0beta8/.git/objects/5e/
tf5-5.0beta8/.git/objects/5f/
tf5-5.0beta8/.git/objects/60/
tf5-5.0beta8/.git/objects/61/
tf5-5.0beta8/.git/objects/62/
tf5-5.0beta8/.git/objects/63/
tf5-5.0beta8/.git/objects/66/
tf5-5.0beta8/.git/objects/67/
tf5-5.0beta8/.git/objects/6c/
tf5-5.0beta8/.git/objects/6e/
tf5-5.0beta8/.git/objects/72/
tf5-5.0beta8/.git/objects/73/
tf5-5.0beta8/.git/objects/75/
tf5-5.0beta8/.git/objects/77/
tf5-5.0beta8/.git/objects/7a/
tf5-5.0beta8/.git/objects/7b/
tf5-5.0beta8/.git/objects/7c/
tf5-5.0beta8/.git/objects/7e/
tf5-5.0beta8/.git/objects/7f/
tf5-5.0beta8/.git/objects/81/
tf5-5.0beta8/.git/objects/84/
tf5-5.0beta8/.git/objects/86/
tf5-5.0beta8/.git/objects/87/
tf5-5.0beta8/.git/objects/88/
tf5-5.0beta8/.git/objects/8b/
tf5-5.0beta8/.git/objects/8c/
tf5-5.0beta8/.git/objects/8f/
tf5-5.0beta8/.git/objects/91/
tf5-5.0beta8/.git/objects/93/
tf5-5.0beta8/.git/objects/96/
tf5-5.0beta8/.git/objects/97/
tf5-5.0beta8/.git/objects/99/
tf5-5.0beta8/.git/objects/9a/
tf5-5.0beta8/.git/objects/9b/
tf5-5.0beta8/.git/objects/9c/
tf5-5.0beta8/.git/objects/9d/
tf5-5.0beta8/.git/objects/9e/
tf5-5.0beta8/.git/objects/a1/
tf5-5.0beta8/.git/objects/a3/
tf5-5.0beta8/.git/objects/a4/
tf5-5.0beta8/.git/objects/a6/
tf5-5.0beta8/.git/objects/a7/
tf5-5.0beta8/.git/objects/a8/
tf5-5.0beta8/.git/objects/a9/
tf5-5.0beta8/.git/objects/ab/
tf5-5.0beta8/.git/objects/ac/
tf5-5.0beta8/.git/objects/ae/
tf5-5.0beta8/.git/objects/b1/
tf5-5.0beta8/.git/objects/b2/
tf5-5.0beta8/.git/objects/b3/
tf5-5.0beta8/.git/objects/b7/
tf5-5.0beta8/.git/objects/b9/
tf5-5.0beta8/.git/objects/bb/
tf5-5.0beta8/.git/objects/bc/
tf5-5.0beta8/.git/objects/bd/
tf5-5.0beta8/.git/objects/bf/
tf5-5.0beta8/.git/objects/c0/
tf5-5.0beta8/.git/objects/c1/
tf5-5.0beta8/.git/objects/c2/
tf5-5.0beta8/.git/objects/c3/
tf5-5.0beta8/.git/objects/c5/
tf5-5.0beta8/.git/objects/c7/
tf5-5.0beta8/.git/objects/ca/
tf5-5.0beta8/.git/objects/ce/
tf5-5.0beta8/.git/objects/d1/
tf5-5.0beta8/.git/objects/d3/
tf5-5.0beta8/.git/objects/d4/
tf5-5.0beta8/.git/objects/d5/
tf5-5.0beta8/.git/objects/d8/
tf5-5.0beta8/.git/objects/d9/
tf5-5.0beta8/.git/objects/dc/
tf5-5.0beta8/.git/objects/dd/
tf5-5.0beta8/.git/objects/e1/
tf5-5.0beta8/.git/objects/e4/
tf5-5.0beta8/.git/objects/e5/
tf5-5.0beta8/.git/objects/e6/
tf5-5.0beta8/.git/objects/e7/
tf5-5.0beta8/.git/objects/e8/
tf5-5.0beta8/.git/objects/ea/
tf5-5.0beta8/.git/objects/eb/
tf5-5.0beta8/.git/objects/ed/
tf5-5.0beta8/.git/objects/ee/
tf5-5.0beta8/.git/objects/ef/
tf5-5.0beta8/.git/objects/f0/
tf5-5.0beta8/.git/objects/f4/
tf5-5.0beta8/.git/objects/f5/
tf5-5.0beta8/.git/objects/f6/
tf5-5.0beta8/.git/objects/f8/
tf5-5.0beta8/.git/objects/f9/
tf5-5.0beta8/.git/objects/fa/
tf5-5.0beta8/.git/objects/fb/
tf5-5.0beta8/.git/objects/fc/
tf5-5.0beta8/.git/objects/fd/
tf5-5.0beta8/.git/refs/heads/
tf5-5.0beta8/.git/refs/tags/
tf5-5.0beta8/autom4te.cache/
tf5-5.0beta8/macos/
tf5-5.0beta8/unix/
tf5-5.0beta8/win32/
;;;; Socket line counts on status line

/loaded __TFLIB__/activity_status.tf

/require -q world-q.tf
/require -q textencode.tf

/status_edit @world:11
/status_rm @active
/status_add -x -A"@world" activity_status

/def -qi -Fp2147483647 -mglob -h'WORLD' update_activity_fg = \
    /let label=$[textencode(fg_world())]%; \
    /set activity_color_%{label}=%; \
    /repeat -0 1 /update_activity

/def -i activity_color = \
    /if (${world_name} !~ fg_world()) \
	/let _var=activity_color_$[textencode(${world_name})]%; \
	/eval \
	    /if (!regmatch("(^|,)%1(,|$$)", %_var)) \
		/set %_var=%%{%_var},%1%%; \
	    /endif%; \
    /endif

/def -qi -Fp2147483647 -hPREACTIVITY activity_status_preactivity_hook = \
    /update_activity_delayed

/def -qi -Fp2147483647 -hBGTEXT activity_status_bgtext_hook = \
    /update_activity_delayed

/def -E'${world_name} !~ fg_world() & moresize("")' \
  -qi -Fp2147483647 -mglob -h'DISCONNECT' \
    update_activity_disconnect_hook = \
	/activity_queue_hook ${world_name}%; \
	/update_activity

;; /status_abbr n string
;; Abbreviate string so it fits in n characters.
;; Try to keep capitals, beginnings of words, and digits; discard everything
;; else as needed.
/def -i status_abbr = \
    /let n=%1%; \
    /let name=%-1%; \
; if name contains ':', abbreviate left side before right side
    /if (strlen(name) > n & regmatch(":", name)) \
	/let right=%{PR}%; \
	/test name:=strcat(status_abbr(n-strlen(right)-1, {PL}), ":", right)%; \
    /endif%; \
    /while (strlen(name) > n & \
        regmatch("((?:[A-Z]|(?<![A-Za-z])[a-z])[a-z]*)[a-z]((?:[^a-z]*(?:(?<![A-Za-z])[a-z])?)+)$", name)) \
        /let name=%PL%P1%P2%; \
    /done%; \
    /while (strlen(name) > n & \
        regmatch("[^A-Za-z0-9]", name)) \
        /let name=%PL%PR%; \
    /done%; \
    /result name

;; Abbreviate a string, for the status bar.  User can define custom
;; abbreviations with "/set_status_abbr <string> <abbr>", or writing his
;; own status_abbr_hook(n, str).  If both of those fail, use the default
;; intelligent abbreviator /status_abbr.
/def -i status_label = \
    /let n=$[status_width('activity_status') / $(/length %active_worlds) - 5]%;\
    /if (status_abbr_max > 0 & n > status_abbr_max) \
	/let n=%status_abbr_max%; \
    /endif%; \
    /if (strlen({*}) <= n) /result {*}%; /endif%; \
    /if /ismacro status_abbr_hook%; /then \
	/let abbr=$[status_abbr_hook(n, {*})]%; \
	/if (abbr !~ "") /result abbr%; /endif%; \
    /endif%; \
    /let abbr=%; \
    /test abbr:=status_abbr__$[textencode({*})]%; \
    /if (abbr !~ "") /result abbr%; /endif%; \
;   Abbreviate the name only as much as necessary to fit in n characters.
    /result status_abbr(n, {*})

;; /set_status_abbr <world> <abbr>
;; <abbr> may contain @{} attributes
/def -i set_status_abbr = /set status_abbr__$[textencode({-L})]=%L
/def -i unset_status_abbr = /unset status_abbr__$[textencode({*})]

;; Activity message is confusing with 5.0's per-world virtual screens, and
;; activity_status tells you what worlds have activity.
/def -i -ag -hACTIVITY gag_activity

;; NB: %* is not current world
/def -i update_activity_world = \
    /let _n=$[moresize("", {*})]%; \
    /let _name=$[textencode({*})]%; \
    /test activity_color_%{_name}%; \
    /echo -p - \
	@{%?}$[is_open({*})?"":"!"]$[status_label({*})]:\
	$[_n < 1000 ? _n : strcat(_n/1000, "k")]@{n}

/def -i update_activity = \
    /if (update_activity_pid) \
	/kill %update_activity_pid%; \
	/set update_activity_pid=0%; \
    /endif%; \
    /set activity_status=$(/mapcar /update_activity_world %active_worlds)

;; format: put in "(...)" if not blank
/set status_var_activity_status \
    (activity_status =~ "") ? "" : strcat('(', activity_status, ')')

/def -i update_activity_delayed = \
    /if (update_activity_pid) \
	/kill %update_activity_pid%; \
    /endif%; \
    /if (moresize("") == 0 | mod(moresize(""), 50) == 0) \
	/repeat -0 1 /update_activity%; \
	/set update_activity_pid=0%; \
    /else \
	/repeat -1 1 /update_activity%; \
	/set update_activity_pid=%?%; \
    /endif

/update_activity