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
a2571337
Commit
a2571337
authored
22 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Added necessary function prototypes.
Switched from fputs() to fprintf().
parent
0d964d64
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/install/sbbsinst.c
+65
-62
65 additions, 62 deletions
src/sbbs3/install/sbbsinst.c
with
65 additions
and
62 deletions
src/sbbs3/install/sbbsinst.c
+
65
−
62
View file @
a2571337
...
...
@@ -68,6 +68,20 @@ char error[256];
char
cflags
[
MAX_PATH
+
1
];
int
backup_level
=
5
;
void
write_makefile
(
void
);
void
install_sbbs
(
void
);
void
bail
(
int
code
)
{
if
(
code
)
{
puts
(
"
\n
Hit a key..."
);
getch
();
}
uifc
.
bail
();
exit
(
code
);
}
void
allocfail
(
uint
size
)
{
printf
(
"
\7
Error allocating %u bytes of memory.
\r\n
"
,
size
);
...
...
@@ -313,17 +327,6 @@ while(1) {
}
}
void
bail
(
int
code
)
{
if
(
code
)
{
puts
(
"
\n
Hit a key..."
);
getch
();
}
uifc
.
bail
();
exit
(
code
);
}
void
write_makefile
(
void
)
{
int
i
;
...
...
@@ -331,7 +334,7 @@ void write_makefile(void)
char
*
build
;
char
*
ccpre
;
char
*
insbin
;
char
platform
[]
=
PLATFORM
;
char
platform
[]
=
PLATFORM
_DESC
;
char
cvs_co
[
MAX_PATH
*
2
];
strlwr
(
platform
);
...
...
@@ -341,16 +344,16 @@ void write_makefile(void)
return
;
}
if
(
!
params
.
release
)
fp
uts
(
"DEBUG := 1
\n
"
,
makefile
);
fp
rintf
(
makefile
,
"DEBUG := 1
\n
"
);
if
(
params
.
symlink
)
fp
uts
(
"INSBIN := ln -s
\n
"
,
makefile
);
fp
rintf
(
makefile
,
"INSBIN := ln -s
\n
"
);
else
fp
uts
(
"INSBIN := install -c -s
\n
"
,
makefile
);
fp
rintf
(
makefile
,
"INSBIN := install -c -s
\n
"
);
if
(
params
.
usebcc
)
{
ccpre
=
"bcc"
;
fp
uts
(
"MKFLAGS += bcc=1
\n
"
,
makefile
);
fp
rintf
(
makefile
,
"MKFLAGS += bcc=1
\n
"
);
}
else
ccpre
=
"gcc"
;
...
...
@@ -378,18 +381,18 @@ endif
*/
if
(
params
.
release
)
{
build
=
"release"
;
fp
uts
(
"MKFLAGS += RELEASE=1
\n
"
,
makefile
);
fp
rintf
(
makefile
,
"MKFLAGS += RELEASE=1
\n
"
);
}
else
{
build
=
"debug"
;
fp
uts
(
"MKFLAGS += DEBUG=1
\n
"
,
makefile
);
fp
rintf
(
makefile
,
"MKFLAGS += DEBUG=1
\n
"
);
}
if
(
params
.
cflags
[
0
])
{
sprintf
(
cflags
,
"CFLAGS=%s"
,
params
.
cflags
);
putenv
(
cflags
);
}
fp
uts
(
"SBBSDIR := "
,
makefile
);
fputs
(
params
.
install_path
,
makefile
);
fp
uts
(
"
\n
"
,
makefile
);
fp
rintf
(
makefile
,
"SBBSDIR := "
);
fputs
(
params
.
install_path
);
fp
rintf
(
makefile
,
"
\n
"
);
/* Not supported
ifdef JSLIB
...
...
@@ -397,47 +400,47 @@ ifdef JSLIB
endif
*/
fp
uts
(
"all: binaries baja externals
\n\n
"
,
makefile
);
fp
uts
(
"externals: sbj sbl
\n\n
"
,
makefile
);
fp
uts
(
"binaries: sbbs3 scfg
\n\n
"
,
makefile
);
fp
rintf
(
makefile
,
"all: binaries baja externals
\n\n
"
);
fp
rintf
(
makefile
,
"externals: sbj sbl
\n\n
"
);
fp
rintf
(
makefile
,
"binaries: sbbs3 scfg
\n\n
"
);
fp
uts
(
"sbbs3: "
,
makefile
);
fp
rintf
(
makefile
,
"sbbs3: "
);
if
(
params
.
cvs
)
fp
uts
(
"$(SBBSDIR)/src/sbbs3 $(SBBSDIR)/src/uifc $(SBBSDIR)/src/xpdev $(SBBSDIR)/src/mozilla
\\\n
"
,
makefile
);
fp
rintf
(
makefile
,
"$(SBBSDIR)/src/sbbs3 $(SBBSDIR)/src/uifc $(SBBSDIR)/src/xpdev $(SBBSDIR)/src/mozilla
\\\n
"
);
fprintf
(
makefile
,
" $(SBBSDIR)/src/mozilla $(SBBSDIR)/lib/mozilla/js/%s.%s
\n
"
,
platform
,
build
);
fp
uts
(
"
\n
"
,
makefile
);
fp
uts
(
" gmake -C $(SBBSDIR)/src/sbbs3 $(MKFLAGS)
\n
"
,
makefile
);
fp
rintf
(
makefile
,
"
\n
"
);
fp
rintf
(
makefile
,
" gmake -C $(SBBSDIR)/src/sbbs3 $(MKFLAGS)
\n
"
);
fputs
(
makefile
,
" MKFLAGS += BAJAPATH=../src/sbbs3/%s.%s.exe.%s/baja
\n\n
"
,
ccpre
,
platform
,
build
);
fp
uts
(
"scfg:"
,
makefile
);
fp
rintf
(
makefile
,
"scfg:"
);
if
(
params
.
cvs
)
fp
uts
(
" $(SBBSDIR)/src/sbbs3 $(SBBSDIR)/src/uifc $(SBBSDIR)/src/xpdev"
,
makefile
);
fp
uts
(
"
\n
"
,
makefile
);
fp
uts
(
" gmake -C $(SBBSDIR)/src/sbbs3/scfg $(MKFLAGS)
\n\n
"
,
makefile
);
fp
rintf
(
makefile
,
" $(SBBSDIR)/src/sbbs3 $(SBBSDIR)/src/uifc $(SBBSDIR)/src/xpdev"
);
fp
rintf
(
makefile
,
"
\n
"
);
fp
rintf
(
makefile
,
" gmake -C $(SBBSDIR)/src/sbbs3/scfg $(MKFLAGS)
\n\n
"
);
fp
uts
(
"baja:"
,
makefile
);
fp
rintf
(
makefile
,
"baja:"
);
if
(
params
.
cvs
)
fp
uts
(
" $(SBBSDIR)/exec"
,
makefile
);
fp
uts
(
" binaries
\n
"
,
makefile
);
fp
uts
(
" gmake -C $(SBBSDIR)/exec $(MKFLAGS)
\n\n
"
,
makefile
);
fp
rintf
(
makefile
,
" $(SBBSDIR)/exec"
);
fp
rintf
(
makefile
,
" binaries
\n
"
);
fp
rintf
(
makefile
,
" gmake -C $(SBBSDIR)/exec $(MKFLAGS)
\n\n
"
);
fp
uts
(
"sbj:"
,
makefile
);
fp
rintf
(
makefile
,
"sbj:"
);
if
(
params
.
cvs
)
fp
uts
(
" $(SBBSDIR)/xtrn"
,
makefile
);
fp
uts
(
"
\n
"
,
makefile
);
fp
uts
(
" gmake -C $(SBBSDIR)/xtrn/sbj $(MKFLAGS)
\n\n
"
,
makefile
);
fp
rintf
(
makefile
,
" $(SBBSDIR)/xtrn"
);
fp
rintf
(
makefile
,
"
\n
"
);
fp
rintf
(
makefile
,
" gmake -C $(SBBSDIR)/xtrn/sbj $(MKFLAGS)
\n\n
"
);
fp
uts
(
"sbl:"
,
makefile
);
fp
rintf
(
makefile
,
"sbl:"
);
if
(
params
.
cvs
)
fp
uts
(
" $(SBBSDIR)/xtrn"
,
makefile
);
fp
uts
(
"
\n
"
,
makefile
);
fp
uts
(
" gmake -C $(SBBSDIR)/xtrn/sbl $(MKFLAGS)
\n\n
"
,
makefile
);
fp
rintf
(
makefile
,
" $(SBBSDIR)/xtrn"
);
fp
rintf
(
makefile
,
"
\n
"
);
fp
rintf
(
makefile
,
" gmake -C $(SBBSDIR)/xtrn/sbl $(MKFLAGS)
\n\n
"
);
fp
uts
(
"install: all"
,
makefile
);
fp
rintf
(
makefile
,
"install: all"
);
if
(
params
.
cvs
)
fp
uts
(
" ctrl text node1 node2 node3 node4"
,
makefile
);
fp
uts
(
"
\n
"
,
makefile
);
fp
uts
(
" echo Installing to $(SBBSDIR)
\n
"
,
makefile
);
fp
rintf
(
makefile
,
" ctrl text node1 node2 node3 node4"
);
fp
rintf
(
makefile
,
"
\n
"
);
fp
rintf
(
makefile
,
" echo Installing to $(SBBSDIR)
\n
"
);
if
(
params
.
release
)
{
fprintf
(
makefile
,
" strip $(SBBSDIR)/src/sbbs3/%s.%s.exe.%s/baja
\n
"
,
ccpre
,
platform
,
build
);
fprintf
(
makefile
,
" strip $(SBBSDIR)/src/sbbs3/%s.%s.exe.%s/node
\n
"
,
ccpre
,
platform
,
build
);
...
...
@@ -464,19 +467,19 @@ endif
fprintf
(
makefile
,
" $(INSBIN) $(SBBSDIR)/src/sbbs3/scfg/%s.%s.%s/scfghelp.ixb $(SBBSDIR)/exec/scfghelp.ixb
\n
"
,
ccpre
,
platform
,
build
);
fprintf
(
makefile
,
" $(INSBIN) $(SBBSDIR)/src/sbbs3/scfg/%s.%s.%s/scfghelp.dat $(SBBSDIR)/exec/scfghelp.dat
\n\n
"
,
ccpre
,
platform
,
build
);
/* Not implemented
fp
uts(
" chown -R $(SBBSCHOWN) $(SBBSDIR)"
,makefile
);
fp
rintf(makefile,
" chown -R $(SBBSCHOWN) $(SBBSDIR)");
*/
if
(
params
.
cvs
)
{
sprintf
(
cvs_co
,
" cd $(SBBSDIR); %s co -r %s"
,
CVSCOMMAND
,
params
.
cvstag
);
fp
uts
(
"$(SBBSDIR)/ctrl: cvslogin
\n
"
,
makefile
);
fp
rintf
(
makefile
,
"$(SBBSDIR)/ctrl: cvslogin
\n
"
);
fprintf
(
makefile
,
"%s ctrl
\n\n
"
,
cvs_co
);
fp
uts
(
"$(SBBSDIR)/text: cvslogin
\n
"
,
makefile
);
fp
rintf
(
makefile
,
"$(SBBSDIR)/text: cvslogin
\n
"
);
fprintf
(
makefile
,
"%s text
\n\n
"
,
cvs_co
);
fp
uts
(
"$(SBBSDIR)/exec: cvslogin
\n
"
,
makefile
);
fp
rintf
(
makefile
,
"$(SBBSDIR)/exec: cvslogin
\n
"
);
fprintf
(
makefile
,
"%s exec
\n\n
"
,
cvs_co
);
for
(
i
=
1
;
i
<=
4
;
i
++
)
{
...
...
@@ -484,31 +487,31 @@ fputs(" chown -R $(SBBSCHOWN) $(SBBSDIR)",makefile);
fprintf
(
makefile
,
"%s node%d
\n\n
"
,
cvs_co
,
i
);
}
fp
uts
(
"$(SBBSDIR)/xtrn: cvslogin
\n
"
,
makefile
);
fp
rintf
(
makefile
,
"$(SBBSDIR)/xtrn: cvslogin
\n
"
);
fprintf
(
makefile
,
"%s xtrn
\n\n
"
,
cvs_co
);
fp
uts
(
"$(SBBSDIR)/src/sbbs3: cvslogin
\n
"
,
makefile
);
fp
rintf
(
makefile
,
"$(SBBSDIR)/src/sbbs3: cvslogin
\n
"
);
fprintf
(
makefile
,
"%s src/sbbs3
\n\n
"
,
cvs_co
);
fp
uts
(
"$(SBBSDIR)/src/uifc: cvslogin
\n
"
,
makefile
);
fp
rintf
(
makefile
,
"$(SBBSDIR)/src/uifc: cvslogin
\n
"
);
fprintf
(
makefile
,
"%s src/uifc
\n\n
"
,
cvs_co
);
fp
uts
(
"$(SBBSDIR)/src/xpdev: cvslogin
\n
"
,
makefile
);
fp
rintf
(
makefile
,
"$(SBBSDIR)/src/xpdev: cvslogin
\n
"
);
fprintf
(
makefile
,
"%s src/xpdev
\n\n
"
,
cvs_co
);
fp
uts
(
"$(SBBSDIR)/src/mozilla: cvslogin
\n
"
,
makefile
);
fp
rintf
(
makefile
,
"$(SBBSDIR)/src/mozilla: cvslogin
\n
"
);
fprintf
(
makefile
,
"%s src/mozilla
\n\n
"
,
cvs_co
);
fprintf
(
makefile
,
"$(SBBSDIR)/lib/mozilla/js/%s.%s: cvslogin
\n
"
,
platform
,
build
);
fprintf
(
makefile
,
"%s lib/mozilla/js/%s.%s
\n\n
"
,
cvs_co
,
platform
,
build
);
fp
uts
(
"cvslogin: $(SBBSDIR)
\n
"
,
makefile
);
fp
uts
(
" @echo Press
\\
<ENTER
\\
> when prompted for password
\n
"
,
makefile
);
fp
uts
(
" @$(CVSCOMMAND) login
\n\n
"
,
makefile
);
fp
rintf
(
makefile
,
"cvslogin: $(SBBSDIR)
\n
"
);
fp
rintf
(
makefile
,
" @echo Press
\\
<ENTER
\\
> when prompted for password
\n
"
);
fp
rintf
(
makefile
,
" @$(CVSCOMMAND) login
\n\n
"
);
}
fp
uts
(
"$(SBBSDIR):
\n
"
,
makefile
);
fp
uts
(
" @[ ! -e $(SBBSDIR) ] && mkdir $(SBBSDIR);
\n
"
,
makefile
);
fp
rintf
(
makefile
,
"$(SBBSDIR):
\n
"
);
fp
rintf
(
makefile
,
" @[ ! -e $(SBBSDIR) ] && mkdir $(SBBSDIR);
\n
"
);
fclose
(
makefile
);
}
...
...
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