'셈말짓기/터놓은글'에 해당되는 글 6건
- 2015.06.11 doxygen 탬플릿
- 2014.12.30 Image지원되는 RTF Editor입니다.
- 2009.07.07 DOS Font File Viewer 2
- 2009.01.29 cpp2html
- 2009.01.29 색상에 이름을 표시 해주는 셈글
- 2009.01.07 ZLib
Image지원되는 RTF Editor입니다.
WTL기반으로 작성되었습니다.
COM 인터페이스로 이미지를 보여지게 하는 코드를 주서다가 만들었습니다.
그런데, RichEdit 8.0 부터는 이미지가 추가 API가 제공 됩니다.
아래와 같이 명령을 하면 도움말을 볼 수가 있습니다.
E:\>cpp2html.exe -h
***I tweeked the original source code to get it to compile on
Windows 2000. The original source code requires Cygnus.dll. This
version does not. The original Credits and Authors are down below.
You can get the source code from http://www.gnu.org
- mdevi@liu.edu
*************************************
Usage
cpp2html only does a lexical analisys of the source code, so the
C++ program is assumed to be correct !
here's how to run it:
cpp2html --input <file (a C++ prog)> --output <file (an html)>
If you do not specify the name of the output file, the name will
be the one of the source file with a .html appended.
if you want a real html document, specify --doc option at the
end.Otherwise you just get some text to copy and paste in you
own html pages. If you choose -doc option the page will have a
white background and your source file name as title. --tab n option
apply a substitution of tab characters with n spaces. You also may
want to specify the title of the page with --title "my title"
option (this implies -doc). Now you can also generate an html with
CSS format, by using --css "url of .css" (try some .css files
included in the package). The order of the options is not relevant.
Here are some links to some of the sources of cpp2html colored with
cpp2html itself:
main.cc.html
generators.cc.html
tags.cc.html
messages.cc.html
These files have been generated with the following commands:
cpp2html --doc main.cc
cpp2html --doc generators.cc
cpp2html --doc tags.cc
cpp2html --doc messages.cc
Obviosly it works with C files as well:
cmdline.c.html
Created with the command:
cpp2html -i cmdline.c -o cmdline.c.html --css="cpp2html.css"
And obviously it works with header files as well (which we colored in
black and white :-)
main.h.html
decorators.h.html
generators.h.html
list.h.html
tags.h.html
cmdline.h.html
created with the command:
cpp2html *.h --css="mono.css"
And here's the output of `cpp2html -help`
Usage: cpp2html [OPTION]... [INPUT-FILE]...
cpp2html < INPUT-FILE > OUTPUT-FILE [OPTION]...
given a source C/C++ file, produces an html source with syntax highlighting.
-v, --verbose verbose mode on
-d, --doc creates html with title, header...
-c, --css=URL use a css for formatting (implies --doc)
-T, --title=TITLE give title to the html (implies --doc)
-i, --input=FILE input file (default standard input)
-o, --output=FILE output file (default standard output)
-t, --tab=TABLEN specify tab length (default 8)
-V, --version print version
As it handles standard output and input you may also run it like
cat MyFile.cpp | cpp2html | lpr
You may want to specify your options for syntax highlighting in the file
tags.j2h. If this file is not present in the current directory, some
default colors will be used. Here's the tags.j2h file that comes with
this distribution:
keyword blue b ;
type green ;
string red ;
comment brown i ;
number purple ;
as you might see the syntax of this file is quite straightforward:
b = bold
i = italics
u = underline
You may also specify more than on of these options separated by commas
e.g.
keyword blue u, b ;
you may see all possible colors in the file colors.html
if something goes wrong with your options try to run cpp2html with --verbose opt
ion enabled.
Credits
These people helped me with java2html, and I used such features in cpp2html
as well, so:
Marcus G. Daniels <marcusd@gnu.org> who gave me some good advices about GNU stan
dards,
Osvaldo Pinali Doederlein <osvaldo@visionnaire.com.br> for tab option idea,
Richard Freedman <rich_freedman@chiinc.com> for feed back and bugs signalations
John Constantine <John.Constantine@mail.cc.trincoll.edu> for some great suggesti
ons I'll surely apply.
Raymond Lambe <rlambe@morgan.ucs.mun.ca>, for quotation bug signalation
Robert J. Clark <clark@klgroup.com> for adding -input, -output, -title options
Hans-Peter Bischof <hpb@cs.rit.edu> for suggestions (to apply).
Luc Maisonobe <Luc.Maisonobe@cnes.fr> for the patch for const char * in order to
make it work under gcc 2.95
Jari Korva <jari.korva@iki.fi> for the bug of " inside a string and & treatme nt
, and especially for adding CSS options and handling
Kaloian Doganov <kaloian@stones.com> for .css suggestion and for providing some
nice .css files
Ziv Caspi <zivc@peach-networks.com> found the bug of \ in chars
Chris Mason <cjmaso@essex.ac.uk> found the darkgreen bug, and that --tab was not
documented
**** Have Fun - mdevi@liu.edu
E:\>
색상의 이름 이나 색상의 RGB값을 Double-Click하면 해당 문자가 Clipboard로 복사됩니다.
첨부 File에는 WTL기반으로 된 Source Code와 Program이 있습니다.
- 첨부파일 내용
1. ZLib123 (http://www.zlib.net/)
2. WCE ARMV4I, W32 x86 Lib
3. VS2005 Project
- Memory 압축/해제 주요 함수
ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen,
const Bytef *source, uLong sourceLen));
/*
Compresses the source buffer into the destination buffer. sourceLen is
the byte length of the source buffer. Upon entry, destLen is the total
size of the destination buffer, which must be at least the value returned
by compressBound(sourceLen). Upon exit, destLen is the actual size of the
compressed buffer.
This function can be used to compress a whole file at once if the
input file is mmap'ed.
compress returns Z_OK if success, Z_MEM_ERROR if there was not
enough memory, Z_BUF_ERROR if there was not enough room in the output
buffer.
*/
ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
const Bytef *source, uLong sourceLen));
/*
Decompresses the source buffer into the destination buffer. sourceLen is
the byte length of the source buffer. Upon entry, destLen is the total
size of the destination buffer, which must be large enough to hold the
entire uncompressed data. (The size of the uncompressed data must have
been saved previously by the compressor and transmitted to the decompressor
by some mechanism outside the scope of this compression library.)
Upon exit, destLen is the actual size of the compressed buffer.
This function can be used to decompress a whole file at once if the
input file is mmap'ed.
uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
enough memory, Z_BUF_ERROR if there was not enough room in the output
buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete.
*/