In linux, indenting the C code is very easy only if you happen to know tools for doing it. One such tool is "indent". It is a linux command that can be used to indent the C code. By default it indents the code in "gnu" style.
>indent file.cBy using this command, we can even convert from one C style to another. For instance if you are acquainted to linux style of coding but you have a file that is in different style of coding, then use this command to convert the coding style to linux style of coding
>indent -linux file.cHere, linux is an option to indent. There are many more options, so start exploring.
No comments:
Post a Comment