Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (b61827cc714dfcc996daa6803d3f41d70926a062)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Jaka Kranjc <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (b61827cc714dfcc996daa6803d3f41d70926a062)
  • Date: Mon, 22 Dec 2008 14:03:50 -0600

GIT changes to master sorcery by Jaka Kranjc <lynxlynxlynx AT sourcemage.org>:

ChangeLog | 3 +++
var/lib/sorcery/modules/libmisc | 30 +++++++++++++-----------------
2 files changed, 16 insertions(+), 17 deletions(-)

New commits:
commit b61827cc714dfcc996daa6803d3f41d70926a062
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

libmisc: removed the bubble around real_query and reformatted it

diff --git a/ChangeLog b/ChangeLog
index 25674c8..62f33a4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2008-12-22 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * libmisc: removed the bubble around real_query and reformatted it
+
2008-12-19 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* libcast: split run_conflicts into query_conflicts and
dispel_conflicts, so they can be asked for sooner #4815
diff --git a/var/lib/sorcery/modules/libmisc b/var/lib/sorcery/modules/libmisc
index 81a9238..323cea0 100755
--- a/var/lib/sorcery/modules/libmisc
+++ b/var/lib/sorcery/modules/libmisc
@@ -100,31 +100,27 @@ function isalpha() {
## Returns true or false based on the answer given.
##
#---------------------------------------------------------------------
-function real_query() { (
+function real_query() {
+ debug "libmisc" "Running query() with the following arguments: '$1' and
'$2'"
+ local _response

- debug "libmisc" "Running query() with the following arguments: '$1' and
'$2'"
+ while true; do
+ _response=""

- while true ; do
+ if [[ -z $SILENT ]]; then
+ echo -e -n "${QUERY_COLOR}$1 [$2] ${DEFAULT_COLOR}"

- RESPONSE=""
-
- if [ -z "$SILENT" ]; then
-
- echo -e -n "${QUERY_COLOR}$1 [$2] ${DEFAULT_COLOR}"
-
- read -t $PROMPT_DELAY -n 1 RESPONSE
+ read -t $PROMPT_DELAY -n 1 _response
echo
fi

- RESPONSE=${RESPONSE:=$2}
- case $RESPONSE in
- n|N) return 1 ;;
- y|Y) return 0 ;;
+ _response=${_response:=$2}
+ case $_response in
+ n|N) return 1 ;;
+ y|Y) return 0 ;;
esac
-
done
-
-) }
+}

#---------------------------------------------------------------------
## @param return_var



  • [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (b61827cc714dfcc996daa6803d3f41d70926a062), Jaka Kranjc, 12/22/2008

Archive powered by MHonArc 2.6.24.

Top of Page