免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1558 | 回复: 1
打印 上一主题 下一主题

[SCO UNIX] 另类界面编写-scosh[原创] [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-03-21 12:26 |只看该作者 |倒序浏览
在unix下面编写界面,menu,form,通常是用curses来编写。如果你的应用系统在sco openserver下面,还可以通过scosh来编写一些简单的界面。
scosh -- menu-driven SCO Shell with calendar, mail, and calculator

  Syntax
  ======

  scosh [ -v ] [ calendar | email | calculator ]

  Description
  ===========

  SCO Shell is a menu-driven shell, including calendar, calculator and
  electronic mail applications. The calendar is a distributed application
  suitable for workgroup coordination across a network.
   Startup
  +++++++

  The command scosh executes the script /usr/bin/scosh, which initializes the
  curses(S) and terminfo(M) based screen handling and invokes the desktop.
  scosh reads the environment variable OALIB to locate the path to its support
  files and binaries; these are located in /usr/lib/scosh/* by default.
man scosh 可以得到更详细的信息。
大家看/usr/lib/scosh/opadm/oakillany
480# cat oakillany
:
#       @(#) oakillany 25.1 92/09/25
#
#       Copyright (C) 1990-1992 The Santa Cruz Operation, Inc.
#               All Rights Reserved.
#       The information in this file is provided for the exclusive use of
#       the licensees of The Santa Cruz Operation, Inc.  Such users have the
#       right to use, modify, and incorporate this code into other products
#       for purposes authorized by the license agreement provided they include
#       this notice and the associated copyright notice with any such product.
#       The information in this file is provided "AS IS" without warranty.
#

OALIB=${OALIB-"/usr/lib/scosh"}
PATH=$OALIB/utilbinPATH

# run ourself thru oash
eval oainit 2>;/dev/null || (oash $0; kill $$)
. `findfile shell_strs`

EscWasHit() {
        oadeinit
        rm -f $TEMP
        exit
}

TEMP=/tmp/fm1$$
sh -c "ps -fe" >; $TEMP

#OAKILL1="Select program to kill"
wmopen 1 13 74 3 2  #打开一个窗口
wmtitle "$OAKILL1" #设置窗口标题
wmmessage -r "$PRESSRET"
pp -f $TEMP
rm -f $TEMP
[ "$PP_NUM" -eq -1 ] && EscWasHit
set $PP_ITEM; Pid=$2

#OAKILL2="Type of Signal"
#OAKILL3="2 - Interrupt"
#OAKILL4="4 - Terminate"
#OAKILL5="9 - Unconditional"
# The length of the box (num of columns) used to display the strings
# OAKILL3, OAKILL4, OAKILL5.
# The title of the box is OAKILL2.
#KILL_NUMCOLS=30
wmopen 2 5 $KILL_NUMCOLS 15 10
wmtitle "$OAKILL2"
wmmessage -r "$PRESSRET"
pp "$OAKILL3" "$OAKILL4" "$OAKILL5"
[ "$PP_NUM" -eq -1 ] && EscWasHit

set $PP_ITEM; SigNum=$1
eval kill -$SigNum $Pid 2>;$TEMP || {
        wmove 1
        wmmessage -r "$USEARROW"
        scan -e"$EOFMSG" $TEMP
}
rm -f $TEMP
oadeinit

论坛徽章:
0
2 [报告]
发表于 2003-03-21 13:56 |只看该作者

另类界面编写-scosh[原创]

scoadmin多数就是用scosh编写的。
/usr/lib/scosh/opadm/oakillany
就是一个杀进程的shell,我就曾经在一个产品里引用了一下,可惜不能支持中文。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP