mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-13 19:52:20 +00:00
dtksh/examples: clean up scripts
This commit does three thing: 1. Sets appropriate bits on source files 2. Tells imake to build them as script files, not data files 3. Remove broken examples based on unused code
This commit is contained in:
parent
5d0125b393
commit
994772518a
21 changed files with 25 additions and 132 deletions
0
cde/programs/dtksh/examples/CallDataTest4.src
Executable file → Normal file
0
cde/programs/dtksh/examples/CallDataTest4.src
Executable file → Normal file
0
cde/programs/dtksh/examples/CallbackTest2.src
Executable file → Normal file
0
cde/programs/dtksh/examples/CallbackTest2.src
Executable file → Normal file
0
cde/programs/dtksh/examples/DtCursorTest2.src
Executable file → Normal file
0
cde/programs/dtksh/examples/DtCursorTest2.src
Executable file → Normal file
0
cde/programs/dtksh/examples/DtWsTest1.src
Executable file → Normal file
0
cde/programs/dtksh/examples/DtWsTest1.src
Executable file → Normal file
0
cde/programs/dtksh/examples/EventHandlerTest.src
Executable file → Normal file
0
cde/programs/dtksh/examples/EventHandlerTest.src
Executable file → Normal file
|
@ -1,31 +1,30 @@
|
|||
XCOMM $XConsortium: Imakefile /main/4 1996/04/21 19:30:42 drk $
|
||||
DESKTOP_VERSION_STRING = DesktopVersionString
|
||||
|
||||
MODULE=dtksh/examples
|
||||
LOCAL_CPP_DEFINES = -DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP)
|
||||
|
||||
LOCAL_CPP_DEFINES = -DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) \
|
||||
-DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP)
|
||||
PROGRAMS = CallDataTest4 CallbackTest2 DtCursorTest2 DtWsTest1 \
|
||||
EventHandlerTest ListBounds1 ListItemPos1 ListPosSel1 PopupTest \
|
||||
SelBoxResTest SessionTest TextCutBuf1 TextDisp1 TextFXYPos1 \
|
||||
TransEventTest TransTest1 WorkProcTest1 XdrawTest crMovesText1
|
||||
|
||||
CppSourceFile(CallDataTest4,CallDataTest4.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppSourceFile(CallbackTest2,CallbackTest2.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppSourceFile(DtCursorTest2,DtCursorTest2.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppSourceFile(DtWsTest1,DtWsTest1.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppSourceFile(EventHandlerTest,EventHandlerTest.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppSourceFile(ListBounds1,ListBounds1.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppSourceFile(ListItemPos1,ListItemPos1.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppSourceFile(ListPosSel1,ListPosSel1.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppSourceFile(PipeTest,PipeTest.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppSourceFile(PopupTest,PopupTest.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppSourceFile(SelBoxResTest,SelBoxResTest.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppSourceFile(SessionTest,SessionTest.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppSourceFile(TextCutBuf1,TextCutBuf1.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppSourceFile(TextDisp1,TextDisp1.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppSourceFile(TextFXYPos1,TextFXYPos1.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppSourceFile(TransEventTest,TransEventTest.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppSourceFile(TransTest1,TransTest1.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppSourceFile(WorkProcTest1,WorkProcTest1.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppSourceFile(XCursorTest1,XCursorTest1.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppSourceFile(XdrawTest,XdrawTest.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppSourceFile(crMovesText1,crMovesText1.src,$(LOCAL_CPP_DEFINES),)
|
||||
all:: $(PROGRAMS)
|
||||
|
||||
all::
|
||||
CppScriptTarget(CallDataTest4,CallDataTest4.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppScriptTarget(CallbackTest2,CallbackTest2.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppScriptTarget(DtCursorTest2,DtCursorTest2.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppScriptTarget(DtWsTest1,DtWsTest1.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppScriptTarget(EventHandlerTest,EventHandlerTest.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppScriptTarget(ListBounds1,ListBounds1.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppScriptTarget(ListItemPos1,ListItemPos1.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppScriptTarget(ListPosSel1,ListPosSel1.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppScriptTarget(PopupTest,PopupTest.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppScriptTarget(SelBoxResTest,SelBoxResTest.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppScriptTarget(SessionTest,SessionTest.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppScriptTarget(TextCutBuf1,TextCutBuf1.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppScriptTarget(TextDisp1,TextDisp1.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppScriptTarget(TextFXYPos1,TextFXYPos1.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppScriptTarget(TransEventTest,TransEventTest.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppScriptTarget(TransTest1,TransTest1.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppScriptTarget(WorkProcTest1,WorkProcTest1.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppScriptTarget(XdrawTest,XdrawTest.src,$(LOCAL_CPP_DEFINES),)
|
||||
CppScriptTarget(crMovesText1,crMovesText1.src,$(LOCAL_CPP_DEFINES),)
|
||||
|
|
0
cde/programs/dtksh/examples/ListBounds1.src
Executable file → Normal file
0
cde/programs/dtksh/examples/ListBounds1.src
Executable file → Normal file
0
cde/programs/dtksh/examples/ListItemPos1.src
Executable file → Normal file
0
cde/programs/dtksh/examples/ListItemPos1.src
Executable file → Normal file
0
cde/programs/dtksh/examples/ListPosSel1.src
Executable file → Normal file
0
cde/programs/dtksh/examples/ListPosSel1.src
Executable file → Normal file
|
@ -1,43 +0,0 @@
|
|||
XCOMM! CDE_INSTALLATION_TOP/bin/dtksh
|
||||
XCOMM $XConsortium: PipeTest.src /main/3 1996/04/23 20:18:30 drk $
|
||||
|
||||
XCOMM #########################################################################
|
||||
XCOMM (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
XCOMM (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
XCOMM (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
XCOMM (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of
|
||||
XCOMM Novell, Inc.
|
||||
XCOMM #########################################################################
|
||||
|
||||
|
||||
XCOMM
|
||||
XCOMM This sample shell script demonstrates some of the more advanced features
|
||||
XCOMM of dtksh. It shows how a structure can be defined and accessed, and
|
||||
XCOMM how a C library function can be called.
|
||||
XCOMM
|
||||
|
||||
XCOMM Define a structure made up of 2 integer fields: pipe_in and pipe_out
|
||||
struct pipe_fds pipe_in:int pipe_out:int
|
||||
typedef 'struct pipe_fds *' pipe_fds_ptr
|
||||
|
||||
echo "Test 1"
|
||||
XCOMM Malloc space for the structure, and initialize the fields
|
||||
call -F nop '@pipe_fds_ptr:{0,0}'
|
||||
PIPE_FDS=$RET
|
||||
XCOMM Call the pipe(2) kernel intrinsic
|
||||
call pipe $PIPE_FDS
|
||||
RESULT=$RET
|
||||
XCOMM Print the values of the fields in the structure
|
||||
call strprint pipe_fds_ptr $PIPE_FDS
|
||||
echo RESULT = $RESULT
|
||||
echo
|
||||
|
||||
XCOMM Repeat the test, to make sure we get different file descriptors
|
||||
echo "Test 2"
|
||||
call -F nop '@pipe_fds_ptr:{0,0}'
|
||||
PIPE_FDS=$RET
|
||||
call pipe $PIPE_FDS
|
||||
RESULT=$RET
|
||||
call strprint pipe_fds_ptr $PIPE_FDS
|
||||
echo RESULT = $RESULT
|
||||
echo
|
0
cde/programs/dtksh/examples/PopupTest.src
Executable file → Normal file
0
cde/programs/dtksh/examples/PopupTest.src
Executable file → Normal file
0
cde/programs/dtksh/examples/SelBoxResTest.src
Executable file → Normal file
0
cde/programs/dtksh/examples/SelBoxResTest.src
Executable file → Normal file
0
cde/programs/dtksh/examples/SessionTest.src
Executable file → Normal file
0
cde/programs/dtksh/examples/SessionTest.src
Executable file → Normal file
0
cde/programs/dtksh/examples/TextCutBuf1.src
Executable file → Normal file
0
cde/programs/dtksh/examples/TextCutBuf1.src
Executable file → Normal file
0
cde/programs/dtksh/examples/TextDisp1.src
Executable file → Normal file
0
cde/programs/dtksh/examples/TextDisp1.src
Executable file → Normal file
0
cde/programs/dtksh/examples/TextFXYPos1.src
Executable file → Normal file
0
cde/programs/dtksh/examples/TextFXYPos1.src
Executable file → Normal file
0
cde/programs/dtksh/examples/TransEventTest.src
Executable file → Normal file
0
cde/programs/dtksh/examples/TransEventTest.src
Executable file → Normal file
0
cde/programs/dtksh/examples/TransTest1.src
Executable file → Normal file
0
cde/programs/dtksh/examples/TransTest1.src
Executable file → Normal file
0
cde/programs/dtksh/examples/WorkProcTest1.src
Executable file → Normal file
0
cde/programs/dtksh/examples/WorkProcTest1.src
Executable file → Normal file
|
@ -1,63 +0,0 @@
|
|||
XCOMM! CDE_INSTALLATION_TOP/bin/dtksh
|
||||
XCOMM $XConsortium: XCursorTest1.src /main/3 1996/04/23 20:19:21 drk $
|
||||
|
||||
XCOMM #########################################################################
|
||||
XCOMM (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
XCOMM (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
XCOMM (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
XCOMM (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of
|
||||
XCOMM Novell, Inc.
|
||||
XCOMM #########################################################################
|
||||
|
||||
|
||||
XCOMM
|
||||
XCOMM This sample shell script demonstrates how the 'call' command can be used
|
||||
XCOMM to obtain an 'X' cursor, and then how that cursor can be set for a
|
||||
XCOMM widget hierarchy.
|
||||
XCOMM
|
||||
|
||||
XCOMM Pushbutton Callback: set the cursor for the widget hierarchy
|
||||
DefineCursor()
|
||||
{
|
||||
XDefineCursor $(XtDisplay "-" $TOPLEVEL) $(XtWindow "-" $TOPLEVEL) $CURSOR
|
||||
}
|
||||
|
||||
XCOMM Pushbutton Callback: unset the cursor for the widget hierarchy
|
||||
UndefineCursor()
|
||||
{
|
||||
XUndefineCursor $(XtDisplay "-" $TOPLEVEL) $(XtWindow "-" $TOPLEVEL)
|
||||
}
|
||||
|
||||
XCOMM ###################### Create the Main UI ###############################
|
||||
|
||||
XtInitialize TOPLEVEL xCursorTest XCursorTest "$0" "$@"
|
||||
XtSetValues $TOPLEVEL allowShellResize:True
|
||||
|
||||
XtCreateManagedWidget DA da XmDrawingArea $TOPLEVEL
|
||||
XtSetValues $DA height:200 width:200
|
||||
|
||||
XtRealizeWidget $TOPLEVEL
|
||||
|
||||
XtCreateApplicationShell TOPLEVEL2 xCursorTesta TopLevelShell
|
||||
|
||||
XtCreateManagedWidget RC rc XmRowColumn $TOPLEVEL2 \
|
||||
orientation:HORIZONTAL \
|
||||
numColumns:2 \
|
||||
packing:PACK_COLUMN
|
||||
|
||||
XtCreateManagedWidget PB1 pb1 XmPushButton $RC \
|
||||
labelString:"Define Cursor"
|
||||
XtAddCallback $PB1 activateCallback "DefineCursor"
|
||||
|
||||
XtCreateManagedWidget PB2 pb2 XmPushButton $RC \
|
||||
labelString:"Undefine Cursor"
|
||||
XtAddCallback $PB2 activateCallback "UndefineCursor"
|
||||
|
||||
XCOMM Call the X function for getting a cursor
|
||||
call XCreateFontCursor $(XtDisplay "-" $TOPLEVEL) 10
|
||||
CURSOR=$RET
|
||||
echo "Cursor = "$CURSOR
|
||||
|
||||
XtRealizeWidget $TOPLEVEL2
|
||||
|
||||
XtMainLoop
|
0
cde/programs/dtksh/examples/XdrawTest.src
Executable file → Normal file
0
cde/programs/dtksh/examples/XdrawTest.src
Executable file → Normal file
Loading…
Reference in a new issue