Skip to content

Commit

Permalink
ACP
Browse files Browse the repository at this point in the history
1. Added EXECUTE_ON_STARTUP_COMPLETE tooltype

Express
1. Added specific types for some object properties rather than assuming default type
2. Added support for displaying text files with CRLF line endings
3. Fixed WHO command error that was not displaying the first character of the location
4. Updated version to 5.1.0 final
  • Loading branch information
dmcoles committed Jun 3, 2019
1 parent 15dcd94 commit c44a0f6
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 8 deletions.
25 changes: 25 additions & 0 deletions ACP.e
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,8 @@ DEF commodityEnabled=TRUE

DEF broker=NIL, broker_mp=NIL:PTR TO mp, cxsigflag=0

DEF starting=TRUE

/* some global variables used to replace the statics from the C version
they are prefixed with the procdure name to prevent any name clashes
*/
Expand All @@ -430,6 +432,8 @@ DEF do_appiconi=0
DEF do_appiconj=0
DEF maddItemi=0

DEF startupCompleteScript[255]:STRING

PROC init() OF itemsList ->constructor
self.lastUsers[0]:=String(36)
self.lastUsers[1]:=String(36)
Expand Down Expand Up @@ -1884,6 +1888,21 @@ PROC showCPS(node,incps:PTR TO CHAR)
Text(eWin.rport,cps,7)
ENDPROC

PROC checkStartingScript()
DEF i,allStarted=TRUE
IF starting
FOR i:=0 TO MAX_NODES-1
IF (StrLen(startNode[i])>0) AND (nodeIdle[i]=FALSE)
IF (users[i].active=FALSE) OR (users[i].actionVal=ENV_NOTACTIVE) THEN allStarted:=FALSE
ENDIF
ENDFOR
IF allStarted
IF StrLen(startupCompleteScript)>0 THEN Execute(startupCompleteScript,NIL,NIL)
starting:=FALSE
ENDIF
ENDIF
ENDPROC

PROC checkMasterSig(signals)
DEF temp[100]:STRING
DEF temp1[10]:STRING
Expand Down Expand Up @@ -1932,6 +1951,7 @@ PROC checkMasterSig(signals)
SELECT c
CASE JH_UPDATE
updateNode(msg.user,msg.location,msg.action,msg.baud,msg.node)
checkStartingScript()
IF(showAbout)
showNodes()
showAbout:=0
Expand Down Expand Up @@ -2736,6 +2756,10 @@ PROC readStartUp(s:PTR TO CHAR)
ENDFOR
ENDIF

IF(t:=FindToolType(oldtooltypes,'EXECUTE_ON_STARTUP_COMPLETE'))
StrCopy(startupCompleteScript,t)
ENDIF

IF(t:=FindToolType(oldtooltypes,'SYSOP_NAME'))
FOR i:=0 TO nodeCount-1
cmd:=cmds[i]
Expand Down Expand Up @@ -3471,6 +3495,7 @@ PROC main() HANDLE
ENDIF

loadState()
checkStartingScript()

WHILE (notDone)
signals:=Wait(masterSig OR windowSig OR myappsig OR cxsigflag)
Expand Down
25 changes: 17 additions & 8 deletions express.e
Original file line number Diff line number Diff line change
Expand Up @@ -399,12 +399,12 @@ OBJECT doorMsg
ENDOBJECT

OBJECT awaitState
subState
redrawScreen
subState: LONG
redrawScreen: LONG
ENDOBJECT

OBJECT loggedOnState
subState
subState: LONG
ENDOBJECT

OBJECT ansi
Expand Down Expand Up @@ -523,8 +523,8 @@ ENDOBJECT

OBJECT bgCheckData
semi: ss
checkedCount
checkedBytes
checkedCount: LONG
checkedBytes: LONG
ENDOBJECT

OBJECT diskObjectCacheItem
Expand Down Expand Up @@ -7670,13 +7670,22 @@ PROC displayFile(filename, allowMCI=TRUE, resetNonStop=TRUE)
JUMP ripCont
ENDIF
len:=StrLen(linedata)-1
lf:=FALSE
IF (len>1)
IF (linedata[len-1]="\b") AND (linedata[len]="\n")
SetStr(linedata,len-1)
lf:=TRUE
ENDIF
ENDIF
IF (lf=FALSE)
IF linedata[len]="\n"
SetStr(linedata,len)
lf:=TRUE
ELSE
len++
SetStr(linedata,len)
lf:=FALSE
ENDIF
ENDIF
IF (firstline)
IF len>0
Expand Down Expand Up @@ -22368,7 +22377,7 @@ PROC who(opt)

status:=s.status
StrCopy(name,s.handle)
StrCopy(location,s.location)
StrCopy(location,s.location-1)
StrCopy(fileName,s.misc1)
IF(opt)
StringF(mes, '| \l\d[20] | \l\d[25] |',s,masterNode)
Expand Down Expand Up @@ -27885,8 +27894,8 @@ PROC main() HANDLE
DEF tempfh
DEF transptr:PTR TO mln

StrCopy(expressVer,'v5.1.0-b10',ALL)
StrCopy(expressDate,'14-May-2019',ALL)
StrCopy(expressVer,'v5.1.0',ALL)
StrCopy(expressDate,'03-Jun-2019',ALL)

InitSemaphore(bgData)

Expand Down

0 comments on commit c44a0f6

Please sign in to comment.