Changes by: flatcap
Update of /cvsroot/linux-ntfs/ntfs-driver-tng/scripts
In directory usw-pr-cvs1:/tmp/cvs-serv20686
Added Files:
create95 create96
Log Message:
backwards compatibility for gcc 2.95
--- NEW FILE ---
#!/bin/bash
# Take the files in linux/fs/ntfs and pre-process the gcc hacks.
# The output files will be placed in the directory gcc-2.95.
# It will expand the _XXX macros and remove the SN macros.
# The output will be compatible with gcc 2.95 and egcs 2.91.66.
#
# ptr->_ARA(var) becomes ptr->aua.ara.var
#
# struct { becomes struct {
# ... ...
# } SN(name); } name;
#
OUTDIR=gcc-2.95
if [ ! -d ${OUTDIR} ]; then
mkdir ${OUTDIR}
fi
for i in *.[ch]; do
cat $i | grep -v "^#define _[A-Z]\{3\}(X) SC(" |
sed \
-e "s/->_AAH(\([^)]\+\))/->aah.\1/g" \
-e "s/->_ANR(\([^)]\+\))/->aua.anr.\1/g" \
-e "s/->_ARA(\([^)]\+\))/->aua.ara.\1/g" \
-e "s/->_FEA(\([^)]\+\))/->fer.fea.\1/g" \
-e "s/->_FER(\([^)]\+\))/->fer.\1/g" \
-e "s/->_ICF(\([^)]\+\))/->idc.icf.\1/g" \
-e "s/->_IDM(\([^)]\+\))/->idc.idm.\1/g" \
-e "s/->_IEH(\([^)]\+\))/->ieh.\1/g" \
-e "s/->_IEV(\([^)]\+\))/->iif.iev.\1/g" \
-e "s/->_IIF(\([^)]\+\))/->ieh.iif.\1/g" \
-e "s/->_INE(\([^)]\+\))/->ine.\1/g" \
-e "s/->_INR(\([^)]\+\))/->inr.\1/g" \
-e "s/->_IRI(\([^)]\+\))/->key.iri.\1/g" \
-e "s/->_MNR(\([^)]\+\))/->mnr.\1/g" \
-e "s/->_OBV(\([^)]\+\))/->oei.obv.\1/g" \
-e "s/->_SDH(\([^)]\+\))/->sdh.\1/g" \
-e "s/->_SIA(\([^)]\+\))/->sia.\1/g" \
-e "s/->_SVS(\([^)]\+\))/->sei.svs.\1/g" \
-e "s/->_VCL(\([^)]\+\))/->vcl.\1/g" \
-e "s/->_VMM(\([^)]\+\))/->vmm.\1/g" \
-e "s/ SN(\([a-z]\{3\}\))/ \1/" > ${OUTDIR}/$i
done
--- NEW FILE ---
#!/bin/bash
# Take the files in linux/fs/ntfs and pre-process the gcc hacks.
# The output files will be placed in the directory gcc-2.96.
# It will remove the _XXX macros and the SN macros.
# The output will be compatible with gcc 2.96 and above.
#
# ptr->_ARA(var) becomes ptr->var
#
# struct { becomes struct {
# ... ...
# } SN(name); };
#
OUTDIR=gcc-2.96
if [ ! -d ${OUTDIR} ]; then
mkdir ${OUTDIR}
fi
for i in *.[ch]; do
cat $i | sed \
-e "s/->_AAH(\([^)]\+\))/->\1/g" \
-e "s/->_ANR(\([^)]\+\))/->\1/g" \
-e "s/->_ARA(\([^)]\+\))/->\1/g" \
-e "s/->_FEA(\([^)]\+\))/->\1/g" \
-e "s/->_FER(\([^)]\+\))/->\1/g" \
-e "s/->_ICF(\([^)]\+\))/->\1/g" \
-e "s/->_IDM(\([^)]\+\))/->\1/g" \
-e "s/->_IEH(\([^)]\+\))/->\1/g" \
-e "s/->_IEV(\([^)]\+\))/->\1/g" \
-e "s/->_IIF(\([^)]\+\))/->\1/g" \
-e "s/->_INE(\([^)]\+\))/->\1/g" \
-e "s/->_INR(\([^)]\+\))/->\1/g" \
-e "s/->_IRI(\([^)]\+\))/->\1/g" \
-e "s/->_MNR(\([^)]\+\))/->\1/g" \
-e "s/->_OBV(\([^)]\+\))/->\1/g" \
-e "s/->_SDH(\([^)]\+\))/->\1/g" \
-e "s/->_SIA(\([^)]\+\))/->\1/g" \
-e "s/->_SVS(\([^)]\+\))/->\1/g" \
-e "s/->_VCL(\([^)]\+\))/->\1/g" \
-e "s/->_VMM(\([^)]\+\))/->\1/g" \
-e "s/ SN([a-z]\{3\})//" | \
grep -v "^#define _[A-Z]\{3\}(X) SC(" > ${OUTDIR}/$i
done
|