cb 832 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. .TH CB 1
  2. .SH NAME
  3. cb \- C program beautifier
  4. .SH SYNOPSIS
  5. .B cb
  6. [
  7. .B -9js
  8. ]
  9. [
  10. .B -l
  11. .I length
  12. ]
  13. [
  14. .I file
  15. \&...
  16. ]
  17. .SH DESCRIPTION
  18. .I Cb
  19. reads syntactically correct C programs from
  20. from its input or the given files, and writes them to its stdout
  21. with a more visually pleasing spacing and indentation.
  22. .I Cb
  23. understands no C++ syntax bar newline-terminated comments;
  24. and by default all user new-lines are preserved in the output.
  25. .PP
  26. The options are:
  27. .TP
  28. .B -j
  29. Join split lines.
  30. .TP
  31. .B -s
  32. Print code in the so-called K&R style used in
  33. .IR "The C Programming Language" .
  34. .TP
  35. .B -l length
  36. Split lines that are longer than
  37. .IR length .
  38. .TP
  39. .B -9
  40. prints code close to Plan 9 style.
  41. .PD
  42. .SH SOURCE
  43. .B /sys/src/cmd/cb
  44. .SH BUGS
  45. .I Cb
  46. does not reformat structure initializers.
  47. .br
  48. Punctuation hidden in macros can cause
  49. indentation errors.