diff --git a/lib.c b/lib.c index 69320ae..cb84e68 100644 --- a/lib.c +++ b/lib.c @@ -258,18 +258,6 @@ int parse_canframe(char *cs, struct canfd_frame *cf) return ret; } -void fprint_canframe(FILE *stream, struct canfd_frame *cf, char *eol, int sep) -{ - /* documentation see lib.h */ - - char buf[CL_CFSZ]; /* max length */ - - sprint_canframe(buf, cf, sep); - fprintf(stream, "%s", buf); - if (eol) - fprintf(stream, "%s", eol); -} - int sprint_canframe(char *buf, struct canfd_frame *cf, int sep) { /* documentation see lib.h */ @@ -353,22 +341,6 @@ int sprint_canframe(char *buf, struct canfd_frame *cf, int sep) return offset; } -void fprint_long_canframe(FILE *stream, struct canfd_frame *cf, char *eol, int view) -{ - /* documentation see lib.h */ - - char buf[CL_LONGCFSZ]; - - sprint_long_canframe(buf, cf, view); - fprintf(stream, "%s", buf); - if ((view & CANLIB_VIEW_ERROR) && (cf->can_id & CAN_ERR_FLAG)) { - snprintf_can_error_frame(buf, sizeof(buf), cf, "\n\t"); - fprintf(stream, "\n\t%s", buf); - } - if (eol) - fprintf(stream, "%s", eol); -} - int sprint_long_canframe(char *buf, struct canfd_frame *cf, int view) { /* documentation see lib.h */ diff --git a/lib.h b/lib.h index 6b49759..fc58814 100644 --- a/lib.h +++ b/lib.h @@ -160,7 +160,6 @@ int parse_canframe(char *cs, struct canfd_frame *cf); * - CAN FD frames do not have a RTR bit */ -void fprint_canframe(FILE *stream , struct canfd_frame *cf, char *eol, int sep); int sprint_canframe(char *buf , struct canfd_frame *cf, int sep); /* * Creates a CAN frame hexadecimal output in compact format. @@ -180,11 +179,6 @@ int sprint_canframe(char *buf , struct canfd_frame *cf, int sep); * 123##0112233 -> CAN FD frame standard CAN-Id = 0x123, flags = 0, len = 3 * 123##2112233 -> CAN FD frame, flags = CANFD_ESI, len = 3 * - * Examples: - * - * fprint_canframe(stdout, &frame, "\n", 0); // with eol to STDOUT - * fprint_canframe(stderr, &frame, NULL, 0); // no eol to STDERR - * */ #define CANLIB_VIEW_ASCII 0x1 @@ -196,7 +190,6 @@ int sprint_canframe(char *buf , struct canfd_frame *cf, int sep); #define SWAP_DELIMITER '`' -void fprint_long_canframe(FILE *stream , struct canfd_frame *cf, char *eol, int view); int sprint_long_canframe(char *buf , struct canfd_frame *cf, int view); /* * Creates a CAN frame hexadecimal output in user readable format. @@ -216,14 +209,6 @@ int sprint_long_canframe(char *buf , struct canfd_frame *cf, int view); * 123 [3] 11 22 33 -> CANLIB_VIEW_INDENT_SFF == 0 * 123 [3] 11 22 33 -> CANLIB_VIEW_INDENT_SFF == set * - * Examples: - * - * // CAN FD frame with eol to STDOUT - * fprint_long_canframe(stdout, &frame, "\n", 0); - * - * // Classical CAN 2.0 frame without eol to STDERR - * fprint_long_canframe(stderr, &frame, NULL, 0); - * */ int snprintf_can_error_frame(char *buf, size_t len, const struct canfd_frame *cf,