lib: remove obsolete fprint_(long_)canframe functions
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>pull/504/head
parent
3b36edf128
commit
f491175d72
28
lib.c
28
lib.c
|
|
@ -258,18 +258,6 @@ int parse_canframe(char *cs, struct canfd_frame *cf)
|
||||||
return ret;
|
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)
|
int sprint_canframe(char *buf, struct canfd_frame *cf, int sep)
|
||||||
{
|
{
|
||||||
/* documentation see lib.h */
|
/* documentation see lib.h */
|
||||||
|
|
@ -353,22 +341,6 @@ int sprint_canframe(char *buf, struct canfd_frame *cf, int sep)
|
||||||
return offset;
|
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)
|
int sprint_long_canframe(char *buf, struct canfd_frame *cf, int view)
|
||||||
{
|
{
|
||||||
/* documentation see lib.h */
|
/* documentation see lib.h */
|
||||||
|
|
|
||||||
15
lib.h
15
lib.h
|
|
@ -160,7 +160,6 @@ int parse_canframe(char *cs, struct canfd_frame *cf);
|
||||||
* - CAN FD frames do not have a RTR bit
|
* - 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);
|
int sprint_canframe(char *buf , struct canfd_frame *cf, int sep);
|
||||||
/*
|
/*
|
||||||
* Creates a CAN frame hexadecimal output in compact format.
|
* 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##0112233 -> CAN FD frame standard CAN-Id = 0x123, flags = 0, len = 3
|
||||||
* 123##2112233 -> CAN FD frame, flags = CANFD_ESI, 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
|
#define CANLIB_VIEW_ASCII 0x1
|
||||||
|
|
@ -196,7 +190,6 @@ int sprint_canframe(char *buf , struct canfd_frame *cf, int sep);
|
||||||
|
|
||||||
#define SWAP_DELIMITER '`'
|
#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);
|
int sprint_long_canframe(char *buf , struct canfd_frame *cf, int view);
|
||||||
/*
|
/*
|
||||||
* Creates a CAN frame hexadecimal output in user readable format.
|
* 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 == 0
|
||||||
* 123 [3] 11 22 33 -> CANLIB_VIEW_INDENT_SFF == set
|
* 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,
|
int snprintf_can_error_frame(char *buf, size_t len, const struct canfd_frame *cf,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue