[GRASS-SVN] r33967 - in
grass/branches/develbranch_6/imagery/i.ortho.photo:
photo.2image photo.2target
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Oct 22 01:45:25 EDT 2008
Author: hamish
Date: 2008-10-22 01:45:25 -0400 (Wed, 22 Oct 2008)
New Revision: 33967
Modified:
grass/branches/develbranch_6/imagery/i.ortho.photo/photo.2image/curses.c
grass/branches/develbranch_6/imagery/i.ortho.photo/photo.2target/curses.c
Log:
fix octals, allow both backspace and DEL (merge from i.points r20310)
Modified: grass/branches/develbranch_6/imagery/i.ortho.photo/photo.2image/curses.c
===================================================================
--- grass/branches/develbranch_6/imagery/i.ortho.photo/photo.2image/curses.c 2008-10-21 22:53:03 UTC (rev 33966)
+++ grass/branches/develbranch_6/imagery/i.ortho.photo/photo.2image/curses.c 2008-10-22 05:45:25 UTC (rev 33967)
@@ -199,7 +199,7 @@
break;
getyx(stdscr, y, x);
- if (c > 037 && c < 0177) {
+ if (c > '\037' && c < '\177') { /* octal codes: accept space to '~' */
if (x < PROMPT_WINDOW->right) {
*answer++ = c;
*answer = 0;
@@ -208,7 +208,7 @@
}
continue;
}
- if (c == '\b') {
+ if (c == '\b' || c == '\177') { /* backspace or DEL (decimal 8,127) */
if (n > 0) {
answer--;
*answer = 0;
Modified: grass/branches/develbranch_6/imagery/i.ortho.photo/photo.2target/curses.c
===================================================================
--- grass/branches/develbranch_6/imagery/i.ortho.photo/photo.2target/curses.c 2008-10-21 22:53:03 UTC (rev 33966)
+++ grass/branches/develbranch_6/imagery/i.ortho.photo/photo.2target/curses.c 2008-10-22 05:45:25 UTC (rev 33967)
@@ -197,7 +197,7 @@
break;
getyx(stdscr, y, x);
- if (c > 037 && c < 0177) {
+ if (c > '\037' && c < '\177') { /* octal codes: accept space to '~' */
if (x < PROMPT_WINDOW->right) {
*answer++ = c;
*answer = 0;
@@ -206,7 +206,7 @@
}
continue;
}
- if (c == '\b') {
+ if (c == '\b' || c == '\177') { /* backspace or DEL (decimal 8,127) */
if (n > 0) {
answer--;
*answer = 0;
More information about the grass-commit
mailing list