added examples
[midnight-commander/osp/pkrayzel123.git] / misc / macros.d / macro.5.sh
bloba64dfc95a440114dbcf8618cd6014ab4e52e4abd
1 s snippets
2 a=`cat %b`
3 if [ "$a" = "fori" ]; then
4 echo "for (i = 0; i _; i++)" > %b
5 fi
6 if [ "$a" = "ife" ]; then
7 cat <<EOF > %b
8 if ( )
11 else
14 EOF
16 if [ "$a" = "GPL" ]; then
17 cat >>%b <<EOF
19 * This program is free software; you can redistribute it and/or modify
20 * it under the terms of the GNU General Public License as published by
21 * the Free Software Foundation; either version 2 of the License, or
22 * (at your option) any later version.
24 * This program is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 * GNU General Public License for more details.
29 * You should have received a copy of the GNU General Public License
30 * along with this program; if not, write to the Free Software
31 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33 EOF
35 if [ "$a" = "type" ]; then
36 cat <<EOF > %b
37 typedef struct {
39 } ?;
40 EOF