Comments (1)
How do you think about to integrate the following change possibilities besides further source code adjustments? 🤔
diff --git a/ui/report.c b/ui/report.c
index 9301480..15f6767 100644
--- a/ui/report.c
+++ b/ui/report.c
@@ -45,6 +45,12 @@
#define MAXLOADBAL 5
#define MAX_FORMAT_STR 320
+#define LINE_BREAK_OUTPUT \
+ if (putchar('\n') != '\n') { \
+ perror("Output failed for a line break"); \
+ exit(EXIT_FAILURE); \
+ }
+
void report_open(
void)
@@ -385,7 +391,8 @@ void json_close(struct mtr_ctl *ctl)
if (ret == -1)
goto on_error;
- printf("\n"); // bash prompt should be on new line
+ // bash prompt should be on new line
+ LINE_BREAK_OUTPUT
json_decref(jreport);
return;
on_error:
@@ -500,7 +507,8 @@ void csv_close(
continue;
printf("%s,", data_fields[j].title);
}
- printf("\n");
+
+ LINE_BREAK_OUTPUT
}
#ifdef HAVE_IPINFO
if (!ctl->ipinfo_no) {
@@ -527,7 +535,9 @@ void csv_close(
printf(",%d", data_fields[j].net_xxx(at));
}
}
- printf("\n");
+
+ LINE_BREAK_OUTPUT
+
if (ctl->reportwide == 0)
continue;
@@ -580,7 +590,8 @@ void csv_close(
printf(",%d", data_fields[j].net_xxx(at));
}
}
- printf("\n");
+
+ LINE_BREAK_OUTPUT
}
}
}
from mtr.
Related Issues (20)
- Using the -f option changes the packet rate. HOT 1
- Next release
- Show whether ICMP, UDP, or TCP is currently used HOT 1
- Show target ip when use -r or -j HOT 1
- BUG: Interface-specific binding and packet marking broken HOT 13
- Show source address when use -r HOT 1
- Proposal: Refactor Address Selection Logic for Enhanced Compatibility and Testability HOT 5
- MaxMind DB for Location HOT 9
- where can i get mtr 0.95? HOT 2
- traceroute does not stop on subnet router anycast addresses on linux routers HOT 2
- Implement DNF flag to set/clear Do Not Fragment bit
- Problems running on Ubuntu 22.04, routing information is displayed incompletely, only part of it is displayed, can't get to the final destination HOT 6
- Two host lines for each hop (regression between 0.92 and 0.95?)
- What is the meaning of 'Received error response' HOT 2
- MTR hangs on IPv6 UDP trace when both --localport and --port are specified.
- mtr-packet returns "invalid argument" for IPv6 probe command HOT 1
- Packet type unsupported HOT 8
- TCP (not TLS) RTT time report not measuring the RTT. HOT 12
- Privacy question HOT 3
- What does '???' at the last hop mean? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mtr.