⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 faqcatccbd.html

📁 this is a mirrored site c-faq. thought might need offline
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN"><!-- This collection of hypertext pages is Copyright 1995-2005 by Steve Summit. --><!-- Content from the book "C Programming FAQs: Frequently Asked Questions" --><!-- (Addison-Wesley, 1995, ISBN 0-201-84519-9) is made available here by --><!-- permission of the author and the publisher as a service to the community. --><!-- It is intended to complement the use of the published text --><!-- and is protected by international copyright laws. --><!-- The on-line content may be accessed freely for personal use --><!-- but may not be published or retransmitted without explicit permission. --><!-- --><!-- this page built Sat Dec 24 21:47:46 2005 by faqproc version 2.7 --><!-- from source file tools.sgml dated Sat Apr 24 13:04:46 2004 --><!-- corresponding to FAQ list version 4.0 --><html><!-- Mirrored from c-faq.com/~scs/cgi-bin/faqcat.cgi?sec=resources by HTTrack Website Copier/3.x [XR&CO'2008], Sat, 14 Mar 2009 07:58:23 GMT --><head><base ><meta name=GENERATOR content="faqproc"><title>Tools and Resources</title></head><body bgcolor="#ffffff"><H1>18. Tools and Resources</H1><a name="tools"><h1>comp.lang.c FAQ list<font color=blue>&middot;</font><a href="../../resources/tools.html"><!-- qtag -->Question 18.1</a></h1><p><font face=Helvetica size=8 color=blue><b>Q:</b></font>I needsome C development tools.</p><p><hr><p><font face=Helvetica size=8 color=blue><b>A:</b></font>Here is a crude list of some which are available.</p><dl><dt>a C cross-referencegenerator</dt><dd>cflow,cxref,calls,cscope,xscope,or ixfw</dd><dt>a C beautifier/pretty-printer</dt><dd>cb, indent,GNU indent,orvgrind</dd><dt>a revision controlorconfiguration managementtool</dt><dd>CVS,RCS,orSCCS</dd><dt>a C source obfuscator(shrouder)</dt><dd>obfus, shroud,oropqcp</dd><dt>a ``make'' dependency generator</dt><dd>makedepend,or try<TT>cc&nbsp;-M</TT> or <TT>cpp&nbsp;-M</TT></dd><dt>tools to compute code metrics</dt><dd>ccount, Metre, lcount, orcsize;there is also a package sold by McCabe and Associates</dd><dt>a C lines-of-source counter</dt><dd>this can be done very crudely with the standard Unix utility <TT>wc</TT>,and somewhat better with<TT>grep&nbsp;-c&nbsp;";"</TT></dd><dt>a C declaration aid(<TT>cdecl</TT>)</dt><dd>check volume 14 ofcomp.sources.unix(see question<a href="faqcatccbd.html?sec=resources#sources">18.16</a>)and K&amp;R2</dd><dt>a prototype generator</dt><dd>see question <a href="faqcat7d4b.html?sec=ansi#cproto">11.31</a></dd><dt>a tool to track down malloc problems</dt><dd>see question <a href="faqcatccbd.html?sec=resources#mallocdbg">18.2</a></dd><dt>a ``selective'' C preprocessor</dt><dd>see question <a href="faqcat204f.html?sec=cpp#unifdef">10.18</a></dd><dt>language translation tools</dt><dd>see questions <a href="faqcat7d4b.html?sec=ansi#cproto">11.31</a> and <a href="faqcat38c2.html?sec=misc#langtran">20.26</a></dd><dt>C verifiers (lint)</dt><dd>see question <a href="faqcatccbd.html?sec=resources#ansilint">18.7</a></dd><dt>a C compiler!</dt><dd>see question <a href="faqcatccbd.html?sec=resources#compilers">18.3</a></dd></dl><p>(This list of tools is by no means complete;if you know of tools not mentioned,you're welcome to contactthis list's maintainer.)</p><p>Other lists of tools,and discussion about them,can be found in the Usenet newsgroupscomp.compilersandcomp.software-eng.</p><p>See also questions <a href="faqcatccbd.html?sec=resources#compilers">18.3</a>and <a href="faqcatccbd.html?sec=resources#sources">18.16</a>.<hr><hr><hr><a name="mallocdbg"><h1>comp.lang.c FAQ list<font color=blue>&middot;</font><a href="../../resources/mallocdbg.html"><!-- qtag -->Question 18.2</a></h1><p><font face=Helvetica size=8 color=blue><b>Q:</b></font>How can I track down these pesky malloc problems?</p><p><hr><p><font face=Helvetica size=8 color=blue><b>A:</b></font>A number of debugging packages exist to help track down<TT>malloc</TT> problems;one popular one isConor P. Cahill's``dbmalloc'',posted tocomp.sources.misc in1992,volume 32.Others are``leak'',available in volume 27 of the comp.sources.unix archives;JMalloc.c and JMalloc.hin the ``Snippets'' collection;MEMDEBUG fromftp.crpht.lu in pub/sources/memdebug;and Electric Fence.See also question<a href="faqcatccbd.html?sec=resources#sources">18.16</a>.</p><p>A number of commercial debugging tools exist, and can be invaluable in tracking down <TT>malloc</TT>-related and other stubborn problems:<UL><li><a href="http://www.centerline.com/productline/code_center/code_center.html">CodeCenter</a> (formerly Saber-C)from<a href="http://www.centerline.com/">Centerline Software</a>.<li>Insight(now <a href="http://www.parasoft.com/jsp/products/home.jsp?product=Insure">Insure</a>?),from<a href="http://www.parasoft.com/">ParaSoft Corporation</a>.<li><a href="http://www-306.ibm.com/software/awdtools/purifyplus/">Purify</a>,from<a href="http://www-306.ibm.com/software/rational/">Rational Software</a>(formerly Pure Software,now part of IBM).<li><a href="http://www.zerofault.com/zf/">ZeroFault</a>,from <a href="http://www.zerofault.com/">The ZeroFault Group</a>.<hr><hr><hr><a name="compilers"><h1>comp.lang.c FAQ list<font color=blue>&middot;</font><a href="../../resources/compilers.html"><!-- qtag -->Question 18.3</a></h1><p><font face=Helvetica size=8 color=blue><b>Q:</b></font>What's a free or cheap C compiler I can use?</p><p><hr><p><font face=Helvetica size=8 color=blue><b>A:</b></font>A popular and high-quality free C compiler isthe FSF's <a href="http://gcc.gnu.org/">GNU C compiler</a>,or <a href="http://gcc.gnu.org/"><TT>gcc</TT></a>.An MS-DOS port,<a href="http://www.delorie.com/djgpp/">djgpp</a>,is also available.As far as I know,thereare versions of <TT>gcc</TT>for Macsand Windows machines,too.</p><p>Another popular compiler is lcc,describedon these pagesat<a href="http://www.cs.virginia.edu/~lcc-win32/">Virginia</a>and<a href="http://www.cs.princeton.edu/software/lcc/">Princeton</a>.</p><p>A very inexpensive MS-DOS compiler isPower C from Mix Software,1132 Commerce Drive,Richardson, TX 75801, USA,214-783-6001.</p><p>A shareware MS-DOS C compiler is available from<a href="ftp://ftp.hitech.com.au/hitech/pacific"><TT>ftp.hitech.com.au/hitech/pacific</TT></a>.Registration is optional for non-commercial use.</p><p>Archives associated withthecomp.compilersnewsgroupcontain a great deal of information aboutavailable compilers, interpreters, grammars,etc. (for many languages).The<a href="http://compilers.iecc.com/">comp.compilers archives</a>includean <a href="http://compilers.iecc.com/faq.txt">FAQ list</a>and a<a href="http://www.idiom.com/free-compilers/">catalog of free compilers</a>.</p><p>See also question <a href="faqcatccbd.html?sec=resources#sources">18.16</a>.<hr><hr><hr><a name="lint1"><h1>comp.lang.c FAQ list<font color=blue>&middot;</font><a href="../../resources/lint1.html"><!-- qtag -->Question 18.4</a></h1><p><font face=Helvetica size=8 color=blue><b>Q:</b></font>I just typed in this program, and it's acting strangely.Can you see anythingwrong with it?</p><p><hr><p><font face=Helvetica size=8 color=blue><b>A:</b></font>See if you can run<TT>lint</TT> first(perhaps with the <TT>-a</TT>, <TT>-c</TT>, <TT>-h</TT>, <TT>-p</TT>or other options<a href="../../resources/lintopts.html" rel=subdocument>[footnote]</a>).Many C compilers are really only half-compilers,taking the attitude that it's not <em>their</em> problemif you didn't say what youmeant,or if what you said is virtually guaranteed not to work.(But doalsosee if your compiler has extra warning levelswhich can be optionally requested.)</p><p>See also questions<a href="faqcat5e04.html?sec=strangeprob#funnybugs">16.5</a>,<a href="faqcat5e04.html?sec=strangeprob#segv">16.8</a>,and<a href="faqcatccbd.html?sec=resources#ansilint">18.7</a>.</p><p>References:Ian Darwin, <I>Checking C Programs with lint</I><hr><hr><hr><a name="lintptralign"><hr><hr><hr><a name="voidmain"><h1>comp.lang.c FAQ list<font color=blue>&middot;</font><a href="../../resources/voidmain.html"><!-- qtag -->Question 18.6</a></h1><p><font face=Helvetica size=8 color=blue><b>Q:</b></font>Can I declare <TT>main</TT> as <TT>void</TT>,to shut off these annoying``main returns no value'' messages?</p><p><hr><p><font face=Helvetica size=8 color=blue><b>A:</b></font>No.See question <a href="faqcat7d4b.html?sec=ansi#voidmain">11.12b</a>.<hr><hr><hr><a name="ansilint"><h1>comp.lang.c FAQ list<font color=blue>&middot;</font><a href="../../resources/ansilint.html"><!-- qtag -->Question 18.7</a></h1><p><font face=Helvetica size=8 color=blue><b>Q:</b></font>Where can I get an ANSI-compatible <TT>lint</TT>?</p><p><hr><p><font face=Helvetica size=8 color=blue><b>A:</b></font>Products called<a href="http://www.gimpel.com/html/pcl.htm">PC-Lint</a>and<a href="http://www.gimpel.com/html/flex.htm">FlexeLint</a>are availablefrom<a href="http://www.gimpel.com/">Gimpel Software</a>.</p><p>The Unix System V release 4 <TT>lint</TT> is ANSI-compatible,and is available separately (bundled with other C tools)from UNIX Support Labsor from System V resellers.</p><p>Another ANSI-compatible <TT>lint</TT>(which can also perform higher-level formal verification)is<a href="http://lclint.cs.virginia.edu/">Splint</a>(formerly lclint).</p><p>In the absence of <TT>lint</TT>,many modern compilersdoattempt to diagnosealmost as many problems as<TT>lint</TT> does.(Many netters recommend<TT>gcc&nbsp;-Wall&nbsp;-pedantic</TT>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -