Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
cmucl
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
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Carl Shapiro
cmucl
Commits
e0ba1b6d
Commit
e0ba1b6d
authored
17 years ago
by
fgilham
Browse files
Options
Downloads
Patches
Plain Diff
Fixed indentation I broke in save.c and lisp.c.
parent
757179b1
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
lisp/lisp.c
+11
-5
11 additions, 5 deletions
lisp/lisp.c
lisp/save.c
+26
-24
26 additions, 24 deletions
lisp/save.c
with
37 additions
and
29 deletions
lisp/lisp.c
+
11
−
5
View file @
e0ba1b6d
/*
* main() entry point for a stand alone lisp image.
*
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/lisp.c,v 1.5
4
2007/07/0
7 17:25:10
fgilham Exp $
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/lisp.c,v 1.5
5
2007/07/0
8 06:58:34
fgilham Exp $
*
*/
...
...
@@ -437,7 +437,8 @@ main(int argc, char *argv[], char *envp[])
if
(
strcmp
(
arg
,
"-core"
)
==
0
)
{
#ifdef FEATURE_EXECUTABLE
if
(
builtin_image_flag
)
{
fprintf
(
stderr
,
"Cannot specify alternate core file with executable image.
\n
"
);
fprintf
(
stderr
,
"Cannot specify core file in executable image --- sorry about that.
\n
"
);
exit
(
1
);
}
#endif
...
...
@@ -447,13 +448,15 @@ main(int argc, char *argv[], char *envp[])
}
core
=
*++
argptr
;
if
(
core
==
NULL
)
{
fprintf
(
stderr
,
"-core must be followed by the name of the core file to use.
\n
"
);
fprintf
(
stderr
,
"-core must be followed by the name of the core file to use.
\n
"
);
exit
(
1
);
}
}
else
if
(
strcmp
(
arg
,
"-lib"
)
==
0
)
{
lib
=
*++
argptr
;
if
(
lib
==
NULL
)
{
fprintf
(
stderr
,
"-lib must be followed by a string denoting the CMUCL library path.
\n
"
);
fprintf
(
stderr
,
"-lib must be followed by a string denoting the CMUCL library path.
\n
"
);
exit
(
1
);
}
}
else
if
(
strcmp
(
arg
,
"-dynamic-space-size"
)
==
0
)
{
...
...
@@ -494,7 +497,8 @@ main(int argc, char *argv[], char *envp[])
}
#endif
if
(
dynamic_space_size
>
DYNAMIC_SPACE_SIZE
)
{
fprintf
(
stderr
,
"-dynamic-space-size must be no greater than %d MBytes.
\n
"
,
fprintf
(
stderr
,
"-dynamic-space-size must be no greater than %d MBytes.
\n
"
,
DYNAMIC_SPACE_SIZE
/
(
1024
*
1024
));
exit
(
1
);
}
...
...
@@ -623,12 +627,14 @@ main(int argc, char *argv[], char *envp[])
core
=
argv
[
0
];
}
#endif
globals_init
();
#ifdef FEATURE_EXECUTABLE
if
(
builtin_image_flag
!=
0
)
{
extern
int
image_dynamic_space_size
;
long
allocation_pointer
=
(
long
)
dynamic_0_space
+
(
int
)
&
image_dynamic_space_size
;
#if defined(i386) || defined(__x86_64)
SetSymbolValue
(
ALLOCATION_POINTER
,
(
lispobj
)
allocation_pointer
);
...
...
This diff is collapsed.
Click to expand it.
lisp/save.c
+
26
−
24
View file @
e0ba1b6d
/*
$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/save.c,v 1.1
6
2007/07/0
7 17:25:10
fgilham Exp $
$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/save.c,v 1.1
7
2007/07/0
8 06:58:39
fgilham Exp $
This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University, and has been placed in the public domain.
...
...
@@ -35,29 +35,29 @@ extern int version;
static
long
write_bytes
(
FILE
*
file
,
char
*
addr
,
long
bytes
)
{
long
count
,
here
,
data
;
bytes
=
(
bytes
+
CORE_PAGESIZE
-
1
)
&
~
(
CORE_PAGESIZE
-
1
);
fflush
(
file
);
here
=
ftell
(
file
);
fseek
(
file
,
0
,
2
);
data
=
(
ftell
(
file
)
+
CORE_PAGESIZE
-
1
)
&
~
(
CORE_PAGESIZE
-
1
);
fseek
(
file
,
data
,
0
);
while
(
bytes
>
0
)
{
count
=
fwrite
(
addr
,
1
,
bytes
,
file
);
if
(
count
>
0
)
{
bytes
-=
count
;
addr
+=
count
;
}
else
{
perror
(
"Error writing to save file"
);
bytes
=
0
;
}
}
fflush
(
file
);
fseek
(
file
,
here
,
0
);
return
data
/
CORE_PAGESIZE
-
1
;
long
count
,
here
,
data
;
bytes
=
(
bytes
+
CORE_PAGESIZE
-
1
)
&
~
(
CORE_PAGESIZE
-
1
);
fflush
(
file
);
here
=
ftell
(
file
);
fseek
(
file
,
0
,
2
);
data
=
(
ftell
(
file
)
+
CORE_PAGESIZE
-
1
)
&
~
(
CORE_PAGESIZE
-
1
);
fseek
(
file
,
data
,
0
);
while
(
bytes
>
0
)
{
count
=
fwrite
(
addr
,
1
,
bytes
,
file
);
if
(
count
>
0
)
{
bytes
-=
count
;
addr
+=
count
;
}
else
{
perror
(
"Error writing to save file"
);
bytes
=
0
;
}
}
fflush
(
file
);
fseek
(
file
,
here
,
0
);
return
data
/
CORE_PAGESIZE
-
1
;
}
static
void
...
...
@@ -171,6 +171,7 @@ save(char *filename, lispobj init_function)
print_ptr
((
lispobj
*
)
0x2805a184
);
#endif
#ifdef DEBUG_BAD_HEAP
/*
* For some reason x86 has a heap corruption problem. I (rtoy)
...
...
@@ -228,6 +229,7 @@ save(char *filename, lispobj init_function)
exit
(
0
);
}
#ifdef FEATURE_EXECUTABLE
boolean
save_executable
(
char
*
filename
,
lispobj
init_function
)
...
...
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