[XviD-devel] [CVS commit] devapi4 -- Cosmetic patches

Edouard Gomez ed.gomez at free.fr
Thu Oct 2 02:39:59 CEST 2003


Hello,

My two last commits will probably be a pain if you were keeping private
changes in your own trees. They make the sources far more C89 compliant
and remove the trailing spaces.

Advise if you have private changes in your trees for which the trailing
space removal is a problem:
$ diff xvidcore.cvs xvidcore.yourtree > merge.diff
$ cd xvidcore.cvs
$ patch -l -p1 < ../merge.diff
$ $(EDITOR) ../trailing-spaces.sh
--- beginning of the file
#!/bin/sh
INPUT=$1
sed 's/[ \t]*$//' ${INPUT} > ${INPUT}.tmp
mv ${INPUT}.tmp ${INPUT}
--- end of the file
$ chmod 755 ../trailing-spaces.sh
$ find src -name "*.[ch]" -exec ../trailing-spaces.sh {} \;

Explaination:
- First step is to compute a changeset between your tree and the cvs tree
- Second step is to apply it against the cvs tree, ignoring white space
  changes (-l option)
- Third step is to reapply a trailing space squashing.

Btw, i have no advises for keeping sources ISO C89 compliant but not
using // is 99% the only ISOC99 code style used...  :-)

2003-10-01 23:07:07 GMT		patch-56

    Summary:
      Cleaned up trailing space chars.
    Revision:
      xvidcore--devapi4--1.0--patch-56

    The kind of patch we would love to avoid as they make merging
    a nightmare while they're kind of useless patches.
    
    Applied sed 's/[ \t]*$//' to all c/h files.

    modified files:
     src/bitstream/bitstream.c src/bitstream/bitstream.h
     src/bitstream/cbp.c src/bitstream/mbcoding.c src/dct/idct.c
     src/dct/simple_idct.c src/decoder.c src/decoder.h
     src/encoder.c src/encoder.h src/global.h
     src/image/colorspace.c src/image/colorspace.h src/image/font.c
     src/image/image.c src/image/image.h src/image/interpolate8x8.c
     src/image/interpolate8x8.h src/image/qpel.c src/image/qpel.h
     src/image/reduced.c src/motion/estimation_rd_based.c
     src/motion/gmc.c src/motion/gmc.h src/motion/motion.h
     src/motion/sad.c src/plugins/plugin_2pass1.c
     src/plugins/plugin_2pass2.c src/plugins/plugin_fixed.c
     src/plugins/plugin_psnr.c src/plugins/plugin_single.c
     src/portab.h src/prediction/mbprediction.c
     src/utils/mbtransquant.c src/utils/timer.c src/xvid.c
     src/xvid.h


2003-09-30 18:10:18 GMT		patch-55

    Summary:
      Code cleanups.
    Revision:
      xvidcore--devapi4--1.0--patch-55

    It's been a while since the last ISOC89 conformance cleanup.
    
    Using the following switches help a lot :-)
     -Wall -Wsign-compare -Wredundant-decls -Wunreachable-code -Wnested-externs \
     -ansi
    
    Result: 0 warning/0 error

    modified files:
     src/bitstream/vlc_codes.h src/global.h src/image/qpel.h
     src/motion/estimation.h src/motion/estimation_bvop.c
     src/motion/estimation_gmc.c src/motion/estimation_pvop.c
     src/motion/estimation_rd_based.c src/motion/gmc.c
     src/motion/gmc.h src/motion/motion_inlines.h
     src/motion/vop_type_decision.c

-- 
Edouard Gomez


More information about the XviD-devel mailing list