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
238fe598
Commit
238fe598
authored
23 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Created environment vars for date info (even for 32-bit externals).
parent
9ac76b83
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/sbbs3/sbbs.h
+7
-1
7 additions, 1 deletion
src/sbbs3/sbbs.h
src/sbbs3/xtrn.cpp
+9
-2
9 additions, 2 deletions
src/sbbs3/xtrn.cpp
with
16 additions
and
3 deletions
src/sbbs3/sbbs.h
+
7
−
1
View file @
238fe598
...
...
@@ -299,7 +299,13 @@ public:
ulong
timeleft
;
/* Number of seconds user has left online */
char
sbbsnode
[
MAX_PATH
+
1
];
/* Environment var to contain node dir path */
char
sbbsnnum
[
MAX_PATH
+
1
];
/* Environment var to contain node num */
char
sbbsctrl
[
MAX_PATH
+
1
];
/* Environmetn var to contain ctrl dir path */
char
sbbsctrl
[
MAX_PATH
+
1
];
/* Environment var to contain ctrl dir path */
char
env_day
[
16
];
/* Environment var for day of month */
char
env_weekday
[
16
];
/* Environment var for name of weekday */
char
env_month
[
16
];
/* Environment var for month number (1-based) */
char
env_monthname
[
16
];
/* Environment var for day of month abbreviation */
char
env_year
[
16
];
/* Environment var for the year */
char
*
comspec
;
/* Pointer to environment variable COMSPEC */
ushort
altul
;
/* Upload to alternate path flag */
char
cid
[
LEN_CID
+
1
];
/* Caller ID (IP Address) of current caller */
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/xtrn.cpp
+
9
−
2
View file @
238fe598
...
...
@@ -287,7 +287,7 @@ int sbbs_t::external(char* cmdline, long mode, char* startup_dir)
if
(
native
&&
mode
&
EX_OUTR
&&
!
(
mode
&
EX_OFFLINE
))
use_pipes
=
true
;
if
(
native
)
{
// Native (32-bit) external
if
(
native
||
mode
&
EX_OFFLINE
)
{
// Native (32-bit) external
// Current environment passed to child process
sprintf
(
dszlog
,
"DSZLOG=%sPROTOCOL.LOG"
,
cfg
.
node_dir
);
...
...
@@ -299,6 +299,13 @@ int sbbs_t::external(char* cmdline, long mode, char* startup_dir)
putenv
(
sbbsnnum
);
/* create environment var to contain node num */
sprintf
(
sbbsctrl
,
"SBBSCTRL=%s"
,
cfg
.
ctrl_dir
);
putenv
(
sbbsctrl
);
if
(
tm_p
!=
NULL
)
{
sprintf
(
env_day
,
"DAY=%02u
\n
"
,
tm_p
->
tm_mday
);
sprintf
(
env_weekday
,
"WEEKDAY=%s
\n
"
,
wday
[
tm_p
->
tm_wday
]);
sprintf
(
env_monthname
,
"MONTHNAME=%s
\n
"
,
mon
[
tm_p
->
tm_mon
]);
sprintf
(
env_month
,
"MONTH=%02u
\n
"
,
tm_p
->
tm_mon
+
1
);
sprintf
(
env_year
,
"YEAR=%u
\n
"
,
1900
+
tm_p
->
tm_year
);
}
}
else
{
// DOS external
...
...
@@ -608,7 +615,7 @@ int sbbs_t::external(char* cmdline, long mode, char* startup_dir)
Sleep
(
500
);
}
else
{
if
(
nt
)
{
// Windows NT/2000
if
(
nt
||
use_pipes
)
{
// Windows NT/2000
/* Write to VDD */
...
...
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