Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nuttx-apps
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
f4grx
nuttx-apps
Commits
e6743f83
Commit
e6743f83
authored
10 years ago
by
Gregory Nutt
Browse files
Options
Downloads
Patches
Plain Diff
CLE: Last bugfix commit was insufficient
parent
f1fc9231
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
system/cle/cle.c
+11
-25
11 additions, 25 deletions
system/cle/cle.c
with
11 additions
and
25 deletions
system/cle/cle.c
+
11
−
25
View file @
e6743f83
...
...
@@ -824,45 +824,31 @@ static int cle_editloop(FAR struct cle_s *priv)
}
break
;
/* Newline terminates editing */
/* Newline terminates editing
. But what is a newline?
*/
#if defined(CONFIG_EOL_IS_CR)
#if defined(CONFIG_EOL_IS_CR)
|| defined(CONFIG_EOL_IS_EITHER_CRLF)
case
'\r'
:
/* CR terminates line */
{
/* Add the newline character to the buffer */
cle_insertch
(
priv
,
'\n'
);
return
OK
;
}
break
;
#elif defined(CONFIG_EOL_IS_BOTH_CRLF)
case
'\r'
:
/* Wait for the LF */
break
;
#endif
#elif defined(CONFIG_EOL_IS_LF) || defined(CONFIG_EOL_IS_BOTH_CRLF) || \
defined(CONFIG_EOL_IS_EITHER_CRLF)
#if defined(CONFIG_EOL_IS_LF) || defined(CONFIG_EOL_IS_BOTH_CRLF)
case
'\n'
:
/* LF terminates line */
#endif
{
/* Add the newline character to the buffer */
/* Add the newline character to the buffer
at the end of the line
*/
priv
->
curpos
=
priv
->
nchars
;
cle_insertch
(
priv
,
'\n'
);
cle_putch
(
priv
,
'\n'
);
return
OK
;
}
break
;
#endif
#ifdef CONFIG_EOL_IS_EITHER_CRLF
case
'\r'
:
/* Either CR or LF terminates line */
case
'\n'
:
{
/* Add the newline character to the buffer */
cle_insertch
(
priv
,
'\n'
);
return
OK
;
}
#if defined(CONFIG_EOL_IS_BOTH_CRLF)
case
'\r'
:
/* Wait for the LF */
break
;
#endif
/* Text to insert or unimplemented/invalid keypresses */
default:
...
...
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