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
1a5841b4
Commit
1a5841b4
authored
Jun 05, 2014
by
cremno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use uppercase US-ASCII ctype macros
parent
f9f864d4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
mrbgems/mruby-bin-mirb/tools/mirb/mirb.c
mrbgems/mruby-bin-mirb/tools/mirb/mirb.c
+2
-2
src/parse.y
src/parse.y
+5
-5
No files found.
mrbgems/mruby-bin-mirb/tools/mirb/mirb.c
View file @
1a5841b4
...
@@ -258,7 +258,7 @@ check_keyword(const char *buf, const char *word)
...
@@ -258,7 +258,7 @@ check_keyword(const char *buf, const char *word)
size_t
len
=
strlen
(
word
);
size_t
len
=
strlen
(
word
);
/* skip preceding spaces */
/* skip preceding spaces */
while
(
*
p
&&
isspace
(
*
p
))
{
while
(
*
p
&&
ISSPACE
(
*
p
))
{
p
++
;
p
++
;
}
}
/* check keyword */
/* check keyword */
...
@@ -268,7 +268,7 @@ check_keyword(const char *buf, const char *word)
...
@@ -268,7 +268,7 @@ check_keyword(const char *buf, const char *word)
p
+=
len
;
p
+=
len
;
/* skip trailing spaces */
/* skip trailing spaces */
while
(
*
p
)
{
while
(
*
p
)
{
if
(
!
isspace
(
*
p
))
return
0
;
if
(
!
ISSPACE
(
*
p
))
return
0
;
p
++
;
p
++
;
}
}
return
1
;
return
1
;
...
...
src/parse.y
View file @
1a5841b4
...
@@ -42,7 +42,7 @@ static void yywarning(parser_state *p, const char *s);
...
@@ -42,7 +42,7 @@ static void yywarning(parser_state *p, const char *s);
static void backref_error(parser_state *p, node *n);
static void backref_error(parser_state *p, node *n);
static void tokadd(parser_state *p, int32_t c);
static void tokadd(parser_state *p, int32_t c);
#define identchar(c) (
isalnum
(c) || (c) == '_' || !ISASCII(c))
#define identchar(c) (
ISALNUM
(c) || (c) == '_' || !ISASCII(c))
typedef unsigned int stack_type;
typedef unsigned int stack_type;
...
@@ -4202,14 +4202,14 @@ parser_yylex(parser_state *p)
...
@@ -4202,14 +4202,14 @@ parser_yylex(parser_state *p)
static const char end[] = "\n=end";
static const char end[] = "\n=end";
if (peeks(p, begin)) {
if (peeks(p, begin)) {
c = peekc_n(p, sizeof(begin)-1);
c = peekc_n(p, sizeof(begin)-1);
if (c < 0 ||
isspace
(c)) {
if (c < 0 ||
ISSPACE
(c)) {
do {
do {
if (!skips(p, end)) {
if (!skips(p, end)) {
yyerror(p, "embedded document meets end of file");
yyerror(p, "embedded document meets end of file");
return 0;
return 0;
}
}
c = nextc(p);
c = nextc(p);
} while (!(c < 0 ||
isspace
(c)));
} while (!(c < 0 ||
ISSPACE
(c)));
if (c != '\n') skip(p, '\n');
if (c != '\n') skip(p, '\n');
p->lineno++;
p->lineno++;
p->column = 0;
p->column = 0;
...
@@ -4334,7 +4334,7 @@ parser_yylex(parser_state *p)
...
@@ -4334,7 +4334,7 @@ parser_yylex(parser_state *p)
yyerror(p, "incomplete character syntax");
yyerror(p, "incomplete character syntax");
return 0;
return 0;
}
}
if (
isspace
(c)) {
if (
ISSPACE
(c)) {
if (!IS_ARG()) {
if (!IS_ARG()) {
int c2;
int c2;
switch (c) {
switch (c) {
...
@@ -5187,7 +5187,7 @@ parser_yylex(parser_state *p)
...
@@ -5187,7 +5187,7 @@ parser_yylex(parser_state *p)
pushback(p, c);
pushback(p, c);
}
}
}
}
if (result == 0 &&
isupper((int)(unsigned char)
tok(p)[0])) {
if (result == 0 &&
ISUPPER(
tok(p)[0])) {
result = tCONSTANT;
result = tCONSTANT;
}
}
else {
else {
...
...
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