<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Chen Yufei's blog &#187; c</title>
	<atom:link href="http://chenyufei.info/blog/tag/c/feed/" rel="self" type="application/rss+xml" />
	<link>http://chenyufei.info/blog</link>
	<description>Keep your head about you while all those are losing theirs</description>
	<lastBuildDate>Wed, 21 Jul 2010 05:30:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>推荐个 C 库 sglib</title>
		<link>http://chenyufei.info/blog/2010-04-08/recommend-a-c-library-sglib/</link>
		<comments>http://chenyufei.info/blog/2010-04-08/recommend-a-c-library-sglib/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 09:01:55 +0000</pubDate>
		<dc:creator>chenyufei</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[library]]></category>

		<guid isPermaLink="false">http://chenyufei.info/blog/?p=296</guid>
		<description><![CDATA[SGLIB &#8211; A Simple Generic Library for C 完全用宏实现，只有一个头文件。提供了如下功能： sorting arrays manipulating linked lists manipulating sorted linked lists manipulating double linked lists manipulating red-black trees manipulating hashed containers 网页提供的下载链接地址不对，提供个sourceforge的下载地址。下载的 tarball 里有 sample 和 doc，看下就知道怎么用了。 一个我比较喜欢的特点是数据结构完全由用户自己定义，sglib 帮你生成操作数据结构的宏，函数声明以及定义。这样做的好处是不需要因为使用库而对数据结构做修改。相比 queue.h，我觉得 sglib 的更容易使用和理解，而且有更多功能。]]></description>
			<content:encoded><![CDATA[<p><a href="http://sglib.sourceforge.net/">SGLIB &#8211; A Simple Generic Library for C</a> 完全用宏实现，只有一个头文件。提供了如下功能：</p>
<ul>
<li>sorting arrays</li>
<li>manipulating linked lists</li>
<li>manipulating sorted linked lists</li>
<li>manipulating double linked lists</li>
<li>manipulating red-black trees</li>
<li>manipulating hashed containers</li>
</ul>
<p>网页提供的下载链接地址不对，提供个<a href="http://sourceforge.net/projects/sglib/">sourceforge的下载地址</a>。下载的 tarball 里有 sample 和 doc，看下就知道怎么用了。</p>
<p>一个我比较喜欢的特点是数据结构完全由用户自己定义，sglib 帮你生成操作数据结构的宏，函数声明以及定义。这样做的好处是不需要因为使用库而对数据结构做修改。相比 queue.h，我觉得 sglib 的更容易使用和理解，而且有更多功能。</p>
]]></content:encoded>
			<wfw:commentRss>http://chenyufei.info/blog/2010-04-08/recommend-a-c-library-sglib/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ch &#8212; 一个 C/C++ 解释器</title>
		<link>http://chenyufei.info/blog/2009-11-05/ch-a-c-and-cplusplus-interprete/</link>
		<comments>http://chenyufei.info/blog/2009-11-05/ch-a-c-and-cplusplus-interprete/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 17:14:08 +0000</pubDate>
		<dc:creator>chenyufei</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[compiler]]></category>

		<guid isPermaLink="false">http://chenyufei.info/blog/?p=258</guid>
		<description><![CDATA[动态语言很重要的一个功能就是支持交互式的开发，用惯了 Python 有时候非常希望 C 也能有一个解释器来用，尤其是忘了 C 的某些语法想写个简单的例子来测试的时候。 很久以前就搜过 C 的解释器，搜到过 Ch，不记得当时为什么没有试用过。今天下了个免费版本的用了下，很不错，支持 C90 和 C99 的主要功能，C++ 支持不完全（不过 C++ 我基本不关心）。 以前想要测试 C 的某个语法功能时会写个文件，int main 什么的搞一堆，然后用 tcc (Tiny C Compiler) 来测试。tcc 可以把 C 代码的编译和执行放在一步完成，执行 tcc -run foo.c 就可以看到效果了，还算方便。 用 Ch 就更方便了。ch 命令出来个交互式的 shell，输入 C 代码马上执行，调 printf 直接看到效果，输入变量就可以看到它的值（struct 的话可以看到每个成员的值），做点小的测试就不需要写 int main 之类的了。另外 ch 还有函数名补全。]]></description>
			<content:encoded><![CDATA[<p>动态语言很重要的一个功能就是支持交互式的开发，用惯了 Python 有时候非常希望 C 也能有一个解释器来用，尤其是忘了 C 的某些语法想写个简单的例子来测试的时候。</p>
<p>很久以前就搜过 C 的解释器，搜到过 <a href="http://www.softintegration.com/">Ch</a>，不记得当时为什么没有试用过。今天下了个免费版本的用了下，很不错，支持 C90 和 C99 的主要功能，C++ 支持不完全（不过 C++ 我基本不关心）。</p>
<p>以前想要测试 C 的某个语法功能时会写个文件，int main 什么的搞一堆，然后用 <a href="http://bellard.org/tcc/">tcc (Tiny C Compiler)</a> 来测试。tcc 可以把 C 代码的编译和执行放在一步完成，执行 <code>tcc -run foo.c</code> 就可以看到效果了，还算方便。</p>
<p>用 Ch 就更方便了。ch 命令出来个交互式的 shell，输入 C 代码马上执行，调 printf 直接看到效果，输入变量就可以看到它的值（struct 的话可以看到每个成员的值），做点小的测试就不需要写 int main 之类的了。另外 ch 还有函数名补全。</p>
]]></content:encoded>
			<wfw:commentRss>http://chenyufei.info/blog/2009-11-05/ch-a-c-and-cplusplus-interprete/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
