Compare commits
7 Commits
master
...
windows-hi
Author | SHA1 | Date |
---|---|---|
|
40ef5594cb | |
|
ef0f56e4b7 | |
|
32795ecf03 | |
|
0f796b922b | |
|
81ff054785 | |
|
4785479ea0 | |
|
56a1ecc0cb |
12
Nmakefile
12
Nmakefile
|
@ -132,11 +132,19 @@ libfactor-ffi-test.dll: vm/ffi_test.obj
|
||||||
factor.dll.lib: $(DLL_OBJS)
|
factor.dll.lib: $(DLL_OBJS)
|
||||||
link $(LINK_FLAGS) /implib:factor.dll.lib /out:factor.dll /dll $(DLL_OBJS)
|
link $(LINK_FLAGS) /implib:factor.dll.lib /out:factor.dll /dll $(DLL_OBJS)
|
||||||
|
|
||||||
factor.com: $(EXE_OBJS) $(DLL_OBJS)
|
# If we ``link`` factor.com and then ``mt`` it in the same rule (for retina support)
|
||||||
|
# then factor.com is still open and ``mt`` fails
|
||||||
|
# sleep hack fixes it...
|
||||||
|
factor.com :: $(EXE_OBJS) $(DLL_OBJS)
|
||||||
link $(LINK_FLAGS) /out:factor.com /SUBSYSTEM:$(SUBSYSTEM_COM_FLAGS) $(EXE_OBJS) $(DLL_OBJS)
|
link $(LINK_FLAGS) /out:factor.com /SUBSYSTEM:$(SUBSYSTEM_COM_FLAGS) $(EXE_OBJS) $(DLL_OBJS)
|
||||||
|
factor.com ::
|
||||||
|
mt -manifest factor.exe.manifest -outputresource:factor.com;#1
|
||||||
|
|
||||||
factor.exe: $(EXE_OBJS) $(DLL_OBJS)
|
factor.exe :: $(EXE_OBJS) $(DLL_OBJS)
|
||||||
link $(LINK_FLAGS) /out:factor.exe /SUBSYSTEM:$(SUBSYSTEM_EXE_FLAGS) $(EXE_OBJS) $(DLL_OBJS)
|
link $(LINK_FLAGS) /out:factor.exe /SUBSYSTEM:$(SUBSYSTEM_EXE_FLAGS) $(EXE_OBJS) $(DLL_OBJS)
|
||||||
|
factor.exe ::
|
||||||
|
mt -manifest factor.exe.manifest -outputresource:factor.exe;#1
|
||||||
|
|
||||||
|
|
||||||
all: factor.com factor.exe factor.dll.lib libfactor-ffi-test.dll
|
all: factor.com factor.exe factor.dll.lib libfactor-ffi-test.dll
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Doug Coleman
|
|
@ -0,0 +1 @@
|
||||||
|
windows
|
|
@ -0,0 +1,11 @@
|
||||||
|
! Copyright (C) 2018 Doug Coleman.
|
||||||
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
|
USING: alien.c-types alien.data arrays classes.struct kernel
|
||||||
|
windows.errors windows.shcore windows.types windows.user32 ;
|
||||||
|
IN: windows.screens
|
||||||
|
|
||||||
|
: get-dpi ( -- dpi )
|
||||||
|
0 0 POINT <struct-boa> 0 MonitorFromPoint
|
||||||
|
MDT_EFFECTIVE_DPI
|
||||||
|
0 uint <ref> 0 uint <ref> [ GetDpiForMonitor win32-error=0/f ] 2keep
|
||||||
|
[ uint deref ] bi@ 2array ;
|
|
@ -0,0 +1 @@
|
||||||
|
Benjamin Pollack
|
|
@ -0,0 +1 @@
|
||||||
|
windows
|
|
@ -0,0 +1,103 @@
|
||||||
|
! Copyright (C) 2017 Benjamin Pollack, Doug Coleman.
|
||||||
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
|
USING: alien.syntax windows.types ;
|
||||||
|
IN: windows.shcore
|
||||||
|
|
||||||
|
LIBRARY: shcore
|
||||||
|
|
||||||
|
ENUM: MONITOR_DPI_TYPE
|
||||||
|
MDT_EFFECTIVE_DPI
|
||||||
|
MDT_ANGULAR_DPI
|
||||||
|
MDT_RAW_DPI
|
||||||
|
{ MDT_DEFAULT 0 } ;
|
||||||
|
|
||||||
|
! CommandLineToArgvW
|
||||||
|
! CreateRandomAccessStreamOnFile
|
||||||
|
! CreateRandomAccessStreamOverStream
|
||||||
|
! CreateStreamOverRandomAccessStream
|
||||||
|
! DllCanUnloadNow
|
||||||
|
! DllGetActivationFactory
|
||||||
|
! DllGetClassObject
|
||||||
|
! GetCurrentProcessExplicitAppUserModelID
|
||||||
|
FUNCTION: HRESULT GetDpiForMonitor ( HMONITOR hMonitor, MONITOR_DPI_TYPE dpiType, UINT* dpiX, UINT *dpiY )
|
||||||
|
! GetDpiForShellUIComponent
|
||||||
|
! GetFeatureEnabledState
|
||||||
|
! GetFeatureVariant
|
||||||
|
! GetProcessDpiAwareness
|
||||||
|
! GetProcessReference
|
||||||
|
! GetScaleFactorForDevice
|
||||||
|
! GetScaleFactorForMonitor
|
||||||
|
! IsOS
|
||||||
|
! IsProcessInIsolatedContainer
|
||||||
|
! IStream_Copy
|
||||||
|
! IStream_Read
|
||||||
|
! IStream_ReadStr
|
||||||
|
! IStream_Reset
|
||||||
|
! IStream_Size
|
||||||
|
! IStream_Write
|
||||||
|
! IStream_WriteStr
|
||||||
|
! IUnknown_AtomicRelease
|
||||||
|
! IUnknown_GetSite
|
||||||
|
! IUnknown_QueryService
|
||||||
|
! IUnknown_Set
|
||||||
|
! IUnknown_SetSite
|
||||||
|
! RecordFeatureError
|
||||||
|
! RecordFeatureUsage
|
||||||
|
! RegisterScaleChangeEvent
|
||||||
|
! RegisterScaleChangeNotifications
|
||||||
|
! RevokeScaleChangeNotifications
|
||||||
|
! SetCurrentProcessExplicitAppUserModelID
|
||||||
|
! SetProcessDpiAwareness
|
||||||
|
! SetProcessReference
|
||||||
|
! SHAnsiToAnsi
|
||||||
|
! SHAnsiToUnicode
|
||||||
|
! SHCopyKeyA
|
||||||
|
! SHCopyKeyW
|
||||||
|
! SHCreateMemStream
|
||||||
|
! SHCreateStreamOnFileA
|
||||||
|
! SHCreateStreamOnFileEx
|
||||||
|
! SHCreateStreamOnFileW
|
||||||
|
! SHCreateThread
|
||||||
|
! SHCreateThreadRef
|
||||||
|
! SHCreateThreadWithHandle
|
||||||
|
! SHDeleteEmptyKeyA
|
||||||
|
! SHDeleteEmptyKeyW
|
||||||
|
! SHDeleteKeyA
|
||||||
|
! SHDeleteKeyW
|
||||||
|
! SHDeleteValueA
|
||||||
|
! SHDeleteValueW
|
||||||
|
! SHEnumKeyExA
|
||||||
|
! SHEnumKeyExW
|
||||||
|
! SHEnumValueA
|
||||||
|
! SHEnumValueW
|
||||||
|
! SHGetThreadRef
|
||||||
|
! SHGetValueA
|
||||||
|
! SHGetValueW
|
||||||
|
! SHOpenRegStream2A
|
||||||
|
! SHOpenRegStream2W
|
||||||
|
! SHOpenRegStreamA
|
||||||
|
! SHOpenRegStreamW
|
||||||
|
! SHQueryInfoKeyA
|
||||||
|
! SHQueryInfoKeyW
|
||||||
|
! SHQueryValueExA
|
||||||
|
! SHQueryValueExW
|
||||||
|
! SHRegDuplicateHKey
|
||||||
|
! SHRegGetIntW
|
||||||
|
! SHRegGetPathA
|
||||||
|
! SHRegGetPathW
|
||||||
|
! SHRegGetValueA
|
||||||
|
! SHRegGetValueFromHKCUHKLM
|
||||||
|
! SHRegGetValueW
|
||||||
|
! SHRegSetPathA
|
||||||
|
! SHRegSetPathW
|
||||||
|
! SHReleaseThreadRef
|
||||||
|
! SHSetThreadRef
|
||||||
|
! SHSetValueA
|
||||||
|
! SHSetValueW
|
||||||
|
! SHStrDupA
|
||||||
|
! SHStrDupW
|
||||||
|
! SHUnicodeToAnsi
|
||||||
|
! SHUnicodeToUnicode
|
||||||
|
! SubscribeFeatureStateChangeNotification
|
||||||
|
! UnregisterScaleChangeEvent
|
||||||
|
! UnsubscribeFeatureStateChangeNotification
|
|
@ -0,0 +1 @@
|
||||||
|
bindings
|
|
@ -1788,7 +1788,7 @@ ALIAS: MessageBoxEx MessageBoxExW
|
||||||
|
|
||||||
! FUNCTION: ModifyMenuA
|
! FUNCTION: ModifyMenuA
|
||||||
! FUNCTION: ModifyMenuW
|
! FUNCTION: ModifyMenuW
|
||||||
! FUNCTION: MonitorFromPoint
|
FUNCTION: HMONITOR MonitorFromPoint ( POINT pt, DWORD dwFlags )
|
||||||
! FUNCTION: MonitorFromRect
|
! FUNCTION: MonitorFromRect
|
||||||
FUNCTION: HMONITOR MonitorFromWindow ( HWND hWnd, DWORD dwFlags )
|
FUNCTION: HMONITOR MonitorFromWindow ( HWND hWnd, DWORD dwFlags )
|
||||||
! FUNCTION: mouse_event
|
! FUNCTION: mouse_event
|
||||||
|
|
|
@ -20,6 +20,7 @@ CONSTANT: MAX_UNICODE_PATH 32768
|
||||||
{ "gl" "opengl32.dll" stdcall }
|
{ "gl" "opengl32.dll" stdcall }
|
||||||
{ "glu" "glu32.dll" stdcall }
|
{ "glu" "glu32.dll" stdcall }
|
||||||
{ "ole32" "ole32.dll" stdcall }
|
{ "ole32" "ole32.dll" stdcall }
|
||||||
|
{ "shcore" "shcore.dll" stdcall }
|
||||||
{ "usp10" "usp10.dll" stdcall }
|
{ "usp10" "usp10.dll" stdcall }
|
||||||
{ "psapi" "psapi.dll" stdcall }
|
{ "psapi" "psapi.dll" stdcall }
|
||||||
{ "winmm" "winmm.dll" stdcall }
|
{ "winmm" "winmm.dll" stdcall }
|
||||||
|
|
|
@ -1,356 +1,356 @@
|
||||||
<HTML>
|
<HTML>
|
||||||
<HEAD>
|
<HEAD>
|
||||||
<TITLE>mass:werk termlib faq</TITLE>
|
<TITLE>mass:werk termlib faq</TITLE>
|
||||||
|
|
||||||
<STYLE TYPE="text/css">
|
<STYLE TYPE="text/css">
|
||||||
body,p,a,td {
|
body,p,a,td {
|
||||||
font-family: courier,fixed,swiss,sans-serif;
|
font-family: courier,fixed,swiss,sans-serif;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #cccccc;
|
color: #cccccc;
|
||||||
}
|
}
|
||||||
.lh13 {
|
.lh13 {
|
||||||
line-height: 13px;
|
line-height: 13px;
|
||||||
}
|
}
|
||||||
.lh15 {
|
.lh15 {
|
||||||
line-height: 15px;
|
line-height: 15px;
|
||||||
}
|
}
|
||||||
pre {
|
pre {
|
||||||
font-family: courier,fixed,swiss,sans-serif;
|
font-family: courier,fixed,swiss,sans-serif;
|
||||||
color: #ccffaa;
|
color: #ccffaa;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 15px;
|
line-height: 15px;
|
||||||
}
|
}
|
||||||
.prop {
|
.prop {
|
||||||
font-family: courier,fixed,swiss,sans-serif;
|
font-family: courier,fixed,swiss,sans-serif;
|
||||||
color: #bbee99;
|
color: #bbee99;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 15px;
|
line-height: 15px;
|
||||||
}
|
}
|
||||||
h1 {
|
h1 {
|
||||||
font-family: courier,fixed,swiss,sans-serif;
|
font-family: courier,fixed,swiss,sans-serif;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: #cccccc;
|
color: #cccccc;
|
||||||
}
|
}
|
||||||
b.quest {
|
b.quest {
|
||||||
font-family: courier,fixed,swiss,sans-serif;
|
font-family: courier,fixed,swiss,sans-serif;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #bbee99;
|
color: #bbee99;
|
||||||
}
|
}
|
||||||
a,a:link,a:visited {
|
a,a:link,a:visited {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #77dd11;
|
color: #77dd11;
|
||||||
}
|
}
|
||||||
a:hover {
|
a:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
color: #77dd11;
|
color: #77dd11;
|
||||||
}
|
}
|
||||||
a:active {
|
a:active {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
color: #dddddd;
|
color: #dddddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media print {
|
@media print {
|
||||||
body { background-color: #ffffff; }
|
body { background-color: #ffffff; }
|
||||||
body,p,a,td {
|
body,p,a,td {
|
||||||
font-family: courier,fixed,swiss,sans-serif;
|
font-family: courier,fixed,swiss,sans-serif;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
}
|
}
|
||||||
.lh13 {
|
.lh13 {
|
||||||
line-height: 13px;
|
line-height: 13px;
|
||||||
}
|
}
|
||||||
.lh15 {
|
.lh15 {
|
||||||
line-height: 15px;
|
line-height: 15px;
|
||||||
}
|
}
|
||||||
pre,.prop {
|
pre,.prop {
|
||||||
font-family: courier,fixed,swiss,sans-serif;
|
font-family: courier,fixed,swiss,sans-serif;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
line-height: 15px;
|
line-height: 15px;
|
||||||
}
|
}
|
||||||
h1 {
|
h1 {
|
||||||
font-family: courier,fixed,swiss,sans-serif;
|
font-family: courier,fixed,swiss,sans-serif;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
}
|
}
|
||||||
b.quest {
|
b.quest {
|
||||||
font-family: courier,fixed,swiss,sans-serif;
|
font-family: courier,fixed,swiss,sans-serif;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
}
|
}
|
||||||
a,a:link,a:visited {
|
a,a:link,a:visited {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
}
|
}
|
||||||
a:hover {
|
a:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
}
|
}
|
||||||
a:active {
|
a:active {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</STYLE>
|
</STYLE>
|
||||||
</HEAD>
|
</HEAD>
|
||||||
|
|
||||||
|
|
||||||
<BODY BGCOLOR="#222222" LINK="#77dd11" TEXT="#cccccc" ALINK="#dddddd" VLINK="#77dd11"
|
<BODY BGCOLOR="#222222" LINK="#77dd11" TEXT="#cccccc" ALINK="#dddddd" VLINK="#77dd11"
|
||||||
TOPMARGIN="0" BOTTOMMARGIN="0" LEFTMARGIN="0" RIGHTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0"><A NAME="top"></A>
|
TOPMARGIN="0" BOTTOMMARGIN="0" LEFTMARGIN="0" RIGHTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0"><A NAME="top"></A>
|
||||||
|
|
||||||
<TABLE BORDER="0" CELLSPACING="20" CELLPADDING="0" ALIGN="center">
|
<TABLE BORDER="0" CELLSPACING="20" CELLPADDING="0" ALIGN="center">
|
||||||
<TR>
|
<TR>
|
||||||
<TD NOWRAP><A HREF="index.html">termlib.js home</A></TD>
|
<TD NOWRAP><A HREF="index.html">termlib.js home</A></TD>
|
||||||
<TD>|</TD>
|
<TD>|</TD>
|
||||||
<TD NOWRAP><A HREF="multiterm_test.html">multiple terminal test</A></TD>
|
<TD NOWRAP><A HREF="multiterm_test.html">multiple terminal test</A></TD>
|
||||||
<TD>|</TD>
|
<TD>|</TD>
|
||||||
<TD NOWRAP><A HREF="parser_sample.html">sample parser</A></TD>
|
<TD NOWRAP><A HREF="parser_sample.html">sample parser</A></TD>
|
||||||
<TD>|</TD>
|
<TD>|</TD>
|
||||||
<TD NOWRAP>faq</TD>
|
<TD NOWRAP>faq</TD>
|
||||||
<TD>|</TD>
|
<TD>|</TD>
|
||||||
<TD NOWRAP><A HREF="readme.txt" TITLE="readme.txt (text/plain)">documentation</A></TD>
|
<TD NOWRAP><A HREF="readme.txt" TITLE="readme.txt (text/plain)">documentation</A></TD>
|
||||||
</TR>
|
</TR>
|
||||||
</TABLE>
|
</TABLE>
|
||||||
|
|
||||||
<TABLE BORDER="0" CELLSPACING="20" CELLPADDING="0" WIDTH="700" ALIGN="center">
|
<TABLE BORDER="0" CELLSPACING="20" CELLPADDING="0" WIDTH="700" ALIGN="center">
|
||||||
<TR><TD>
|
<TR><TD>
|
||||||
<H1>frequently asked questions</H1>
|
<H1>frequently asked questions</H1>
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
<TR><TD CLASS="lh13">
|
<TR><TD CLASS="lh13">
|
||||||
<BR>
|
<BR>
|
||||||
<UL>
|
<UL>
|
||||||
<LI CLASS="lh15"><A HREF="#chrome">Can I add chrome to the terminal? (e.g. a window header, a close box)</A></LI>
|
<LI CLASS="lh15"><A HREF="#chrome">Can I add chrome to the terminal? (e.g. a window header, a close box)</A></LI>
|
||||||
<LI CLASS="lh15"><A HREF="#embed">How can I embed a terminal relative to my HTML layout?</A></LI>
|
<LI CLASS="lh15"><A HREF="#embed">How can I embed a terminal relative to my HTML layout?</A></LI>
|
||||||
<LI CLASS="lh15"><A HREF="#syntax">I pasted your sample code and just got an error. - ???</A></LI>
|
<LI CLASS="lh15"><A HREF="#syntax">I pasted your sample code and just got an error. - ???</A></LI>
|
||||||
<LI CLASS="lh15"><A HREF="#keyboard">I can't get any input, but I don't get any erros too.</A></LI>
|
<LI CLASS="lh15"><A HREF="#keyboard">I can't get any input, but I don't get any erros too.</A></LI>
|
||||||
<LI CLASS="lh15"><A HREF="#keylock">How can I temporary disable the keyboard handlers?</A></LI>
|
<LI CLASS="lh15"><A HREF="#keylock">How can I temporary disable the keyboard handlers?</A></LI>
|
||||||
<LI CLASS="lh15"><A HREF="#linesranges">How can I set the cusor to the start / the end of the command line?</A></LI>
|
<LI CLASS="lh15"><A HREF="#linesranges">How can I set the cusor to the start / the end of the command line?</A></LI>
|
||||||
<LI CLASS="lh15"><A HREF="#historyunique">How can I limit the command history to unique entries only?</A></LI>
|
<LI CLASS="lh15"><A HREF="#historyunique">How can I limit the command history to unique entries only?</A></LI>
|
||||||
<LI CLASS="lh15"><A HREF="#rebuild">How can I change my color theme on the fly?</A></LI>
|
<LI CLASS="lh15"><A HREF="#rebuild">How can I change my color theme on the fly?</A></LI>
|
||||||
<LI CLASS="lh15"><A HREF="#connect">How can I connect to a server?</A></LI>
|
<LI CLASS="lh15"><A HREF="#connect">How can I connect to a server?</A></LI>
|
||||||
</UL>
|
</UL>
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
<TR><TD CLASS="lh13"><A NAME="chrome"></A>
|
<TR><TD CLASS="lh13"><A NAME="chrome"></A>
|
||||||
<BR>
|
<BR>
|
||||||
<B CLASS="quest">Can I add chrome to the terminal? (e.g. a window header, a close box)</B><BR><BR>
|
<B CLASS="quest">Can I add chrome to the terminal? (e.g. a window header, a close box)</B><BR><BR>
|
||||||
|
|
||||||
Not by the means of the Terminal object's interface (since there are way too many things that you may possibly want to add).<BR>
|
Not by the means of the Terminal object's interface (since there are way too many things that you may possibly want to add).<BR>
|
||||||
The Terminal object allows you to specify the background color, the frame color, the frame's width and the font class used. If you want to add more chrome, you must align this in a separate division element.<BR><BR>
|
The Terminal object allows you to specify the background color, the frame color, the frame's width and the font class used. If you want to add more chrome, you must align this in a separate division element.<BR><BR>
|
||||||
|
|
||||||
To calculate the dimensions of the terminal use this formula:<BR><BR>
|
To calculate the dimensions of the terminal use this formula:<BR><BR>
|
||||||
|
|
||||||
width: 2 * frameWidth + conf.cols * <width of > + 2 * 2px padding (left and right)<BR>
|
width: 2 * frameWidth + conf.cols * <width of > + 2 * 2px padding (left and right)<BR>
|
||||||
height: 2 * frameWidth + conf.rows * conf.rowHeight + 2 * 2px padding (top and bottom).<BR><BR>
|
height: 2 * frameWidth + conf.rows * conf.rowHeight + 2 * 2px padding (top and bottom).<BR><BR>
|
||||||
|
|
||||||
Or you could get the empirical values for width and height by calling a terminal's `<SPAN CLASS="prop">getDimensions()</SPAN>' method, once the terminal is open. (see documentation in "readme.txt").<BR><BR>
|
Or you could get the empirical values for width and height by calling a terminal's `<SPAN CLASS="prop">getDimensions()</SPAN>' method, once the terminal is open. (see documentation in "readme.txt").<BR><BR>
|
||||||
|
|
||||||
Finnally, you could obviously embed the terminal's division element in your custom chrome layout (see below). [This will not be compatible to Netscape 4.]<BR><BR>
|
Finnally, you could obviously embed the terminal's division element in your custom chrome layout (see below). [This will not be compatible to Netscape 4.]<BR><BR>
|
||||||
|
|
||||||
p.e.:<PRE>
|
p.e.:<PRE>
|
||||||
<div id="myTerminal1" style="position:absolute; top:100px; left:100px;">
|
<div id="myTerminal1" style="position:absolute; top:100px; left:100px;">
|
||||||
<table class="termChrome">
|
<table class="termChrome">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="termTitle">terminal 1</td>
|
<td class="termTitle">terminal 1</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="termBody"><div id="termDiv1" style="position:relative"></div></td>
|
<td class="termBody"><div id="termDiv1" style="position:relative"></div></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
// get a terminal for this
|
// get a terminal for this
|
||||||
|
|
||||||
var term1 = new Terminal(
|
var term1 = new Terminal(
|
||||||
{
|
{
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
id: 1,
|
id: 1,
|
||||||
termDiv: "termDiv1",
|
termDiv: "termDiv1",
|
||||||
handler: myTermHandler
|
handler: myTermHandler
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
term1.open();
|
term1.open();
|
||||||
|
|
||||||
// and this is how to move the chrome and the embedded terminal
|
// and this is how to move the chrome and the embedded terminal
|
||||||
|
|
||||||
TermGlobals.setElementXY( "myTerminal1", 200, 80 );
|
TermGlobals.setElementXY( "myTerminal1", 200, 80 );
|
||||||
</PRE>
|
</PRE>
|
||||||
To keep track of the instance for any widgets use the terminal's `id' property. (You must set this in the configuration object to a unique value for this purpose.)<BR><BR>
|
To keep track of the instance for any widgets use the terminal's `id' property. (You must set this in the configuration object to a unique value for this purpose.)<BR><BR>
|
||||||
|
|
||||||
For a demonstration see the <A HREF="chrome_sample.html">Chrome Sample Page</A>.
|
For a demonstration see the <A HREF="chrome_sample.html">Chrome Sample Page</A>.
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
<TR><TD CLASS="lh13"><A NAME="embed"></A>
|
<TR><TD CLASS="lh13"><A NAME="embed"></A>
|
||||||
<BR>
|
<BR>
|
||||||
<B CLASS="quest">How can I embed a terminal relative to my HTML layout?</B><BR><BR>
|
<B CLASS="quest">How can I embed a terminal relative to my HTML layout?</B><BR><BR>
|
||||||
|
|
||||||
Define your devision element with attribute "position" set to "relative" and place this inside your layout. Call "new Terminal()" with config-values { x: 0, y: 0 } to leave it at its relative origin.
|
Define your devision element with attribute "position" set to "relative" and place this inside your layout. Call "new Terminal()" with config-values { x: 0, y: 0 } to leave it at its relative origin.
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
<TR><TD CLASS="lh13"><A NAME="syntax"></A>
|
<TR><TD CLASS="lh13"><A NAME="syntax"></A>
|
||||||
<BR>
|
<BR>
|
||||||
<B CLASS="quest">I pasted your sample code and just got an error. - ???</B><BR><BR>
|
<B CLASS="quest">I pasted your sample code and just got an error. - ???</B><BR><BR>
|
||||||
|
|
||||||
The short examples are kept arbitrarily simple to show the syntax.<BR>
|
The short examples are kept arbitrarily simple to show the syntax.<BR>
|
||||||
Make sure that your divison element(s) is/are rendered by the browser before `Terminal.open()' is called.<BR><BR>
|
Make sure that your divison element(s) is/are rendered by the browser before `Terminal.open()' is called.<BR><BR>
|
||||||
|
|
||||||
Does not work:
|
Does not work:
|
||||||
<PRE> <head>
|
<PRE> <head>
|
||||||
<script>
|
<script>
|
||||||
var term = new Terminal();
|
var term = new Terminal();
|
||||||
term.open();
|
term.open();
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
</PRE>
|
</PRE>
|
||||||
Does work:
|
Does work:
|
||||||
<PRE> <head>
|
<PRE> <head>
|
||||||
<script>
|
<script>
|
||||||
var term;
|
var term;
|
||||||
|
|
||||||
function termOpen() {
|
function termOpen() {
|
||||||
// to be called from outside after compile time
|
// to be called from outside after compile time
|
||||||
term = new Terminal();
|
term = new Terminal();
|
||||||
term.open();
|
term.open();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
</PRE>
|
</PRE>
|
||||||
c.f. "readme.txt"<BR>
|
c.f. "readme.txt"<BR>
|
||||||
(Opening a terminal by clicking a link implies also that the page has currently focus.)<BR><BR>
|
(Opening a terminal by clicking a link implies also that the page has currently focus.)<BR><BR>
|
||||||
With v.1.01 and higher this doesn't cause an error any more.<BR>`Terminal.prototype.open()' now returns a value for success.
|
With v.1.01 and higher this doesn't cause an error any more.<BR>`Terminal.prototype.open()' now returns a value for success.
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
<TR><TD CLASS="lh13"><A NAME="keyboard"></A>
|
<TR><TD CLASS="lh13"><A NAME="keyboard"></A>
|
||||||
<BR>
|
<BR>
|
||||||
<B CLASS="quest">I can't get any input, but I don't get any erros too.</B><BR><BR>
|
<B CLASS="quest">I can't get any input, but I don't get any erros too.</B><BR><BR>
|
||||||
|
|
||||||
The Terminal object's functionality relies on the browsers ability to generate and handle keyboard events.<BR>
|
The Terminal object's functionality relies on the browsers ability to generate and handle keyboard events.<BR>
|
||||||
Sadly some browsers lack a full implementation of the event model. (e.g. Konquerer [khtml] and early versions of Apple Safari, which is a descendant of khtml.)
|
Sadly some browsers lack a full implementation of the event model. (e.g. Konquerer [khtml] and early versions of Apple Safari, which is a descendant of khtml.)
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
<TR><TD CLASS="lh13"><A NAME="keylock"></A>
|
<TR><TD CLASS="lh13"><A NAME="keylock"></A>
|
||||||
<BR>
|
<BR>
|
||||||
<B CLASS="quest">How can I temporary disable the keyboard handlers?</B><BR>
|
<B CLASS="quest">How can I temporary disable the keyboard handlers?</B><BR>
|
||||||
<SPAN CLASS="prop">(The terminal is blocking my HTML form fields, etc.)</SPAN><BR><BR>
|
<SPAN CLASS="prop">(The terminal is blocking my HTML form fields, etc.)</SPAN><BR><BR>
|
||||||
|
|
||||||
With version 1.03 there's a global property `<SPAN CLASS="prop">TermGlobals.keylock</SPAN>'. Set this to `true' to disable the keyboard handlers without altering any other state. Reset it to `false' to continue with your terminal session(s).
|
With version 1.03 there's a global property `<SPAN CLASS="prop">TermGlobals.keylock</SPAN>'. Set this to `true' to disable the keyboard handlers without altering any other state. Reset it to `false' to continue with your terminal session(s).
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
<TR><TD CLASS="lh13"><A NAME="linesranges"></A>
|
<TR><TD CLASS="lh13"><A NAME="linesranges"></A>
|
||||||
<BR>
|
<BR>
|
||||||
<B CLASS="quest">How can I set the cusor to the start / the end of the command line?</B><BR><BR>
|
<B CLASS="quest">How can I set the cusor to the start / the end of the command line?</B><BR><BR>
|
||||||
|
|
||||||
In case you need to implement a shortcut (like ^A of some UN*X-shells) to jump to the beginning or the end of the current input line, there are two private instance methods you could utilize:<BR><BR>
|
In case you need to implement a shortcut (like ^A of some UN*X-shells) to jump to the beginning or the end of the current input line, there are two private instance methods you could utilize:<BR><BR>
|
||||||
`<SPAN CLASS="prop">_getLineEnd(<row>, <col>)</SPAN>' returns an array [<row>, <col>] with the position of the last character in the logical input line with ASCII value >= 32 (0x20).<BR><BR>
|
`<SPAN CLASS="prop">_getLineEnd(<row>, <col>)</SPAN>' returns an array [<row>, <col>] with the position of the last character in the logical input line with ASCII value >= 32 (0x20).<BR><BR>
|
||||||
`<SPAN CLASS="prop">_getLineStart(<row>, <col>)</SPAN>' returns an array [<row>, <col>] with the position of the first character in the logical input line with ASCII value >= 32 (0x20).<BR><BR>
|
`<SPAN CLASS="prop">_getLineStart(<row>, <col>)</SPAN>' returns an array [<row>, <col>] with the position of the first character in the logical input line with ASCII value >= 32 (0x20).<BR><BR>
|
||||||
Both take a row and a column of a cursor position as arguments.<BR><BR>
|
Both take a row and a column of a cursor position as arguments.<BR><BR>
|
||||||
|
|
||||||
p.e.:
|
p.e.:
|
||||||
<PRE>
|
<PRE>
|
||||||
// jump to the start of the input line
|
// jump to the start of the input line
|
||||||
|
|
||||||
myCtrlHandler() {
|
myCtrlHandler() {
|
||||||
// catch ^A and jump to start of the line
|
// catch ^A and jump to start of the line
|
||||||
if (this.inputChar == 1) {
|
if (this.inputChar == 1) {
|
||||||
var firstChar = this._getLineStart(this.r, this.c);
|
var firstChar = this._getLineStart(this.r, this.c);
|
||||||
this.cursorSet(firstChar[0], firstChar[1]);
|
this.cursorSet(firstChar[0], firstChar[1]);
|
||||||
}
|
}
|
||||||
}</PRE>
|
}</PRE>
|
||||||
(Keep in mind that this is not exactly a good example, since some browser actually don't issue a keyboard event for
|
(Keep in mind that this is not exactly a good example, since some browser actually don't issue a keyboard event for
|
||||||
"^A". And other browsers, which do catch such codes, are not very reliable in that.)
|
"^A". And other browsers, which do catch such codes, are not very reliable in that.)
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
<TR><TD CLASS="lh13"><A NAME="historyunique"></A>
|
<TR><TD CLASS="lh13"><A NAME="historyunique"></A>
|
||||||
<BR>
|
<BR>
|
||||||
<B CLASS="quest">How can I limit the command history to unique entries only?</B><BR>
|
<B CLASS="quest">How can I limit the command history to unique entries only?</B><BR>
|
||||||
<SPAN CLASS="prop">(My application effords commands to be commonly repeated.)</SPAN><BR><BR>
|
<SPAN CLASS="prop">(My application effords commands to be commonly repeated.)</SPAN><BR><BR>
|
||||||
|
|
||||||
With version 1.05 there is a new configuration and control flag `<SPAN CLASS="prop">historyUnique</SPAN>'. All you need is setting this to `true' in your terminal's configuration object.
|
With version 1.05 there is a new configuration and control flag `<SPAN CLASS="prop">historyUnique</SPAN>'. All you need is setting this to `true' in your terminal's configuration object.
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
<TR><TD CLASS="lh13"><A NAME="rebuild"></A>
|
<TR><TD CLASS="lh13"><A NAME="rebuild"></A>
|
||||||
<BR>
|
<BR>
|
||||||
<B CLASS="quest">How can I change my color theme on the fly?</B><BR><BR>
|
<B CLASS="quest">How can I change my color theme on the fly?</B><BR><BR>
|
||||||
|
|
||||||
With version 1.07 there is a new method `<SPAN CLASS="prop">Terminal.rebuild()</SPAN>'.<BR>
|
With version 1.07 there is a new method `<SPAN CLASS="prop">Terminal.rebuild()</SPAN>'.<BR>
|
||||||
This method updates the GUI to current config settings while preserving all other state.<BR><BR>
|
This method updates the GUI to current config settings while preserving all other state.<BR><BR>
|
||||||
p.e.:
|
p.e.:
|
||||||
<PRE>
|
<PRE>
|
||||||
// change color settings on the fly
|
// change color settings on the fly
|
||||||
// here: set bgColor to white and font style to class "termWhite"
|
// here: set bgColor to white and font style to class "termWhite"
|
||||||
// method rebuild() updates the GUI without side effects
|
// method rebuild() updates the GUI without side effects
|
||||||
// assume var term holds a referene to a Terminal object already active
|
// assume var term holds a referene to a Terminal object already active
|
||||||
|
|
||||||
term.conf.bgColor = '#ffffff';
|
term.conf.bgColor = '#ffffff';
|
||||||
term.conf.fontClass = 'termWhite';
|
term.conf.fontClass = 'termWhite';
|
||||||
term.rebuild();</PRE>
|
term.rebuild();</PRE>
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
<TR><TD CLASS="lh13"><A NAME="connect"></A>
|
<TR><TD CLASS="lh13"><A NAME="connect"></A>
|
||||||
<BR>
|
<BR>
|
||||||
<B CLASS="quest">How can I connect to a server?</B><BR><BR>
|
<B CLASS="quest">How can I connect to a server?</B><BR><BR>
|
||||||
|
|
||||||
The Terminal object only provides an interface to handle console input and output.<BR>
|
The Terminal object only provides an interface to handle console input and output.<BR>
|
||||||
External connections have to be handled outside the Terminal object. You could use the XMLHttpRequest-Object (and use a communication model like AJAX or JSON) or connect via a frame or iframe element to a foreign host.<BR><BR>
|
External connections have to be handled outside the Terminal object. You could use the XMLHttpRequest-Object (and use a communication model like AJAX or JSON) or connect via a frame or iframe element to a foreign host.<BR><BR>
|
||||||
Handling connections is considered to be out of the realm of the "termlib.js" library.<BR>
|
Handling connections is considered to be out of the realm of the "termlib.js" library.<BR>
|
||||||
The code you need is in fact quite simple:
|
The code you need is in fact quite simple:
|
||||||
<PRE>
|
<PRE>
|
||||||
function connectToHost(url) {
|
function connectToHost(url) {
|
||||||
if (window.XMLHttpRequest) {
|
if (window.XMLHttpRequest) {
|
||||||
request = new XMLHttpRequest();
|
request = new XMLHttpRequest();
|
||||||
}
|
}
|
||||||
else if (window.ActiveXObject) {
|
else if (window.ActiveXObject) {
|
||||||
request = new ActiveXObject('Microsoft.XMLHTTP');
|
request = new ActiveXObject('Microsoft.XMLHTTP');
|
||||||
}
|
}
|
||||||
if (request) {
|
if (request) {
|
||||||
request.onreadystatechange = requestChangeHandler;
|
request.onreadystatechange = requestChangeHandler;
|
||||||
request.open('GET', url);
|
request.open('GET', url);
|
||||||
request.send('');
|
request.send('');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// XMLHttpRequest not implemented
|
// XMLHttpRequest not implemented
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function requestChangeHandler() {
|
function requestChangeHandler() {
|
||||||
if (request.readyState == 4) {
|
if (request.readyState == 4) {
|
||||||
// readyState 4: complete; now test for server's response status
|
// readyState 4: complete; now test for server's response status
|
||||||
if (request.status == 200) {
|
if (request.status == 200) {
|
||||||
// response in request.responseText or request.responseXML if XML-code
|
// response in request.responseText or request.responseXML if XML-code
|
||||||
// if it's JS-code we could get this by eval(request.responseText)
|
// if it's JS-code we could get this by eval(request.responseText)
|
||||||
// by this we could import whole functions to be used via the terminal
|
// by this we could import whole functions to be used via the terminal
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// connection error
|
// connection error
|
||||||
// status code and message in request.status and request.statusText
|
// status code and message in request.status and request.statusText
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</PRE>
|
</PRE>
|
||||||
You should use this only together with a timer (window.setTimeout()) to handle connection timeouts.<BR>
|
You should use this only together with a timer (window.setTimeout()) to handle connection timeouts.<BR>
|
||||||
Additionally you would need some syntax to authenticate and tell the server what you want.<BR>
|
Additionally you would need some syntax to authenticate and tell the server what you want.<BR>
|
||||||
For this purpose you could use the following methods of the XMLHttpRequest object:<BR><BR>
|
For this purpose you could use the following methods of the XMLHttpRequest object:<BR><BR>
|
||||||
|
|
||||||
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="3">
|
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="3">
|
||||||
<TR VALIGN="top"><TD NOWRAP CLASS="prop">setRequestHeader("<I>headerLabel</I>", "<I>value</I>")</TD><TD>set a HTTP header to be sent to the server</TD></TR>
|
<TR VALIGN="top"><TD NOWRAP CLASS="prop">setRequestHeader("<I>headerLabel</I>", "<I>value</I>")</TD><TD>set a HTTP header to be sent to the server</TD></TR>
|
||||||
<TR VALIGN="top"><TD NOWRAP CLASS="prop">getResponseHeader("<I>headerLabel</I>")</TD><TD>get a HTTP header sent from the server</TD></TR>
|
<TR VALIGN="top"><TD NOWRAP CLASS="prop">getResponseHeader("<I>headerLabel</I>")</TD><TD>get a HTTP header sent from the server</TD></TR>
|
||||||
<TR VALIGN="top"><TD NOWRAP CLASS="prop">open(<I>method</I>, "<I>url</I>" [, <I>asyncFlag</I> [,<BR> "<I>userid</I>" [, "<I>password</I>"]]])</TD><TD>assign the destination properties to the request.<BR>be aware that userid and password are not encrypted!</TD></TR>
|
<TR VALIGN="top"><TD NOWRAP CLASS="prop">open(<I>method</I>, "<I>url</I>" [, <I>asyncFlag</I> [,<BR> "<I>userid</I>" [, "<I>password</I>"]]])</TD><TD>assign the destination properties to the request.<BR>be aware that userid and password are not encrypted!</TD></TR>
|
||||||
<TR VALIGN="top"><TD NOWRAP CLASS="prop">send(<I>content</I>)</TD><TD>transmit a message body (post-string or DOM object)</TD></TR>
|
<TR VALIGN="top"><TD NOWRAP CLASS="prop">send(<I>content</I>)</TD><TD>transmit a message body (post-string or DOM object)</TD></TR>
|
||||||
<TR VALIGN="top"><TD NOWRAP CLASS="prop">abort()</TD><TD>use this to stop a pending connection</TD></TR>
|
<TR VALIGN="top"><TD NOWRAP CLASS="prop">abort()</TD><TD>use this to stop a pending connection</TD></TR>
|
||||||
</TABLE>
|
</TABLE>
|
||||||
|
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
<TR><TD CLASS="lh13">
|
<TR><TD CLASS="lh13">
|
||||||
<BR>
|
<BR>
|
||||||
Norbert Landsteiner - August 2005<BR>
|
Norbert Landsteiner - August 2005<BR>
|
||||||
<A HREF="http://www.masswerk.at/" TARGET="_blank">http://www.masswerk.at</A>
|
<A HREF="http://www.masswerk.at/" TARGET="_blank">http://www.masswerk.at</A>
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
<TR><TD CLASS="lh13">
|
<TR><TD CLASS="lh13">
|
||||||
<BR>
|
<BR>
|
||||||
<A HREF="#top">> top of page</A>
|
<A HREF="#top">> top of page</A>
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
<TR><TD CLASS="lh13">
|
<TR><TD CLASS="lh13">
|
||||||
|
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
</TABLE>
|
</TABLE>
|
||||||
|
|
||||||
<DIV ID="termDiv" STYLE="position:absolute; top:20px; left:100px;"></DIV>
|
<DIV ID="termDiv" STYLE="position:absolute; top:20px; left:100px;"></DIV>
|
||||||
|
|
||||||
</BODY>
|
</BODY>
|
||||||
</HTML>
|
</HTML>
|
|
@ -1,207 +1,207 @@
|
||||||
<HTML>
|
<HTML>
|
||||||
<HEAD>
|
<HEAD>
|
||||||
<TITLE>mass:werk termlib</TITLE>
|
<TITLE>mass:werk termlib</TITLE>
|
||||||
|
|
||||||
<STYLE TYPE="text/css">
|
<STYLE TYPE="text/css">
|
||||||
body,p,a,td {
|
body,p,a,td {
|
||||||
font-family: courier,fixed,swiss,sans-serif;
|
font-family: courier,fixed,swiss,sans-serif;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #cccccc;
|
color: #cccccc;
|
||||||
}
|
}
|
||||||
.lh13 {
|
.lh13 {
|
||||||
line-height: 13px;
|
line-height: 13px;
|
||||||
}
|
}
|
||||||
.lh15 {
|
.lh15 {
|
||||||
line-height: 15px;
|
line-height: 15px;
|
||||||
}
|
}
|
||||||
pre {
|
pre {
|
||||||
font-family: courier,fixed,swiss,sans-serif;
|
font-family: courier,fixed,swiss,sans-serif;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #ccffaa;
|
color: #ccffaa;
|
||||||
line-height: 15px;
|
line-height: 15px;
|
||||||
}
|
}
|
||||||
.prop {
|
.prop {
|
||||||
font-family: courier,fixed,swiss,sans-serif;
|
font-family: courier,fixed,swiss,sans-serif;
|
||||||
color: #bbee99;
|
color: #bbee99;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 15px;
|
line-height: 15px;
|
||||||
}
|
}
|
||||||
h1 {
|
h1 {
|
||||||
font-family: courier,fixed,swiss,sans-serif;
|
font-family: courier,fixed,swiss,sans-serif;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: #cccccc;
|
color: #cccccc;
|
||||||
}
|
}
|
||||||
a,a:link,a:visited {
|
a,a:link,a:visited {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #77dd11;
|
color: #77dd11;
|
||||||
}
|
}
|
||||||
a:hover {
|
a:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
color: #77dd11;
|
color: #77dd11;
|
||||||
}
|
}
|
||||||
a:active {
|
a:active {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
color: #dddddd;
|
color: #dddddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media print {
|
@media print {
|
||||||
body { background-color: #ffffff; }
|
body { background-color: #ffffff; }
|
||||||
body,p,a,td {
|
body,p,a,td {
|
||||||
font-family: courier,fixed,swiss,sans-serif;
|
font-family: courier,fixed,swiss,sans-serif;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
}
|
}
|
||||||
.lh13 {
|
.lh13 {
|
||||||
line-height: 13px;
|
line-height: 13px;
|
||||||
}
|
}
|
||||||
.lh15 {
|
.lh15 {
|
||||||
line-height: 15px;
|
line-height: 15px;
|
||||||
}
|
}
|
||||||
pre,.prop {
|
pre,.prop {
|
||||||
font-family: courier,fixed,swiss,sans-serif;
|
font-family: courier,fixed,swiss,sans-serif;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
line-height: 15px;
|
line-height: 15px;
|
||||||
}
|
}
|
||||||
h1 {
|
h1 {
|
||||||
font-family: courier,fixed,swiss,sans-serif;
|
font-family: courier,fixed,swiss,sans-serif;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
}
|
}
|
||||||
a,a:link,a:visited {
|
a,a:link,a:visited {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
}
|
}
|
||||||
a:hover {
|
a:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
}
|
}
|
||||||
a:active {
|
a:active {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</STYLE>
|
</STYLE>
|
||||||
</HEAD>
|
</HEAD>
|
||||||
|
|
||||||
|
|
||||||
<BODY BGCOLOR="#222222" LINK="#77dd11" TEXT="#cccccc" ALINK="#dddddd" VLINK="#77dd11"
|
<BODY BGCOLOR="#222222" LINK="#77dd11" TEXT="#cccccc" ALINK="#dddddd" VLINK="#77dd11"
|
||||||
TOPMARGIN="0" BOTTOMMARGIN="0" LEFTMARGIN="0" RIGHTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0"><A NAME="top"></A>
|
TOPMARGIN="0" BOTTOMMARGIN="0" LEFTMARGIN="0" RIGHTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0"><A NAME="top"></A>
|
||||||
|
|
||||||
<TABLE BORDER="0" CELLSPACING="20" CELLPADDING="0" ALIGN="center">
|
<TABLE BORDER="0" CELLSPACING="20" CELLPADDING="0" ALIGN="center">
|
||||||
<TR>
|
<TR>
|
||||||
<TD NOWRAP>termlib.js home</TD>
|
<TD NOWRAP>termlib.js home</TD>
|
||||||
<TD>|</TD>
|
<TD>|</TD>
|
||||||
<TD NOWRAP><A HREF="multiterm_test.html">multiple terminal test</A></TD>
|
<TD NOWRAP><A HREF="multiterm_test.html">multiple terminal test</A></TD>
|
||||||
<TD>|</TD>
|
<TD>|</TD>
|
||||||
<TD NOWRAP><A HREF="parser_sample.html">sample parser</A></TD>
|
<TD NOWRAP><A HREF="parser_sample.html">sample parser</A></TD>
|
||||||
<TD>|</TD>
|
<TD>|</TD>
|
||||||
<TD NOWRAP><A HREF="faq.html">faq</A></TD>
|
<TD NOWRAP><A HREF="faq.html">faq</A></TD>
|
||||||
<TD>|</TD>
|
<TD>|</TD>
|
||||||
<TD NOWRAP><A HREF="readme.txt" TITLE="readme.txt (text/plain)">documentation</A></TD>
|
<TD NOWRAP><A HREF="readme.txt" TITLE="readme.txt (text/plain)">documentation</A></TD>
|
||||||
</TR>
|
</TR>
|
||||||
</TABLE>
|
</TABLE>
|
||||||
|
|
||||||
<TABLE BORDER="0" CELLSPACING="20" CELLPADDING="0" WIDTH="700" ALIGN="center">
|
<TABLE BORDER="0" CELLSPACING="20" CELLPADDING="0" WIDTH="700" ALIGN="center">
|
||||||
<TR><TD>
|
<TR><TD>
|
||||||
<H1>mass:werk termlib.js</H1>
|
<H1>mass:werk termlib.js</H1>
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
<TR><TD CLASS="lh13">
|
<TR><TD CLASS="lh13">
|
||||||
The JavaScript library "termlib.js" provides a `Terminal' object, which
|
The JavaScript library "termlib.js" provides a `Terminal' object, which
|
||||||
facillitates a simple and object oriented approach to generate and control a
|
facillitates a simple and object oriented approach to generate and control a
|
||||||
terminal-like interface for web services.<BR><BR>
|
terminal-like interface for web services.<BR><BR>
|
||||||
|
|
||||||
"termlib.js" features direct keyboard input and powerful output methods
|
"termlib.js" features direct keyboard input and powerful output methods
|
||||||
for multiple and simultanious instances of the `Terminal' object.<BR><BR>
|
for multiple and simultanious instances of the `Terminal' object.<BR><BR>
|
||||||
|
|
||||||
The library was written with the aim of simple usage and a maximum of compatibility
|
The library was written with the aim of simple usage and a maximum of compatibility
|
||||||
with minimal foot print in the global namespace.<BR><BR><BR>
|
with minimal foot print in the global namespace.<BR><BR><BR>
|
||||||
|
|
||||||
|
|
||||||
A short example:<BR>
|
A short example:<BR>
|
||||||
<PRE>
|
<PRE>
|
||||||
var term = new Terminal( {handler: termHandler} );
|
var term = new Terminal( {handler: termHandler} );
|
||||||
term.open();
|
term.open();
|
||||||
|
|
||||||
function termHandler() {
|
function termHandler() {
|
||||||
this.newLine();
|
this.newLine();
|
||||||
var line = this.lineBuffer;
|
var line = this.lineBuffer;
|
||||||
if (line != "") {
|
if (line != "") {
|
||||||
this.write("You typed: "+line);
|
this.write("You typed: "+line);
|
||||||
}
|
}
|
||||||
this.prompt();
|
this.prompt();
|
||||||
}
|
}
|
||||||
</PRE>
|
</PRE>
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
<TR><TD CLASS="lh13">
|
<TR><TD CLASS="lh13">
|
||||||
<B>License</B><BR><BR>
|
<B>License</B><BR><BR>
|
||||||
|
|
||||||
This JavaScript-library is <U>free for private and academic use</U>.
|
This JavaScript-library is <U>free for private and academic use</U>.
|
||||||
Please include a readable copyright statement and a backlink to <http://www.masswerk.at> in the
|
Please include a readable copyright statement and a backlink to <http://www.masswerk.at> in the
|
||||||
web page. The library should always be accompanied by the "readme.txt" and the sample HTML-documents.<BR><BR>
|
web page. The library should always be accompanied by the "readme.txt" and the sample HTML-documents.<BR><BR>
|
||||||
|
|
||||||
The term "private use" includes any personal or non-commercial use, which is not related
|
The term "private use" includes any personal or non-commercial use, which is not related
|
||||||
to commercial activites, but excludes intranet, extranet and/or public net applications
|
to commercial activites, but excludes intranet, extranet and/or public net applications
|
||||||
that are related to any kind of commercial or profit oriented activity.<BR><BR>
|
that are related to any kind of commercial or profit oriented activity.<BR><BR>
|
||||||
|
|
||||||
For commercial use see <<A HREF="http://www.masswerk.at/" TARGET="_blank">http://www.masswerk.at</A>> for contact information.
|
For commercial use see <<A HREF="http://www.masswerk.at/" TARGET="_blank">http://www.masswerk.at</A>> for contact information.
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
<TR><TD CLASS="lh13">
|
<TR><TD CLASS="lh13">
|
||||||
<B>Distribution</B><BR><BR>
|
<B>Distribution</B><BR><BR>
|
||||||
|
|
||||||
This JavaScript-library may be distributed freely as long it is distributed together with the "readme.txt" and the sample HTML-documents and this document.<BR><BR>
|
This JavaScript-library may be distributed freely as long it is distributed together with the "readme.txt" and the sample HTML-documents and this document.<BR><BR>
|
||||||
|
|
||||||
Any changes to the library should be commented and be documented in the readme-file.<BR>
|
Any changes to the library should be commented and be documented in the readme-file.<BR>
|
||||||
Any changes must be reflected in the `Terminal.version' string as "Version.Subversion (compatibility)".
|
Any changes must be reflected in the `Terminal.version' string as "Version.Subversion (compatibility)".
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
<TR><TD CLASS="lh13">
|
<TR><TD CLASS="lh13">
|
||||||
<B>Disclaimer</B><BR><BR>
|
<B>Disclaimer</B><BR><BR>
|
||||||
|
|
||||||
This software is distributed AS IS and in the hope that it will be useful, but WITHOUT ANY
|
This software is distributed AS IS and in the hope that it will be useful, but WITHOUT ANY
|
||||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||||
PURPOSE. The entire risk as to the quality and performance of the product is borne by the
|
PURPOSE. The entire risk as to the quality and performance of the product is borne by the
|
||||||
user. No use of the product is authorized hereunder except under this disclaimer.
|
user. No use of the product is authorized hereunder except under this disclaimer.
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
<TR><TD CLASS="lh13">
|
<TR><TD CLASS="lh13">
|
||||||
<B>History</B><BR><BR>
|
<B>History</B><BR><BR>
|
||||||
|
|
||||||
This library evolved from the terminal script "TermApp" ((c) N. Landsteiner 2003) and is in its
|
This library evolved from the terminal script "TermApp" ((c) N. Landsteiner 2003) and is in its
|
||||||
current form a down scaled spinn-off of the "JS/UIX" project. (JS/UIX is not a free software by now.)
|
current form a down scaled spinn-off of the "JS/UIX" project. (JS/UIX is not a free software by now.)
|
||||||
c.f.: <<A HREF="http://www.masswerk.at/jsuix/" TARGET="_blank">http://www.masswerk.at/jsuix</A>><BR><BR>
|
c.f.: <<A HREF="http://www.masswerk.at/jsuix/" TARGET="_blank">http://www.masswerk.at/jsuix</A>><BR><BR>
|
||||||
|
|
||||||
For version history: see the <A HREF="readme.txt">readme.txt</A>.
|
For version history: see the <A HREF="readme.txt">readme.txt</A>.
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
<TR><TD CLASS="lh13">
|
<TR><TD CLASS="lh13">
|
||||||
<BR>
|
<BR>
|
||||||
<B>Download</B><BR><BR>
|
<B>Download</B><BR><BR>
|
||||||
Be sure to have read the license information and the disclamer and that you are willing to respect copyrights.<BR><BR>
|
Be sure to have read the license information and the disclamer and that you are willing to respect copyrights.<BR><BR>
|
||||||
|
|
||||||
<SPAN CLASS="prop">Download:</SPAN> <A HREF="termlib.zip">termlib.zip</A> (~ 40 KB, incl. docs)<BR><BR>
|
<SPAN CLASS="prop">Download:</SPAN> <A HREF="termlib.zip">termlib.zip</A> (~ 40 KB, incl. docs)<BR><BR>
|
||||||
Current version is "1.07 (original)".<BR>
|
Current version is "1.07 (original)".<BR>
|
||||||
The files are now provided with line breaks in format <CRLF>.<BR>
|
The files are now provided with line breaks in format <CRLF>.<BR>
|
||||||
|
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
<TR><TD CLASS="lh13">
|
<TR><TD CLASS="lh13">
|
||||||
<B>Author</B><BR><BR>
|
<B>Author</B><BR><BR>
|
||||||
© Norbert Landsteiner 2003-2005<BR>
|
© Norbert Landsteiner 2003-2005<BR>
|
||||||
mass:werk – media environments<BR>
|
mass:werk – media environments<BR>
|
||||||
<A HREF="http://www.masswerk.at/" TARGET="_blank">http://www.masswerk.at</A>
|
<A HREF="http://www.masswerk.at/" TARGET="_blank">http://www.masswerk.at</A>
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
<TR><TD CLASS="lh13">
|
<TR><TD CLASS="lh13">
|
||||||
<BR>
|
<BR>
|
||||||
Author's note:<BR>
|
Author's note:<BR>
|
||||||
Please do not contact me on questions of simple usage. There is an extensive documentation (readme.txt) including plenty of sample code that should provide all information you need.
|
Please do not contact me on questions of simple usage. There is an extensive documentation (readme.txt) including plenty of sample code that should provide all information you need.
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
<TR><TD CLASS="lh13">
|
<TR><TD CLASS="lh13">
|
||||||
<BR>
|
<BR>
|
||||||
<A HREF="#top">> top of page</A>
|
<A HREF="#top">> top of page</A>
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
<TR><TD CLASS="lh13">
|
<TR><TD CLASS="lh13">
|
||||||
|
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
</TABLE>
|
</TABLE>
|
||||||
|
|
||||||
<DIV ID="termDiv" STYLE="position:absolute; top:20px; left:100px;"></DIV>
|
<DIV ID="termDiv" STYLE="position:absolute; top:20px; left:100px;"></DIV>
|
||||||
|
|
||||||
</BODY>
|
</BODY>
|
||||||
</HTML>
|
</HTML>
|
|
@ -1,188 +1,188 @@
|
||||||
<HTML>
|
<HTML>
|
||||||
<HEAD>
|
<HEAD>
|
||||||
<TITLE>termlib Multiple Terminal Test</TITLE>
|
<TITLE>termlib Multiple Terminal Test</TITLE>
|
||||||
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" SRC="termlib.js"></SCRIPT>
|
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" SRC="termlib.js"></SCRIPT>
|
||||||
|
|
||||||
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
|
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
|
||||||
<!--
|
<!--
|
||||||
|
|
||||||
/*
|
/*
|
||||||
multiple terminal test for termlib.js
|
multiple terminal test for termlib.js
|
||||||
|
|
||||||
(c) Norbert Landsteiner 2003-2005
|
(c) Norbert Landsteiner 2003-2005
|
||||||
mass:werk - media environments
|
mass:werk - media environments
|
||||||
<http://www.masswerk.at>
|
<http://www.masswerk.at>
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var term=new Array();
|
var term=new Array();
|
||||||
|
|
||||||
var helpPage=[
|
var helpPage=[
|
||||||
'%CS%+r Terminal Help %-r%n',
|
'%CS%+r Terminal Help %-r%n',
|
||||||
' This is just a tiny test for multiple terminals.',
|
' This is just a tiny test for multiple terminals.',
|
||||||
' use one of the following commands:',
|
' use one of the following commands:',
|
||||||
' clear .... clear the terminal',
|
' clear .... clear the terminal',
|
||||||
' exit ..... close the terminal (or <ESC>)',
|
' exit ..... close the terminal (or <ESC>)',
|
||||||
' id ....... show terminal\'s id',
|
' id ....... show terminal\'s id',
|
||||||
' switch ... switch to other terminal',
|
' switch ... switch to other terminal',
|
||||||
' help ..... show this help page',
|
' help ..... show this help page',
|
||||||
' other input will be echoed to the terminal.',
|
' other input will be echoed to the terminal.',
|
||||||
' '
|
' '
|
||||||
];
|
];
|
||||||
|
|
||||||
function termOpen(n) {
|
function termOpen(n) {
|
||||||
if (!term[n]) {
|
if (!term[n]) {
|
||||||
var y=(n==1)? 70: 280;
|
var y=(n==1)? 70: 280;
|
||||||
term[n]=new Terminal(
|
term[n]=new Terminal(
|
||||||
{
|
{
|
||||||
x: 220,
|
x: 220,
|
||||||
y: y,
|
y: y,
|
||||||
rows: 12,
|
rows: 12,
|
||||||
greeting: '%+r +++ Terminal #'+n+' ready. +++ %-r%nType "help" for help.%n',
|
greeting: '%+r +++ Terminal #'+n+' ready. +++ %-r%nType "help" for help.%n',
|
||||||
id: n,
|
id: n,
|
||||||
termDiv: 'termDiv'+n,
|
termDiv: 'termDiv'+n,
|
||||||
crsrBlinkMode: true,
|
crsrBlinkMode: true,
|
||||||
handler: termHandler,
|
handler: termHandler,
|
||||||
exitHandler: termExitHandler
|
exitHandler: termExitHandler
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
if (term[n]) term[n].open();
|
if (term[n]) term[n].open();
|
||||||
}
|
}
|
||||||
else if (term[n].closed) {
|
else if (term[n].closed) {
|
||||||
term[n].open();
|
term[n].open();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
term[n].focus();
|
term[n].focus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function termHandler() {
|
function termHandler() {
|
||||||
// called on <CR> or <ENTER>
|
// called on <CR> or <ENTER>
|
||||||
this.newLine();
|
this.newLine();
|
||||||
var cmd=this.lineBuffer;
|
var cmd=this.lineBuffer;
|
||||||
if (cmd!='') {
|
if (cmd!='') {
|
||||||
if (cmd=='switch') {
|
if (cmd=='switch') {
|
||||||
var other=(this.id==1)? 2:1;
|
var other=(this.id==1)? 2:1;
|
||||||
termOpen(other);
|
termOpen(other);
|
||||||
}
|
}
|
||||||
else if (cmd=='clear') {
|
else if (cmd=='clear') {
|
||||||
this.clear();
|
this.clear();
|
||||||
}
|
}
|
||||||
else if (cmd=='exit') {
|
else if (cmd=='exit') {
|
||||||
this.close();
|
this.close();
|
||||||
}
|
}
|
||||||
else if (cmd=='help') {
|
else if (cmd=='help') {
|
||||||
this.write(helpPage);
|
this.write(helpPage);
|
||||||
}
|
}
|
||||||
else if (cmd=='id') {
|
else if (cmd=='id') {
|
||||||
this.write('terminal id: '+this.id);
|
this.write('terminal id: '+this.id);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.type('You typed: '+cmd);
|
this.type('You typed: '+cmd);
|
||||||
this.newLine();
|
this.newLine();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.prompt();
|
this.prompt();
|
||||||
}
|
}
|
||||||
|
|
||||||
function termExitHandler() {
|
function termExitHandler() {
|
||||||
// optional handler called on exit
|
// optional handler called on exit
|
||||||
// activate other terminal if open
|
// activate other terminal if open
|
||||||
var other=(this.id==1)? 2:1;
|
var other=(this.id==1)? 2:1;
|
||||||
if ((term[other]) && (term[other].closed==false)) term[other].focus();
|
if ((term[other]) && (term[other].closed==false)) term[other].focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
//-->
|
//-->
|
||||||
</SCRIPT>
|
</SCRIPT>
|
||||||
|
|
||||||
<STYLE TYPE="text/css">
|
<STYLE TYPE="text/css">
|
||||||
body,p,a,td {
|
body,p,a,td {
|
||||||
font-family: courier,fixed,swiss,sans-serif;
|
font-family: courier,fixed,swiss,sans-serif;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #cccccc;
|
color: #cccccc;
|
||||||
}
|
}
|
||||||
.lh15 {
|
.lh15 {
|
||||||
line-height: 15px;
|
line-height: 15px;
|
||||||
}
|
}
|
||||||
.term {
|
.term {
|
||||||
font-family: courier,fixed,swiss,sans-serif;
|
font-family: courier,fixed,swiss,sans-serif;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #33d011;
|
color: #33d011;
|
||||||
background: none;
|
background: none;
|
||||||
}
|
}
|
||||||
.termReverse {
|
.termReverse {
|
||||||
color: #111111;
|
color: #111111;
|
||||||
background: #33d011;
|
background: #33d011;
|
||||||
}
|
}
|
||||||
a,a:link,a:visited {
|
a,a:link,a:visited {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #77dd11;
|
color: #77dd11;
|
||||||
}
|
}
|
||||||
a:hover {
|
a:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
color: #77dd11;
|
color: #77dd11;
|
||||||
}
|
}
|
||||||
a:active {
|
a:active {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
color: #dddddd;
|
color: #dddddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.termopen,a.termopen:link,a.termopen:visited {
|
a.termopen,a.termopen:link,a.termopen:visited {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #77dd11;
|
color: #77dd11;
|
||||||
background: none;
|
background: none;
|
||||||
}
|
}
|
||||||
a.termopen:hover {
|
a.termopen:hover {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #222222;
|
color: #222222;
|
||||||
background: #77dd11;
|
background: #77dd11;
|
||||||
}
|
}
|
||||||
a.termopen:active {
|
a.termopen:active {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #222222;
|
color: #222222;
|
||||||
background: #dddddd;
|
background: #dddddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
</STYLE>
|
</STYLE>
|
||||||
</HEAD>
|
</HEAD>
|
||||||
|
|
||||||
|
|
||||||
<BODY BGCOLOR="#222222" LINK="#77dd11" TEXT="#cccccc" ALINK="#dddddd" VLINK="#77dd11"
|
<BODY BGCOLOR="#222222" LINK="#77dd11" TEXT="#cccccc" ALINK="#dddddd" VLINK="#77dd11"
|
||||||
TOPMARGIN="0" BOTTOMMARGIN="0" LEFTMARGIN="0" RIGHTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0">
|
TOPMARGIN="0" BOTTOMMARGIN="0" LEFTMARGIN="0" RIGHTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0">
|
||||||
|
|
||||||
<TABLE BORDER="0" CELLSPACING="20" CELLPADDING="0" ALIGN="center">
|
<TABLE BORDER="0" CELLSPACING="20" CELLPADDING="0" ALIGN="center">
|
||||||
<TR>
|
<TR>
|
||||||
<TD NOWRAP><A HREF="index.html">termlib.js home</A></TD>
|
<TD NOWRAP><A HREF="index.html">termlib.js home</A></TD>
|
||||||
<TD>|</TD>
|
<TD>|</TD>
|
||||||
<TD NOWRAP>multiple terminal test</TD>
|
<TD NOWRAP>multiple terminal test</TD>
|
||||||
<TD>|</TD>
|
<TD>|</TD>
|
||||||
<TD NOWRAP><A HREF="parser_sample.html">sample parser</A></TD>
|
<TD NOWRAP><A HREF="parser_sample.html">sample parser</A></TD>
|
||||||
<TD>|</TD>
|
<TD>|</TD>
|
||||||
<TD NOWRAP><A HREF="faq.html">faq</A></TD>
|
<TD NOWRAP><A HREF="faq.html">faq</A></TD>
|
||||||
<TD>|</TD>
|
<TD>|</TD>
|
||||||
<TD NOWRAP><A HREF="readme.txt" TITLE="readme.txt (text/plain)">documentation</A></TD>
|
<TD NOWRAP><A HREF="readme.txt" TITLE="readme.txt (text/plain)">documentation</A></TD>
|
||||||
</TR>
|
</TR>
|
||||||
</TABLE>
|
</TABLE>
|
||||||
|
|
||||||
<TABLE BORDER="0" CELLSPACING="20" CELLPADDING="0">
|
<TABLE BORDER="0" CELLSPACING="20" CELLPADDING="0">
|
||||||
<TR><TD NOWRAP>
|
<TR><TD NOWRAP>
|
||||||
Multiple Terminal Test<BR>
|
Multiple Terminal Test<BR>
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
<TR><TD NOWRAP>
|
<TR><TD NOWRAP>
|
||||||
<A HREF="javascript:termOpen(1)" onfocus="if(this.blur)this.blur();" onmouseover="window.status='terminal 1'; return true" onmouseout="window.status=''; return true" CLASS="termopen">> open terminal 1 </A>
|
<A HREF="javascript:termOpen(1)" onfocus="if(this.blur)this.blur();" onmouseover="window.status='terminal 1'; return true" onmouseout="window.status=''; return true" CLASS="termopen">> open terminal 1 </A>
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
<TR><TD NOWRAP>
|
<TR><TD NOWRAP>
|
||||||
<A HREF="javascript:termOpen(2)" onfocus="if(this.blur)this.blur();" onmouseover="window.status='terminal 2'; return true" onmouseout="window.status=''; return true" CLASS="termopen">> open terminal 2 </A>
|
<A HREF="javascript:termOpen(2)" onfocus="if(this.blur)this.blur();" onmouseover="window.status='terminal 2'; return true" onmouseout="window.status=''; return true" CLASS="termopen">> open terminal 2 </A>
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
<TR><TD NOWRAP CLASS="lh15">
|
<TR><TD NOWRAP CLASS="lh15">
|
||||||
<BR>
|
<BR>
|
||||||
(c) mass:werk,<BR>N. Landsteiner 2003-2005<BR>
|
(c) mass:werk,<BR>N. Landsteiner 2003-2005<BR>
|
||||||
<A HREF="http://www.masswerk.at/" TARGET="_blank">http://www.masswerk.at</A>
|
<A HREF="http://www.masswerk.at/" TARGET="_blank">http://www.masswerk.at</A>
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
</TABLE>
|
</TABLE>
|
||||||
|
|
||||||
<DIV ID="termDiv1" STYLE="position:absolute; top:20px; left:100px;"></DIV>
|
<DIV ID="termDiv1" STYLE="position:absolute; top:20px; left:100px;"></DIV>
|
||||||
<DIV ID="termDiv2" STYLE="position:absolute; top:20px; left:100px;"></DIV>
|
<DIV ID="termDiv2" STYLE="position:absolute; top:20px; left:100px;"></DIV>
|
||||||
|
|
||||||
</BODY>
|
</BODY>
|
||||||
</HTML>
|
</HTML>
|
|
@ -1,293 +1,293 @@
|
||||||
<HTML>
|
<HTML>
|
||||||
<HEAD>
|
<HEAD>
|
||||||
<TITLE>termlib Sample Parser</TITLE>
|
<TITLE>termlib Sample Parser</TITLE>
|
||||||
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" SRC="termlib.js"></SCRIPT>
|
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" SRC="termlib.js"></SCRIPT>
|
||||||
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" SRC="termlib_parser.js"></SCRIPT>
|
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" SRC="termlib_parser.js"></SCRIPT>
|
||||||
|
|
||||||
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
|
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
|
||||||
<!--
|
<!--
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test sample for termlib.js and termlib_parser.js
|
test sample for termlib.js and termlib_parser.js
|
||||||
|
|
||||||
(c) Norbert Landsteiner 2005
|
(c) Norbert Landsteiner 2005
|
||||||
mass:werk - media environments
|
mass:werk - media environments
|
||||||
<http://www.masswerk.at>
|
<http://www.masswerk.at>
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var term;
|
var term;
|
||||||
|
|
||||||
var helpPage=[
|
var helpPage=[
|
||||||
'%CS%+r Terminal Help %-r%n',
|
'%CS%+r Terminal Help %-r%n',
|
||||||
' This is just a sample to demonstrate command line parsing.',
|
' This is just a sample to demonstrate command line parsing.',
|
||||||
' ',
|
' ',
|
||||||
' Use one of the following commands:',
|
' Use one of the following commands:',
|
||||||
' clear [-a] .......... clear the terminal',
|
' clear [-a] .......... clear the terminal',
|
||||||
' option "a" also removes the status line',
|
' option "a" also removes the status line',
|
||||||
' number -n<value> .... return value of option "n" (test for options)',
|
' number -n<value> .... return value of option "n" (test for options)',
|
||||||
' repeat -n<value> .... repeats the first argument n times (another test)',
|
' repeat -n<value> .... repeats the first argument n times (another test)',
|
||||||
' login <username> .... sample login (test for raw mode)',
|
' login <username> .... sample login (test for raw mode)',
|
||||||
' exit ................ close the terminal (same as <ESC>)',
|
' exit ................ close the terminal (same as <ESC>)',
|
||||||
' help ................ show this help page',
|
' help ................ show this help page',
|
||||||
' ',
|
' ',
|
||||||
' other input will be echoed to the terminal as a list of parsed arguments',
|
' other input will be echoed to the terminal as a list of parsed arguments',
|
||||||
' in the format <argument index> <quoting level> "<parsed value>".',
|
' in the format <argument index> <quoting level> "<parsed value>".',
|
||||||
' '
|
' '
|
||||||
];
|
];
|
||||||
|
|
||||||
function termOpen() {
|
function termOpen() {
|
||||||
if (!term) {
|
if (!term) {
|
||||||
term=new Terminal(
|
term=new Terminal(
|
||||||
{
|
{
|
||||||
x: 220,
|
x: 220,
|
||||||
y: 70,
|
y: 70,
|
||||||
termDiv: 'termDiv',
|
termDiv: 'termDiv',
|
||||||
ps: '[guest]$',
|
ps: '[guest]$',
|
||||||
initHandler: termInitHandler,
|
initHandler: termInitHandler,
|
||||||
handler: commandHandler
|
handler: commandHandler
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
if (term) term.open();
|
if (term) term.open();
|
||||||
}
|
}
|
||||||
else if (term.closed) {
|
else if (term.closed) {
|
||||||
term.open();
|
term.open();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
term.focus();
|
term.focus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function termInitHandler() {
|
function termInitHandler() {
|
||||||
// output a start up screen
|
// output a start up screen
|
||||||
this.write(
|
this.write(
|
||||||
[
|
[
|
||||||
TermGlobals.center('####################################################', 80),
|
TermGlobals.center('####################################################', 80),
|
||||||
TermGlobals.center('# #', 80),
|
TermGlobals.center('# #', 80),
|
||||||
TermGlobals.center('# termlib.js - Sample Parser #', 80),
|
TermGlobals.center('# termlib.js - Sample Parser #', 80),
|
||||||
TermGlobals.center('# Input is echoed as a list of parsed arguments. #', 80),
|
TermGlobals.center('# Input is echoed as a list of parsed arguments. #', 80),
|
||||||
TermGlobals.center('# #', 80),
|
TermGlobals.center('# #', 80),
|
||||||
TermGlobals.center('# Type "help" for commands. #', 80),
|
TermGlobals.center('# Type "help" for commands. #', 80),
|
||||||
TermGlobals.center('# #', 80),
|
TermGlobals.center('# #', 80),
|
||||||
TermGlobals.center('# (c) N. Landsteiner 2005; www.masswerk.at #', 80),
|
TermGlobals.center('# (c) N. Landsteiner 2005; www.masswerk.at #', 80),
|
||||||
TermGlobals.center('# #', 80),
|
TermGlobals.center('# #', 80),
|
||||||
TermGlobals.center('####################################################', 80),
|
TermGlobals.center('####################################################', 80),
|
||||||
'%n'
|
'%n'
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
// set a double status line
|
// set a double status line
|
||||||
this.statusLine('', 8,2); // just a line of strike
|
this.statusLine('', 8,2); // just a line of strike
|
||||||
this.statusLine(' +++ This is just a test sample for command parsing. Type "help" for help. +++');
|
this.statusLine(' +++ This is just a test sample for command parsing. Type "help" for help. +++');
|
||||||
this.maxLines -= 2;
|
this.maxLines -= 2;
|
||||||
// and leave with prompt
|
// and leave with prompt
|
||||||
this.prompt();
|
this.prompt();
|
||||||
}
|
}
|
||||||
|
|
||||||
function commandHandler() {
|
function commandHandler() {
|
||||||
this.newLine();
|
this.newLine();
|
||||||
// check for raw mode first (should not be parsed)
|
// check for raw mode first (should not be parsed)
|
||||||
if (this.rawMode) {
|
if (this.rawMode) {
|
||||||
if (this.env.getPassword) {
|
if (this.env.getPassword) {
|
||||||
// sample password handler (lineBuffer == stored username ?)
|
// sample password handler (lineBuffer == stored username ?)
|
||||||
if (this.lineBuffer == this.env.username) {
|
if (this.lineBuffer == this.env.username) {
|
||||||
this.user = this.env.username;
|
this.user = this.env.username;
|
||||||
this.ps = '['+this.user+']>';
|
this.ps = '['+this.user+']>';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.type('Sorry.');
|
this.type('Sorry.');
|
||||||
}
|
}
|
||||||
this.env.username = '';
|
this.env.username = '';
|
||||||
this.env.getPassword = false;
|
this.env.getPassword = false;
|
||||||
}
|
}
|
||||||
// leave in normal mode
|
// leave in normal mode
|
||||||
this.rawMode = false;
|
this.rawMode = false;
|
||||||
this.prompt();
|
this.prompt();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// normal command parsing
|
// normal command parsing
|
||||||
// just call the termlib_parser with a reference of the calling Terminal instance
|
// just call the termlib_parser with a reference of the calling Terminal instance
|
||||||
// parsed arguments will be imported in this.argv,
|
// parsed arguments will be imported in this.argv,
|
||||||
// quoting levels per argument in this.argQL (quoting character or empty)
|
// quoting levels per argument in this.argQL (quoting character or empty)
|
||||||
// cursor for arguments is this.argc (used by parserGetopt)
|
// cursor for arguments is this.argc (used by parserGetopt)
|
||||||
// => see 'termlib_parse.js' for configuration and details
|
// => see 'termlib_parse.js' for configuration and details
|
||||||
parseLine(this);
|
parseLine(this);
|
||||||
if (this.argv.length == 0) {
|
if (this.argv.length == 0) {
|
||||||
// no commmand line input
|
// no commmand line input
|
||||||
}
|
}
|
||||||
else if (this.argQL[0]) {
|
else if (this.argQL[0]) {
|
||||||
// first argument quoted -> error
|
// first argument quoted -> error
|
||||||
this.write("Syntax error: first argument quoted.");
|
this.write("Syntax error: first argument quoted.");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var cmd = this.argv[this.argc++];
|
var cmd = this.argv[this.argc++];
|
||||||
/*
|
/*
|
||||||
process commands now
|
process commands now
|
||||||
1st argument: this.argv[this.argc]
|
1st argument: this.argv[this.argc]
|
||||||
*/
|
*/
|
||||||
if (cmd == 'help') {
|
if (cmd == 'help') {
|
||||||
this.write(helpPage);
|
this.write(helpPage);
|
||||||
}
|
}
|
||||||
else if (cmd == 'clear') {
|
else if (cmd == 'clear') {
|
||||||
// get options
|
// get options
|
||||||
var opts = parserGetopt(this, 'aA');
|
var opts = parserGetopt(this, 'aA');
|
||||||
if (opts.a) {
|
if (opts.a) {
|
||||||
// discard status line on opt "a" or "A"
|
// discard status line on opt "a" or "A"
|
||||||
this.maxLines = this.conf.rows;
|
this.maxLines = this.conf.rows;
|
||||||
}
|
}
|
||||||
this.clear();
|
this.clear();
|
||||||
}
|
}
|
||||||
else if (cmd == 'number') {
|
else if (cmd == 'number') {
|
||||||
// test for value options
|
// test for value options
|
||||||
var opts = parserGetopt(this, 'n');
|
var opts = parserGetopt(this, 'n');
|
||||||
if (opts.illegals.length) this.type('illegal option. usage: number -n<value>')
|
if (opts.illegals.length) this.type('illegal option. usage: number -n<value>')
|
||||||
else if ((opts.n) && (opts.n.value != -1)) this.type('option value: '+opts.n.value)
|
else if ((opts.n) && (opts.n.value != -1)) this.type('option value: '+opts.n.value)
|
||||||
else this.type('usage: number -n<value>');
|
else this.type('usage: number -n<value>');
|
||||||
}
|
}
|
||||||
else if (cmd == 'repeat') {
|
else if (cmd == 'repeat') {
|
||||||
// another test for value options
|
// another test for value options
|
||||||
var opts = parserGetopt(this, 'n');
|
var opts = parserGetopt(this, 'n');
|
||||||
if (opts.illegals.length) this.type('illegal option. usage: repeat -n<value> <string>')
|
if (opts.illegals.length) this.type('illegal option. usage: repeat -n<value> <string>')
|
||||||
else if ((opts.n) && (opts.n.value != -1)) {
|
else if ((opts.n) && (opts.n.value != -1)) {
|
||||||
// first normal argument is again this.argv[this.argc]
|
// first normal argument is again this.argv[this.argc]
|
||||||
var s = this.argv[this.argc];
|
var s = this.argv[this.argc];
|
||||||
if (typeof s != 'undefined') {
|
if (typeof s != 'undefined') {
|
||||||
// repeat this string n times
|
// repeat this string n times
|
||||||
var a = [];
|
var a = [];
|
||||||
for (var i=0; i<opts.n.value; i++) a[a.length] = s;
|
for (var i=0; i<opts.n.value; i++) a[a.length] = s;
|
||||||
this.type(a.join(' '));
|
this.type(a.join(' '));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else this.type('usage: repeat -n<value> <string>');
|
else this.type('usage: repeat -n<value> <string>');
|
||||||
}
|
}
|
||||||
else if (cmd == 'login') {
|
else if (cmd == 'login') {
|
||||||
// sample login (test for raw mode)
|
// sample login (test for raw mode)
|
||||||
if ((this.argc == this.argv.length) || (this.argv[this.argc] == '')) {
|
if ((this.argc == this.argv.length) || (this.argv[this.argc] == '')) {
|
||||||
this.type('usage: login <username>');
|
this.type('usage: login <username>');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.env.getPassword = true;
|
this.env.getPassword = true;
|
||||||
this.env.username = this.argv[this.argc];
|
this.env.username = this.argv[this.argc];
|
||||||
this.write('%+iSample login: repeat username as password.%-i%n');
|
this.write('%+iSample login: repeat username as password.%-i%n');
|
||||||
this.type('password: ');
|
this.type('password: ');
|
||||||
// exit in raw mode (blind input)
|
// exit in raw mode (blind input)
|
||||||
this.rawMode = true;
|
this.rawMode = true;
|
||||||
this.lock = false;
|
this.lock = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (cmd == 'exit') {
|
else if (cmd == 'exit') {
|
||||||
this.close();
|
this.close();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// for test purpose just output argv as list
|
// for test purpose just output argv as list
|
||||||
// assemble a string of style-escaped lines and output it in more-mode
|
// assemble a string of style-escaped lines and output it in more-mode
|
||||||
s=' INDEX QL ARGUMENT%n';
|
s=' INDEX QL ARGUMENT%n';
|
||||||
for (var i=0; i<this.argv.length; i++) {
|
for (var i=0; i<this.argv.length; i++) {
|
||||||
s += TermGlobals.stringReplace('%', '%%',
|
s += TermGlobals.stringReplace('%', '%%',
|
||||||
TermGlobals.fillLeft(i, 6) +
|
TermGlobals.fillLeft(i, 6) +
|
||||||
TermGlobals.fillLeft((this.argQL[i])? this.argQL[i]:'-', 4) +
|
TermGlobals.fillLeft((this.argQL[i])? this.argQL[i]:'-', 4) +
|
||||||
' "' + this.argv[i] + '"'
|
' "' + this.argv[i] + '"'
|
||||||
) + '%n';
|
) + '%n';
|
||||||
}
|
}
|
||||||
this.write(s, 1);
|
this.write(s, 1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.prompt();
|
this.prompt();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//-->
|
//-->
|
||||||
</SCRIPT>
|
</SCRIPT>
|
||||||
|
|
||||||
<STYLE TYPE="text/css">
|
<STYLE TYPE="text/css">
|
||||||
body,p,a,td {
|
body,p,a,td {
|
||||||
font-family: courier,fixed,swiss,sans-serif;
|
font-family: courier,fixed,swiss,sans-serif;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #cccccc;
|
color: #cccccc;
|
||||||
}
|
}
|
||||||
.lh15 {
|
.lh15 {
|
||||||
line-height: 15px;
|
line-height: 15px;
|
||||||
}
|
}
|
||||||
.term {
|
.term {
|
||||||
font-family: courier,fixed,swiss,sans-serif;
|
font-family: courier,fixed,swiss,sans-serif;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #33d011;
|
color: #33d011;
|
||||||
background: none;
|
background: none;
|
||||||
}
|
}
|
||||||
.termReverse {
|
.termReverse {
|
||||||
color: #111111;
|
color: #111111;
|
||||||
background: #33d011;
|
background: #33d011;
|
||||||
}
|
}
|
||||||
a,a:link,a:visited {
|
a,a:link,a:visited {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #77dd11;
|
color: #77dd11;
|
||||||
}
|
}
|
||||||
a:hover {
|
a:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
color: #77dd11;
|
color: #77dd11;
|
||||||
}
|
}
|
||||||
a:active {
|
a:active {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
color: #dddddd;
|
color: #dddddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.termopen,a.termopen:link,a.termopen:visited {
|
a.termopen,a.termopen:link,a.termopen:visited {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #77dd11;
|
color: #77dd11;
|
||||||
background: none;
|
background: none;
|
||||||
}
|
}
|
||||||
a.termopen:hover {
|
a.termopen:hover {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #222222;
|
color: #222222;
|
||||||
background: #77dd11;
|
background: #77dd11;
|
||||||
}
|
}
|
||||||
a.termopen:active {
|
a.termopen:active {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #222222;
|
color: #222222;
|
||||||
background: #dddddd;
|
background: #dddddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
</STYLE>
|
</STYLE>
|
||||||
</HEAD>
|
</HEAD>
|
||||||
|
|
||||||
|
|
||||||
<BODY BGCOLOR="#222222" LINK="#77dd11" TEXT="#cccccc" ALINK="#dddddd" VLINK="#77dd11"
|
<BODY BGCOLOR="#222222" LINK="#77dd11" TEXT="#cccccc" ALINK="#dddddd" VLINK="#77dd11"
|
||||||
TOPMARGIN="0" BOTTOMMARGIN="0" LEFTMARGIN="0" RIGHTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0">
|
TOPMARGIN="0" BOTTOMMARGIN="0" LEFTMARGIN="0" RIGHTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0">
|
||||||
|
|
||||||
<TABLE BORDER="0" CELLSPACING="20" CELLPADDING="0" ALIGN="center">
|
<TABLE BORDER="0" CELLSPACING="20" CELLPADDING="0" ALIGN="center">
|
||||||
<TR>
|
<TR>
|
||||||
<TD NOWRAP><A HREF="index.html">termlib.js home</A></TD>
|
<TD NOWRAP><A HREF="index.html">termlib.js home</A></TD>
|
||||||
<TD>|</TD>
|
<TD>|</TD>
|
||||||
<TD NOWRAP><A HREF="multiterm_test.html">multiple terminal test</A></TD>
|
<TD NOWRAP><A HREF="multiterm_test.html">multiple terminal test</A></TD>
|
||||||
<TD>|</TD>
|
<TD>|</TD>
|
||||||
<TD NOWRAP>sample parser</TD>
|
<TD NOWRAP>sample parser</TD>
|
||||||
<TD>|</TD>
|
<TD>|</TD>
|
||||||
<TD NOWRAP><A HREF="faq.html">faq</A></TD>
|
<TD NOWRAP><A HREF="faq.html">faq</A></TD>
|
||||||
<TD>|</TD>
|
<TD>|</TD>
|
||||||
<TD NOWRAP><A HREF="readme.txt" TITLE="readme.txt (text/plain)">documentation</A></TD>
|
<TD NOWRAP><A HREF="readme.txt" TITLE="readme.txt (text/plain)">documentation</A></TD>
|
||||||
</TR>
|
</TR>
|
||||||
</TABLE>
|
</TABLE>
|
||||||
|
|
||||||
<TABLE BORDER="0" CELLSPACING="20" CELLPADDING="0">
|
<TABLE BORDER="0" CELLSPACING="20" CELLPADDING="0">
|
||||||
<TR><TD NOWRAP>
|
<TR><TD NOWRAP>
|
||||||
Sample Parser Test<BR>
|
Sample Parser Test<BR>
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
<TR><TD NOWRAP>
|
<TR><TD NOWRAP>
|
||||||
<A HREF="javascript:termOpen()" onfocus="if(this.blur)this.blur();" onmouseover="window.status='terminal 1'; return true" onmouseout="window.status=''; return true" CLASS="termopen">> open terminal </A>
|
<A HREF="javascript:termOpen()" onfocus="if(this.blur)this.blur();" onmouseover="window.status='terminal 1'; return true" onmouseout="window.status=''; return true" CLASS="termopen">> open terminal </A>
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
<TR><TD NOWRAP>
|
<TR><TD NOWRAP>
|
||||||
|
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
<TR><TD NOWRAP CLASS="lh15">
|
<TR><TD NOWRAP CLASS="lh15">
|
||||||
<BR>
|
<BR>
|
||||||
(c) mass:werk,<BR>N. Landsteiner 2003-2005<BR>
|
(c) mass:werk,<BR>N. Landsteiner 2003-2005<BR>
|
||||||
<A HREF="http://www.masswerk.at/" TARGET="_blank">http://www.masswerk.at</A>
|
<A HREF="http://www.masswerk.at/" TARGET="_blank">http://www.masswerk.at</A>
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
</TABLE>
|
</TABLE>
|
||||||
|
|
||||||
<DIV ID="termDiv" STYLE="position:absolute;"></DIV>
|
<DIV ID="termDiv" STYLE="position:absolute;"></DIV>
|
||||||
|
|
||||||
</BODY>
|
</BODY>
|
||||||
</HTML>
|
</HTML>
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||||
|
<assemblyIdentity type="win32"
|
||||||
|
name="factor"
|
||||||
|
version="0.9.8.0"
|
||||||
|
/>
|
||||||
|
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<windowsSettings>
|
||||||
|
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">True/PM</dpiAware>
|
||||||
|
</windowsSettings>
|
||||||
|
</application>
|
||||||
|
</assembly>
|
|
@ -3,7 +3,10 @@ namespace factor {
|
||||||
#define CALLSTACK_BOTTOM(ctx) \
|
#define CALLSTACK_BOTTOM(ctx) \
|
||||||
(ctx->callstack_seg->end - sizeof(cell) * 5)
|
(ctx->callstack_seg->end - sizeof(cell) * 5)
|
||||||
|
|
||||||
inline static void flush_icache(cell start, cell len) {}
|
inline static void flush_icache(cell start, cell len) {
|
||||||
|
(void)start;
|
||||||
|
(void)len;
|
||||||
|
}
|
||||||
|
|
||||||
// In the instruction sequence:
|
// In the instruction sequence:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue