Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
4baf09c4
Commit
4baf09c4
authored
23 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Added exit() and sleep() global methods.
parent
62de4d22
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sbbs3/globobj.c
+8
-0
8 additions, 0 deletions
src/sbbs3/globobj.c
with
8 additions
and
0 deletions
src/sbbs3/globobj.c
+
8
−
0
View file @
4baf09c4
...
...
@@ -140,6 +140,12 @@ js_beep(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
return
(
JS_TRUE
);
}
static
JSBool
js_exit
(
JSContext
*
cx
,
JSObject
*
obj
,
uintN
argc
,
jsval
*
argv
,
jsval
*
rval
)
{
return
(
JS_FALSE
);
}
static
JSClass
js_global_class
=
{
"Global"
,
JSCLASS_HAS_PRIVATE
,
/* needed for scfg_t ptr */
...
...
@@ -148,9 +154,11 @@ static JSClass js_global_class ={
};
static
JSFunctionSpec
js_global_functions
[]
=
{
{
"exit"
,
js_exit
,
0
},
/* stop execution */
{
"load"
,
js_load
,
1
},
/* Load and execute a javascript file */
{
"format"
,
js_format
,
1
},
/* return a formatted string (ala printf) */
{
"mswait"
,
js_mswait
,
0
},
/* millisecond wait/sleep routine */
{
"sleep"
,
js_mswait
,
0
},
/* millisecond wait/sleep routine */
{
"beep"
,
js_beep
,
0
},
/* local beep (freq, dur) */
{
0
}
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment