hbformat

354 views
Skip to first unread message

Com1 Software

unread,
Jun 17, 2013, 6:18:34 PM6/17/13
to harbou...@googlegroups.com
Hello all,

I have been trying to use hbformat to format some of my source code and I was wondering
if there was any good documentation on the options available and if there is a way
to have it run using the hbformat.ini. I am trying to set the cExtBack and cExtSave as well
as reduce the number of spaces used in the formatting.

Any suggestions are always appreciated.

Thanks
Dave

Maurizio la Cecilia

unread,
Jun 18, 2013, 3:03:22 AM6/18/13
to harbou...@googlegroups.com
H
from changelog.txt:

The command line to call it:
         hbformat [-r] [options] [@config.ini] file[s]

      -r option ( recursive ) forces formatting files in all nested directories.
      Default options ( their values you may find commented in a provided hbformat.ini )
      provides the style, accepted in Harbour prgs. The hbformat.ini must be in the same
      directory, where the hbformat.exe is. You can use additional ini file and point to
      it in a command line with the '@' before it. Options in a command line are the same,
      which are in ini file - for example, -lCase=no forces to not make case conversion.

To know the available options you need to read the hbformat.ini. For each option you'll find the needed info.
Anyway, here is it:

# Eol: -1 - no change, 0 - OS default, 1 - DOS, 2 - UNIX
#nEol = -1

# If true, convert file name to lower case
#lFCaseLow = no

# If yes, converts all tabs to spaces
#lNoTabs = yes

# If yes, indent code
#lIndent = yes

# If yes, make case conversion
#lCase = yes

# If yes, reformat spaces
#lSpaces = yes

# If yes, indent "Function", "Procedure", "Class", "Method"
#lIndFunc = no

# If yes, indent "Local", "Private", etc. in a function beginning
#lIndVar = yes

# If yes, indent  directives
#lIndDrt = no

# If yes, indent  "Return"
#lIndRet  = yes

# Leftmost indent - amount of spaces
#nIndLeft = 3

# indent - amount of spaces
#nIndNext = 3

# Indent for continuation ( after ';' ) lines - amount of spaces
#nIndCont = 3

# If yes, convert asterisk '*' to '//'
#lCnvAst = yes

# If yes, convert '&&' to '//'
#lCnvAmp = yes

# Number of spaces after /* and // comments ( -1 - no change )
#nSpaceComment = 1

# If yes, convert .NOT. TO !
#lCnvNot = yes

# Case of commands ( -1 - no change, 1 - upper, 2 - lower, 3 - title )
#nCaseCmd = 1

# Case of boolean operators ( -1 - no change, 1 - upper, 2 - lower, 3 - title )
#nCaseBoo = 1

# Case of functions ( -1 - no change, 1 - upper, 2 - lower, 3 - title, 4 - as in pattern )
#nCaseFnc = 4

# Case of functions ( -1 - no change, 1 - upper, 2 - lower, 3 - title )
#nCaseUnk = -1

# Case of directives ( -1 - no change, 1 - upper, 2 - lower, 3 - title )
#nCaseDrt = 2

# Number of spaces after # in directives ( -1 - no change )
#nSpaceDrt = 0

# -1 - no change, 1 - insert empty line before a function ( procedure,class ) declaration, 2 - remove it
#nLineFnc = 1

# -1 - no change, 1 - insert empty line before return, 2 - remove it
#nLineRet = 1

# -1 - no change, 1 - insert empty line before variables declaration, 2 - remove it
#nLineVar = 1

# -1 - no change, 1 - insert empty line before code in function, 2 - remove it
#nLineCode = 1

# Max level of nesting in brackets, while space is added after a comma
#nBr4Comma = 1

# Max level of nesting in brackets, while space is added after/before a bracket
#nBr4Brac = 2

# Extension for a formatted file ( if empty - replace original )
#cExtSave =

# Extension for a backup file
#cExtBack = bak

# List of space separated .hbx files for specifying proper casing of function names
#cHBXList =


I hope this helps,
BR
Maurizio



2013/6/18 Com1 Software <infor...@com1software.com>


--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users
 
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages