###############################################################################
GC GreatCode
Christophe Beaudet (1998)
GC Version 1.140
email: cbeaudet@club-internet.fr
homepage: http://perso.club-internet.fr/cbeaudet
The author declines responsability for bad results, corrupted source files
and so on... You must backup your files before using GC on them.
GC is freeware, open source, and so one. You can do what you want with
it, without any restriction.
(and sorry for my bad English -:).
###############################################################################
1/ How to use GC ?
2/ Options description
3/ Special comments
*******************************************************************************
* *
* *
* HOW TO USE GC ? *
* *
* *
*******************************************************************************
GC is a console application. The best way to use it is as an external
tool in your IDE.
For example in DevStudio 5/6 :
1/ Menu Tools/Customize.
2/ Select the "Tool" tab.
3/ Add GC as a new tool.
Command: C:\Tools\GC\GC.exe (example)
Arguments: -file-"$(FilePath)"
Initial directory: C:\Tools\GC (or see *)
You can then associate a shortkey to that tool :
1/ Menu Tools/Customize/Keyboard
2/ Category Tools
3/ Command UserTool<num> where num is the rank of GC in the external
tool list.
4/ And then choose a keyboard shortcut.
If you don't want a message box each time you press the shortcut :
1/ Menu Tools/Options.
2/ Select the "Editor" tab.
3/ "Automatic reload of externally modified files" must be ON.
For vc 7
Menu Tools/External Tools
Add:
Command: c:\bin\gc
Arguments: -file-$(ItemPath)
Initial dir: $(SolutionDir)
enable Use Output directory
for keyboard short cut use
Menu Tools/Options
Choose Environment/Keyboard
In show command containing type the number of the command
( you have to count them on your finger in the menu :)
select externalcommand[n]
enter shortcut key
Note: Place your configuration file in the Solution Directory
and all your file in the solution will be formatted using this
configuration file.
You can still use GC directly at the command prompt :
GC -file-myfile.c -option- -option-
GC searches a GC.cfg file to get a list of options.
Looks first in the working directory and if found uses this file.
If not found looks in the executable directory.
* Configuration file placement:
You can obviously simply use one global cfg and place it in the same
directory as gc.exe then the Initial Directory should be the same
as the executable.
If you place the configuration file with you project in 5/6 or with
the solution in 7 and set the initial directory in the tool to
Initial Directory: 5/6 : $(WkspDir)
7 : $(SolutionDir)
then all your files within your project/solution will be formatted using
the same configuration file.
*******************************************************************************
* *
* *
* OPTIONS DESCRIPTION *
* *
* *
*******************************************************************************
===============================================================================
Syntax
===============================================================================
GC -option-[param]
GC -option-["param with a blank"]
Example :
GC -file-myfile.c -no-output-
GC -file-*.c -file-*.h -no-output-
GC -file-"c:/my dir with a blank/myfile.c"
===============================================================================
List
===============================================================================
-in_cfg-
-dir-
-direx-
-file-
-fileex-
-file_insert-
-file_end_eol-
-output-
-output_test-
-overwrite_read_only-
-verbose-
-bak-
-tab_size-
-tab_out-
-eol_unix-
-space_if-
-space_return-
-space_fctcall-
-space_fctcall_firstparam-
-space_fctcall_lastparam-
-space_fctcall_inparam-
-space_fctdecl_firstparam-
-space_fctdecl_lastparam-
-space_fctdef_firstparam-
-space_fctdef_lastparam-
-space_fctdecl-
-space_fctdef-
-space_paren-
-space_cast-
-space_cast_after-
-space_scope_def-
-space_scope_access-
-space_affect_style-
-space_autoaffect_style-
-code_eol_after_close_brace-
-code_len-
-code_keep_empty_lines-
-code_keep_more_empty_lines-
-code_remove_empty_lines-
-code_split_bool_before-
-code_split_fctcall_style-
-code_split_fctdef_style-
-code_split_fctdecl_style-
-code_split_for_style-
-code_split_if_style-
-code_split_decl_style-
-code_constructor_style-
-code_decl_move_affect-
-code_decl_move_top-
-code_decl_access_to_type-
-code_decl_break_template-
-code_decl_add_void-
-code_wizard_indent-
-code_force_return_paren-
-code_remove_return_paren-
-code_align_max_blanks-
-code_def_fct_break_return_type-
-code_concat_strings-
-code_empty_fct_blanks-
-catch_eol_before-
-code_class_access_eol_before-
-code_class_access_eol_after-
-code_labels_eol_after-
-stmt_force_brace-
-stmt_break_alone-
-stmt_break_dowhile-
-stmt_concat_if-
-stmt_concat_else_2_stmt-
-stmt_concat_if_and_else-
-stmt_concat_else_if-
-stmt_concat_inline_class-
-stmt_concat_switch-
-stmt_concat_macros-
-stmt_concat_enum-
-stmt_decl_remove_empty-
-stmt_concat_if_remove_empty-
-stmt_brace_style_class-
-stmt_brace_style_fct-
-stmt_brace_style_decl-
-stmt_brace_style-
-stmt_switch_style-
-stmt_switch_eol-
-stmt_class_indent-
-stmt_namespace_indent-
-stmt_extern_c_indent-
-stmt_static_init_style-
-stmt_static_init_len-
-pp_align_to_code-
-pp_style-
-pp_include_unix-
-pp_align_breakline-
-cmt_fixme-
-cmt_align_max_blanks-
-cmt_dont_modify-
-cmt_keep-char_1-
-cmt_keep-char_2-
-cmt_keep-char_3-
-cmt_keep-char_4-
-cmt_keep-char_cpp_1-
-cmt_keep-char_cpp_2-
-cmt_keep-char_cpp_3-
-cmt_keep-char_cpp_4-
-cmt_add_gc_tag-
-cmt_add_file-
-cmt_add_file_style-
-cmt_add_fct_def-
-cmt_add_fct_def_class-
-cmt_trailing_style-
-cmt_split_before_@_in_fct_cmts-
-cmt_add_class_access-
-cmt_first_space_cpp-
-cmt_keep_cpp-
-cmt_force_fct_def_decl_split-
-cmt_java_doc-
-cmt_fct_java_doc-
-cmt_c2cpp-
-cmt_cpp2c_keep_eol-
-cmt_fct_categ-
-cmt_fct_categ_in-
-cmt_fct_categ_style-
-cmt_decl-
-cmt_decl_max_level-
-cmt_decl_before-
-cmt_decl_len-
-cmt_decl_auto_len-
-cmt_decl_auto_len_add-
-cmt_fi
- 1
- 2
前往页