home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / share / gedit-2 / plugins / snippets / c.xml next >
Encoding:
Extensible Markup Language  |  2006-08-27  |  3.7 KB  |  142 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <snippets language="C">
  3.   <snippet id="gpl">
  4.     <text><![CDATA[/*
  5.  * ${1:<filename>}
  6.  * This file is part of ${2:<program name>}
  7.  *
  8.  * Copyright (C) ${3:<year>} - ${4:<name of author>}
  9.  *
  10.  * ${2} is free software; you can redistribute it and/or modify
  11.  * it under the terms of the GNU General Public License as published by
  12.  * the Free Software Foundation; either version 2 of the License, or
  13.  * (at your option) any later version.
  14.  *
  15.  * ${2} is distributed in the hope that it will be useful,
  16.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  18.  * GNU General Public License for more details.
  19.  *
  20.  * You should have received a copy of the GNU General Public License
  21.  * along with ${2}; if not, write to the Free Software
  22.  * Foundation, Inc., 51 Franklin St, Fifth Floor, 
  23.  * Boston, MA  02110-1301  USA
  24.  */
  25.  
  26.  $0]]></text>
  27.     <tag>gpl</tag>
  28.     <description>GPL License</description>
  29.   </snippet>
  30.   <snippet id="lgpl">
  31.     <text><![CDATA[/*
  32.  * ${1:<filename>}
  33.  * This file is part of ${2:<library name>} 
  34.  *
  35.  * Copyright (C) ${3:<year>} - ${4:<name of author>}
  36.  *
  37.  * ${2} is free software; you can redistribute it and/or
  38.  * modify it under the terms of the GNU Lesser General Public
  39.  * License as published by the Free Software Foundation; either
  40.  * version 2.1 of the License, or (at your option) any later version.
  41.  * 
  42.  * ${2} is distributed in the hope that it will be useful,
  43.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  44.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  45.  * Lesser General Public License for more details.
  46.  * 
  47.  * You should have received a copy of the GNU Lesser General Public
  48.  * License along with this library; if not, write to the Free Software
  49.  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  50.  */
  51.  
  52.  $0]]></text>
  53.     <tag>lgpl</tag>
  54.     <description>LGPL License</description>
  55.   </snippet>
  56.   <snippet id="do">
  57.     <text><![CDATA[do
  58. {
  59.     $0
  60. } while ($1);]]></text>
  61.     <tag>do</tag>
  62.     <description>do .. while</description>
  63.   </snippet>
  64.   <snippet id="for">
  65.     <text><![CDATA[for (${1:i} = ${2:0}; ${1:i} < ${3:count}; ${1:i} += ${4:1})
  66. {
  67.     $0
  68. }]]></text>
  69.     <tag>for</tag>
  70.     <description>for loop</description>
  71.   </snippet>
  72.   <snippet id="while">
  73.     <text><![CDATA[while ($1)
  74. {
  75.     $0
  76. }]]></text>
  77.     <tag>while</tag>
  78.     <description>while</description>
  79.   </snippet>
  80.   <snippet id="once">
  81.     <text><![CDATA[#ifndef __${1:NAME}_H__
  82. #define __$1_H__
  83.  
  84. $0
  85.  
  86. #endif /* __$1_H__ */
  87. ]]></text>
  88.     <tag>once</tag>
  89.     <description>Header-Include Guard</description>
  90.   </snippet>
  91.   <snippet id="if">
  92.     <text><![CDATA[if (${1:condition})
  93. {
  94.     $0
  95. }]]></text>
  96.     <tag>if</tag>
  97.     <description>if</description>
  98.   </snippet>
  99.   <snippet id="Inc">
  100.     <text><![CDATA[#include <${1:file}.h>
  101. $0]]></text>
  102.     <tag>Inc</tag>
  103.     <description>#include <..></description>
  104.   </snippet>
  105.   <snippet id="inc">
  106.     <text><![CDATA[#include "${1:file}.h"
  107. $0]]></text>
  108.     <tag>inc</tag>
  109.     <description>#include ".."</description>
  110.   </snippet>
  111.   <snippet id="main">
  112.     <text><![CDATA[int 
  113. main (int argc, char *argv[])
  114. {
  115.     $0
  116.     return 0;
  117. }]]></text>
  118.     <tag>main</tag>
  119.     <description>main</description>
  120.   </snippet>
  121.   <snippet id="struct">
  122.     <text><![CDATA[struct ${1:name}
  123. {
  124.     ${0:/* data */}
  125. };]]></text>
  126.     <tag>struct</tag>
  127.     <description>struct</description>
  128.   </snippet>
  129.   <snippet id="endif">
  130.     <text><![CDATA[#endif
  131. $0]]></text>
  132.     <description>#endif</description>
  133.     <accelerator><![CDATA[<Control><Alt>period]]></accelerator>
  134.   </snippet>
  135.   <snippet id="td">
  136.     <text><![CDATA[typedef ${1:newtype} ${2:type};
  137. $0]]></text>
  138.     <tag>td</tag>
  139.     <description>typedef</description>
  140.   </snippet>
  141. </snippets>
  142.