window:
	res:
		windowType	wstandard
	endres:
endwindow:
close:
	res:
		bitmapPath	$(bitmaps)
		bitmapFile	CLOSE::CBM
	endres:
endclose:
title:
	res:
		leftLabel	'Ŭ̾Ʈ '
		leftKanjiFont	$(kanjiFont)
		leftFont	$(kanaFont)
		rightLabel	/etc/fstab
		rightKanjiFont	$(kanjiFont)
		rightFont	$(kanaFont)
		switch $(COLOR)
			case MONO:
				bitmapPath	$(bitmaps)
				backgroundFile	GRAY3
				transparent	false
				break
		endswitch
	endres:
endtitle:
dialog: dialogs
	res:
		defaultDistance		#(fWidth)
		dialogType		modeless
	endres:
	ditem: host
		res:
			itemType	bitmap
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)
			leftLabel	'ȣƮ         :12345678901234567890'
			leftKanjiFont	$(kanjiFont)
			leftFont	$(kanaFont)
		endres:
	endditem:
	ditem: dir
		res:
			itemType	bitmap
			fromVert	host
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)
			leftLabel	' 丮  :12345678901234567890'
			leftKanjiFont	$(kanjiFont)
			leftFont	$(kanaFont)
		endres:
	endditem:
	ditem: set
		res:
			itemType	button
			fromHoriz	host
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)*2
			label		'   '
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
		act:
			switch $(TMP_CLIENT_MNTDIR)
				case '':
					put 1 $(err_no)
					job err
					quit
				case /\*:
					break
				default:
					put 2 $(err_no)
					job err
					quit
			endswitch
			put on $(ONRUN)
			put 101 $(menu_no)
			$(onrun) = sub $(commonPath)/onrun ++48++48
			$(pid) = bg $(etc)/Disk/Sfstab.sh chg $(CLIENT_SVRDIR) $(CLIENT_MNTDIR) $(TMP_CLIENT_MNTDIR) off $(TMP_CLIENT_WRITE) $(TMP_CLIENT_AUTO) > $(ERR_LIST)
			$(bgstat) = trap $(pid) cmd_end
		endact:
	endditem:
	ditem: reset
		res:
			itemType	button
			fromVert	set
			fromHoriz	host
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)*2
			label		'   '
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
		act:
			job reset
		endact:
	endditem:
	ditem: cdir_label
		res:
			itemType	button
			fromVert	dir
			vertDistance	#(fWidth)*2
			horizDistance	#(fWidth)
			label		'Ʈ 丮:'
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
		act:
			$(getdir) = getdir
			trap $(getdir) getdir
		endact:
	endditem:
	ditem: cdir
		res:
			itemType	text
			fromVert	dir
			fromHoriz	cdir_label
			vertDistance	#(fWidth)*2
			horizDistance	6
			length		32
			width		#(fWidth)*32+4
			height		#(fHeight)
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			shadowWidth	0
			borderWidth	2
			focus
		endres:
		act:
			put $(line)
			put $(line)@0 $(TMP_CLIENT_MNTDIR)
		endact:
	endditem:
	ditem: write_label
		res:
			itemType	bitmap
			fromVert	cdir_label
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)
			label		'ϱ       :'
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
	endditem:
	ditem: write
		res:
			itemType	button
			fromVert	cdir_label
			fromHoriz	cdir_label
			vertDistance	#(fWidth)
			horizDistance	6
			label		'   '
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
		act:
			switch $(TMP_CLIENT_WRITE)
				case on:
					put off $(TMP_CLIENT_WRITE)
					break
				case off:
					put on $(TMP_CLIENT_WRITE)
					break
			endswitch
			job chg_write
		endact:
	endditem:
	ditem: autom_label
		res:
			itemType	bitmap
			fromVert	write_label
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)
			label		'⵿ Ʈ  :'
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
	endditem:
	ditem: autom
		res:
			itemType	button
			fromVert	write_label
			fromHoriz	cdir_label
			vertDistance	#(fWidth)
			horizDistance	6
			label		' ƴ '
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
		endres:
		act:
			switch $(TMP_CLIENT_AUTO)
				case on:
					put off $(TMP_CLIENT_AUTO)
					break
				case off:
					put on $(TMP_CLIENT_AUTO)
					break
			endswitch
			job chg_autom
		endact:
	endditem:
enddialog:
proc: pre
	$(TMP) = mktemp
	put /tmp/$(TMP) $(TMP_LIST)
	$(TMP) = mktemp
	put /tmp/$(TMP) $(ERR_LIST)
	sh -c 'echo $(CLIENT_SVRDIR) | sed "s/:/ /"'
	put $(stdout)@0 $(HOST_NAME)
	put $(stdout)@1 $(SERVER_DIR)
	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
	switch #(menu_no)
		case 1:
		case 2:
			close $(err)
	endswitch
	rm -f $(TMP_LIST) $(ERR_LIST)
endproc:
proc: open
	setval host leftLabel 'ȣƮ         : $(HOST_NAME)'
	setval dir leftLabel ' 丮  : $(SERVER_DIR)'
	job reset
endproc:
proc: reset
	put $(CLIENT_MNTDIR) $(TMP_CLIENT_MNTDIR)
	setval cdir string $(TMP_CLIENT_MNTDIR)
	put $(CLIENT_WRITE) $(TMP_CLIENT_WRITE)
	job chg_write
	put $(CLIENT_AUTO) $(TMP_CLIENT_AUTO)
	job chg_autom
endproc:
proc: chg_write
	switch $(TMP_CLIENT_WRITE)
		case on:
			setval write label '   '
			break
		case off:
			setval write label '   '
			break
	endswitch
endproc:
proc: chg_autom
	switch $(TMP_CLIENT_AUTO)
		case on:
			setval autom label '  '
			break
		case off:
			setval autom label ' ƴ '
			break
	endswitch
endproc:
proc: getdir
	switch #(pg_stat)
		case 0:
			setval cdir string $(pg_path)
			break
	endswitch
endproc:
proc: cmd_end
	close $(onrun)
	buzzer $(main)
	switch $(mapped)
		case on:
			job bgdone
			break
		case off:
			put on $(opened)
			break
	endswitch
	put 102 $(menu_no)
endproc:
proc: unmap
	switch #(menu_no)
		case 1:
		case 2:
			unmap $(err)
			break
		case 101:
			unmap $(onrun)
			break
		case 102:
			unmap $(n_end)
			break
	endswitch
	put off $(mapped)
endproc:
proc: map
	switch #(menu_no)
		case 1:
		case 2:
			move $(err)
			raise $(err)
			map $(err)
			break
		case 101:
			move $(onrun)
			raise $(onrun)
			map $(onrun)
			break
		case 102:
			switch $(opened)
				case on:
					job bgdone
					break
				case off:
					move $(n_end)
					raise $(n_end)
					map $(n_end)
					break
			endswitch
	endswitch
	put on $(mapped)
	put off $(opened)
endproc:
proc: title
	job move
	job up
endproc:
proc: raise
	job up
endproc:
proc: move
	switch #(menu_no)
		case 1:
		case 2:
			move $(err)
			break
		case 101:
			move $(onrun)
			break
		case 102:
			move $(n_end)
			break
	endswitch
endproc:
proc: up
	switch #(menu_no)
		case 1:
		case 2:
			raise $(err)
			break
		case 101:
			raise $(onrun)
			break
		case 102:
			raise $(n_end)
			break
	endswitch
endproc:
proc: bgdone
	switch #(bgstat)
		case 0:
			$(n_end) = sub $(commonPath)/normalEnd ++48++48
			trap $(n_end) n_end
			break
		case 0x200:
			put $(error_dir) < $(ERR_LIST)
			put '$(error_dir)() 丮 ƴ  ϹǷ, ' $(confirm_msg1)
			put '丮$(CLIENT_MNTDIR)() ۼ  ϴ.' $(confirm_msg2)
			$(n_end) = sub $(commonPath)/error2 ++48++48
			trap $(n_end) n_err
			break
		case 0x300:
			put $(error_dir) < $(ERR_LIST)
			put '丮$(error_dir)() ۼ  ϴ.' $(confirm_msg1)
			$(n_end) = sub $(commonPath)/error1 ++48++48
			trap $(n_end) n_err
			break
		case 0x400:
			put '2 ٸ  ý,  丮 ' $(confirm_msg1)
			put 'ڵ  Ʈ  ϴ.' $(confirm_msg2)
			$(n_end) = sub $(commonPath)/error2 ++48++48
			trap $(n_end) n_err
			break
	endswitch
endproc:
proc: n_end
	put off $(ONRUN)
	put on $(CHANGE_CLIENT)
	put 0 $(menu_no)
	job close
endproc:
proc: n_err
	put off $(ONRUN)
	put 0 $(menu_no)
endproc:
proc: err
	put $(err_no) $(menu_no)
	switch #(err_no)
		case 1:
			put 'Ʈ 丮 Ͽ ֽʽÿ.' $(confirm_msg1)
			$(err) = sub $(commonPath)/error1 ++48++48
			break
		case 2:
			put 'Ʈ 丮 /  ۵Ǵ н Ͽ ֽʽÿ.' $(confirm_msg1)
			$(err) = sub $(commonPath)/error1 ++48++48
			break
	endswitch
	buzzer
	trap $(err) err_end
endproc:
proc: err_end
	put 0 $(menu_no)
endproc:
