window:
	res:
		windowType	wstandard
	endres:
endwindow:
close:
	res:
		bitmapPath	$(bitmaps)
		bitmapFile	CLOSE::CBM
	endres:
endclose:
title:
	res:
		leftLabel	mhrX|uT|o|̑I
		leftKanjiFont	$(kanjiFont)
		leftFont	$(kanaFont)
		switch $(COLOR)
			case MONO:
				bitmapPath	$(bitmaps)
				backgroundFile	GRAY3
				transparent	false
				break
		endswitch
	endres:
endtitle:
dialog: dialogs
	res:
		defaultDistance		#(fWidth)
		dialogType		modeless
	endres:
	ditem: list_label
		res:
			itemType	bitmap
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)
			label		'zXgꗗ'
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
	endditem:
	ditem: list
		res:
			itemType	scrtext
			fromVert	list_label
			vertDistance	4
			horizDistance	#(fWidth)
			width		#(fWidth)+1*20
			height		#(lHeight)*7+8
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			bind1		select1
			bind2		select2
			file		/dev/null
		endres:
		act:
			put $(line)
			put $(line)@0 $(TMP_NAME)
		endact:
	endditem:
	ditem: select
		res:
			itemType	button
			fromVert	list
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)
			label		' I@ '
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
		act:
			job select
		endact:
	endditem:
	ditem: belong_label
		res:
			itemType	bitmap
			fromHoriz	list
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)*3
			label		'X|uT|o|'
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
	endditem:
	ditem: belong
		res:
			itemType	scrtext
			fromVert	belong_label
			fromHoriz	list
			vertDistance	4
			horizDistance	#(fWidth)*3
			width		#(fWidth)+1*20
			height		#(lHeight)*7+8
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			bind1		delete1
			bind2		delete2
			file		/dev/null
		endres:
		act:
			put $(line)
			put $(line)@0 $(DEL_NAME)
		endact:
	endditem:
	ditem: del
		res:
			itemType	button
			fromVert	belong
			fromHoriz	list
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)*3
			label		' @ '
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
		act:
			job delete2
		endact:
	endditem:
	ditem: set
		res:
			itemType	button
			fromVert	list_label
			fromHoriz	belong
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)*2
			label		' ݁@ '
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
		act:
			sed 's/ //g' $(NEW_LIST) > $(YPSERV_LIST)
			job off
			close
		endact:
	endditem:
	ditem: clear
		res:
			itemType	button
			fromVert	set
			fromHoriz	belong
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)*2
			label		' NA '
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
		act:
			echo -n > $(NEW_LIST)
			job belong_init
		endact:
	endditem:
enddialog:
proc: pre
	$(TMP) = mktemp
	put /tmp/$(TMP) $(NEW_LIST)
	$(TMP) = mktemp
	put /tmp/$(TMP) $(OLD_LIST)
	$(TMP) = mktemp
	put /tmp/$(TMP) $(STATION_LIST)
	$(TMP) = mktemp
	put /tmp/$(TMP) $(TMP_LIST)
	$(bin)/Snet_check -lhm > $(TMP_LIST)
	sort -u -t\ +0.2 $(TMP_LIST) > $(STATION_LIST)
	cp $(YPSERV_LIST) $(OLD_LIST)
	cp $(OLD_LIST) $(NEW_LIST)
	put 0 $(menu_no)
	put on $(mapped)
	put off $(opened)
endproc:
proc: close
	switch $(ONRUN)
		case on:
			quit
	endswitch
	job off
	close
endproc:
proc: off
	rm -f $(NEW_LIST) $(OLD_LIST) $(STATION_LIST) $(TMP_LIST)
endproc:
proc: open
	setval list file $(STATION_LIST)
	setval select sensitive false
	job belong_init
	switch #(uid)
		case 0:
			break
		default:
			setval set sensitive false
			setval clear sensitive false
			break
	endswitch
endproc:
proc: select1
	switch #(uid)
		case 0:
			break
		default:
			quit
	endswitch
	switch $(TMP_NAME)
		case '':
			quit
	endswitch
	setval select sensitive true
endproc:
proc: select2
	switch #(uid)
		case 0:
			break
		default:
			quit
	endswitch
	switch $(TMP_NAME)
		case '':
			quit
	endswitch
	setval select selected true
	job select
	setval select selected false
endproc:
proc: select
	put '  $(TMP_NAME)' > $(TMP_LIST)
	$(bin)/Sfile_op -a -i $(TMP_LIST) -o $(NEW_LIST)
	job belong_init
endproc:
proc: delete1
	switch #(uid)
		case 0:
			break
		default:
			quit
	endswitch
	switch $(DEL_NAME)
		case '':
			quit
	endswitch
	setval del sensitive true
endproc:
proc: delete2
	switch #(uid)
		case 0:
			break
		default:
			quit
	endswitch
	switch $(DEL_NAME)
		case '':
			quit
	endswitch
	setval del selected true
	job delete
	setval del selected false
endproc:
proc: delete
	put $(DEL_NAME) > $(TMP_LIST)
	$(bin)/Sfile_op -d -i $(TMP_LIST) -o $(NEW_LIST)
	job belong_init
endproc:
proc: belong_init
	setval belong file $(NEW_LIST)
	setval del sensitive false
endproc:
