Omit version field in patty_print_frame_header()
This commit is contained in:
parent
c7a51ff7f1
commit
6b603b6048
1 changed files with 3 additions and 16 deletions
19
src/print.c
19
src/print.c
|
@ -31,16 +31,6 @@ static char *frame_type(enum patty_ax25_frame_type type) {
|
|||
return "unknown";
|
||||
}
|
||||
|
||||
static char *version(enum patty_ax25_version version) {
|
||||
switch (version) {
|
||||
case PATTY_AX25_2_0: return "v2.0";
|
||||
case PATTY_AX25_2_2: return "v2.2";
|
||||
case PATTY_AX25_OLD: return "old";
|
||||
}
|
||||
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
static char *frame_cr(enum patty_ax25_frame_cr cr) {
|
||||
switch (cr) {
|
||||
case PATTY_AX25_FRAME_COMMAND: return "cmd";
|
||||
|
@ -97,9 +87,8 @@ int patty_print_frame_header(FILE *fh,
|
|||
}
|
||||
|
||||
if (PATTY_AX25_FRAME_CONTROL_I(frame->control)) {
|
||||
if (fprintf(fh, " (%s %s %s N(R)=%d N(S)=%d P/F=%d info=%zu)",
|
||||
if (fprintf(fh, " (%s %s N(R)=%d N(S)=%d P/F=%d info=%zu)",
|
||||
frame_type(frame->type),
|
||||
version(frame->version),
|
||||
frame_cr(frame->cr),
|
||||
(int)frame->nr,
|
||||
(int)frame->ns,
|
||||
|
@ -108,9 +97,8 @@ int patty_print_frame_header(FILE *fh,
|
|||
goto error_io;
|
||||
}
|
||||
} else if (PATTY_AX25_FRAME_CONTROL_U(frame->control)) {
|
||||
if (fprintf(fh, " (%s %s %s P/F=%d",
|
||||
if (fprintf(fh, " (%s %s P/F=%d",
|
||||
frame_type(frame->type),
|
||||
version(frame->version),
|
||||
frame_cr(frame->cr),
|
||||
(int)frame->pf) < 0) {
|
||||
goto error_io;
|
||||
|
@ -126,9 +114,8 @@ int patty_print_frame_header(FILE *fh,
|
|||
goto error_io;
|
||||
}
|
||||
} else if (PATTY_AX25_FRAME_CONTROL_S(frame->control)) {
|
||||
if (fprintf(fh, " (%s %s %s N(R)=%d P/F=%d)",
|
||||
if (fprintf(fh, " (%s %s N(R)=%d P/F=%d)",
|
||||
frame_type(frame->type),
|
||||
version(frame->version),
|
||||
frame_cr(frame->cr),
|
||||
(int)frame->nr,
|
||||
(int)frame->pf) < 0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue