Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107086177
D43094.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
732 B
Referenced Files
None
Subscribers
None
D43094.diff
View Options
diff --git a/usr.bin/seq/seq.c b/usr.bin/seq/seq.c
--- a/usr.bin/seq/seq.c
+++ b/usr.bin/seq/seq.c
@@ -181,8 +181,9 @@
for (step = 1, cur = first; incr > 0 ? cur <= last : cur >= last;
cur = first + incr * step++) {
+ if (step > 1)
+ fputs(sep, stdout);
printf(fmt, cur);
- fputs(sep, stdout);
prev = cur;
}
@@ -202,15 +203,19 @@
}
if (strcmp(cur_print, last_print) == 0 &&
strcmp(cur_print, prev_print) != 0) {
- fputs(last_print, stdout);
fputs(sep, stdout);
+ fputs(last_print, stdout);
}
free(cur_print);
free(last_print);
free(prev_print);
- if (term != NULL)
+ if (term != NULL) {
+ fputs(sep, stdout);
fputs(term, stdout);
+ }
+
+ fputs("\n", stdout);
return (0);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 10, 9:42 PM (15 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15746957
Default Alt Text
D43094.diff (732 B)
Attached To
Mode
D43094: seq(1): Put separator only between the elements.
Attached
Detach File
Event Timeline
Log In to Comment