Attention is currently required from: laforge, pespin.
falconia has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/39558?usp=email )
Change subject: tests: add trau2rtp_gen program ......................................................................
Patch Set 2:
(3 comments)
Patchset:
PS1:
You could maybe add a comment in the _gen. […]
I was not able to come up with an aesthetically pleasing way to incorporate both TRAU-16k and TRAU-8k input examples into the big header comment at the top of the C file, so I took a different approach: I wrote a separate text file that serves as a mini-manual for the program, covering input and output hex formats and other info I expect to be useful.
File tests/trau_conv/trau2rtp_gen.c:
https://gerrit.osmocom.org/c/libosmo-abis/+/39558/comment/12e83726_99a2b3df?... : PS1, Line 150: inv: fprintf(stderr, "%s line %d: invalid syntax\n", infname, lineno);
we usually put goto tags on its own line.
I made the requested change in Patchset 2. To make it more aesthetically pleasing in the new split-line arrangement, I changed the goto label from `inv:` to `inv_syntax:`, which is also more descriptive.
https://gerrit.osmocom.org/c/libosmo-abis/+/39558/comment/9922f4b6_1b12d113?... : PS1, Line 212: usage: fprintf(stderr, "usage: %s [-8] [-d] [-x] input-file [output-file]\n",
we usually put goto tags on its own line.
In this particular case I really don't want to change it. This goto-reached code block is already out of the way of regular code flow, moved to the end of the function after `exit()`, and when the label is short enough to fit neatly into the space allocated by the leading tab, the style I wrote here is more aesthetically pleasing than the same short label on its own line, followed by `fprintf()` and `exit()` lines.
Alternatively, I could change the style if you suggest changing `usage:` to some longer label that would look more natural on a line by itself.