summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 917f65c)
raw | patch | inline | side by side (parent: 917f65c)
author | tgdwyer <tgdwyer@users.sourceforge.net> | |
Wed, 1 Feb 2006 04:00:20 +0000 (04:00 +0000) | ||
committer | tgdwyer <tgdwyer@users.sourceforge.net> | |
Wed, 1 Feb 2006 04:00:20 +0000 (04:00 +0000) |
diff --git a/mkinstalldirs b/mkinstalldirs
index 5d26a485f11223c19546f3e02ce59d201a5afe48..d2d5f21b611235316317197d3a32c2dff5897a6f 100755 (executable)
--- a/mkinstalldirs
+++ b/mkinstalldirs
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
-
-scriptversion=2005-02-02.21
-
-# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
-# Public domain.
-#
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
+# Public domain
errstatus=0
dirmode=""
usage="\
-Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
-
-Create each directory DIR (with mode MODE, if specified), including all
-leading file name components.
-
-Report bugs to <bug-automake@gnu.org>."
+Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
# process command line arguments
while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
- echo "$usage"
- exit $?
+ echo "$usage" 1>&2
+ exit 0
;;
-m) # -m PERM arg
shift
dirmode=$1
shift
;;
- --version)
- echo "$0 $scriptversion"
- exit $?
- ;;
--) # stop option processing
shift
break
0) exit 0 ;;
esac
-# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
-# mkdir -p a/c at the same time, both will detect that a is missing,
-# one will create a, then the other will try to create a and die with
-# a "File exists" error. This is a problem when calling mkinstalldirs
-# from a parallel make. We use --version in the probe to restrict
-# ourselves to GNU mkdir, which is thread-safe.
case $dirmode in
'')
- if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+ if mkdir -p -- . 2>/dev/null; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
- else
- # On NextStep and OpenStep, the `mkdir' command does not
- # recognize any option. It will interpret all options as
- # directories to create, and then abort because `.' already
- # exists.
- test -d ./-p && rmdir ./-p
- test -d ./--version && rmdir ./--version
fi
;;
*)
- if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
- test ! -d ./--version; then
+ if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
- else
- # Clean up after NextStep and OpenStep mkdir.
- for d in ./-m ./-p ./--version "./$dirmode";
- do
- test -d $d && rmdir $d
- done
fi
;;
esac
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
- errstatus=$lasterr
+ errstatus=$lasterr
else
- if test ! -z "$dirmode"; then
+ if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
- lasterr=""
- chmod "$dirmode" "$pathcomp" || lasterr=$?
+ lasterr=""
+ chmod "$dirmode" "$pathcomp" || lasterr=$?
- if test ! -z "$lasterr"; then
- errstatus=$lasterr
- fi
- fi
+ if test ! -z "$lasterr"; then
+ errstatus=$lasterr
+ fi
+ fi
fi
fi
# Local Variables:
# mode: shell-script
# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
# End:
+# mkinstalldirs ends here
index 8760dcdf6d0b972640d3256656642b3671e79a44..683d66da3425a8345d9c666cd0a63e2f4f48ee73 100644 (file)
};
#include <float.h>
#include "block.h"
-static inline bool compareConstraints(Constraint *&l, Constraint *&r) {
+static inline bool compareConstraints(Constraint *const &l, Constraint *const &r) {
double const sl =
l->left->block->timeStamp > l->timeStamp
||l->left->block==l->right->block
diff --git a/src/removeoverlap/pairingheap/PairingHeap.cpp b/src/removeoverlap/pairingheap/PairingHeap.cpp
index 9c67f44fa30b225016a1273e818d93b02369cb29..e0db8fdaf2889452487abf008040efc03a00c120 100644 (file)
* Construct the pairing heap.
*/
template <class T>
-PairingHeap<T>::PairingHeap( bool (*lessThan)(T &lhs, T &rhs) )
+PairingHeap<T>::PairingHeap( bool (*lessThan)(T const &lhs, T const &rhs) )
{
root = NULL;
counter=0;
diff --git a/src/removeoverlap/pairingheap/PairingHeap.h b/src/removeoverlap/pairingheap/PairingHeap.h
index 2f68c2b6f88bd27f202a406c8834e9f41e879e22..5f57f2f1b3d9a0821a007e960e64b10be9fe831a 100644 (file)
class Comparator
{
public:
- virtual bool isLessThan(T &lhs, T &rhs) const = 0;
+ virtual bool isLessThan(T const &lhs, T const &rhs) const = 0;
};
template <class T>
class PairingHeap
{
public:
- PairingHeap( bool (*lessThan)(T &lhs, T &rhs) );
+ PairingHeap( bool (*lessThan)(T const &lhs, T const &rhs) );
PairingHeap( const PairingHeap & rhs );
~PairingHeap( );
}
private:
PairNode<T> *root;
- bool (*lessThan)(T &lhs, T &rhs);
+ bool (*lessThan)(T const &lhs, T const &rhs);
int counter;
void reclaimMemory( PairNode<T> *t ) const;
void compareAndLink( PairNode<T> * & first, PairNode<T> *second ) const;