aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-12-08 21:44:40 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-12-08 21:44:40 +0000
commit287113c3f446eeb5864080b86f657ec7f5142e05 (patch)
tree5f9957528118e6e961ab9ec682a99e83fa71b496
parent1577c6854e2aada16759ba96baf7f323744a0e99 (diff)
downloadpaludis-287113c3f446eeb5864080b86f657ec7f5142e05.tar.gz
paludis-287113c3f446eeb5864080b86f657ec7f5142e05.tar.xz
sr is dead
-rw-r--r--misc/Makefile.am2
-rwxr-xr-xmisc/make_sr.bash798
-rw-r--r--paludis/dep_spec_flattener.hh1
-rw-r--r--paludis/environments/no_config/no_config_environment.hh1
-rw-r--r--paludis/environments/paludis/paludis_config.cc1
-rw-r--r--paludis/repositories/e/eapi.hh1
-rw-r--r--paludis/repositories/e/manifest2_reader.hh1
-rw-r--r--paludis/repository.hh1
-rw-r--r--paludis/util/files.m42
-rw-r--r--paludis/util/select.hh (renamed from paludis/util/sr.hh)16
-rw-r--r--paludis/util/sr.cc25
-rw-r--r--paludis/util/validated.hh2
-rw-r--r--src/clients/inquisitio/matcher.hh1
-rw-r--r--src/output/console_install_task.cc1
14 files changed, 6 insertions, 847 deletions
diff --git a/misc/Makefile.am b/misc/Makefile.am
index a785a76..0f9aee7 100644
--- a/misc/Makefile.am
+++ b/misc/Makefile.am
@@ -1,6 +1,6 @@
CLEANFILES = *~ *.epicfail
MAINTAINERCLEANFILES = Makefile.in
-EXTRA_DIST = generated-file.txt do_m4.bash make_sr.bash make_se.bash make_nn.bash
+EXTRA_DIST = generated-file.txt do_m4.bash make_se.bash make_nn.bash
built-sources : $(BUILT_SOURCES)
for s in $(SUBDIRS) ; do $(MAKE) -C $$s built-sources || exit 1 ; done
diff --git a/misc/make_sr.bash b/misc/make_sr.bash
deleted file mode 100755
index 8f12ade..0000000
--- a/misc/make_sr.bash
+++ /dev/null
@@ -1,798 +0,0 @@
-#!/usr/bin/env bash
-# vim: set sw=4 sts=4 et tw=0 :
-
-what_to_make=${1}
-shift
-
-echo -n "/* vim"
-echo ": set ro : */"
-echo
-echo "/* ******************************************************** */"
-echo "/* THIS IS A GENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY */"
-echo "/* ******************************************************** */"
-echo
-
-for src in ${@} ; do
- if ! source ${src} ; then
- echo "source ${src} failed" 1>&2
- exit 7
- fi
-done
-
-make_const_ref()
-{
- local x=${@}
- if [[ "${x%\*}" != "${x}" ]] ; then
- echo "${@}" const
- elif [[ "${1#const}" != "${1}" ]] ; then
- echo "${@}" const "&"
- else
- echo const "${@}" "&"
- fi
-}
-
-set | grep '^make_class_.*() $' | sort -r | \
-while read a ; do
- a=${a##make_class_}
- a=${a%% *}
-
- want_named_args=
- want_visible=
- want_keys=( )
- want_key_types=( )
- want_key_defaults=( )
- want_cache_func=( )
- want_inherit=( )
- want_comparison_operators=
- want_comparison_fields=( )
- want_typedefs=( )
-
- extra_constructors()
- {
- :
- }
-
- extra_methods()
- {
- :
- }
-
- allow_named_args()
- {
- want_named_args=${1:-hh}
- }
-
- visible()
- {
- want_visible=yes
- }
-
- doxygen_comment()
- {
- :
- }
-
- inherit()
- {
- want_inherit=( "${want_inherit[@]}" "$1" )
- }
-
- key()
- {
- want_keys=( "${want_keys[@]}" "$1" )
- want_key_types=( "${want_key_types[@]}" "$2" )
- want_key_defaults=( "${want_key_defaults[@]}" "$3" )
- want_cache_func=( "${want_cache_func[@]}" "__unset_function__" )
- }
-
- cache_key()
- {
- want_keys=( "${want_keys[@]}" "$1" )
- want_key_types=( "${want_key_types[@]}" "$2 -> $3" )
- want_cache_func=( "${want_cache_func[@]}" "$4" )
- }
-
- comparison_operators()
- {
- want_comparison_operators=$1
- shift
- want_comparison_fields=( $@ )
- }
-
- typedef()
- {
- want_typedefs=( "${want_typedefs[@]}" "$1" )
- }
-
- make_class_${a}
-
- if [[ "${want_comparison_fields[0]}" == "all" ]] ; then
- want_comparison_fields=( ${want_keys[@]} )
- fi
-
- doxygen_comment()
- {
- cat
- }
-
- allow_named_args()
- {
- :
- }
-
- key()
- {
- :
- }
-
- cache_key()
- {
- :
- }
-
- inherit()
- {
- :
- }
-
- comparison_operators()
- {
- :
- }
-
- typedef()
- {
- :
- }
-
- make_class_${a}
-
- doxygen_comment()
- {
- :
- }
-
-
- extra_constructors()
- {
- echo
- cat
- }
-
- extra_methods()
- {
- echo
- cat
- }
-
- if [[ "${what_to_make}" == "--header" ]] ; then
- current_class=${a}
-
- if [[ -z ${want_visible} ]] ; then
- echo -n "class ${a}"
- else
- echo -n "class PALUDIS_VISIBLE ${a}"
- fi
-
- if [[ 0 != "${#want_inherit[@]}" ]] || [[ -n "${want_comparison_operators}" ]] ; then
- echo " :"
- if [[ -n "${want_comparison_operators}" ]] ; then
- if [[ "${want_comparison_operators}" == "all" ]] ; then
- echo -n " public paludis::relational_operators::HasRelationalOperators"
- elif [[ "${want_comparison_operators}" == "equality" ]] ; then
- echo -n " public paludis::equality_operators::HasEqualityOperators"
- else
- echo "bad first parameter for comparison_operators" 1>&2
- exit 1
- fi
-
- if [[ 0 == ${#want_inherit[@]} ]] ; then
- echo
- else
- echo ","
- fi
- fi
-
- for (( k = 0 ; k < ${#want_inherit[@]} ; k++ )) ; do
- echo -n " ${want_inherit[${k}]}"
- if [[ ${k} == $(( ${#want_inherit[@]} - 1 )) ]] ; then
- echo
- else
- echo ","
- fi
- done
- else
- echo
- fi
-
- echo "{"
- echo " ///\\name Typedefs"
- echo " ///\\{"
- echo
-
- for (( k = 0 ; k < ${#want_typedefs[@]} ; k++ )) ; do
- echo " public:"
- echo " typedef ${want_typedefs[${k}]};"
- echo
- done
-
- echo
- echo " ///\\}"
- echo
-
- echo " ///\\name Data members"
- echo " ///\\{"
- echo
-
- for (( k = 0 ; k < ${#want_keys[@]} ; k++ )) ; do
- if [[ ${want_key_types[${k}]/->} == ${want_key_types[${k}]} ]] ; then
- echo " public:"
- echo " ${want_key_types[${k}]} ${want_keys[${k}]};"
- echo
- else
- echo " protected:"
- echo " ${want_key_types[${k}]% ->*} raw_${want_keys[${k}]};"
- echo " mutable paludis::std::tr1::shared_ptr<const ${want_key_types[${k}]#*-> }> cached_${want_keys[${k}]};"
- echo
- fi
- done
-
- echo
- echo " ///\\}"
- echo
-
- echo " public:"
- echo
-
- echo " ///\\name Cache key methods"
- echo " ///\\{"
- echo
- for (( k = 0 ; k < ${#want_keys[@]} ; k++ )) ; do
- if [[ ${want_key_types[${k}]/->} != ${want_key_types[${k}]} ]] ; then
- echo " ${current_class} & set_${want_keys[${k}]}($(make_const_ref ${want_key_types[${k}]% ->*}));"
- echo
- echo " const ${want_key_types[${k}]%-> *} get_raw_${want_keys[${k}]}() const"
- echo " PALUDIS_ATTRIBUTE((warn_unused_result));"
- echo
- echo " paludis::std::tr1::shared_ptr<const ${want_key_types[${k}]#*-> }> ${want_keys[${k}]}() const"
- echo " PALUDIS_ATTRIBUTE((warn_unused_result));"
- echo
- fi
- done
- echo
- echo " ///\\}"
-
-
- if [[ -n "${want_comparison_operators}" ]] ; then
-
- echo " ///\\name Comparison operators"
- echo " ///\\{"
- echo
-
- if [[ "${want_comparison_operators}" == "all" ]] ; then
- echo " bool operator== (const ${a} & other) const;"
- echo " bool operator< (const ${a} & other) const;"
- elif [[ "${want_comparison_operators}" == "equality" ]] ; then
- echo " bool operator== (const ${a} & other) const;"
- else
- echo "bad first parameter for comparison_operators" 1>&2
- exit 1
- fi
-
- echo
- echo " ///\\}"
- echo
- fi
-
- echo " ///\\name Basic operations"
- echo " ///\\{"
- echo
-
- echo " explicit ${a}("
- for (( k = 0 ; k < ${#want_keys[@]} ; k++ )) ; do
- echo -n " $(make_const_ref "${want_key_types[${k}]% ->*}") value_for_${want_keys[${k}]}"
- if [[ -n ${want_key_defaults[${k}]} ]] ; then
- echo -n "=${want_key_defaults[${k}]}"
- fi
- if [[ $(( ${k} + 1 )) -lt ${#want_keys[@]} ]] ; then
- echo ","
- else
- echo
- fi
- done
- echo " );"
- echo
-
- make_class_${a}
-
- echo
- echo " ///\\}"
- echo
-
- if [[ -n "${want_named_args}" ]] ; then
-
- echo " public:"
- echo " ///\\name Named argument constructor"
- echo " ///\\{"
- echo
-
- echo "/**"
- echo " * Named arguments for the constructor for ${current_class}."
- echo " *"
- echo " * \\see ${current_class}"
- echo " * \\ingroup g_named_arguments"
- echo " * \\nosubgrouping"
- echo " */"
-
- echo "template <"
- for (( k = 0 ; k < ${#want_keys[@]} ; k++ )) ; do
- echo -n " bool has_${k}_ = true"
- if [[ $(( ${k} + 1 )) -lt ${#want_keys[@]} ]] ; then
- echo ","
- else
- echo ">"
- fi
- done
- echo -n "class NamedArguments"
-
- if [[ "${want_named_args}" == "cc" ]] ; then
- echo ";"
- else
- echo
- echo "{"
- echo " friend class ${current_class};"
- echo " template <"
- for (( k = 0 ; k < ${#want_keys[@]} ; k++ )) ; do
- echo -n " bool"
- if [[ $(( ${k} + 1 )) -lt ${#want_keys[@]} ]] ; then
- echo ","
- else
- echo ">"
- fi
- done
- echo " friend class ${current_class}::NamedArguments;"
- echo
- echo " private:"
-
- for (( k = 0 ; k < ${#want_keys[@]} ; k++ )) ; do
- echo " const typename paludis::Select<has_${k}_, ${want_key_types[${k}]% ->*}, paludis::Empty>::Type _v${k};"
- done
-
- echo " NamedArguments("
- for (( k = 0 ; k < ${#want_keys[@]} ; k++ )) ; do
- echo -n " const typename paludis::Select<has_${k}_, ${want_key_types[${k}]% ->*}, paludis::Empty>::Type & v${k}"
- if [[ $(( ${k} + 1 )) -lt ${#want_keys[@]} ]] ; then
- echo ","
- else
- echo ") :"
- fi
- done
- for (( k = 0 ; k < ${#want_keys[@]} ; k++ )) ; do
- echo -n " _v${k}(v${k})"
- if [[ $(( ${k} + 1 )) -lt ${#want_keys[@]} ]] ; then
- echo ","
- else
- echo
- fi
- done
- echo " {"
- echo " }"
-
- echo
- echo " public:"
- echo
-
- echo " ///\\name Value specification functions"
- echo " ///\\{"
-
- for (( k = 0 ; k < ${#want_keys[@]} ; k++ )) ; do
- echo " /**"
- echo " * Set the value of the ${current_class}.${want_keys[${k}]} member."
- echo " */"
- echo " NamedArguments<"
- for (( kk = 0 ; kk < ${#want_keys[@]} ; kk++ )) ; do
- if [[ ${k} == ${kk} ]] ; then
- echo -n " true"
- else
- echo -n " has_${kk}_"
- fi
- if [[ $(( ${kk} + 1 )) -lt ${#want_keys[@]} ]] ; then
- echo ","
- else
- echo ">"
- fi
- done
- echo " ${want_keys[${k}]}($(make_const_ref "${want_key_types[${k}]% ->*}" ) v)"
- echo " {"
- echo " const typename paludis::Select<has_${k}_, void, paludis::Empty>::Type"
- echo " check_not_already_specified = paludis::Empty::instance;"
- echo
- echo " return NamedArguments<"
- for (( kk = 0 ; kk < ${#want_keys[@]} ; kk++ )) ; do
- if [[ ${k} == ${kk} ]] ; then
- echo -n " true"
- else
- echo -n " has_${kk}_"
- fi
- if [[ $(( ${kk} + 1 )) -lt ${#want_keys[@]} ]] ; then
- echo ","
- else
- echo ">("
- fi
- done
- for (( kk = 0 ; kk < ${#want_keys[@]} ; kk++ )) ; do
- if [[ ${k} == ${kk} ]] ; then
- echo -n " v"
- else
- echo -n " _v${kk}"
- fi
- if [[ $(( ${kk} + 1 )) -lt ${#want_keys[@]} ]] ; then
- echo ","
- else
- echo ");"
- fi
- done
-
- echo " }"
- echo
- done
- echo " ///\\}"
-
- echo
- echo "};"
- fi
-
- echo " /**"
- echo " * Create using named arguments."
- echo " */"
- if [[ -n ${want_key_defaults[@]} ]] ; then
- echo -n " template <"
- first="true"
- for (( k = 0 ; k < ${#want_key_defaults[@]} ; k++ )) ; do
- if [[ -n ${want_key_defaults[${k}]} ]] ; then
- if [[ -z $first ]] ; then
- echo -n ", "
- fi
- first=""
- echo -n "bool b${k}_"
- fi
- done
- echo ">"
- fi
-
- echo " ${current_class}(const NamedArguments<"
- for (( k = 0 ; k < ${#want_keys[@]} ; k++ )) ; do
- if [[ -n ${want_key_defaults[${k}]} ]] ; then
- echo -n " b${k}_"
- else
- echo -n " true"
- fi
- if [[ $(( ${k} + 1 )) -lt ${#want_keys[@]} ]] ; then
- echo ","
- else
- echo "> & va);"
- fi
- done
-
- echo
- echo " /**"
- echo " * Convenience function to create an empty named arguments class."
- echo " */"
- echo " static NamedArguments<"
- for (( k = 0 ; k < ${#want_keys[@]} ; k++ )) ; do
- echo -n " false"
- if [[ $(( ${k} + 1 )) -lt ${#want_keys[@]} ]] ; then
- echo ","
- else
- echo ">"
- fi
- done
- echo " create() PALUDIS_ATTRIBUTE((warn_unused_result));"
-
- echo
- echo " ///\\}"
-
- fi
- echo "};"
-
- elif [[ "${what_to_make}" == "--source" ]] ; then
-
- if [[ "${want_named_args}" == "cc" ]] ; then
- echo "template <"
- for (( k = 0 ; k < ${#want_keys[@]} ; k++ )) ; do
- echo -n " bool has_${k}_"
- if [[ $(( ${k} + 1 )) -lt ${#want_keys[@]} ]] ; then
- echo ","
- else
- echo ">"
- fi
- done
- echo "class ${a}::NamedArguments"
- echo "{"
- echo " friend class ${a};"
- echo " public:"
-
- for (( k = 0 ; k < ${#want_keys[@]} ; k++ )) ; do
- echo " const typename paludis::Select<has_${k}_, ${want_key_types[${k}]% ->*}, paludis::Empty>::Type _v${k};"
- done
-
- echo " NamedArguments("
- for (( k = 0 ; k < ${#want_keys[@]} ; k++ )) ; do
- echo -n " const typename paludis::Select<has_${k}_, ${want_key_types[${k}]% ->*}, paludis::Empty>::Type & v${k}"
- if [[ $(( ${k} + 1 )) -lt ${#want_keys[@]} ]] ; then
- echo ","
- else
- echo ") :"
- fi
- done
- for (( k = 0 ; k < ${#want_keys[@]} ; k++ )) ; do
- echo -n " _v${k}(v${k})"
- if [[ $(( ${k} + 1 )) -lt ${#want_keys[@]} ]] ; then
- echo ","
- else
- echo
- fi
- done
- echo " {"
- echo " }"
-
- echo
- echo " public:"
- echo
-
- echo " ///\\name Value specification functions"
- echo " ///\\{"
-
- for (( k = 0 ; k < ${#want_keys[@]} ; k++ )) ; do
- echo " /**"
- echo " * Set the value of the ${current_class}.${want_keys[${k}]} member."
- echo " */"
- echo " NamedArguments<"
- for (( kk = 0 ; kk < ${#want_keys[@]} ; kk++ )) ; do
- if [[ ${k} == ${kk} ]] ; then
- echo -n " true"
- else
- echo -n " has_${kk}_"
- fi
- if [[ $(( ${kk} + 1 )) -lt ${#want_keys[@]} ]] ; then
- echo ","
- else
- echo ">"
- fi
- done
- echo " ${want_keys[${k}]}($(make_const_ref "${want_key_types[${k}]% ->*}" ) v)"
- echo " {"
- echo " const typename paludis::Select<has_${k}_, void, paludis::Empty>::Type"
- echo " check_not_already_specified = paludis::Empty::instance;"
- echo
- echo " return NamedArguments<"
- for (( kk = 0 ; kk < ${#want_keys[@]} ; kk++ )) ; do
- if [[ ${k} == ${kk} ]] ; then
- echo -n " true"
- else
- echo -n " has_${kk}_"
- fi
- if [[ $(( ${kk} + 1 )) -lt ${#want_keys[@]} ]] ; then
- echo ","
- else
- echo ">("
- fi
- done
- for (( kk = 0 ; kk < ${#want_keys[@]} ; kk++ )) ; do
- if [[ ${k} == ${kk} ]] ; then
- echo -n " v"
- else
- echo -n " _v${kk}"
- fi
- if [[ $(( ${kk} + 1 )) -lt ${#want_keys[@]} ]] ; then
- echo ","
- else
- echo ");"
- fi
- done
-
- echo " }"
- echo
- done
- echo " ///\\}"
-
- echo
- echo "};"
- fi
-
- echo "${a}::${a}("
- for (( k = 0 ; k < ${#want_keys[@]} ; k++ )) ; do
- echo -n " $(make_const_ref "${want_key_types[${k}]% ->*}") value_for_${want_keys[${k}]}"
- if [[ $(( ${k} + 1 )) -lt ${#want_keys[@]} ]] ; then
- echo ","
- else
- echo ") :"
- fi
- done
- for (( k = 0 ; k < ${#want_keys[@]} ; k++ )) ; do
- if [[ ${want_key_types[${k}]/->} == ${want_key_types[${k}]} ]] ; then
- echo -n " ${want_keys[${k}]}(value_for_${want_keys[${k}]})"
- else
- echo " raw_${want_keys[${k}]}(value_for_${want_keys[${k}]}),"
- echo -n " cached_${want_keys[${k}]}()"
- fi
- if [[ $(( ${k} + 1 )) -lt ${#want_keys[@]} ]] ; then
- echo ","
- else
- echo
- fi
- done
- echo "{"
- echo "}"
- echo
-
- for (( k = 0 ; k < ${#want_keys[@]} ; k++ )) ; do
- if [[ ${want_key_types[${k}]/->} != ${want_key_types[${k}]} ]] ; then
- echo "${a} &"
- echo "${a}::set_${want_keys[${k}]}($(make_const_ref ${want_key_types[${k}]% ->*}) va)"
- echo "{"
- echo " raw_${want_keys[${k}]} = va;"
- echo " cached_${want_keys[${k}]}.reset();"
- echo " return *this;"
- echo "}"
- echo
- echo "const ${want_key_types[${k}]%-> *}"
- echo "${a}::get_raw_${want_keys[${k}]}() const"
- echo "{"
- echo " return raw_${want_keys[${k}]};"
- echo "}"
- echo
- echo "paludis::std::tr1::shared_ptr<const ${want_key_types[${k}]#*-> }>"
- echo "${a}::${want_keys[${k}]}() const"
- echo "{"
- echo " if (! cached_${want_keys[${k}]})"
- echo " cached_${want_keys[${k}]} = ${want_cache_func[${k}]}(raw_${want_keys[${k}]});"
- echo " return cached_${want_keys[${k}]};"
- echo "}"
- echo
- fi
- done
-
- if [[ -n "${want_named_args}" ]] ; then
- if [[ -n ${want_key_defaults[@]} ]] ; then
- echo -n "template <"
- first="true"
- for (( k = 0 ; k < ${#want_key_defaults[@]} ; k++ )) ; do
- if [[ -n ${want_key_defaults[${k}]} ]] ; then
- if [[ -z $first ]] ; then
- echo -n ", "
- fi
- first=""
- echo -n "bool b${k}_"
- fi
- done
- echo ">"
- fi
-
- echo "${a}::${a}(const NamedArguments<"
- for (( k = 0 ; k < ${#want_keys[@]} ; k++ )) ; do
- if [[ -n ${want_key_defaults[${k}]} ]] ; then
- echo -n " b${k}_"
- else
- echo -n " true"
- fi
- if [[ $(( ${k} + 1 )) -lt ${#want_keys[@]} ]] ; then
- echo ","
- else
- echo "> & va) :"
- fi
- done
- for (( k = 0 ; k < ${#want_keys[@]} ; k++ )) ; do
- if [[ ${want_key_types[${k}]/->} == ${want_key_types[${k}]} ]] ; then
- if [[ -n ${want_key_defaults[${k}]} ]] ; then
- echo -n " ${want_keys[${k}]}(SelectValue<b${k}_>::get(va._v${k}, ${want_key_defaults[${k}]}))"
- else
- echo -n " ${want_keys[${k}]}(va._v${k})"
- fi
- else
- echo " raw_${want_keys[${k}]}(va._v${k}),"
- echo -n " cached_${want_keys[${k}]}()"
- fi
- if [[ $(( ${k} + 1 )) -lt ${#want_keys[@]} ]] ; then
- echo ","
- else
- echo
- fi
- done
- echo " {"
- echo " }"
- fi
-
- if [[ -n "${want_comparison_operators}" ]] ; then
-
- if [[ "${want_comparison_operators}" == "all" ]] ; then
- echo "bool"
- echo "${a}::operator== (const ${a} & other) const"
- echo "{"
- for (( k = 0 ; k < ${#want_comparison_fields[@]} ; k++ )) ; do
- w="${want_comparison_fields[${k}]}"
- s=${w//[^*]}
- w=${w#\*}
- echo " if (${want_comparison_fields[${k}]} != ${s}other.${w})"
- echo " return false;"
- done
- echo " return true;"
- echo "}"
- echo
- echo "bool"
- echo "${a}::operator< (const ${a} & other) const"
- echo "{"
- echo " using namespace std::rel_ops;"
- echo
- for (( k = 0 ; k < ${#want_comparison_fields[@]} ; k++ )) ; do
- w="${want_comparison_fields[${k}]}"
- s=${w//[^*]}
- w=${w#\*}
- echo " if (${want_comparison_fields[${k}]} < ${s}other.${w})"
- echo " return true;"
- echo " if (${want_comparison_fields[${k}]} > ${s}other.${w})"
- echo " return false;"
- done
- echo " return false;"
- echo "}"
- echo
- elif [[ "${want_comparison_operators}" == "equality" ]] ; then
- echo "bool"
- echo "${a}::operator== (const ${a} & other) const"
- echo "{"
- for (( k = 0 ; k < ${#want_comparison_fields[@]} ; k++ )) ; do
- w="${want_comparison_fields[${k}]}"
- s=${w//[^*]}
- w=${w#\*}
- echo " if (${want_comparison_fields[${k}]} != ${s}other.${w})"
- echo " return false;"
- done
- echo " return true;"
- echo "}"
- echo
- else
- echo "bad first parameter for comparison_operators" 1>&2
- exit 1
- fi
- fi
-
- if [[ -n "${want_named_args}" ]] ; then
- echo
- echo "${a}::NamedArguments<"
- for (( k = 0 ; k < ${#want_keys[@]} ; k++ )) ; do
- echo -n " false"
- if [[ $(( ${k} + 1 )) -lt ${#want_keys[@]} ]] ; then
- echo ","
- else
- echo ">"
- fi
- done
- echo "${a}::create()"
- echo "{"
- echo " return ${a}::NamedArguments<"
- for (( k = 0 ; k < ${#want_keys[@]} ; k++ )) ; do
- echo -n " false"
- if [[ $(( ${k} + 1 )) -lt ${#want_keys[@]} ]] ; then
- echo ","
- else
- echo ">("
- fi
- done
- for (( k = 0 ; k < ${#want_keys[@]} ; k++ )) ; do
- echo -n " paludis::Empty::instance"
- if [[ $(( ${k} + 1 )) -lt ${#want_keys[@]} ]] ; then
- echo ","
- else
- echo ");"
- fi
- done
- echo "}"
-
- fi
-
- else
- echo "bad argument (expected --header or --source)" 1>&2
- exit 1
- fi
-done
-
diff --git a/paludis/dep_spec_flattener.hh b/paludis/dep_spec_flattener.hh
index 888e03e..bbb6cc1 100644
--- a/paludis/dep_spec_flattener.hh
+++ b/paludis/dep_spec_flattener.hh
@@ -29,7 +29,6 @@
#include <paludis/util/visitor.hh>
#include <paludis/util/no_type.hh>
#include <paludis/util/wrapped_forward_iterator-fwd.hh>
-#include <paludis/util/sr.hh>
#include <tr1/memory>
/** \file
diff --git a/paludis/environments/no_config/no_config_environment.hh b/paludis/environments/no_config/no_config_environment.hh
index eb78bb4..7a98b7d 100644
--- a/paludis/environments/no_config/no_config_environment.hh
+++ b/paludis/environments/no_config/no_config_environment.hh
@@ -23,7 +23,6 @@
#include <paludis/environment_implementation.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/private_implementation_pattern.hh>
-#include <paludis/util/sr.hh>
#include <paludis/util/map-fwd.hh>
namespace paludis
diff --git a/paludis/environments/paludis/paludis_config.cc b/paludis/environments/paludis/paludis_config.cc
index 5a6b6fc..adecc60 100644
--- a/paludis/environments/paludis/paludis_config.cc
+++ b/paludis/environments/paludis/paludis_config.cc
@@ -34,7 +34,6 @@
#include <paludis/util/is_file_with_extension.hh>
#include <paludis/util/log.hh>
#include <paludis/util/stringify.hh>
-#include <paludis/util/sr.hh>
#include <paludis/util/set.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/map.hh>
diff --git a/paludis/repositories/e/eapi.hh b/paludis/repositories/e/eapi.hh
index 6789b78..9695e23 100644
--- a/paludis/repositories/e/eapi.hh
+++ b/paludis/repositories/e/eapi.hh
@@ -24,7 +24,6 @@
#include <paludis/repositories/e/dep_parser-fwd.hh>
#include <paludis/repositories/e/iuse.hh>
#include <paludis/util/attributes.hh>
-#include <paludis/util/sr.hh>
#include <paludis/util/instantiation_policy.hh>
#include <paludis/util/private_implementation_pattern.hh>
#include <paludis/util/options.hh>
diff --git a/paludis/repositories/e/manifest2_reader.hh b/paludis/repositories/e/manifest2_reader.hh
index 70ef782..621e0d3 100644
--- a/paludis/repositories/e/manifest2_reader.hh
+++ b/paludis/repositories/e/manifest2_reader.hh
@@ -23,7 +23,6 @@
#include <paludis/action.hh>
#include <paludis/util/fs_entry-fwd.hh>
#include <paludis/util/stringify.hh>
-#include <paludis/util/sr.hh>
#include <paludis/util/wrapped_forward_iterator-fwd.hh>
#include <string>
diff --git a/paludis/repository.hh b/paludis/repository.hh
index 189a24b..2125c0a 100644
--- a/paludis/repository.hh
+++ b/paludis/repository.hh
@@ -29,7 +29,6 @@
#include <paludis/qa-fwd.hh>
#include <paludis/util/attributes.hh>
#include <paludis/util/exception.hh>
-#include <paludis/util/sr.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/wrapped_forward_iterator-fwd.hh>
#include <paludis/util/options.hh>
diff --git a/paludis/util/files.m4 b/paludis/util/files.m4
index 192c7e0..bcaf51f 100644
--- a/paludis/util/files.m4
+++ b/paludis/util/files.m4
@@ -53,12 +53,12 @@ add(`random', `hh', `cc', `test')
add(`remove_shared_ptr', `hh')
add(`rmd160', `hh', `cc', `test')
add(`save', `hh', `test')
+add(`select', `hh')
add(`sequence', `hh', `fwd', `impl', `cc')
add(`set', `hh', `fwd', `impl')
add(`sha1', `hh', `cc', `test')
add(`sha256', `hh', `cc', `test')
add(`simple_parser', `hh', `cc')
-add(`sr', `hh', `cc')
add(`stringify', `hh', `test')
add(`strip', `hh', `cc', `test')
add(`system', `hh', `cc', `test', `testscript')
diff --git a/paludis/util/sr.hh b/paludis/util/select.hh
index ee4adcf..a399811 100644
--- a/paludis/util/sr.hh
+++ b/paludis/util/select.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006, 2007 Ciaran McCreesh
+ * Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -23,7 +23,7 @@
#include <paludis/util/attributes.hh>
/** \file
- * Declarations for various sr-related utility classes.
+ * Declarations for various metaprogramming utility classes.
*
* \ingroup g_oo
*
@@ -34,17 +34,6 @@
namespace paludis
{
- /**
- * Metaprogramming: an empty class.
- *
- * \ingroup g_oo
- */
- struct Empty
- {
- /// Convenience instance.
- static const PALUDIS_VISIBLE Empty instance;
- };
-
template <bool value_, typename IfTrue_, typename IfFalse_>
struct Select;
@@ -107,3 +96,4 @@ namespace paludis
}
#endif
+
diff --git a/paludis/util/sr.cc b/paludis/util/sr.cc
deleted file mode 100644
index e57f541..0000000
--- a/paludis/util/sr.cc
+++ /dev/null
@@ -1,25 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2006, 2007 Ciaran McCreesh
- *
- * This file is part of the Paludis package manager. Paludis is free software;
- * you can redistribute it and/or modify it under the terms of the GNU General
- * Public License version 2, as published by the Free Software Foundation.
- *
- * Paludis 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, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include "sr.hh"
-
-using namespace paludis;
-
-const Empty Empty::instance = Empty();
-
diff --git a/paludis/util/validated.hh b/paludis/util/validated.hh
index 1eb1eaf..f710511 100644
--- a/paludis/util/validated.hh
+++ b/paludis/util/validated.hh
@@ -24,7 +24,7 @@
#include <functional>
#include <paludis/util/validated-fwd.hh>
#include <paludis/util/operators.hh>
-#include <paludis/util/sr.hh>
+#include <paludis/util/select.hh>
/** \file
* Validated declarations.
diff --git a/src/clients/inquisitio/matcher.hh b/src/clients/inquisitio/matcher.hh
index 86b69de..70d5fcd 100644
--- a/src/clients/inquisitio/matcher.hh
+++ b/src/clients/inquisitio/matcher.hh
@@ -21,7 +21,6 @@
#define PALUDIS_GUARD_SRC_CLIENTS_INQUISITIO_MATCHER_HH 1
#include <paludis/util/instantiation_policy.hh>
-#include <paludis/util/sr.hh>
#include <paludis/util/exception.hh>
#include <string>
#include <tr1/memory>
diff --git a/src/output/console_install_task.cc b/src/output/console_install_task.cc
index 73e72fe..1ed1ac0 100644
--- a/src/output/console_install_task.cc
+++ b/src/output/console_install_task.cc
@@ -24,7 +24,6 @@
#include <paludis/util/log.hh>
#include <paludis/util/pretty_print.hh>
-#include <paludis/util/sr.hh>
#include <paludis/util/strip.hh>
#include <paludis/util/tokeniser.hh>
#include <paludis/util/mutex.hh>