[GRASS-SVN] r31455 - in grass/branches/develbranch_6: include lib/imagery

svn_grass at osgeo.org svn_grass at osgeo.org
Wed May 21 03:01:38 EDT 2008


Author: glynn
Date: 2008-05-21 03:01:37 -0400 (Wed, 21 May 2008)
New Revision: 31455

Modified:
   grass/branches/develbranch_6/include/imagedefs.h
   grass/branches/develbranch_6/lib/imagery/find.c
   grass/branches/develbranch_6/lib/imagery/fopen.c
   grass/branches/develbranch_6/lib/imagery/group.c
   grass/branches/develbranch_6/lib/imagery/list_gp.c
   grass/branches/develbranch_6/lib/imagery/list_subgp.c
   grass/branches/develbranch_6/lib/imagery/loc_info.c
   grass/branches/develbranch_6/lib/imagery/ls_groups.c
   grass/branches/develbranch_6/lib/imagery/points.c
   grass/branches/develbranch_6/lib/imagery/ref.c
   grass/branches/develbranch_6/lib/imagery/sigfile.c
   grass/branches/develbranch_6/lib/imagery/sigset.c
   grass/branches/develbranch_6/lib/imagery/sigsetfile.c
   grass/branches/develbranch_6/lib/imagery/target.c
   grass/branches/develbranch_6/lib/imagery/title.c
Log:
Use "const" where appropriate (merge r31454 from trunk)


Modified: grass/branches/develbranch_6/include/imagedefs.h
===================================================================
--- grass/branches/develbranch_6/include/imagedefs.h	2008-05-21 06:34:47 UTC (rev 31454)
+++ grass/branches/develbranch_6/include/imagedefs.h	2008-05-21 07:01:37 UTC (rev 31455)
@@ -17,54 +17,54 @@
 /* eol.c */
 int I_get_to_eol(char *, int, FILE *);
 /* find.c */
-int I_find_group(char *);
-int I_find_group_file(char *, char *);
-int I_find_subgroup(char *, char *);
-int I_find_subgroup_file(char *, char *, char *);
+int I_find_group(const char *);
+int I_find_group_file(const char *, const char *);
+int I_find_subgroup(const char *, const char *);
+int I_find_subgroup_file(const char *, const char *, const char *);
 /* fopen.c */
-FILE *I_fopen_group_file_new(char *, char *);
-FILE *I_fopen_group_file_append(char *, char *);
-FILE *I_fopen_group_file_old(char *, char *);
-FILE *I_fopen_subgroup_file_new(char *, char *, char *);
-FILE *I_fopen_subgroup_file_append(char *, char *, char *);
-FILE *I_fopen_subgroup_file_old(char *, char *, char *);
+FILE *I_fopen_group_file_new(const char *, const char *);
+FILE *I_fopen_group_file_append(const char *, const char *);
+FILE *I_fopen_group_file_old(const char *, const char *);
+FILE *I_fopen_subgroup_file_new(const char *, const char *, const char *);
+FILE *I_fopen_subgroup_file_append(const char *, const char *, const char *);
+FILE *I_fopen_subgroup_file_old(const char *, const char *, const char *);
 /* georef.c */
 int I_compute_georef_equations(struct Control_Points *, double [3], double [3], double [3], double [3]);
 int I_georef(double, double, double *, double *, double [3], double [3]);
 /* group.c */
 int I_get_group(char *);
-int I_put_group(char *);
-int I_get_subgroup(char *, char *);
-int I_put_subgroup(char *, char *);
-int I_get_group_ref(char *, struct Ref *);
-int I_get_subgroup_ref(char *, char *, struct Ref *);
+int I_put_group(const char *);
+int I_get_subgroup(const char *, char *);
+int I_put_subgroup(const char *, const char *);
+int I_get_group_ref(const char *, struct Ref *);
+int I_get_subgroup_ref(const char *, const char *, struct Ref *);
 int I_init_ref_color_nums(struct Ref *);
-int I_put_group_ref(char *, struct Ref *);
-int I_put_subgroup_ref(char *, char *, struct Ref *);
-int I_add_file_to_group_ref(char *, char *, struct Ref *);
-int I_transfer_group_ref_file(struct Ref *, int, struct Ref *);
+int I_put_group_ref(const char *, const struct Ref *);
+int I_put_subgroup_ref(const char *, const char *, const struct Ref *);
+int I_add_file_to_group_ref(const char *, const char *, struct Ref *);
+int I_transfer_group_ref_file(const struct Ref *, int, struct Ref *);
 int I_init_group_ref(struct Ref *);
 int I_free_group_ref(struct Ref *);
 /* list_gp.c */
-int I_list_group(char *, struct Ref *, FILE *);
-int I_list_group_simple(struct Ref *, FILE *);
+int I_list_group(const char *, const struct Ref *, FILE *);
+int I_list_group_simple(const struct Ref *, FILE *);
 /* list_subgp.c */
-int I_list_subgroup(char *, char *, struct Ref *, FILE *);
-int I_list_subgroup_simple(struct Ref *, FILE *);
+int I_list_subgroup(const char *, const char *, const struct Ref *, FILE *);
+int I_list_subgroup_simple(const struct Ref *, FILE *);
 /* loc_info.c */
-int I_location_info(char *, char *);
+int I_location_info(char *, const char *);
 /* ls_groups.c */
 int I_list_groups(int);
-int I_list_subgroups(char *, int);
+int I_list_subgroups(const char *, int);
 /* points.c */
 int I_new_control_point(struct Control_Points *, double, double, double, double, int);
-int I_get_control_points(char *, struct Control_Points *);
-int I_put_control_points(char *, struct Control_Points *);
+int I_get_control_points(const char *, struct Control_Points *);
+int I_put_control_points(const char *, const struct Control_Points *);
 /* ref.c */
-FILE *I_fopen_group_ref_new(char *);
-FILE *I_fopen_group_ref_old(char *);
-FILE *I_fopen_subgroup_ref_new(char *, char *);
-FILE *I_fopen_subgroup_ref_old(char *, char *);
+FILE *I_fopen_group_ref_new(const char *);
+FILE *I_fopen_group_ref_old(const char *);
+FILE *I_fopen_subgroup_ref_new(const char *, const char *);
+FILE *I_fopen_subgroup_ref_old(const char *, const char *);
 /* sig.c */
 int I_init_signatures(struct Signature *, int);
 int I_new_signature(struct Signature *);
@@ -73,8 +73,8 @@
 int I_read_signatures(FILE *, struct Signature *);
 int I_write_signatures(FILE *, struct Signature *);
 /* sigfile.c */
-FILE *I_fopen_signature_file_new(char *, char *, char *);
-FILE *I_fopen_signature_file_old(char *, char *, char *);
+FILE *I_fopen_signature_file_new(const char *, const char *, const char *);
+FILE *I_fopen_signature_file_old(const char *, const char *, const char *);
 /* sigset.c */
 int I_SigSetNClasses(struct SigSet *);
 struct ClassData *I_AllocClassData(struct SigSet *, struct ClassSig *, int);
@@ -83,20 +83,20 @@
 struct ClassSig *I_NewClassSig(struct SigSet *);
 struct SubSig *I_NewSubSig(struct SigSet *, struct ClassSig *);
 int I_ReadSigSet(FILE *, struct SigSet *);
-int I_SetSigTitle(struct SigSet *, char *);
-char *I_GetSigTitle(struct SigSet *);
-int I_SetClassTitle(struct ClassSig *, char *);
-char *I_GetClassTitle(struct ClassSig *);
-int I_WriteSigSet(FILE *, struct SigSet *);
+int I_SetSigTitle(struct SigSet *, const char *);
+const char *I_GetSigTitle(const struct SigSet *);
+int I_SetClassTitle(struct ClassSig *, const char *);
+const char *I_GetClassTitle(const struct ClassSig *);
+int I_WriteSigSet(FILE *, const struct SigSet *);
 /* sigsetfile.c */
-FILE *I_fopen_sigset_file_new(char *, char *, char *);
-FILE *I_fopen_sigset_file_old(char *, char *, char *);
+FILE *I_fopen_sigset_file_new(const char *, const char *, const char *);
+FILE *I_fopen_sigset_file_old(const char *, const char *, const char *);
 /* target.c */
-int I_get_target(char *, char *, char *);
-int I_put_target(char *, char *, char *);
+int I_get_target(const char *, char *, char *);
+int I_put_target(const char *, const char *, const char *);
 /* title.c */
-int I_get_group_title(char *, char *, int);
-int I_put_group_title(char *, char *);
+int I_get_group_title(const char *, char *, int);
+int I_put_group_title(const char *, const char *);
 /* var.c */
 double I_variance(double, double, int);
 double I_stddev(double, double, int);

Modified: grass/branches/develbranch_6/lib/imagery/find.c
===================================================================
--- grass/branches/develbranch_6/lib/imagery/find.c	2008-05-21 06:34:47 UTC (rev 31454)
+++ grass/branches/develbranch_6/lib/imagery/find.c	2008-05-21 07:01:37 UTC (rev 31455)
@@ -17,7 +17,7 @@
  *  \return int
  */
 
-int I_find_group(char *group)
+int I_find_group(const char *group)
 {
     if (group == NULL || *group == 0)
 	return 0;
@@ -25,7 +25,7 @@
     return G_find_file2 ("group", group, G_mapset()) != NULL ;
 }
 
-int I_find_group_file(char *group, char *file)
+int I_find_group_file(const char *group, const char *file)
 {
     if (!I_find_group (group))
 	return 0;
@@ -35,7 +35,7 @@
     return G_find_file2_misc ("group", file, group, G_mapset()) != NULL ;
 }
 
-int I_find_subgroup(char *group, char *subgroup)
+int I_find_subgroup(const char *group, const char *subgroup)
 {
     char element[GNAME_MAX];
 
@@ -49,7 +49,7 @@
     return G_find_file2_misc ("group", element, group, G_mapset()) != NULL ;
 }
 
-int I_find_subgroup_file(char *group, char *subgroup, char *file)
+int I_find_subgroup_file(const char *group, const char *subgroup, const char *file)
 {
     char element[GNAME_MAX*2];
 

Modified: grass/branches/develbranch_6/lib/imagery/fopen.c
===================================================================
--- grass/branches/develbranch_6/lib/imagery/fopen.c	2008-05-21 06:34:47 UTC (rev 31454)
+++ grass/branches/develbranch_6/lib/imagery/fopen.c	2008-05-21 07:01:37 UTC (rev 31455)
@@ -15,7 +15,7 @@
 
 
 FILE *
-I_fopen_group_file_new(char *group, char *file)
+I_fopen_group_file_new(const char *group, const char *file)
 {
     FILE *fd;
 
@@ -29,7 +29,7 @@
 
 
 FILE *
-I_fopen_group_file_append (char *group, char *file)
+I_fopen_group_file_append (const char *group, const char *file)
 {
     FILE *fd;
 
@@ -43,7 +43,7 @@
 
 
 FILE *
-I_fopen_group_file_old (char *group, char *file)
+I_fopen_group_file_old (const char *group, const char *file)
 {
     FILE *fd;
 
@@ -67,9 +67,9 @@
 
 FILE *
 I_fopen_subgroup_file_new (
-    char *group,
-    char *subgroup,
-    char *file)
+    const char *group,
+    const char *subgroup,
+    const char *file)
 {
     FILE *fd;
     char element[GNAME_MAX*2];
@@ -92,9 +92,9 @@
 
 FILE *
 I_fopen_subgroup_file_append (
-    char *group,
-    char *subgroup,
-    char *file)
+    const char *group,
+    const char *subgroup,
+    const char *file)
 {
     FILE *fd;
     char element[GNAME_MAX*2];
@@ -117,9 +117,9 @@
 
 FILE *
 I_fopen_subgroup_file_old (
-    char *group,
-    char *subgroup,
-    char *file)
+    const char *group,
+    const char *subgroup,
+    const char *file)
 {
     FILE *fd;
     char element[GNAME_MAX*2];

Modified: grass/branches/develbranch_6/lib/imagery/group.c
===================================================================
--- grass/branches/develbranch_6/lib/imagery/group.c	2008-05-21 06:34:47 UTC (rev 31454)
+++ grass/branches/develbranch_6/lib/imagery/group.c	2008-05-21 07:01:37 UTC (rev 31455)
@@ -27,9 +27,9 @@
 #include <string.h>
 #include <stdlib.h>
 #include <grass/imagery.h>
-static int get_ref(char *,char *,struct Ref *);
-static int set_color(char *,char *,char *,struct Ref *);
-static int put_ref(char *,char *,struct Ref *);
+static int get_ref(const char *, const char *, struct Ref *);
+static int set_color(const char *, const char *, const char *, struct Ref *);
+static int put_ref(const char *, const char *, const struct Ref *);
 
 /* get current group name from file GROUPFILE in current mapset */
 int I_get_group(char *group)
@@ -49,7 +49,7 @@
 }
 
 /* write group name to file GROUPFILE in current mapset */
-int I_put_group(char *group)
+int I_put_group(const char *group)
 {
     FILE *fd;
 
@@ -62,7 +62,7 @@
 }
 
 /* get current subgroup for group in current mapset */
-int I_get_subgroup (char *group,char *subgroup)
+int I_get_subgroup(const char *group, char *subgroup)
 {
     FILE *fd;
     int stat;
@@ -81,7 +81,7 @@
 }
 
 /* write current subgroup to group in current mapset */
-int I_put_subgroup(char *group,char *subgroup)
+int I_put_subgroup(const char *group, const char *subgroup)
 {
     FILE *fd;
 
@@ -109,7 +109,7 @@
  */
 
 int I_get_group_ref(
-    char *group,
+    const char *group,
     struct Ref *ref)
 {
     return get_ref (group, "", ref);
@@ -131,16 +131,16 @@
  */
 
 int I_get_subgroup_ref(
-    char *group,
-    char *subgroup,
+    const char *group,
+    const char *subgroup,
     struct Ref *ref)
 {
     return get_ref (group, subgroup, ref);
 }
 
 static int get_ref (
-    char *group,
-    char *subgroup,
+    const char *group,
+    const char *subgroup,
     struct Ref *ref)
 {
     int n;
@@ -176,7 +176,7 @@
     return 1;
 }
 
-static int set_color(char *name,char *mapset,char *color,struct Ref *ref)
+static int set_color(const char *name, const char *mapset, const char *color, struct Ref *ref)
 {
     int n;
 
@@ -260,7 +260,7 @@
  *  \return int
  */
 
-int I_put_group_ref(char *group, struct Ref *ref)
+int I_put_group_ref(const char *group, const struct Ref *ref)
 {
     return put_ref (group, "", ref);
 }
@@ -282,12 +282,12 @@
  *  \return int
  */
 
-int I_put_subgroup_ref(char *group, char *subgroup, struct Ref *ref)
+int I_put_subgroup_ref(const char *group, const char *subgroup, const struct Ref *ref)
 {
     return put_ref (group, subgroup, ref);
 }
 
-static int put_ref( char *group, char *subgroup, struct Ref *ref)
+static int put_ref(const char *group, const char *subgroup, const struct Ref *ref)
 {
     int n;
     FILE *fd;
@@ -337,7 +337,7 @@
  *  \return int
  */
 
-int I_add_file_to_group_ref(char *name, char *mapset, struct Ref *ref)
+int I_add_file_to_group_ref(const char *name, const char *mapset, struct Ref *ref)
 {
     int n;
 
@@ -384,7 +384,7 @@
  *  \return int
  */
 
-int I_transfer_group_ref_file (struct Ref *ref2, int n, struct Ref *ref1)
+int I_transfer_group_ref_file(const struct Ref *ref2, int n, struct Ref *ref1)
 {
     int k;
 

Modified: grass/branches/develbranch_6/lib/imagery/list_gp.c
===================================================================
--- grass/branches/develbranch_6/lib/imagery/list_gp.c	2008-05-21 06:34:47 UTC (rev 31454)
+++ grass/branches/develbranch_6/lib/imagery/list_gp.c	2008-05-21 07:01:37 UTC (rev 31455)
@@ -10,8 +10,8 @@
  * \return 0
  */
 int I_list_group (
-    char *group,
-    struct Ref *ref,
+    const char *group,
+    const struct Ref *ref,
     FILE *fd)
 {
     char buf[80];
@@ -62,7 +62,7 @@
  * \param fd where to print (typically stdout)
  * \return 0
  */
-int I_list_group_simple (struct Ref *ref, FILE *fd)
+int I_list_group_simple (const struct Ref *ref, FILE *fd)
 {
     int i;
 

Modified: grass/branches/develbranch_6/lib/imagery/list_subgp.c
===================================================================
--- grass/branches/develbranch_6/lib/imagery/list_subgp.c	2008-05-21 06:34:47 UTC (rev 31454)
+++ grass/branches/develbranch_6/lib/imagery/list_subgp.c	2008-05-21 07:01:37 UTC (rev 31455)
@@ -11,9 +11,9 @@
  * \return 0
  */
 int I_list_subgroup (
-    char *group,
-    char *subgroup,
-    struct Ref *ref,
+    const char *group,
+    const char *subgroup,
+    const struct Ref *ref,
     FILE *fd)
 {
     char buf[80];
@@ -66,7 +66,7 @@
  * \return 0
  */
 /* same as above, but one map per line in map at mapset form */
-int I_list_subgroup_simple(struct Ref *ref, FILE *fd)
+int I_list_subgroup_simple(const struct Ref *ref, FILE *fd)
 {
     return I_list_group_simple(ref, fd);
 }

Modified: grass/branches/develbranch_6/lib/imagery/loc_info.c
===================================================================
--- grass/branches/develbranch_6/lib/imagery/loc_info.c	2008-05-21 06:34:47 UTC (rev 31454)
+++ grass/branches/develbranch_6/lib/imagery/loc_info.c	2008-05-21 07:01:37 UTC (rev 31455)
@@ -5,7 +5,7 @@
 /* makes a three part title with location, mapset info */
 int I_location_info(
     char *buf,
-    char *middle)
+    const char *middle)
 {
     char left[80];
     char right[80];

Modified: grass/branches/develbranch_6/lib/imagery/ls_groups.c
===================================================================
--- grass/branches/develbranch_6/lib/imagery/ls_groups.c	2008-05-21 06:34:47 UTC (rev 31454)
+++ grass/branches/develbranch_6/lib/imagery/ls_groups.c	2008-05-21 07:01:37 UTC (rev 31455)
@@ -2,6 +2,7 @@
 * I_list_groups (full)
 * I_list_subgroups (group, full)
 *************************************************************/
+#include <stdio.h>
 #include <string.h>
 #include <unistd.h>
 #include <stdlib.h>
@@ -16,9 +17,9 @@
     char *element;
     int i;
 
-    char buf[1024];
+    char buf[GPATH_MAX];
     char title[50];
-    FILE *ls, *temp, *popen();
+    FILE *ls, *temp;
     struct Ref ref;
     int any;
 
@@ -39,6 +40,7 @@
     G__file_name (buf+strlen(buf), element, "", G_mapset());
     strcat (buf, ";ls");
     if (!full) strcat (buf, " -C");
+    /* FIXME: use G__ls() */
     if ((ls = popen (buf, "r")))
     {
 	while (G_getl(buf, sizeof(buf), ls))
@@ -76,13 +78,13 @@
     return 0;
 }
 
-int I_list_subgroups (char *group,int full)
+int I_list_subgroups (const char *group, int full)
 {
-    char element[100];
+    char element[GNAME_MAX+15];
     int i;
 
-    char buf[1024];
-    FILE *ls, *temp, *popen();
+    char buf[GPATH_MAX];
+    FILE *ls, *temp;
     struct Ref ref;
     int any;
 
@@ -103,6 +105,7 @@
     G__file_name (buf+strlen(buf), element, "", G_mapset());
     strcat (buf, ";ls");
     if (!full) strcat (buf, " -C");
+    /* FIXME: use G__ls() */
     if ((ls = popen (buf, "r")))
     {
 	while (G_getl(buf, sizeof(buf), ls))

Modified: grass/branches/develbranch_6/lib/imagery/points.c
===================================================================
--- grass/branches/develbranch_6/lib/imagery/points.c	2008-05-21 06:34:47 UTC (rev 31454)
+++ grass/branches/develbranch_6/lib/imagery/points.c	2008-05-21 07:01:37 UTC (rev 31455)
@@ -80,7 +80,7 @@
     return 0;
 }
 
-static int I_write_control_points(FILE *fd, struct Control_Points *cp)
+static int I_write_control_points(FILE *fd, const struct Control_Points *cp)
 {
     int i;
 
@@ -111,7 +111,7 @@
  */
 
 int I_get_control_points (
-    char *group,
+    const char *group,
     struct Control_Points *cp)
 {
     FILE *fd;
@@ -154,8 +154,8 @@
  */
 
 int I_put_control_points (
-    char *group,
-    struct Control_Points *cp)
+    const char *group,
+    const struct Control_Points *cp)
 {
     FILE *fd;
     char msg[100];

Modified: grass/branches/develbranch_6/lib/imagery/ref.c
===================================================================
--- grass/branches/develbranch_6/lib/imagery/ref.c	2008-05-21 06:34:47 UTC (rev 31454)
+++ grass/branches/develbranch_6/lib/imagery/ref.c	2008-05-21 07:01:37 UTC (rev 31455)
@@ -23,14 +23,14 @@
 
 FILE *
 I_fopen_group_ref_new (
-    char *group)
+    const char *group)
 {
     return I_fopen_group_file_new (group, "REF");
 }
 
 FILE *
 I_fopen_group_ref_old (
-    char *group)
+    const char *group)
 {
     return I_fopen_group_file_old (group, "REF");
 }
@@ -38,7 +38,7 @@
 /*
 FILE *
 I_fopen_group_ref_append (
-    char *group)
+    const char *group)
 {
     return I_fopen_group_file_append (group, "REF");
 }
@@ -46,16 +46,16 @@
 
 FILE *
 I_fopen_subgroup_ref_new (
-    char *group,
-    char *subgroup)
+    const char *group,
+    const char *subgroup)
 {
     return I_fopen_subgroup_file_new (group, subgroup, "REF");
 }
 
 FILE *
 I_fopen_subgroup_ref_old (
-    char *group,
-    char *subgroup)
+    const char *group,
+    const char *subgroup)
 {
     FILE *fd;
 

Modified: grass/branches/develbranch_6/lib/imagery/sigfile.c
===================================================================
--- grass/branches/develbranch_6/lib/imagery/sigfile.c	2008-05-21 06:34:47 UTC (rev 31454)
+++ grass/branches/develbranch_6/lib/imagery/sigfile.c	2008-05-21 07:01:37 UTC (rev 31455)
@@ -2,9 +2,9 @@
 #include <grass/imagery.h>
 
 FILE *I_fopen_signature_file_new (
-    char *group,
-    char *subgroup,
-    char *name)
+    const char *group,
+    const char *subgroup,
+    const char *name)
 {
     char element[GNAME_MAX*2];
     FILE *fd;
@@ -23,9 +23,9 @@
 }
 
 FILE *I_fopen_signature_file_old(
-    char *group,
-    char *subgroup,
-    char *name)
+    const char *group,
+    const char *subgroup,
+    const char *name)
 {
     char element[GNAME_MAX*2];
     FILE *fd;

Modified: grass/branches/develbranch_6/lib/imagery/sigset.c
===================================================================
--- grass/branches/develbranch_6/lib/imagery/sigset.c	2008-05-21 06:34:47 UTC (rev 31454)
+++ grass/branches/develbranch_6/lib/imagery/sigset.c	2008-05-21 07:01:37 UTC (rev 31455)
@@ -278,18 +278,17 @@
 
 int I_SetSigTitle(
     struct SigSet *S,
-    char *title)
+    const char *title)
 {
     if (title == NULL) title = "";
     if (S->title)
         free (S->title);
-    S->title = G_malloc (strlen (title)+1);
-    strcpy(S->title, title);
+    S->title = G_store(title);
 
     return 0;
 }
 
-char * I_GetSigTitle(struct SigSet *S)
+const char *I_GetSigTitle(const struct SigSet *S)
 {
     if (S->title)
         return S->title;
@@ -299,18 +298,17 @@
 
 int I_SetClassTitle(
     struct ClassSig *C,
-    char *title)
+    const char *title)
 {
     if (title == NULL) title = "";
     if (C->title)
         free (C->title);
-    C->title = G_malloc (strlen (title)+1);
-    strcpy(C->title, title);
+    C->title = G_store (title);
 
     return 0;
 }
 
-char *I_GetClassTitle ( struct ClassSig *C)
+const char *I_GetClassTitle (const struct ClassSig *C)
 {
     if (C->title)
         return C->title;
@@ -320,10 +318,10 @@
 
 int I_WriteSigSet(
     FILE *fd,
-    struct SigSet *S)
+    const struct SigSet *S)
 {
-    struct ClassSig *Cp;
-    struct SubSig *Sp;
+    const struct ClassSig *Cp;
+    const struct SubSig *Sp;
     int i,j, b1, b2;
 
     fprintf (fd, "title: %s\n",I_GetSigTitle(S));

Modified: grass/branches/develbranch_6/lib/imagery/sigsetfile.c
===================================================================
--- grass/branches/develbranch_6/lib/imagery/sigsetfile.c	2008-05-21 06:34:47 UTC (rev 31454)
+++ grass/branches/develbranch_6/lib/imagery/sigsetfile.c	2008-05-21 07:01:37 UTC (rev 31455)
@@ -1,6 +1,6 @@
 #include <grass/imagery.h>
 
-FILE *I_fopen_sigset_file_new( char *group, char *subgroup, char *name)
+FILE *I_fopen_sigset_file_new(const char *group, const char *subgroup, const char *name)
 {
     char element[GNAME_MAX*2];
     FILE *fd;
@@ -19,7 +19,7 @@
     return fd;
 }
 
-FILE *I_fopen_sigset_file_old ( char *group, char *subgroup, char *name)
+FILE *I_fopen_sigset_file_old(const char *group, const char *subgroup, const char *name)
 {
     char element[GNAME_MAX*2];
     FILE *fd;

Modified: grass/branches/develbranch_6/lib/imagery/target.c
===================================================================
--- grass/branches/develbranch_6/lib/imagery/target.c	2008-05-21 06:34:47 UTC (rev 31454)
+++ grass/branches/develbranch_6/lib/imagery/target.c	2008-05-21 07:01:37 UTC (rev 31455)
@@ -20,7 +20,7 @@
  */
 
 int I_get_target(
-    char *group,
+    const char *group,
     char *location,
     char *mapset)
 {
@@ -64,9 +64,9 @@
  */
 
 int I_put_target (
-    char *group,
-    char *location,
-    char *mapset)
+    const char *group,
+    const char *location,
+    const char *mapset)
 {
     FILE *fd;
 

Modified: grass/branches/develbranch_6/lib/imagery/title.c
===================================================================
--- grass/branches/develbranch_6/lib/imagery/title.c	2008-05-21 06:34:47 UTC (rev 31454)
+++ grass/branches/develbranch_6/lib/imagery/title.c	2008-05-21 07:01:37 UTC (rev 31455)
@@ -2,7 +2,7 @@
 #include <grass/imagery.h>
 
 
-int I_get_group_title (char *group, char *title, int n)
+int I_get_group_title(const char *group, char *title, int n)
 {
     FILE *fd;
 
@@ -20,7 +20,7 @@
 }
 
 
-int I_put_group_title (char *group, char *title)
+int I_put_group_title(const char *group, const char *title)
 {
     FILE *fd;
 



More information about the grass-commit mailing list