macros.d/macro.5.sh 0000644 00000002343 15043317757 0010070 0 ustar 00 #silent
s snippets
a=`cat %b`
if [ "$a" = "fori" ]; then
echo "for (i = 0; i _; i++)" > %b
fi
if [ "$a" = "ife" ]; then
cat <<EOF > %b
if ( )
{
}
else
{
}
EOF
fi
if [ "$a" = "GPL" ]; then
cat >>%b <<EOF
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
EOF
fi
if [ "$a" = "type" ]; then
cat <<EOF > %b
typedef struct {
;
} ?;
EOF
fi
macros.d/macro.0.sh 0000644 00000000222 15043317757 0010055 0 ustar 00 m make
TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1
make 2> $TMPFILE
mcedit $TMPFILE
rm $TMPFILE
macros.d/macro.7.sh 0000644 00000000263 15043317757 0010071 0 ustar 00 #silent
w delete trailing whitespace
TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1
cat %b > $TMPFILE
cat $TMPFILE | sed 's/[ \t]*$//' > %b
macros.d/macro.4.sh 0000644 00000000155 15043317757 0010066 0 ustar 00 #silent
t Indent `C' formatter
indent -gnu -fc1 -i4 -bli0 -nut -bap -l100 %b 1>/dev/null 2> %e
macros.d/macro.1.sh 0000644 00000000305 15043317757 0010060 0 ustar 00 #silent
u Upper case selection
TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1
cat %b > $TMPFILE
cat $TMPFILE| sed 's/\(.*\)/\U\1/' >%b
rm -f $TMPFILE
macros.d/macro.6.sh 0000644 00000000225 15043317757 0010066 0 ustar 00 #silent
e execute something
TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1
cat %b > $TMPFILE
sh $TMPFILE > %b
macros.d/macro.3.sh 0000644 00000000257 15043317760 0010062 0 ustar 00 #silent
S Sort selection
TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1
cat %b > $TMPFILE
cat $TMPFILE| sort >%b
rm -f $TMPFILE