ccmt - grep c-lang cmt with visible/printf line oriented format
ccmt [
-hHVBE] [
files...]
~$ printf '"//"\n /*-\n*/\n' | ccmt #>> output /*-*/
~$ ccmt a.txt b.txt #>> cat a.txt b.txt|ccmt
~$ ccmt <a.txt | while read -r a;do printf "$a"; done
- -h, -H, -V
- usage, version
- -B
- use BRE innercode for dbg (dfl)
- -E
- use ERE innercode for dbg (use gnu-sed)
- files...
- use src 'cat files...'. cat /dev/stdin is noarg.
ccmt grep c-lang cmt //, /**/. ccmt assumes the src doesnt holds
trigraphs ??X and long-line syntax \(\n).
output is 1-line == 1-cmt. non-printable chars is escaped as \001, \n and printf
'$line' outputs raw comment strings.
always $? == 0. return !0 if the options is invalid.
-
posix-shell
Copyright (C) 2022 Momi-g
License GPLv3+ <https://gnu.org/licenses/gpl.html>
2022-03-20 v1.0.1 (2022-03-18 v1.0.0)
sed(1)
https://gcc.gnu.org/onlinedocs/gcc-3.2.3/cpp/Initial-processing.html