diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index e9e693e57c3..517e0e50f7a 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -23,6 +23,11 @@ jobs: runs-on: macos-14 env: PYTHONWARNINGS: always + + permissions: + id-token: write + contents: read + steps: - name: Info run: | @@ -98,6 +103,7 @@ jobs: pytest \ @.github/workflows/pytest_args_ci.txt \ @.github/workflows/pytest_args_parallel.txt \ + --junitxml=pytest.xdist.junit.xml \ -k 'not testsuite' - name: Run pytest with a single worker (for tests marked with needs_solo_run) shell: micromamba-shell {0} @@ -107,6 +113,7 @@ jobs: pytest \ @.github/workflows/pytest_args_ci.txt \ @.github/workflows/pytest_args_not_parallel.txt \ + --junitxml=pytest.needs_solo_run.junit.xml \ -k 'not testsuite' - name: Run pytest with a single worker (for gunittest-based tests) shell: micromamba-shell {0} @@ -114,7 +121,16 @@ jobs: export PYTHONPATH=$(grass --config python_path):$PYTHONPATH export LD_LIBRARY_PATH=$(grass --config path)/lib:$LD_LIBRARY_PATH pytest \ - @.github/workflows/pytest_args_gunittest.txt + @.github/workflows/pytest_args_gunittest.txt \ + --junitxml=pytest.gunittest.junit.xml + + - name: Upload test results to Codecov + if: ${{ !cancelled() }} + uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1 + with: + exclude: gui + flags: macos-pytest-python + use_oidc: true - name: Cache GRASS Sample Dataset id: cached-data diff --git a/.github/workflows/osgeo4w.yml b/.github/workflows/osgeo4w.yml index d25aa01bf90..d3e0fbaca01 100644 --- a/.github/workflows/osgeo4w.yml +++ b/.github/workflows/osgeo4w.yml @@ -29,6 +29,10 @@ jobs: - windows-2022 fail-fast: false + permissions: + id-token: write + contents: read + steps: - name: Set git to use LF run: | @@ -135,6 +139,7 @@ jobs: path %GISBASE%\lib;%GISBASE%\bin;%PATH% pytest ^ @.github/workflows/pytest_args_ci.txt ^ + --junitxml=pytest.junit.xml ^ -k "not testsuite" shell: cmd /D /E:ON /V:OFF /S /C "CALL C:/OSGeo4W/OSGeo4W.bat "{0}"" - name: Run pytest with a single worker (for gunittest-based tests) @@ -145,9 +150,18 @@ jobs: pytest ^ @.github/workflows/pytest_args_ci.txt ^ @.github/workflows/pytest_args_deselect.txt ^ - @.github/workflows/pytest_args_gunittest.txt + @.github/workflows/pytest_args_gunittest.txt ^ + --junitxml=pytest.gunittest.junit.xml shell: cmd /D /E:ON /V:OFF /S /C "CALL C:/OSGeo4W/OSGeo4W.bat "{0}"" + - name: Upload test results to Codecov + if: ${{ !cancelled() }} + uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1 + with: + exclude: gui + flags: ${{ matrix.os }}-pytest-python + use_oidc: true + - name: Run tests run: .github/workflows/test_thorough.bat '${{env.O4WROOT}}\opt\grass\grass85.bat' '${{env.O4WROOT}}\bin\python3' env: diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 9bf763b7526..baf89ac8e20 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -33,6 +33,10 @@ jobs: CLICOLOR_FORCE: 1 # for other software including ninja: https://bixense.com/clicolors/ PYTHONWARNINGS: always + permissions: + id-token: write + contents: read + steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -91,6 +95,7 @@ jobs: @.github/workflows/pytest_args_ci.txt \ @.github/workflows/pytest_args_cov.txt \ @.github/workflows/pytest_args_parallel.txt \ + --junitxml=pytest.xdist.junit.xml \ -k 'not testsuite' - name: Run pytest with a single worker (for tests marked with needs_solo_run) @@ -103,6 +108,7 @@ jobs: @.github/workflows/pytest_args_ci.txt \ @.github/workflows/pytest_args_cov.txt \ @.github/workflows/pytest_args_not_parallel.txt \ + --junitxml=pytest.needs_solo_run.junit.xml \ -k 'not testsuite' - name: Run pytest with a single worker (for gunittest-based tests) run: | @@ -112,7 +118,8 @@ jobs: export INITIAL_PWD="${PWD}" pytest \ @.github/workflows/pytest_args_cov.txt \ - @.github/workflows/pytest_args_gunittest.txt + @.github/workflows/pytest_args_gunittest.txt \ + --junitxml=pytest.gunittest.junit.xml - name: Fix non-standard installed script paths in coverage data run: | export PYTHONPATH=`grass --config python_path`:$PYTHONPATH @@ -123,13 +130,20 @@ jobs: coverage combine coverage html + - name: Upload test results to Codecov + if: ${{ !cancelled() }} + uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1 + with: + exclude: gui + flags: pytest-python-${{ matrix.python-version }} + use_oidc: true - name: Upload coverage reports to Codecov uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3 with: verbose: true flags: pytest-python-${{ matrix.python-version }} name: pytest-python-${{ matrix.python-version }} - token: ${{ secrets.CODECOV_TOKEN }} + use_oidc: true - name: Make python-only code coverage test report available if: ${{ !cancelled() }} uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 diff --git a/.github/workflows/pytest_args_ci.txt b/.github/workflows/pytest_args_ci.txt index c661b4896b6..c47721ee58e 100644 --- a/.github/workflows/pytest_args_ci.txt +++ b/.github/workflows/pytest_args_ci.txt @@ -2,4 +2,6 @@ --color=yes --durations=0 --durations-min=0.5 +--junitxml=junit.xml +-o junit_family=legacy -ra diff --git a/.gitignore b/.gitignore index d936d6bc072..29446d15507 100644 --- a/.gitignore +++ b/.gitignore @@ -202,3 +202,6 @@ python/grass/docs/src/pydispatch.rst python/grass/docs/src/pygrass.*rst python/grass/docs/src/script.rst python/grass/docs/src/temporal.rst + +# Test result files +*junit.xml diff --git a/db/drivers/ogr/describe.c b/db/drivers/ogr/describe.c index ad93339659e..524300c77ba 100644 --- a/db/drivers/ogr/describe.c +++ b/db/drivers/ogr/describe.c @@ -25,7 +25,7 @@ \brief Describe table using driver \param table_name table name (as dbString) - \param table[out] pointer to dbTable + \param[out] table pointer to dbTable \return DB_OK on success \return DB_FAILED on failure diff --git a/include/Make/Doxyfile_arch_html.in b/include/Make/Doxyfile_arch_html.in index 708ac630c67..66fd25b07d0 100644 --- a/include/Make/Doxyfile_arch_html.in +++ b/include/Make/Doxyfile_arch_html.in @@ -2211,7 +2211,7 @@ ENABLE_PREPROCESSING = YES # The default value is: NO. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -MACRO_EXPANSION = NO +MACRO_EXPANSION = YES # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then # the macro expansion is limited to the macros specified with the PREDEFINED and @@ -2251,11 +2251,14 @@ INCLUDE_FILE_PATTERNS = # recursively expanded use the := operator instead of the = operator. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -PREDEFINED = HAVE_OGR \ - HAVE_TIFFIO_H \ - HAVE_GEOS \ +PREDEFINED = HAVE_GEOS \ + HAVE_LIBBLAS \ HAVE_LIBLAPACK \ - HAVE_LIBBLAS + HAVE_OGR \ + HAVE_TIFFIO_H \ + NOPG_UNUSED= \ + NO_NLS_UNUSED= \ + UNUSED= # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The diff --git a/include/Make/Doxyfile_arch_latex.in b/include/Make/Doxyfile_arch_latex.in index c707a1a10da..3f3181a5799 100644 --- a/include/Make/Doxyfile_arch_latex.in +++ b/include/Make/Doxyfile_arch_latex.in @@ -2211,7 +2211,7 @@ ENABLE_PREPROCESSING = YES # The default value is: NO. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -MACRO_EXPANSION = NO +MACRO_EXPANSION = YES # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then # the macro expansion is limited to the macros specified with the PREDEFINED and @@ -2251,11 +2251,14 @@ INCLUDE_FILE_PATTERNS = # recursively expanded use the := operator instead of the = operator. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -PREDEFINED = HAVE_OGR \ - HAVE_TIFFIO_H \ - HAVE_GEOS \ +PREDEFINED = HAVE_GEOS \ + HAVE_LIBBLAS \ HAVE_LIBLAPACK \ - HAVE_LIBBLAS + HAVE_OGR \ + HAVE_TIFFIO_H \ + NOPG_UNUSED= \ + NO_NLS_UNUSED= \ + UNUSED= # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The diff --git a/lib/db/dbmi_client/select.c b/lib/db/dbmi_client/select.c index c6190d8057a..e4becdc3af6 100644 --- a/lib/db/dbmi_client/select.c +++ b/lib/db/dbmi_client/select.c @@ -261,6 +261,7 @@ int db_select_value(dbDriver *driver, const char *tab, const char *key, int id, \param tab table name \param key key column name \param col value column name + \param where where statement \param[out] cvarr dbCatValArray to store within \return number of selected values diff --git a/lib/gis/make_loc.c b/lib/gis/make_loc.c index 40c10c40d58..4b0b9368e2d 100644 --- a/lib/gis/make_loc.c +++ b/lib/gis/make_loc.c @@ -169,15 +169,12 @@ int G_make_location_epsg(const char *location_name, struct Cell_head *wind, * \param proj_units projection units suitable to write to the PROJ_UNITS * file, or NULL. * - * \param proj_epsg EPSG code suitable to write to the PROJ_EPSG + * \param proj_srid Spatial reference ID suitable to write to the PROJ_SRID * file, or NULL. * * \param proj_wkt WKT definition suitable to write to the PROJ_WKT * file, or NULL. * - * \param proj_srid Spatial reference ID suitable to write to the PROJ_SRID - * file, or NULL. - * * \return 0 on success * \return -1 to indicate a system error (check errno). * \return -2 failed to create projection file (currently not used) diff --git a/lib/gis/open_misc.c b/lib/gis/open_misc.c index 136e78fb0eb..9507cd1ace5 100644 --- a/lib/gis/open_misc.c +++ b/lib/gis/open_misc.c @@ -196,6 +196,7 @@ FILE *G_fopen_new_misc(const char *dir, const char *element, const char *name) * the file does not exist, the NULL pointer is returned. Otherwise the file * descriptor from the fopen( ) is returned. * + * \param dir * \param element * \param name * \param mapset diff --git a/lib/gmath/la.c b/lib/gmath/la.c index 6ce3e8ee77e..9da6d6a6564 100644 --- a/lib/gmath/la.c +++ b/lib/gmath/la.c @@ -209,7 +209,8 @@ mat_struct *G_matrix_subtract(mat_struct *mt1, mat_struct *mt2) * Calculates the scalar-matrix multiplication * * \param scalar - * \param A + * \param matrix + * \param out * \return mat_struct */ mat_struct *G_matrix_scalar_mul(double scalar, mat_struct *matrix, @@ -1509,7 +1510,7 @@ int G_matrix_read(FILE *fp, mat_struct *out) * * Resizes a matrix * - * \param A + * \param in * \param rows * \param cols * \return mat_struct diff --git a/lib/gpde/n_gwflow.c b/lib/gpde/n_gwflow.c index 1e0218a4039..22bc2d1eb90 100644 --- a/lib/gpde/n_gwflow.c +++ b/lib/gpde/n_gwflow.c @@ -144,6 +144,8 @@ void N_free_gwflow_data3d(N_gwflow_data3d *data) * * \param cols int * \param rows int + * \param river + * \param drain * \return N_gwflow_data2d * * */ N_gwflow_data2d *N_alloc_gwflow_data2d(int cols, int rows, int river, int drain) @@ -648,7 +650,7 @@ N_data_star *N_callback_gwflow_2d(void *gwdata, N_geom_data *geom, int col, * the cells. The sum of the water budget of each active/dirichlet cell must be * near zero due the effect of numerical inaccuracy of cpu's. * - * \param gwdata N_gwflow_data2d * + * \param data N_gwflow_data2d * * \param geom N_geom_data * * \param budget N_array_2d * \return void diff --git a/lib/gpde/n_les_assemble.c b/lib/gpde/n_les_assemble.c index fb08ed8046d..4266877a891 100644 --- a/lib/gpde/n_les_assemble.c +++ b/lib/gpde/n_les_assemble.c @@ -457,8 +457,8 @@ N_data_star *N_callback_template_3d(void *data UNUSED, N_geom_data *geom, * * \param data void * (unused) * \param geom N_geom_data * - * \param row int (unused) * \param col int (unused) + * \param row int (unused) * \return N_data_star * * * */ diff --git a/lib/imagery/group.c b/lib/imagery/group.c index 2c930dd1efb..fab6a9f49c8 100644 --- a/lib/imagery/group.c +++ b/lib/imagery/group.c @@ -419,10 +419,10 @@ int I_add_file_to_group_ref(const char *name, const char *mapset, * This routine is used by g.gui.gcp to create the REF file for a * subgroup. * - * \param src + * \param ref2 Source * \param n - * \param dst - * \return int + * \param ref1 Destination + * \return int 0 */ int I_transfer_group_ref_file(const struct Ref *ref2, int n, struct Ref *ref1) { diff --git a/lib/imagery/iscatt_core.c b/lib/imagery/iscatt_core.c index 4edf27be0c8..9bcfd6d1be2 100644 --- a/lib/imagery/iscatt_core.c +++ b/lib/imagery/iscatt_core.c @@ -38,7 +38,7 @@ struct rast_row { These pgms have header in format created by this function. \param region region to be pgm header generated for - \param [out] header header of pgm file + \param[out] header header of pgm file */ static int get_cat_rast_header(struct Cell_head *region, char *header) { @@ -110,7 +110,7 @@ int I_create_cat_rast(struct Cell_head *cat_rast_region, const char *cat_rast) \param A pointer to intersected region \param B pointer to intersected region - \param [out] intersec pointer to intersection region of regions A B + \param[out] intersec pointer to intersection region of regions A B (relevant params of the region are: south, north, east, west) \return 0 if interaction exists @@ -162,9 +162,9 @@ static int regions_intersecion(struct Cell_head *A, struct Cell_head *B, \param A pointer to intersected region \param B pointer to intersected region (A and B must have same resolution) - \param [out] A_bounds rows and cols numbers of A stored in + \param[out] A_bounds rows and cols numbers of A stored in south, north, east, west, which defines intersection of A and B - \param [out] B_bounds rows and cols numbers of B stored in + \param[out] B_bounds rows and cols numbers of B stored in south, north, east, west, which defines intersection of A and B \return 0 if interaction exists @@ -363,7 +363,7 @@ int I_insert_patch_to_cat_rast(const char *patch_rast, \param bands_rows data represents data describig one row from raster band \param belongs_pix array which defines which pixels belongs to category (1 value) and which not (0 value) - \param [out] scatts pointer to scScatts struct of type SC_SCATT_DATA, + \param[out] scatts pointer to scScatts struct of type SC_SCATT_DATA, which are modified according to values in belongs_pix (represents scatter plot category) */ diff --git a/lib/imagery/iscatt_structs.c b/lib/imagery/iscatt_structs.c index a146bd38fb2..b9b6ea3915f 100644 --- a/lib/imagery/iscatt_structs.c +++ b/lib/imagery/iscatt_structs.c @@ -198,7 +198,7 @@ int I_sc_add_cat(struct scCats *cats) cats struct (SC_SCATT_DATA or SC_SCATT_CONDITIONS). \param cats pointer to scCats struct - \param scarr_data pointer to scdScattData struct + \param scatt_data pointer to scdScattData struct \param cat_id id number of category \param scatt_id id number of scatter plot diff --git a/lib/imagery/manage_signatures.c b/lib/imagery/manage_signatures.c index 79697381e85..cc392b4fb34 100644 --- a/lib/imagery/manage_signatures.c +++ b/lib/imagery/manage_signatures.c @@ -166,8 +166,8 @@ int I_signatures_copy(I_SIGFILE_TYPE type, const char *old_name, * It is safe to pass fully qualified names. * * \param type I_SIGFILE_TYPE signature type - * \param name of old signature - * \param name of new signature + * \param old_name name of old signature + * \param new_name name of new signature * \return 0 on success * \return 1 on failure */ @@ -233,7 +233,8 @@ int I_signatures_rename(I_SIGFILE_TYPE type, const char *old_name, * * \param type I_SIGFILE_TYPE signature type * \param mapset optional mapset to search in or NULL - * \param pointer to array of found signature strings or NULL if none found + * \param out_list pointer to array of found signature strings or NULL if none + * found * \return count of signature strings in the array */ int I_signatures_list_by_type(I_SIGFILE_TYPE type, const char *mapset, diff --git a/lib/imagery/sig.c b/lib/imagery/sig.c index f2784377e9b..581d28e1267 100644 --- a/lib/imagery/sig.c +++ b/lib/imagery/sig.c @@ -8,7 +8,7 @@ * * No need to call before calling I_read_signatures. * - * \param *Signature to initialize + * \param S *Signature to initialize * \param nbands band (imagery group member) count */ int I_init_signatures(struct Signature *S, int nbands) @@ -53,7 +53,7 @@ int I_new_signature(struct Signature *S) * One must call I_init_signatures() to re-use struct after it has been * passed to this function. * - * \param *Signature to free + * \param S Signature struct to free * * \return always 0 */ @@ -139,8 +139,8 @@ int I_read_one_signature(FILE *fd, struct Signature *S) * There is no need to initialize struct Signature in advance, as this * function internally calls I_init_signatures. * - * \param pointer to FILE* - * \param pointer to struct Signature *S + * \param fd pointer to FILE* + * \param S pointer to struct Signature *S * * \return 1 on success, -1 on failure */ diff --git a/lib/imagery/sigset.c b/lib/imagery/sigset.c index 0ef306f3e1e..cf0ed19b95b 100644 --- a/lib/imagery/sigset.c +++ b/lib/imagery/sigset.c @@ -58,7 +58,7 @@ struct ClassData *I_AllocClassData(struct SigSet *S, struct ClassSig *C, * * No need to call before calling I_ReadSigSet. * - * \param *Signature to initialize + * \param S *Signature to initialize * \param nbands band (imagery group member) count */ int I_InitSigSet(struct SigSet *S, int nbands) @@ -462,11 +462,13 @@ int I_WriteSigSet(FILE *fd, const struct SigSet *S) * detected (== all are present in the other list), a NULL value will be * returned in the particular list of mismatches (not an empty string). * For example: - * \code if (ret && ret[1]) printf("List of imagery group bands without - * signatures: %s\n, ret[1]); \endcode + * \code + * if (ret && ret[1]) + * printf("List of imagery group bands without signatures: %s\n, ret[1]); + * \endcode * - * \param *SigSet existing signatures to check & sort - * \param *Ref group reference + * \param S existing signatures to check & sort + * \param R group reference * * \return NULL successfully sorted * \return err_array two comma separated lists of mismatches diff --git a/lib/nviz/map_obj.c b/lib/nviz/map_obj.c index bd7fee3c6e1..15c8267260b 100644 --- a/lib/nviz/map_obj.c +++ b/lib/nviz/map_obj.c @@ -173,7 +173,8 @@ int Nviz_new_map_obj(int type, const char *name, double value, nv_data *data) \param desc attribute descriptor \param src attribute source \param str_value attribute value as string (if NULL, check for - num_value) \param num_value attribute value as double + num_value) + \param num_value attribute value as double \return 1 on success \return 0 on failure diff --git a/lib/nviz/render.c b/lib/nviz/render.c index 40c259f7ec9..1d2eb07bf07 100644 --- a/lib/nviz/render.c +++ b/lib/nviz/render.c @@ -89,7 +89,7 @@ struct render_window *Nviz_new_render_window(void) /*! \brief Initialize render window - \param win pointer to render_window struct + \param rwin pointer to render_window struct */ void Nviz_init_render_window(struct render_window *rwin) { @@ -317,7 +317,7 @@ int Nviz_create_render_window(struct render_window *rwin, void *display UNUSED, /*! \brief Make window current for rendering - \param win pointer to render_window struct + \param rwin pointer to render_window struct \return 1 on success \return 0 on failure diff --git a/lib/ogsf/gk.c b/lib/ogsf/gk.c index 076ed685f33..f063549791a 100644 --- a/lib/ogsf/gk.c +++ b/lib/ogsf/gk.c @@ -600,13 +600,13 @@ double get_2key_neighbors(int nvk, float time, float range UNUSED, Here we use linear interpolation. Loop variable isn't used, but left in for use in possible "linear interp with smoothing" version. - \param kesy keyframe list + \param keys keyframe list \param keysteps step value \param newsteps new step value \param loop loop indicator - \param pointer to viewnode struct - \param NULL on failure + \return pointer to viewnode struct + \return NULL on failure */ Viewnode *gk_make_linear_framesfromkeys(Keylist *keys, int keysteps, int newsteps, int loop) diff --git a/lib/ogsf/gk2.c b/lib/ogsf/gk2.c index a13cc3bd824..47e86c4d268 100644 --- a/lib/ogsf/gk2.c +++ b/lib/ogsf/gk2.c @@ -421,7 +421,7 @@ int GK_delete_key(float pos, float precis, int justone) GK_add_key() will fail unless force_replace is TRUE. \param pos position - \param fmaks + \param fmask \param force_replace \param precis precision value diff --git a/lib/ogsf/gp2.c b/lib/ogsf/gp2.c index c243f3d0305..9b687125491 100644 --- a/lib/ogsf/gp2.c +++ b/lib/ogsf/gp2.c @@ -225,6 +225,10 @@ int GP_get_sitename(int id, char **filename) \brief Get point set style \param id point set id + \param color + \param width + \param size + \param symbol \return 1 on success \return -1 on error (point set not found) @@ -301,7 +305,7 @@ int GP_set_style(int id, int color, int width, float size, int symbol) \param width icon line width column name \param size icon size column name \param symbol icon symbol column name - \param colors pointer to Colors structure or NULL + \param color_rules pointer to Colors structure or NULL \return 1 on success \return -1 on error (point set not found) diff --git a/lib/ogsf/gs.c b/lib/ogsf/gs.c index 568773aa992..c12926133ea 100644 --- a/lib/ogsf/gs.c +++ b/lib/ogsf/gs.c @@ -1222,7 +1222,7 @@ int gs_get_data_avg_zmax(float *azmax) /*! \brief Get data center point - \param[out] center (array X,Y,Z) + \param[out] cen center (array X,Y,Z) \return -1 on error \return 1 on success diff --git a/lib/ogsf/gs2.c b/lib/ogsf/gs2.c index f1ed6e0b69f..177e1e5fa60 100644 --- a/lib/ogsf/gs2.c +++ b/lib/ogsf/gs2.c @@ -522,23 +522,23 @@ void GS_get_modelposition1(float pos[]) know position to calculate size, have two dependent variables (nearclip * 2) from eye. - \param[out] siz size + \param[out] size size \param[out] pos coordinates (X, Y, Z) */ -void GS_get_modelposition(float *siz, float *pos) +void GS_get_modelposition(float *size, float *pos) { float dist, near_h, dir[3]; dist = 2. * Gd.nearclip; near_h = 2.0 * tan(4.0 * atan(1.) * Gv.fov / 3600.) * dist; - *siz = near_h / 8.0; + *size = near_h / 8.0; /* prevent clipping - would only happen if fov > ~127 degrees, at fov = 2.0 * atan(2.0) */ - if (*siz > Gd.nearclip) { - *siz = Gd.nearclip; + if (*size > Gd.nearclip) { + *size = Gd.nearclip; } GS_v3dir(Gv.from_to[FROM], Gv.from_to[TO], dir); diff --git a/lib/ogsf/gs_bm.c b/lib/ogsf/gs_bm.c index 4ed97be196c..812cf328659 100644 --- a/lib/ogsf/gs_bm.c +++ b/lib/ogsf/gs_bm.c @@ -103,7 +103,7 @@ void gsbm_zero_mask(struct BM *map) Must be same size, ORs bitmaps & stores in bmvar \param bmvar bitmap (BM) to changed - \param bmcom bitmap (BM) + \param bmcon bitmap (BM) \param mask_type mask type (see mask types macros) \return -1 on failure (bitmap mispatch) @@ -158,7 +158,7 @@ static int gsbm_masks(struct BM *bmvar, struct BM *bmcon, const int mask_type) Must be same size, ORs bitmaps & stores in bmvar \param bmvar bitmap (BM) to changed - \param bmcom bitmap (BM) + \param bmcon bitmap (BM) \param mask_type mask type (see mask types macros) \return -1 on failure (bitmap mispatch) @@ -175,8 +175,7 @@ int gsbm_or_masks(struct BM *bmvar, struct BM *bmcon) Must be same size, ORNOTs bitmaps & stores in bmvar \param bmvar bitmap (BM) to changed - \param bmcom bitmap (BM) - \param mask_type mask type (see mask types macros) + \param bmcon bitmap (BM) \return -1 on failure (bitmap mispatch) \return 0 on success @@ -192,8 +191,7 @@ int gsbm_ornot_masks(struct BM *bmvar, struct BM *bmcon) Must be same size, ADDs bitmaps & stores in bmvar \param bmvar bitmap (BM) to changed - \param bmcom bitmap (BM) - \param mask_type mask type (see mask types macros) + \param bmcon bitmap (BM) \return -1 on failure (bitmap mispatch) \return 0 on success @@ -209,8 +207,7 @@ int gsbm_and_masks(struct BM *bmvar, struct BM *bmcon) Must be same size, XORs bitmaps & stores in bmvar \param bmvar bitmap (BM) to changed - \param bmcom bitmap (BM) - \param mask_type mask type (see mask types macros) + \param bmcon bitmap (BM) \return -1 on failure (bitmap mispatch) \return 0 on success diff --git a/lib/ogsf/gs_util.c b/lib/ogsf/gs_util.c index b8da7b6fa15..ae430d46e21 100644 --- a/lib/ogsf/gs_util.c +++ b/lib/ogsf/gs_util.c @@ -313,7 +313,7 @@ int GS_dv3norm(double *dv1) \brief Change v2 so that v1v2 is a unit vector \param v1 first vector - \param v2[in,out] second vector + \param[in,out] v2 second vector \return 0 if magnitude of dx is zero \return 1 if magnitude of dx > 0 diff --git a/lib/ogsf/gsd_cplane.c b/lib/ogsf/gsd_cplane.c index 291946b54ac..f974fcb0bc2 100644 --- a/lib/ogsf/gsd_cplane.c +++ b/lib/ogsf/gsd_cplane.c @@ -155,7 +155,7 @@ void gsd_get_cplanes_state(int *onstate) Planes MUST be big enough to hold MAX_CPLANES Point4s - \param places surface coordinates, normal pointing away from visible side + \param planes surface coordinates, normal pointing away from visible side \return ADD */ diff --git a/lib/ogsf/gsd_objs.c b/lib/ogsf/gsd_objs.c index 235eda957ef..e0b4e8e5c86 100644 --- a/lib/ogsf/gsd_objs.c +++ b/lib/ogsf/gsd_objs.c @@ -1,5 +1,5 @@ /*! - \file lib/ogsf/gsd_label.c + \file lib/ogsf/gsd_objs.c \brief OGSF library - objects management (lower level functions) @@ -207,8 +207,6 @@ void gsd_line_onsurf(geosurf *gs, float *v1, float *v2) \param v2 second point \param pt \param n number of segments - - \param number of vertices */ int gsd_nline_onsurf(geosurf *gs, float *v1, float *v2, float *pt, int n) { @@ -537,7 +535,7 @@ void gsd_draw_box(float *center, unsigned long colr, float siz) \param center center point \param colr color value - \param size size value + \param siz size value */ void gsd_drawsphere(float *center, unsigned long colr, float siz) { diff --git a/lib/ogsf/gsx.c b/lib/ogsf/gsx.c index 2214727c71d..85478132c07 100644 --- a/lib/ogsf/gsx.c +++ b/lib/ogsf/gsx.c @@ -47,7 +47,7 @@ void GS_set_cancel(int c) /*! \brief Set cxl function - \param pointer to function + \param f pointer to function */ void GS_set_cxl_func(void (*f)(void)) { diff --git a/lib/ogsf/gv2.c b/lib/ogsf/gv2.c index 5a54c41bc75..26ac83fab0a 100644 --- a/lib/ogsf/gv2.c +++ b/lib/ogsf/gv2.c @@ -279,7 +279,7 @@ int GV_get_style(int id, int *mem, int *color, int *width, int *use_z) \param layer layer number for thematic mapping \param color color column name \param width width column name - \param colors pointer to Colors structure or NULL + \param color_rules pointer to Colors structure or NULL \return 1 on success \return -1 on error (point set not found) diff --git a/lib/ogsf/gv3.c b/lib/ogsf/gv3.c index 5ffb8acddf9..12e4f1caa5c 100644 --- a/lib/ogsf/gv3.c +++ b/lib/ogsf/gv3.c @@ -39,7 +39,7 @@ static int Tot_mem = 0; The other alternative may be to load to a tmp file \param grassname vector map name - \param[out] number of loaded features + \param[out] nlines number of loaded features \return pointer to geoline struct \return NULL on failure diff --git a/lib/ogsf/gvl.c b/lib/ogsf/gvl.c index e4de0ef90e5..8525d7aa071 100644 --- a/lib/ogsf/gvl.c +++ b/lib/ogsf/gvl.c @@ -79,7 +79,7 @@ geovol *gvl_get_prev_vol(int id) /*! \brief Get all volumes - \param[out] list of geovol structs + \param[out] gvols list of geovol structs \return number of available volume sets */ diff --git a/lib/ogsf/gvl2.c b/lib/ogsf/gvl2.c index 2c861c4b5ad..416ca65dd04 100644 --- a/lib/ogsf/gvl2.c +++ b/lib/ogsf/gvl2.c @@ -846,7 +846,7 @@ int GVL_isosurf_get_att(int id, int isosurf_id, int att, int *set, \brief Unset isosurface attributes \param id volume set id - \param isosurface_id isosurface id + \param isosurf_id isosurface id \param att attribute id \return ? diff --git a/lib/ogsf/gvl_calc.c b/lib/ogsf/gvl_calc.c index 34b6259dfde..70b489814a4 100644 --- a/lib/ogsf/gvl_calc.c +++ b/lib/ogsf/gvl_calc.c @@ -153,7 +153,7 @@ int iso_r_cndx(data_buffer *dbuff) \param isosurf \param desc \param x,y,z - \param[out] value + \param[out] v value \return 0 \return ? diff --git a/lib/ogsf/gvl_file.c b/lib/ogsf/gvl_file.c index cdff188a0b2..d7fc5f9cef3 100644 --- a/lib/ogsf/gvl_file.c +++ b/lib/ogsf/gvl_file.c @@ -1041,6 +1041,8 @@ int gvl_file_end_read(geovol_file *vf) \brief Get value for volume file at x, y, z \param vf pointer to geovol_file struct + \param x,y,z + \param[out] value \return -1 on failure \return 1 on success diff --git a/lib/proj/get_proj.c b/lib/proj/get_proj.c index 36501e7abdb..ecb4f9a5c81 100644 --- a/lib/proj/get_proj.c +++ b/lib/proj/get_proj.c @@ -331,7 +331,6 @@ static void alloc_options(char *buffa) * \param info Pointer to a pj_info struct (which must already exist) into * which the co-ordinate system definition will be placed * \param str input string with projection definition - * \param in_units_keys PROJ_UNITS-style key-value pairs * * \return -1 on error (unable to initialise PROJ.4) * 1 on success diff --git a/lib/raster/histogram.c b/lib/raster/histogram.c index 62276f4ed8c..82817e02f40 100644 --- a/lib/raster/histogram.c +++ b/lib/raster/histogram.c @@ -161,6 +161,7 @@ int Rast_get_histogram_num(const struct Histogram *histogram) * \brief Returns cat for the nth element in the histogram * * Returns cat for the nth element in the histogram + * \param n: The nth element in the histogram to get the cat for * \param histogram: struct for histogram * \return CELL */ diff --git a/lib/raster/quant.c b/lib/raster/quant.c index 17591508b01..79e8f6fe75e 100644 --- a/lib/raster/quant.c +++ b/lib/raster/quant.c @@ -263,11 +263,11 @@ static void quant_update_limits(struct Quant *q, DCELL dLow, DCELL dHigh, * from all the rules (except the "infinite" rules) in q into * dmin, dmax, cmin, and cmax. * - * \param quant pointer to Quant structure which holds quant rules info - * \param[out] dmin minimum fp value - * \param[out] dmax maximum fp value - * \param[out] cmin minimum value - * \param[out] cmax maximum value + * \param q pointer to Quant structure which holds quant rules info + * \param[out] dMin minimum fp value + * \param[out] dMax maximum fp value + * \param[out] cMin minimum value + * \param[out] cMax maximum value * * \return -1 if q->truncate or q->round are true or after * Rast_quant_init (), or any call to Rast_quant_clear () or Rast_quant_free() diff --git a/lib/raster/quant_rw.c b/lib/raster/quant_rw.c index 8a41b31ffe6..448a569923f 100644 --- a/lib/raster/quant_rw.c +++ b/lib/raster/quant_rw.c @@ -75,8 +75,8 @@ void Rast_round_fp_map(const char *name, const char *mapset) * \param name map name * \param mapset mapset name - * \param cmin minimum value - * \param cmax maximum value + * \param min minimum value + * \param max maximum value */ void Rast_quantize_fp_map(const char *name, const char *mapset, CELL min, CELL max) @@ -176,7 +176,7 @@ void Rast_write_quant(const char *name, const char *mapset, * mapset. * \param name * \param mapset - * \param q + * \param quant * * \return -2 if raster map is of type integer * \return -1 if (!G_name_is_fully_qualified()) diff --git a/lib/raster3d/history.c b/lib/raster3d/history.c index 9dc6e68614d..1ea8bf57b18 100644 --- a/lib/raster3d/history.c +++ b/lib/raster3d/history.c @@ -56,7 +56,7 @@ void SimpleErrorMessage(FILE *fd, const char *name, const char *mapset) * * \param name * \param mapset - * \param history + * \param hist * \return int */ int Rast3d_read_history(const char *name, const char *mapset, diff --git a/lib/raster3d/mask.c b/lib/raster3d/mask.c index 716258146de..b670058b5f1 100644 --- a/lib/raster3d/mask.c +++ b/lib/raster3d/mask.c @@ -187,6 +187,7 @@ int Rast3d_is_masked(RASTER3D_Map *map, int x, int y, int z) * Rast3d_is_masked (x, y, z) returns 1. Does nothing otherwise. * value is assumed to be oftype. * + * \param map * \param x * \param y * \param z @@ -230,6 +231,7 @@ void Rast3d_mask_float(RASTER3D_Map *map, int x, int y, int z, float *value) * * Same as Rast3d_mask_num (x, y, z, value, DCELL_TYPE). * + * \param map * \param x * \param y * \param z diff --git a/lib/raster3d/open2.c b/lib/raster3d/open2.c index 02ef17f126b..127bf4d8c16 100644 --- a/lib/raster3d/open2.c +++ b/lib/raster3d/open2.c @@ -28,8 +28,9 @@ * \param cache The type of the caching * \param region The region of the map * \param type The type of the map (FCELL_TYPE, or DCELL_TYPE) + * \param compression * \param doLzw Use the LZW compression algorithm - * \param doRle Use the Run-Length-Encoding algroithm for compression + * \param doRle Use the Run-Length-Encoding algorithm for compression * \param precision The precision used for the mantissa (0 - 52) or * RASTER3D_MAX_PRECISION * \param tileX The number of cells in X direction of a tile diff --git a/lib/rst/interp_float/func2d.c b/lib/rst/interp_float/func2d.c index 8e38404d9dd..577c463f06b 100644 --- a/lib/rst/interp_float/func2d.c +++ b/lib/rst/interp_float/func2d.c @@ -35,18 +35,18 @@ #include #include -/* parameter description from DESCRIPTION.INTERP */ -/*! - * Radial basis function +/** + * @brief Radial basis function * * Radial basis function - completely regularized spline with tension (d=2) * + * parameter description from DESCRIPTION.INTERP + * + * @param r distance squared + * @param fi tension + * @return */ - -double IL_crst(double r, /**< distance squared */ - - double fi /**< tension */ -) +double IL_crst(double r, double fi) { double rfsta2 = fi * fi * r / 4.; @@ -97,19 +97,18 @@ double IL_crst(double r, /**< distance squared */ return (res); } -/*! - * Function for calculating derivatives (d=2) +/** + * @brief Function for calculating derivatives (d=2) * * Derivatives of radial basis function - regularized spline with tension(d=2) + * + * @param r distance squared + * @param fi tension + * @param gd1 G1(r) + * @param gd2 G2(r) + * @return */ -int IL_crstg(double r, /**< distance squared */ - - double fi, /**< tension */ - - double *gd1, /**< G1(r) */ - - double *gd2 /**< G2(r) */ -) +int IL_crstg(double r, double fi, double *gd1, double *gd2) { double r2 = r; double rfsta2 = fi * fi * r / 4.; diff --git a/lib/vector/Vlib/geos_to_wktb.c b/lib/vector/Vlib/geos_to_wktb.c index ce84dde7f0c..9c78c75216a 100644 --- a/lib/vector/Vlib/geos_to_wktb.c +++ b/lib/vector/Vlib/geos_to_wktb.c @@ -79,7 +79,6 @@ char *Vect_read_area_to_wkt(struct Map_info *Map, int area) \param Map pointer to Map_info structure \param area area id - \param size The size of the returned unsigned char array \param trim Set the number trimming option on, With trim set to true, the writer will strip trailing 0's from the output coordinates. diff --git a/lib/vector/Vlib/open.c b/lib/vector/Vlib/open.c index af6b4e3c7ec..b08e69cf0fe 100644 --- a/lib/vector/Vlib/open.c +++ b/lib/vector/Vlib/open.c @@ -33,14 +33,14 @@ #include "pg_local_proto.h" #endif -/* - \brief Number of levels - - - 1 without topology - - 2 with 2D topology - - \todo Implement - - 3 with 3D topology +/** + * @brief Number of levels + * + * - 1 without topology + * - 2 with 2D topology + * + * @todo Implement + * - 3 with 3D topology */ #define MAX_OPEN_LEVEL 2 @@ -753,7 +753,6 @@ int Vect_open_old_head(struct Map_info *Map, const char *name, \param mapset mapset name ("" for search path) \param layer layer name (OGR format) - \param[out] Map pointer to Map_info structure \param name name of vector map to open (datasource for direct OGR access) \param mapset mapset name ("" for search path, "OGR" for direct OGR access) \param layer layer name (OGR layer for direct OGR access) diff --git a/lib/vector/Vlib/read_nat.c b/lib/vector/Vlib/read_nat.c index 7327474b48c..df18b8ffe35 100644 --- a/lib/vector/Vlib/read_nat.c +++ b/lib/vector/Vlib/read_nat.c @@ -124,10 +124,10 @@ int V1_read_next_line_nat(struct Map_info *Map, struct line_pnts *line_p, Note: Topology must be built at level >= GV_BUILD_BASE \param Map pointer to Map_info struct - \param[out] Points container used to store line points within (pointer to + \param[out] line_p container used to store line points within (pointer to line_pnts struct) - \param[out] Cats container used to store line categories - within (pointer to line_cats struct) + \param[out] line_c container used to store line categories + within (pointer to line_cats struct) \param line feature id to read (starts at 1) \return feature type (GV_POINT, GV_LINE, ...) diff --git a/lib/vector/Vlib/simple_features.c b/lib/vector/Vlib/simple_features.c index c618d4006fa..c0205ef6a38 100644 --- a/lib/vector/Vlib/simple_features.c +++ b/lib/vector/Vlib/simple_features.c @@ -70,8 +70,7 @@ SF_FeatureType Vect_sfa_get_line_type(const struct line_pnts *Points, int type, /*! \brief Get relevant GV type - \param Map pointer to Map_info structure - \param type SF geometry type (SF_POINT, SF_LINESTRING, ...) + \param sftype SF geometry type (SF_POINT, SF_LINESTRING, ...) \return GV type \return -1 on error @@ -120,7 +119,6 @@ int Vect_sfa_check_line_type(const struct line_pnts *Points, int type, /*! \brief Get geometry dimension - \param Points pointer to line_pnts structure \param type feature type (GV_POINT, GV_LINE, ...) \return 0 for GV_POINT @@ -237,8 +235,9 @@ int Vect_sfa_line_astext(const struct line_pnts *Points, int type, int with_z, /*! \brief Check if feature is simple - \param Points pointer to line_pnts structure - \param type feature type (GV_POINT, GV_LINE, ...) + \param Points pointer to line_pnts structure (unused) + \param type feature type (GV_POINT, GV_LINE, ...) (unused) + \param with_z (unused) \return 1 feature simple \return 0 feature not simple diff --git a/lib/vector/Vlib/write_nat.c b/lib/vector/Vlib/write_nat.c index 8f6993b2931..51191cb2427 100644 --- a/lib/vector/Vlib/write_nat.c +++ b/lib/vector/Vlib/write_nat.c @@ -646,7 +646,7 @@ void V2__add_area_cats_to_cidx_nat(struct Map_info *Map, int area) \param Map pointer to Map_info struct \param line feature id to be removed - \param Points feature geometry (pointer to line_pnts struct) + \param points feature geometry (pointer to \ref line_pnts struct) \param external_routine external subroutine to execute (used by PostGIS Topology) diff --git a/lib/vector/diglib/plus_line.c b/lib/vector/diglib/plus_line.c index 1614f7658bd..ee95751e453 100644 --- a/lib/vector/diglib/plus_line.c +++ b/lib/vector/diglib/plus_line.c @@ -178,6 +178,7 @@ int dig_add_line(struct Plus_head *plus, int type, * \brief Restore line in Plus_head structure. * * \param[in,out] plus pointer to Plus_head structure + * \param lineid * \param type feature type * \param Points line geometry * \param box bounding box diff --git a/lib/vector/diglib/struct_alloc.c b/lib/vector/diglib/struct_alloc.c index aa667e377de..4998daa207b 100644 --- a/lib/vector/diglib/struct_alloc.c +++ b/lib/vector/diglib/struct_alloc.c @@ -172,7 +172,7 @@ void *dig_alloc_topo(char type) /*! \brief Free line structure - \param pointer to P_line struct to be freed + \param Line pointer to P_line struct to be freed */ void dig_free_line(struct P_line *Line) { diff --git a/lib/vector/neta/spanningtree.c b/lib/vector/neta/spanningtree.c index 05a2fddab87..af08849cf3d 100644 --- a/lib/vector/neta/spanningtree.c +++ b/lib/vector/neta/spanningtree.c @@ -82,7 +82,7 @@ static int cmp_edge(const void *pa, const void *pb) \brief Get number of edges in the spanning forest \param graph input graph - \param[out] list of edges + \param[out] tree_list list of edges \return number of edges \return -1 on failure diff --git a/lib/vector/neta/timetables.c b/lib/vector/neta/timetables.c index aabc8c8afaf..b755bc2bbdf 100644 --- a/lib/vector/neta/timetables.c +++ b/lib/vector/neta/timetables.c @@ -27,8 +27,8 @@ \param driver DB driver \param sql SQl string - \param[out] list of lengths - \param[out] list of ids + \param[out] lengths list of lengths + \param[out] ids list of ids \return number of distinct elements \return -1 on failure diff --git a/lib/vector/vedit/move.c b/lib/vector/vedit/move.c index db1a8515878..e9bcd1fc8a1 100644 --- a/lib/vector/vedit/move.c +++ b/lib/vector/vedit/move.c @@ -18,10 +18,12 @@ \brief Move selected primitives \param Map pointer to Map_info - \param BgMap, nbgmaps list of background vector maps used for snapping + \param BgMap list of background vector maps used for snapping + \param nbgmaps Number of background vector maps in BgMap \param List list of primitives to be moved \param move_x,move_y,move_z direction (move_z used only if map is 3D) \param snap enable snapping (see globals.h) + \param thresh snapping threshold (>0) \return number of modified primitives \return -1 on error