Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 691761d8 authored by rswindell's avatar rswindell

Eliminated all JS ThreadStackLimit stuff - not needed anymore as mozjs 1.8.5

has its own functional "too much recursion" detection.
Replaced "branch callback" stuff with "operational callback".
JavaScriptBranchLimit has been replaced with JavaScriptTimeLimit
(default value: 24 hours)
parent c2db8150
......@@ -815,7 +815,7 @@ __fastcall TMainForm::TMainForm(TComponent* Owner)
SAFECOPY(global.ctrl_dir,"c:\\sbbs\\ctrl\\");
global.js.max_bytes=JAVASCRIPT_MAX_BYTES;
global.js.cx_stack=JAVASCRIPT_CONTEXT_STACK;
global.js.branch_limit=JAVASCRIPT_BRANCH_LIMIT;
global.js.time_limit=JAVASCRIPT_TIME_LIMIT;
global.js.gc_interval=JAVASCRIPT_GC_INTERVAL;
global.js.yield_interval=JAVASCRIPT_YIELD_INTERVAL;
global.sem_chk_freq=5; /* seconds */
......@@ -1995,8 +1995,6 @@ void __fastcall TMainForm::StartupTimerTick(TObject *Sender)
global.js.cx_stack=Registry->ReadInteger("JS_ContextStack");
if(global.js.cx_stack==0)
global.js.cx_stack=JAVASCRIPT_CONTEXT_STACK;
if(Registry->ValueExists("JS_BranchLimit"))
global.js.branch_limit=Registry->ReadInteger("JS_BranchLimit");
if(Registry->ValueExists("JS_GcInterval"))
global.js.gc_interval=Registry->ReadInteger("JS_GcInterval");
if(Registry->ValueExists("JS_YieldInterval"))
......@@ -3156,8 +3154,7 @@ void __fastcall TMainForm::PropertiesExecute(TObject *Sender)
PropertiesDlg->PasswordEdit->Text=Password;
PropertiesDlg->JS_MaxBytesEdit->Text=IntToStr(global.js.max_bytes);
PropertiesDlg->JS_ContextStackEdit->Text=IntToStr(global.js.cx_stack);
PropertiesDlg->JS_ThreadStackEdit->Text=IntToStr(global.js.thread_stack);
PropertiesDlg->JS_BranchLimitEdit->Text=IntToStr(global.js.branch_limit);
PropertiesDlg->JS_TimeLimitEdit->Text=IntToStr(global.js.time_limit);
PropertiesDlg->JS_GcIntervalEdit->Text=IntToStr(global.js.gc_interval);
PropertiesDlg->JS_YieldIntervalEdit->Text=IntToStr(global.js.yield_interval);
PropertiesDlg->JS_LoadPathEdit->Text=global.js.load_path;
......@@ -3217,10 +3214,8 @@ void __fastcall TMainForm::PropertiesExecute(TObject *Sender)
=PropertiesDlg->JS_MaxBytesEdit->Text.ToIntDef(JAVASCRIPT_MAX_BYTES);
global.js.cx_stack
=PropertiesDlg->JS_ContextStackEdit->Text.ToIntDef(JAVASCRIPT_CONTEXT_STACK);
global.js.thread_stack
=PropertiesDlg->JS_ThreadStackEdit->Text.ToIntDef(JAVASCRIPT_THREAD_STACK);
global.js.branch_limit
=PropertiesDlg->JS_BranchLimitEdit->Text.ToIntDef(JAVASCRIPT_BRANCH_LIMIT);
global.js.time_limit
=PropertiesDlg->JS_TimeLimitEdit->Text.ToIntDef(JAVASCRIPT_TIME_LIMIT);
global.js.gc_interval
=PropertiesDlg->JS_GcIntervalEdit->Text.ToIntDef(JAVASCRIPT_GC_INTERVAL);
global.js.yield_interval
......
......@@ -3,8 +3,8 @@ object PropertiesDlg: TPropertiesDlg
Top = 219
BorderStyle = bsDialog
Caption = 'Control Panel Properties'
ClientHeight = 288
ClientWidth = 433
ClientHeight = 234
ClientWidth = 352
Color = clBtnFace
ParentFont = True
OldCreateOrder = True
......@@ -12,15 +12,15 @@ object PropertiesDlg: TPropertiesDlg
ShowHint = True
OnShow = FormShow
DesignSize = (
433
288)
PixelsPerInch = 120
TextHeight = 16
352
234)
PixelsPerInch = 96
TextHeight = 13
object OKBtn: TButton
Left = 329
Top = 10
Width = 93
Height = 31
Left = 267
Top = 8
Width = 76
Height = 25
Anchors = [akTop, akRight]
Caption = 'OK'
Default = True
......@@ -28,10 +28,10 @@ object PropertiesDlg: TPropertiesDlg
TabOrder = 0
end
object CancelBtn: TButton
Left = 329
Top = 47
Width = 93
Height = 31
Left = 267
Top = 38
Width = 76
Height = 25
Anchors = [akTop, akRight]
Cancel = True
Caption = 'Cancel'
......@@ -39,10 +39,10 @@ object PropertiesDlg: TPropertiesDlg
TabOrder = 1
end
object PageControl: TPageControl
Left = 9
Top = 9
Width = 312
Height = 272
Left = 7
Top = 7
Width = 254
Height = 221
ActivePage = JavaScriptTabSheet
Anchors = [akLeft, akTop, akBottom]
TabIndex = 3
......@@ -50,57 +50,57 @@ object PropertiesDlg: TPropertiesDlg
object SettingsTabSheet: TTabSheet
Caption = 'Settings'
object Label3: TLabel
Left = 9
Top = 12
Width = 109
Height = 24
Left = 7
Top = 10
Width = 89
Height = 19
AutoSize = False
Caption = 'Login Command'
end
object Label2: TLabel
Left = 9
Top = 44
Width = 109
Height = 24
Left = 7
Top = 36
Width = 89
Height = 19
AutoSize = False
Caption = 'Config Command'
end
object Label4: TLabel
Left = 9
Top = 76
Width = 224
Height = 24
Left = 7
Top = 62
Width = 182
Height = 19
AutoSize = False
Caption = 'Node Display Interval (seconds)'
end
object Label5: TLabel
Left = 9
Top = 108
Width = 224
Height = 24
Left = 7
Top = 88
Width = 182
Height = 19
AutoSize = False
Caption = 'Client Display Interval (seconds)'
end
object PasswordLabel: TLabel
Left = 9
Top = 206
Width = 109
Height = 24
Left = 7
Top = 167
Width = 89
Height = 20
AutoSize = False
Caption = 'Password'
end
object Label10: TLabel
Left = 9
Top = 138
Width = 224
Height = 23
Left = 7
Top = 112
Width = 182
Height = 19
AutoSize = False
Caption = 'Semaphore Check Interval (seconds)'
end
object LoginCmdEdit: TEdit
Left = 121
Top = 12
Width = 168
Left = 98
Top = 10
Width = 137
Height = 24
Hint = 'Login command-line or URL (default = telnet://localhost)'
ParentShowHint = False
......@@ -108,9 +108,9 @@ object PropertiesDlg: TPropertiesDlg
TabOrder = 0
end
object ConfigCmdEdit: TEdit
Left = 121
Top = 44
Width = 168
Left = 98
Top = 36
Width = 137
Height = 24
Hint = 'Configuration command line'
ParentShowHint = False
......@@ -118,9 +118,9 @@ object PropertiesDlg: TPropertiesDlg
TabOrder = 1
end
object NodeIntEdit: TEdit
Left = 240
Top = 76
Width = 25
Left = 195
Top = 62
Width = 20
Height = 24
Hint = 'Frequency of updates to Node window'
ParentShowHint = False
......@@ -129,10 +129,10 @@ object PropertiesDlg: TPropertiesDlg
Text = '1'
end
object NodeIntUpDown: TUpDown
Left = 265
Top = 76
Width = 19
Height = 24
Left = 215
Top = 62
Width = 16
Height = 19
Associate = NodeIntEdit
Min = 1
Max = 99
......@@ -141,9 +141,9 @@ object PropertiesDlg: TPropertiesDlg
Wrap = False
end
object ClientIntEdit: TEdit
Left = 240
Top = 108
Width = 25
Left = 195
Top = 88
Width = 20
Height = 24
Hint = 'Frequency of updates to clients window'
ParentShowHint = False
......@@ -152,10 +152,10 @@ object PropertiesDlg: TPropertiesDlg
Text = '1'
end
object ClientIntUpDown: TUpDown
Left = 265
Top = 108
Width = 19
Height = 24
Left = 215
Top = 88
Width = 16
Height = 19
Associate = ClientIntEdit
Min = 1
Max = 99
......@@ -164,10 +164,10 @@ object PropertiesDlg: TPropertiesDlg
Wrap = False
end
object TrayIconCheckBox: TCheckBox
Left = 9
Top = 170
Width = 280
Height = 24
Left = 7
Top = 138
Width = 228
Height = 20
Hint = 'Create tray icon when minimized'
Caption = 'Minimize to System Tray'
ParentShowHint = False
......@@ -176,9 +176,9 @@ object PropertiesDlg: TPropertiesDlg
OnClick = TrayIconCheckBoxClick
end
object PasswordEdit: TEdit
Left = 121
Top = 206
Width = 168
Left = 98
Top = 167
Width = 137
Height = 24
Hint = 'Required password for restoring from system tray icon'
ParentShowHint = False
......@@ -187,9 +187,9 @@ object PropertiesDlg: TPropertiesDlg
TabOrder = 9
end
object SemFreqEdit: TEdit
Left = 240
Top = 138
Width = 25
Left = 195
Top = 112
Width = 20
Height = 24
Hint = 'Frequency of checks for signaled semaphore files'
ParentShowHint = False
......@@ -198,10 +198,10 @@ object PropertiesDlg: TPropertiesDlg
Text = '1'
end
object SemFreqUpDown: TUpDown
Left = 265
Top = 138
Width = 18
Height = 24
Left = 215
Top = 112
Width = 15
Height = 20
Associate = SemFreqEdit
Min = 1
Max = 99
......@@ -214,11 +214,11 @@ object PropertiesDlg: TPropertiesDlg
Caption = 'Customize'
ImageIndex = 1
object SourceComboBox: TComboBox
Left = 9
Top = 12
Width = 134
Height = 24
ItemHeight = 16
Left = 7
Top = 10
Width = 109
Height = 21
ItemHeight = 13
TabOrder = 0
Text = 'Node List'
OnChange = SourceComboBoxChange
......@@ -233,46 +233,46 @@ object PropertiesDlg: TPropertiesDlg
'Services Log')
end
object ExampleEdit: TEdit
Left = 154
Top = 12
Width = 135
Left = 125
Top = 10
Width = 110
Height = 24
TabOrder = 1
Text = 'Scheme'
end
object FontButton: TButton
Left = 9
Top = 44
Width = 134
Height = 24
Left = 7
Top = 36
Width = 109
Height = 19
Caption = 'Change Font'
TabOrder = 2
OnClick = FontButtonClick
end
object BackgroundButton: TButton
Left = 154
Top = 44
Width = 135
Height = 24
Left = 125
Top = 36
Width = 110
Height = 19
Caption = 'Background Color'
TabOrder = 3
OnClick = BackgroundButtonClick
end
object ApplyButton: TButton
Left = 9
Top = 76
Width = 134
Height = 24
Left = 7
Top = 62
Width = 109
Height = 19
Caption = 'Apply Scheme To:'
TabOrder = 4
OnClick = ApplyButtonClick
end
object TargetComboBox: TComboBox
Left = 154
Top = 76
Width = 135
Height = 24
ItemHeight = 16
Left = 125
Top = 62
Width = 110
Height = 21
ItemHeight = 13
TabOrder = 5
Items.Strings = (
'Node List'
......@@ -286,27 +286,27 @@ object PropertiesDlg: TPropertiesDlg
'All Windows')
end
object LogFontGroupBox: TGroupBox
Left = 8
Top = 128
Width = 281
Height = 97
Left = 7
Top = 104
Width = 228
Height = 79
Caption = 'Log Fonts'
TabOrder = 6
object LogLevelLabel: TLabel
Left = 22
Top = 26
Width = 113
Height = 23
Left = 18
Top = 21
Width = 92
Height = 19
Alignment = taRightJustify
AutoSize = False
Caption = 'Log Level'
end
object LogLevelComboBox: TComboBox
Left = 146
Top = 24
Width = 119
Height = 24
ItemHeight = 16
Left = 119
Top = 20
Width = 96
Height = 21
ItemHeight = 13
ItemIndex = 7
TabOrder = 0
Text = 'Debug'
......@@ -322,18 +322,18 @@ object PropertiesDlg: TPropertiesDlg
'Debug')
end
object LogFontExampleEdit: TEdit
Left = 146
Top = 56
Width = 119
Left = 119
Top = 46
Width = 96
Height = 24
TabOrder = 1
Text = 'Example'
end
object LogFontButton: TButton
Left = 16
Top = 56
Width = 122
Height = 24
Left = 13
Top = 46
Width = 99
Height = 19
Caption = 'Change Font'
TabOrder = 2
OnClick = LogFontButtonClick
......@@ -344,49 +344,49 @@ object PropertiesDlg: TPropertiesDlg
Caption = 'Advanced'
ImageIndex = 2
object Label1: TLabel
Left = 9
Top = 12
Width = 109
Height = 24
Left = 7
Top = 10
Width = 89
Height = 19
AutoSize = False
Caption = 'Control Directory'
end
object Label6: TLabel
Left = 9
Top = 76
Width = 109
Height = 24
Left = 7
Top = 62
Width = 89
Height = 19
AutoSize = False
Caption = 'Hostname'
end
object Label8: TLabel
Left = 9
Top = 108
Width = 109
Height = 24
Left = 7
Top = 88
Width = 89
Height = 19
AutoSize = False
Caption = 'Log Window Size'
end
object Label9: TLabel
Left = 9
Top = 44
Width = 109
Height = 24
Left = 7
Top = 36
Width = 89
Height = 19
AutoSize = False
Caption = 'Temp Directory'
end
object ErrorSoundLabel: TLabel
Left = 9
Top = 140
Width = 80
Height = 25
Left = 7
Top = 114
Width = 65
Height = 20
AutoSize = False
Caption = 'Error Sound'
end
object CtrlDirEdit: TEdit
Left = 121
Top = 12
Width = 168
Left = 98
Top = 10
Width = 137
Height = 24
Hint = 'Control directory (e.g. c:\sbbs\ctrl)'
ParentShowHint = False
......@@ -394,9 +394,9 @@ object PropertiesDlg: TPropertiesDlg
TabOrder = 0
end
object HostnameEdit: TEdit
Left = 121
Top = 76
Width = 168
Left = 98
Top = 62
Width = 137
Height = 24
Hint = 'Hostname (if different than configured in SCFG)'
ParentShowHint = False
......@@ -404,9 +404,9 @@ object PropertiesDlg: TPropertiesDlg
TabOrder = 2
end
object MaxLogLenEdit: TEdit
Left = 121
Top = 108
Width = 168
Left = 98
Top = 88
Width = 137
Height = 24
Hint =
'Maximum number of lines to store in log windows before auto-dele' +
......@@ -416,9 +416,9 @@ object PropertiesDlg: TPropertiesDlg
TabOrder = 3
end
object TempDirEdit: TEdit
Left = 121
Top = 44
Width = 168
Left = 98
Top = 36
Width = 137
Height = 24
Hint = 'Temp directory (e.g. C:\SBBSTEMP)'
ParentShowHint = False
......@@ -426,10 +426,10 @@ object PropertiesDlg: TPropertiesDlg
TabOrder = 1
end
object UndockableCheckBox: TCheckBox
Left = 9
Top = 177
Width = 280
Height = 25
Left = 7
Top = 144
Width = 228
Height = 20
Hint = 'Allow child windows to be "un-docked" from main window'
Caption = 'Undockable Windows'
ParentShowHint = False
......@@ -437,10 +437,10 @@ object PropertiesDlg: TPropertiesDlg
TabOrder = 6
end
object FileAssociationsCheckBox: TCheckBox
Left = 9
Top = 209
Width = 280
Height = 25
Left = 7
Top = 170
Width = 228
Height = 20
Hint = 'Use Windows file associations when viewing or editing files'
Caption = 'Use File Associations'
ParentShowHint = False
......@@ -448,9 +448,9 @@ object PropertiesDlg: TPropertiesDlg
TabOrder = 7
end
object ErrorSoundEdit: TEdit
Left = 121
Top = 140
Width = 137
Left = 98
Top = 114
Width = 112
Height = 24
Hint = 'Sound file to play when an error condition is logged'
ParentShowHint = False
......@@ -458,10 +458,10 @@ object PropertiesDlg: TPropertiesDlg
TabOrder = 4
end
object ErrorSoundButton: TButton
Left = 263
Top = 140
Width = 25
Height = 26
Left = 214
Top = 114
Width = 20
Height = 21
Caption = '...'
TabOrder = 5
OnClick = ErrorSoundButtonClick
......@@ -471,66 +471,58 @@ object PropertiesDlg: TPropertiesDlg
Caption = 'JavaScript'
ImageIndex = 3
object Label7: TLabel
Left = 9
Top = 12
Width = 109
Height = 24
Left = 7
Top = 10
Width = 89
Height = 19
AutoSize = False
Caption = 'Heap Size'
end
object Label11: TLabel
Left = 9
Top = 44
Width = 109