6.14.1.1. 带CDATA的programinglist示例

例 6.31. 举例:带CDATA的programinglist


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

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

]]>

</programlisting>

                    


上述,就是由于programlisting的内容中出现了&<>,才用<![CDATA[]]>括起来的。