Sponsored Content
Full Discussion: Coding Style checking
Top Forums Programming Coding Style checking Post 302899699 by jim mcnamara on Wednesday 30th of April 2014 05:11:24 PM
Old 04-30-2014
What you probably want is a code beautifier. Run one of those against your code, and do a diff on the original versus the new.

indent is already there on most Linux boxes. Plus, it is freeware and is available for most other flavors of UNIX.

Code:
indent -prs -br -i 4 inputfile.c > temp
diff inputfile.c temp

 

7 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

Style not working right

:( The style "Craig's InfoPop" doesn't wrap lines on Netscape 4.79. It seems to work okay on MSIE. When I get home, I'll check on FBSD/Mozilla 1.0. Back to Silk Road ... (3 Replies)
Discussion started by: criglerj
3 Replies

2. Post Here to Contact Site Administrators and Moderators

New Style

Hi, I pop in here every so oftern and was suprised to see the changes in colour. I think the new style/colour is great :D (1 Reply)
Discussion started by: Ralf
1 Replies

3. AIX

Dashboard style tool(s)?

I was wondering if anyone knows of any dashboard style tools for AIX. One of my many responsibilities is to report the status of the boxes and whether certain things are "up" and running each and every day. Nonetheless, this is a MAJOR pain as I have to logon to each box, pull up URLs through my... (3 Replies)
Discussion started by: dsimpg1
3 Replies

4. Solaris

CDE Style Manager

How would one go about adding or removing the applications (keyboard, mouse, beep, screen, etc) from CDE's style manager (/usr/dt/bin/dtstyle)? running solaris 5.10 (4 Replies)
Discussion started by: eddiet
4 Replies

5. What is on Your Mind?

Old Style Computing and Networking

Does any one know what uucp stands for, what gopher is, does any one go BBS and edit with ed? If yes, are there any uucp providers today? Sometimes i get bored by all the Web @@@@ , and feel lonely in the world without uucp and free (realy free - no stupid Spamhaus etc) mailing lists. TIA Action (14 Replies)
Discussion started by: Action
14 Replies

6. Shell Programming and Scripting

Programming guidelines and style

Hello all, I would like to know if there is a generally accepted unix shell programming Guideline? Do you have any idea where to find this? There are a lot of programming Guidelines to find over Google, but is there one who is generally accepted? (3 Replies)
Discussion started by: API
3 Replies

7. What is on Your Mind?

Coding Style at UNIX.com forums

Hi, as I mentioned in this thread(https://www.unix.com/shell-programming-and-scripting/280737-awk-function-return-permutations-n-items-out-m.html), a helpful coding style may improve overall value and support for people who come here and want to learn things the participants from unix.com have... (2 Replies)
Discussion started by: stomp
2 Replies
GENDIFF(1)						      General Commands Manual							GENDIFF(1)

NAME
gendiff - utility to aid in error-free diff file generation SYNOPSIS
gendiff <directory> <diff-extension> DESCRIPTION
gendiff is a rather simple script which aids in generating a diff file from a single directory. It takes a directory name and a "diff- extension" as its only arguments. The diff extension should be a unique sequence of characters added to the end of all original, unmodi- fied files. The output of the program is a diff file which may be applied with the patch program to recreate the changes. The usual sequence of events for creating a diff is to create two identical directories, make changes in one directory, and then use the diff utility to create a list of differences between the two. Using gendiff eliminates the need for the extra, original and unmodified directory copy. Instead, only the individual files that are modified need to be saved. Before editing a file, copy the file, appending the extension you have chosen to the filename. I.e. if you were going to edit somefile.cpp and have chosen the extension "fix", copy it to somefile.cpp.fix before editing it. Then edit the first copy (somefile.cpp). After editing all the files you need to edit in this fashion, enter the directory one level above where your source code resides, and then type $ gendiff somedirectory .fix > mydiff-fix.patch You should redirect the output to a file (as illustrated) unless you want to see the results on stdout. SEE ALSO
diff(1), patch(1) AUTHOR
Marc Ewing <marc@redhat.com> 4th Berkeley Distribution Mon Jan 10 2000 GENDIFF(1)
All times are GMT -4. The time now is 07:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy