Browse Source

libgis: G__ls -> G_ls2
update modules
(merge https://trac.osgeo.org/grass/changeset/63851,r63853 from trunk)


git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@63854 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 10 years ago
parent
commit
5a0e2afee9

+ 1 - 1
general/g.list/main.c

@@ -404,7 +404,7 @@ static void make_list(struct elist **el, int *lcount, int *lalloc,
     if (access(path, 0) != 0)
 	return;
 
-    if ((list = G__ls(path, &count)) == NULL)
+    if ((list = G_ls2(path, &count)) == NULL)
 	return;
 
     if (strcmp(alias, "raster") == 0)

+ 1 - 1
general/g.mkfontcap/stroke_fonts.c

@@ -56,7 +56,7 @@ void find_stroke_fonts(void)
 
     G_asprintf(&dirpath, "%s/fonts", G_gisbase());
 
-    dirlisting = G__ls(dirpath, &numfiles);
+    dirlisting = G_ls2(dirpath, &numfiles);
 
     G_asprintf(&fonttable, "%s/fonts.table", dirpath);
     if (access(fonttable, R_OK) == 0)

+ 1 - 1
general/g.remove/main.c

@@ -236,7 +236,7 @@ int main(int argc, char *argv[])
 	    continue;
 
 	rast = !G_strcasecmp(elem->alias, "raster");
-	files = G__ls(path, &num_files);
+	files = G_ls2(path, &num_files);
 
 	for (j = 0; j < num_files; j++) {
 	    if (!flag.force->answer) {

+ 1 - 1
lib/gis/color_rules.c

@@ -112,7 +112,7 @@ char **scan_rules(int *nrules)
 
     G_snprintf(path, GPATH_MAX, "%s/etc/colors", G_gisbase());
 
-    rules = G__ls(path, nrules);
+    rules = G_ls2(path, nrules);
 
     rules = G_realloc(rules, (*nrules + 3) * sizeof (const char *));
 

+ 1 - 1
lib/gis/list.c

@@ -126,7 +126,7 @@ static int list_element(FILE *out, const char *element, const char *desc, const
      * otherwise the ls must be forced into columnar form.
      */
 
-    list = G__ls(path, &count);
+    list = G_ls2(path, &count);
 
     if (count > 0) {
 	fprintf(out, _("%s files available in mapset <%s>:\n"), desc, mapset);

+ 5 - 5
lib/gis/ls.c

@@ -52,10 +52,10 @@ static int cmp_names(const void *aa, const void *bb)
 }
 
 /**
- * \brief Sets a function and its complementary data for G__ls filtering.
+ * \brief Sets a function and its complementary data for G_ls2 filtering.
  *
- * Defines a filter function and its rule data that allow G__ls to filter out
- * unwanted file names.  Call this function before G__ls.
+ * Defines a filter function and its rule data that allow G_ls2 to filter out
+ * unwanted file names.  Call this function before G_ls2.
  *
  * \param func      Filter callback function to compare a file name and closure
  * 		    pattern (if NULL, no filter will be used).
@@ -92,7 +92,7 @@ void G_set_ls_exclude_filter(ls_filter_func *func, void *closure)
  * \return          Pointer to array of strings containing the listing
  **/
 
-char **G__ls(const char *dir, int *num_files)
+char **G_ls2(const char *dir, int *num_files)
 {
     struct dirent *dp;
     DIR *dfd;
@@ -136,7 +136,7 @@ char **G__ls(const char *dir, int *num_files)
 void G_ls(const char *dir, FILE * stream)
 {
     int i, n;
-    char **dir_listing = G__ls(dir, &n);
+    char **dir_listing = G_ls2(dir, &n);
 
     G_ls_format(dir_listing, n, 0, stream);
 

+ 1 - 1
lib/imagery/list_subgp.c

@@ -47,7 +47,7 @@ char **I_list_subgroups(const char *group, int *subgs_num)
     if (!G_lstat(path, &sb) == 0 || !S_ISDIR(sb.st_mode))
 	return NULL;
 
-    subgs = G__ls(path, subgs_num);
+    subgs = G_ls2(path, subgs_num);
     return subgs;
 }