فهرست منبع

add missing required parameter

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@45358 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 14 سال پیش
والد
کامیت
fe3022f69b
1فایلهای تغییر یافته به همراه6 افزوده شده و 2 حذف شده
  1. 6 2
      raster/r.rescale/main.c

+ 6 - 2
raster/r.rescale/main.c

@@ -23,8 +23,9 @@ int main(int argc, char *argv[])
 {
 {
     char input[GNAME_MAX+8];
     char input[GNAME_MAX+8];
     char output[GNAME_MAX+8];
     char output[GNAME_MAX+8];
+    char rules[GNAME_MAX+8];
     char title[GPATH_MAX];
     char title[GPATH_MAX];
-    const char *args[5];
+    const char *args[6];
     struct Popen child;
     struct Popen child;
     FILE *fp;
     FILE *fp;
     long old_min, old_max;
     long old_min, old_max;
@@ -124,11 +125,14 @@ int main(int argc, char *argv[])
     else
     else
 	sprintf(title, "title=rescale of %s", old_name);
 	sprintf(title, "title=rescale of %s", old_name);
 
 
+    sprintf(rules, "rules=-");
+
     args[0] = "r.reclass";
     args[0] = "r.reclass";
     args[1] = input;
     args[1] = input;
     args[2] = output;
     args[2] = output;
     args[3] = title;
     args[3] = title;
-    args[4] = NULL;
+    args[4] = rules;
+    args[5] = NULL;
 
 
     fp = G_popen_write(&child, "r.reclass", args);
     fp = G_popen_write(&child, "r.reclass", args);