Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
678bc1f5
Commit
678bc1f5
authored
Jul 08, 2009
by
Chong Yidong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* b2m.c (main): Ensure that each message ends in two newlines.
parent
88d03607
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
lib-src/ChangeLog
lib-src/ChangeLog
+4
-0
lib-src/b2m.c
lib-src/b2m.c
+14
-3
No files found.
lib-src/ChangeLog
View file @
678bc1f5
2009-07-08 E. Jay Berkenbilt <ejb@ql.org> (tiny change)
* b2m.c (main): Ensure that each message ends in two newlines.
2009-07-03 Jason Rumney <jasonr@gnu.org>
* emacsclient.c (w32_set_user_model_id): Use standard types.
...
...
lib-src/b2m.c
View file @
678bc1f5
...
...
@@ -94,7 +94,7 @@ main (argc, argv)
int
argc
;
char
**
argv
;
{
logical
labels_saved
,
printing
,
header
;
logical
labels_saved
,
printing
,
header
,
first
,
last_was_blank_line
;
time_t
ltoday
;
struct
tm
*
tm
;
char
*
labels
,
*
p
,
*
today
;
...
...
@@ -139,7 +139,8 @@ main (argc, argv)
exit
(
EXIT_SUCCESS
);
}
labels_saved
=
printing
=
header
=
FALSE
;
labels_saved
=
printing
=
header
=
last_was_blank_line
=
FALSE
;
first
=
TRUE
;
ltoday
=
time
(
0
);
/* Convert to a string, checking for out-of-range time stamps.
Don't use 'ctime', as that might dump core if the hardware clock
...
...
@@ -170,6 +171,10 @@ main (argc, argv)
continue
;
else
if
(
data
.
buffer
[
1
]
==
'\f'
)
{
if
(
first
)
first
=
FALSE
;
else
if
(
!
last_was_blank_line
)
puts
(
""
);
/* Save labels. */
readline
(
&
data
,
stdin
);
p
=
strtok
(
data
.
buffer
,
" ,
\r\n\t
"
);
...
...
@@ -195,7 +200,13 @@ main (argc, argv)
}
if
(
printing
)
{
puts
(
data
.
buffer
);
if
(
data
.
buffer
[
0
]
==
'\0'
)
last_was_blank_line
=
TRUE
;
else
last_was_blank_line
=
FALSE
;
}
}
return
EXIT_SUCCESS
;
...
...
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