ctags는 말 그대로 c 언어 파일의 keyword, identifier를 출력해 주는 툴이다.
ctags -R
을 실행하면 tags라는 파일이 생성이 된다.
source code [test.c]
command [ctags test.c]
file [tags]
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/
!_TAG_PROGRAM_NAME Exuberant Ctags //
!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
!_TAG_PROGRAM_VERSION 5.4 //
CHARLEY test.c /^ CHARLEY,$/;" e file:
FALSE test.c /^ FALSE$/;" e file:
LINDA test.c /^ LINDA$/;" e file:
TOM test.c /^ TOM,$/;" e file:
TRUE test.c /^ TRUE,$/;" e file:
WIN32_VERSION test.c 3;" d file:
boolean test.c /^} boolean;$/;" t file:
main test.c /^int main(int argc,char argv**)$/;" f
test_int test.c /^int test_int;$/;" v
test_int_static test.c /^static int test_int_static;$/;" v file:
command [ctags -n -u test.c]
file [tags]
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED 0 /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/
!_TAG_PROGRAM_NAME Exuberant Ctags //
!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
!_TAG_PROGRAM_VERSION 5.4 //
WIN32_VERSION test.c 3;" d file:
test_int_static test.c 5;" v file:
test_int test.c 6;" v
TRUE test.c 10;" e file:
FALSE test.c 11;" e file:
boolean test.c 12;" t file:
TOM test.c 16;" e file:
CHARLEY test.c 17;" e file:
LINDA test.c 18;" e file:
main test.c 21;" f
Wikipedia의 ctags file format 에 관련된 내용
Tags file formats
There are multiple tag file formats. Some of them are described below. In the
following, <\x##> represents the byte with hexadecimal representation
##.
Ctags and Exuberant Ctags
The original ctags and Exuberant Ctags have similar file
formats:[2]
Ctags
This is the format used by vi and various clones. The tags file is
normally named "tags".
The tags file is a list of lines, each line in the format:
{tagname}<Tab>{tagfile}<Tab>{tagaddress}
The fields are specified as follows:
{tagname} – Any identifier, not containing white space
<Tab> – Exactly one tab
character, although many versions of vi can handle any amount of white
space
{tagfile} – The name of the file where {tagname} is defined, relative to the
current directory
{tagaddress} – An ex mode command that will take the editor to the
location of the tag. For POSIX implementations of vi this may only be a
search or a line number.
The tags file is sorted on the {tagname} field which allows for fast
searching of the tags file.
Exuberant Ctags
This is the format used by Vim. It can generate an original ctags
file format or an extended format that attempts to retain backward
compatibility.
The fields up to and including {tagaddress} are the same as for ctags above.
Optional additional fields:
;" – semicolon + doublequote: Ends the {tagaddress} in way that looks like
the start of a comment to vi.
{tagfield}
Extended format extends the {tagaddress} field under certain circumstances to
include a set of extension fields embedded in an ex comment immediately appended
to the ex command, which leaves it backward-compatible with original vi
implementations. These extension fields are tab separated "key:value" pairs,
documented in the ctags
manual.
Etags
This is the format used by Emacs etags. The tags file is normally
named "TAGS".
The etags files consists of multiple sections—one section per input source
file. Sections are plain-text with several non-ascii characters used for special
purposes. These characters are represented as bracketed hexadecimal codes
below.
A section starts with a two line header, one line containing a single
<\x0c> character, followed by a line which consists of:
{src_file},{size_of_tag_definition_data_in_bytes}
The header is followed by tag definitions, one definition per line, with the
format:
-a Append the tags to an existing tag file.
-B Use backward searching patterns (?...?).
-e Output tag file for use with Emacs.
-f <name>
Write tags to specified file. Value of "-" writes tags to stdout
["tags"; or "TAGS" when -e supplied].
-F Use forward searching patterns (/.../) (default).
-h <list>
Specify list of file extensions to be treated as include files.
[".h.H.hh.hpp.hxx.h++"].
-I <list|@file>
A list of tokens to be specially handled is read from either the
command line or the specified file.
-L <file>
A list of source file names are read from the specified file.
If specified as "-", then standard input is read. -n Equivalent to --excmd=number.
-N Equivalent to --excmd=pattern.
-o Alternative for -f. -R Equivalent to --recurse. -u Equivalent to --sort=no.
-V Equivalent to --verbose.
-x Print a tabular cross reference file to standard output.
--append=[yes|no]
Should tags should be appended to existing tag file [no]?
--etags-include=file
Include reference to 'file' in Emacs-style tag file (requires -e).
--exclude=pattern
Exclude files and directories matching 'pattern'.
--excmd=number|pattern|mix
Uses the specified type of EX command to locate tags [mix].
--extra=[+|-]flags
Include extra tag entries for selected information (flags: "fq").
--fields=[+|-]flags
Include selected extension fields (flags: "afmikKlnsSz") [fks].
--file-scope=[yes|no]
Should tags scoped only for a single file (e.g. "static" tags
be included in the output [yes]?
--filter=[yes|no]
Behave as a filter, reading file names from standard input and
writing tags to standard output [no].
--filter-terminator=string
Specify string to print to stdout following the tags for each file
parsed when --filter is enabled.
--format=level
Force output of specified tag file format [2].
--help
Print this option summary.
--if0=[yes|no]
Should C code within #if 0 conditional branches be parsed [no]?
--langdef=name
Define a new language to be parsed with regular expressions.
--langmap=map(s)
Override default mapping of language to source file extension.
--language-force=language
Force all files to be interpreated with specified language.
--languages=[+|-]list
Restrict files scanned for tags to those mapped to langauges
specified in the comma-separated 'list'. The list can contain any
built-in or user-defined language [all].
--license
Print details of software license.
--line-directives=[yes|no]
Should #line directives be processed [no]?
--links=[yes|no]
Indicate whether symbolic links should be followed [yes].
--options=file
Specify file from which command line options should be read.
--recurse=[yes|no]
Recurse into directories supplied on command line [no].
--sort=[yes|no|foldcase]
Should tags be sorted (optionally ignoring case) [yes]?.
--tag-relative=[yes|no]
Should paths be relative to location of tag file [no; yes when -e]?
--totals=[yes|no]
Print statistics about source and tag files [no].
--verbose=[yes|no]
Enable verbose messages describing actions on each source file.
--version
Print version identifier to standard output.
The following options are used to specify which language-specific tag
types (or kinds) should be included in the tag file. "Kinds" is a group of
one-letter flags designating kinds of tags to either include or exclude from
the output. Each letter or group of letters may be preceded by either '+' to
add it to those already included, or '-' to exclude it from the output. In
the absence of any preceding '+' or '-' sign, only those kinds listed in
"kinds" will be included in the output. Below each option is a list of the
flags accepted. All kinds are enabled by default unless otherwise noted.
--asm-types=[+|-]kinds
d defines
l labels
m macros
t types
--asp-types=[+|-]kinds
f functions
s subroutines
--awk-types=[+|-]kinds
f functions
--beta-types=[+|-]kinds
f fragment definitions
p all patterns [off]
s slots (fragment uses)
v patterns (only virtual or rebound patterns are recorded)
--c-types=[+|-]kinds
c classes
d macro definitions
e enumerators (values inside an enumeration)
f function definitions
g enumeration names
m class, struct, and union members
n namespaces
p function prototypes [off]
s structure names
t typedefs
u union names
v variable definitions
x external variable declarations [off]
--c++-types=[+|-]kinds
c classes
d macro definitions
e enumerators (values inside an enumeration)
f function definitions
g enumeration names
m class, struct, and union members
n namespaces
p function prototypes [off]
s structure names
t typedefs
u union names
v variable definitions
x external variable declarations [off]
--eiffel-types=[+|-]kinds
c classes
f features
l local entities [off]
--fortran-types=[+|-]kinds
b block data
c common blocks
e entry points
f functions
i interfaces
k type components
l labels
L local and common block variables [off]
m modules
n namelists
p programs
s subroutines
t derived types
v module variables
--java-types=[+|-]kinds
c classes
f fields
i interfaces
m methods
p packages
--lisp-types=[+|-]kinds
f functions
--lua-types=[+|-]kinds
f functions
--make-types=[+|-]kinds
m macros
--pascal-types=[+|-]kinds
f functions
p procedures
--perl-types=[+|-]kinds
s subroutines
p packages
--php-types=[+|-]kinds
c classes
f functions
--python-types=[+|-]kinds
c classes
f functions
m class member
--ruby-types=[+|-]kinds
c classes
f methods
F singleton methods
m mixins
--scheme-types=[+|-]kinds
f functions
s sets
--sh-types=[+|-]kinds
f functions
--sql-types=[+|-]kinds
c cursors
d prototypes [off]
f functions
F record fields
l local variables [off]
P packages
p procedures
r records
s subtypes
t tables
T triggers
v variables
--tcl-types=[+|-]kinds
p procedures
c classes
f methods
--vera-types=[+|-]kinds
c classes
d macro definitions
e enumerators (values inside an enumeration)
f function definitions
g enumeration names
m class, struct, and union members
p programs
P function prototypes [off]
t tasks
T typedefs
v variable definitions
x external variable declarations [off]
--verilog-types=[+|-]kinds
f functions
m modules
P parameters, defines
p ports (input, output, inout)
r registers
t tasks
v variables (integer, real, time)
w wires (supply, tri, wire, wand, ...)
--vim-types=[+|-]kinds
f function definitions
v variable definitions
; 1=SourceDrive:\pathname of the directory from which the INF file was installed
; 2=c:\WININST0.400
; 3=c:\UNINSTAL.000
; 4=c:\UNINSTAL.000
; 5=inf
; 10=windows
; 11=system (or system32 on Windows NT)
; 12=system\iosubsystem
; 13=command
; 17=inf
; 18=help
; 19=windows
; 20=fonts
; 21=system\viewers
; 22=VMM32
; 23=color
; 24=c: (the Applications folder [ie. Program Files] root)
; 25=windows (MS doc refers to this as the "Shared directory". ?)
; 27=c:
; 28=windows
; 30=c: Root directory of the boot disk (might not be the same directory as dirid24)
; 31=c: (as above?)
; 32=c:\Winboot
; 33=start menu\programs
; 50 System directory (%windir%\system) on NT-based OS (only)
; 51 Spool directory (not used for installing printer drivers)
; 52 Spool drivers directory (not used for installing printer drivers)
; 53 User profile directory
; 54 Directory where ntldr.exe and osloader.exe are located (NT-based systems only)
; 55 Print processors directory (not used for installing printer drivers)
; Value Shell Special Folder
;
; 16406 All Users\Start Menu
; 16407 All Users\Start Menu\Programs
; 16408 All Users\Start Menu\Programs\Startup
; 16409 All Users\Desktop
; 16415 All Users\Favorites
; 16419 All Users\Application Data
; 16422 Program Files
; 16427 Program Files\Common
; 16429 All Users\Templates
; 16430 All Users\Documents
설치 버전 정보
XAMPP 1.7.0 - Apache 2.2.11 MySQL 5.1.30 PHP 5.2.8 include
MediaWiki 1.13.3
FCKEditor 2.6.3
XAMPP 설치 하기
다음 다음 다음 확인 누르면 기본값으로 C:\XAMPP 에 설치가 되고
htdocs(웹 페이지 저장 위치)는 C:\XAMPP\htdocs에 존재한다.
Control Panel에서 Apache, MySQL을 기동시켜 주면 준비 끝
MediaWiki 설치 하기 Step 1.다운받은 MediaWiki의 압축을 해제해서 C:\XAMPP\htdocs\mediawiki 로 넣어 준다. mediawiki 라고 했을 경우에, http://localhost/mediawiki로 접속하게 되므로 편한 이름으로 넣어 주면 된다.
Step 2. 위의 주소로 접속해서 install을 진행하다 보면 Mysql용 User / database를 요청하는데,
xampp의 경우 myphpadmin이 설치 되어 있으므로 이 곳에서 접속하여 user와 database를 생성해 준다.
['MW_Template','MW_Special','MW_Ref','MW_Math'],를 주석처리 하고 ['MW_Ref', 'MW_Special'], 로 변경한다.
FCKeditor의 Toolbar 설정인데, 실제 작동이 하는지는 모르겠지만, 해주지 않아도 작동에는 이상이 없다.
notepad++을 실행 만 시켜 봤는데, 상당히 화려하고, 먼가 기능이 매우 많아 보인다.
단순하게 용량을 비교 하자면 sourceforge notepad++ 프로젝트 에서 받은
최신 버전의 용량은 3.23MB (3,397,310 바이트)
그리고 압축이 해제된(ANSI/UNICODE 버전 두가지 포함)
디렉토리의 용량은 10.7MB (11,295,036 바이트) 이다.
그리고 실행하는데 시간이 약간 걸린다. 내 시스템에서 화면 나오는데 대략 1초 미만 정도로 추정된다.
[notepad++ 공식 : http://notepad-plus.sourceforge.net/uk/site.htm]
하지만 notepad2는
누르자 마자 실행이 되고, 용량은 한글판 최신 버전 기준 300KB 미만이다.
용량/속도 대비로는 notepad2가 상당히 우세하나, 눈에 보이는 기능이라던가 글꼴은 notepad++가 낫다.
Commands:
-1 compress faster -9 compress better
-d decompress -l list compressed file
-t test compressed file -V display version number
-h give more help -L display software license Options:
-q be quiet -v be verbose
-oFILE write output to 'FILE'
-f force compression of suspicious files
-k keep backup files
file.. executables to (de)compress
Type 'upx --help' for more detailed help.
UPX comes with ABSOLUTELY NO WARRANTY; for details visit http://upx.sf.net
notepad2의 용량이 커서 이것으로 압축을 해보았습니다.
명령어 : upx.exe -9 -o notepad2_packed.exe notepad2.exe
그랬더니 프로그램의 크기가 절반정도로 줄어 드는군요!
2008-12-24 오전 12:47 580,096 Notepad2.exe
2008-12-24 오전 12:47 221,696 Notepad2_packed.exe