thank for the bash lecon, it is very interresting to discover new function like pushd for me...

For emacs users, I have an interessant tips to add mouse scroll.

add in your .emacs config file this lines

;;=============================================================================
;;                    scroll on  mouse wheel
;;=============================================================================
(defun up-slightly () (interactive) (scroll-up 5))
(defun down-slightly () (interactive) (scroll-down 5))
(global-set-key [mouse-4] 'down-slightly)
(global-set-key [mouse-5] 'up-slightly)

(defun up-one () (interactive) (scroll-up 1))
(defun down-one () (interactive) (scroll-down 1))
(global-set-key [S-mouse-4] 'down-one)
(global-set-key [S-mouse-5] 'up-one)

(defun up-a-lot () (interactive) (scroll-up))
(defun down-a-lot () (interactive) (scroll-down))
(global-set-key [C-mouse-4] 'down-a-lot)
(global-set-key [C-mouse-5] 'up-a-lot)

 I cannot separate any more from that.



On 11/1/06, Steven T. Hatton < [EMAIL PROTECTED]> wrote:
I had problems using emacs ECB when the class definitions were preceeded by an
EXPORT macro, so I finally wrote a script for stripping them from the files.
If anybody is interested in doing this, here's the script.  I do a `make
INST_LOCATION=$OSG install' with OSG set to a directory in my user space.
The script just traverses the include directory, mirroring it to a temporary
directory and then seds each of the files containing any *_EXPORT not
preceeded by a '#' back into the $OSG/include/osg* where it originated.  If
everything works, you can rm -r on the $OSG/tmp.  If not, hopefully the stuff
in the tmp directory will be intact.

#!/bin/bash
# use at your own risk
function fail { echo "Error: $1" && exit -1 }

[ -n "$OSG" ] || fail "Need to set \$OSG"

TEMP_DIR=$OSG/tmp

[ -e $TEMP_DIR ] || mkdir $TEMP_DIR

[ -d $TEMP_DIR ] || fail "Failed to find or create directory $OSG/tmp"

[ -d $OSG/include ] || fail "Directory $OSG/include does not exist"

for sc in $(find $OSG -name semantic.cache); rm $sc;done

function traverse {
    pushd $1 > /dev/null
    echo "traversing $PWD"
    local td=$2/$1
    [ -e $td ] || mkdir $td
    [ -d $td ] || fail "Failed to find or create directory $td"

    for d in $(find . -maxdepth 1 -mindepth 1 -type d); do traverse ${d#./}
$td; done

    for f in $(find . -maxdepth 1 -mindepth 1 -type f); do
        local tf=$td/${f#./}
        cp ${f#./} $tf;
        [ -f $tf ] || fail "failed to create $tf"
        local gs="";
        gs=$(grep _EXPORT $tf | grep -v \#)
        [ -n "$gs" ] && eval "sed -e 's/[A-Z]*_EXPORT//g' $tf > $f"
    done

    popd > /dev/null
}

pushd $OSG > /dev/null
traverse include $TEMP_DIR
popd > /dev/null

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/



--
Bertrand Greslier
http://www.cooki3d.org
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to