6.14.1.2. 不带CDATA的programinglist示例

例 6.32. 举例:不带CDATA的programinglist


<programlisting language="c">
	for (setno = 0; setno &lt; nr_sets; setno++, nmtd++) {
		pr_debug("initialising set %d (%p, info %p)\n", setno, nmtd, info);
		s3c2410_nand_init_chip(info, nmtd, sets);
		nmtd-&gt;scan_res = nand_scan_ident(&amp;nmtd-&gt;mtd,(sets) ? sets-&gt;nr_chips : 1);

		if (nmtd-&gt;scan_res == 0) {
			s3c2410_nand_update_chip(info, nmtd);
			nand_scan_tail(&amp;nmtd-&gt;mtd);
			s3c2410_nand_add_partition(info, nmtd, sets);
		}
		if (sets != NULL)
			sets++;
	}
</programlisting>

                    


上述,就是由于programlisting的内容中出现了:&<>

所以才分别用:&amp;&lt;&gt;,去替换的。