Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
1dfe52e5
Commit
1dfe52e5
authored
May 05, 2013
by
crimsonwoods
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix typos.
parent
7d134d94
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
13 deletions
+13
-13
include/mruby/dump.h
include/mruby/dump.h
+8
-8
src/dump.c
src/dump.c
+2
-2
src/load.c
src/load.c
+3
-3
No files found.
include/mruby/dump.h
View file @
1dfe52e5
...
...
@@ -42,16 +42,16 @@ mrb_value mrb_load_irep_file(mrb_state*,FILE*);
#define MRB_DUMP_NULL_SYM_LEN 0xFFFF
/* Rite Binary File header */
#define RITE_BINARY_IDEN
FIFIER
"RITE"
#define RITE_BINARY_FORMAT_VER "0001"
#define RITE_COMPILER_NAME "MATZ"
#define RITE_COMPILER_VERSION "0000"
#define RITE_BINARY_IDEN
TIFIER
"RITE"
#define RITE_BINARY_FORMAT_VER
"0001"
#define RITE_COMPILER_NAME
"MATZ"
#define RITE_COMPILER_VERSION
"0000"
#define RITE_VM_VER "0000"
#define RITE_VM_VER
"0000"
#define RITE_BINARY_EOF "END\0"
#define RITE_SECTION_IREP_IDENTIFIER "IREP"
#define RITE_SECTION_LIENO_IDENTIFIER "LINE"
#define RITE_BINARY_EOF
"END\0"
#define RITE_SECTION_IREP_IDENTIFIER
"IREP"
#define RITE_SECTION_LI
N
ENO_IDENTIFIER "LINE"
#define MRB_DUMP_DEFAULT_STR_LEN 128
...
...
src/dump.c
View file @
1dfe52e5
...
...
@@ -304,7 +304,7 @@ mrb_write_section_lineno_header(mrb_state *mrb, uint32_t section_size, uint16_t
struct
rite_section_lineno_header
*
header
=
(
struct
rite_section_lineno_header
*
)
bin
;
// TODO
memcpy
(
header
->
section_identify
,
RITE_SECTION_LIENO_IDENTIFIER
,
sizeof
(
header
->
section_identify
));
memcpy
(
header
->
section_identify
,
RITE_SECTION_LI
N
ENO_IDENTIFIER
,
sizeof
(
header
->
section_identify
));
uint32_to_bin
(
section_size
,
header
->
section_size
);
uint16_to_bin
(
nirep
,
header
->
nirep
);
uint16_to_bin
(
sirep
,
header
->
sirep
);
...
...
@@ -396,7 +396,7 @@ write_rite_binary_header(mrb_state *mrb, size_t binary_size, uint8_t* bin)
uint16_t
crc
;
size_t
offset
;
memcpy
(
header
->
binary_identify
,
RITE_BINARY_IDEN
F
IFIER
,
sizeof
(
header
->
binary_identify
));
memcpy
(
header
->
binary_identify
,
RITE_BINARY_IDEN
T
IFIER
,
sizeof
(
header
->
binary_identify
));
memcpy
(
header
->
binary_version
,
RITE_BINARY_FORMAT_VER
,
sizeof
(
header
->
binary_version
));
memcpy
(
header
->
compiler_name
,
RITE_COMPILER_NAME
,
sizeof
(
header
->
compiler_name
));
memcpy
(
header
->
compiler_version
,
RITE_COMPILER_VERSION
,
sizeof
(
header
->
compiler_version
));
...
...
src/load.c
View file @
1dfe52e5
...
...
@@ -309,7 +309,7 @@ read_rite_binary_header(const uint8_t *bin, size_t *bin_size, uint16_t *crc)
{
const
struct
rite_binary_header
*
header
=
(
const
struct
rite_binary_header
*
)
bin
;
if
(
memcmp
(
header
->
binary_identify
,
RITE_BINARY_IDEN
F
IFIER
,
sizeof
(
header
->
binary_identify
))
!=
0
)
{
if
(
memcmp
(
header
->
binary_identify
,
RITE_BINARY_IDEN
T
IFIER
,
sizeof
(
header
->
binary_identify
))
!=
0
)
{
return
MRB_DUMP_INVALID_FILE_HEADER
;
}
...
...
@@ -362,7 +362,7 @@ mrb_read_irep(mrb_state *mrb, const uint8_t *bin)
}
total_nirep
+=
result
;
}
else
if
(
memcmp
(
section_header
->
section_identify
,
RITE_SECTION_LIENO_IDENTIFIER
,
sizeof
(
section_header
->
section_identify
))
==
0
)
{
else
if
(
memcmp
(
section_header
->
section_identify
,
RITE_SECTION_LI
N
ENO_IDENTIFIER
,
sizeof
(
section_header
->
section_identify
))
==
0
)
{
result
=
read_rite_section_lineno
(
mrb
,
bin
,
sirep
);
if
(
result
<
MRB_DUMP_OK
)
{
return
result
;
...
...
@@ -601,7 +601,7 @@ mrb_read_irep_file(mrb_state *mrb, FILE* fp)
}
total_nirep
+=
result
;
}
else
if
(
memcmp
(
section_header
.
section_identify
,
RITE_SECTION_LIENO_IDENTIFIER
,
sizeof
(
section_header
.
section_identify
))
==
0
)
{
else
if
(
memcmp
(
section_header
.
section_identify
,
RITE_SECTION_LI
N
ENO_IDENTIFIER
,
sizeof
(
section_header
.
section_identify
))
==
0
)
{
fseek
(
fp
,
fpos
,
SEEK_SET
);
result
=
read_rite_section_lineno_file
(
mrb
,
fp
,
sirep
);
if
(
result
<
MRB_DUMP_OK
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment