Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@
BasedOnStyle: LLVM
IndentWidth: 4
---
Language: C
AlignConsecutiveMacros:
Enabled: true
AcrossEmptyLines: true
AcrossComments: true
PadOperators: true
AlignEscapedNewlines: Left
AllowShortFunctionsOnASingleLine: InlineOnly
BreakBeforeBraces: Stroustrup
ForEachMacros:
- DGL_FOREACH_NODE
- DGL_FOREACH_EDGE
- BOOST_FOREACH
IfMacros:
- SORT_DEBUG
MacroBlockBegin: GNO_BEGIN
MacroBlockEnd: GNO_END
SortIncludes: Never
---
Language: Cpp
AccessModifierOffset: -4
AlignConsecutiveMacros:
Expand All @@ -11,8 +30,8 @@ AlignConsecutiveMacros:
PadOperators: true
AlignEscapedNewlines: Left
AllowShortFunctionsOnASingleLine: InlineOnly
AlwaysBreakTemplateDeclarations: Yes
BreakBeforeBraces: Stroustrup
BreakTemplateDeclarations: Yes
ForEachMacros:
- DGL_FOREACH_NODE
- DGL_FOREACH_EDGE
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: DoozyX/clang-format-lint-action@bcb4eb2cb0d707ee4f3e5cc3b456eb075f12cf73 # v0.20
with:
source: "."
clangFormatVersion: 19
clangFormatVersion: 20
inplace: True
- name: Create and uploads code suggestions to apply
id: diff
Expand Down
6 changes: 5 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ repos:
.*/testsuite/.*
)
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.7
rev: v20.1.0
hooks:
- id: clang-format
types_or: [c, c++, javascript, json, objective-c]
Expand All @@ -92,6 +92,10 @@ repos:
rev: v1.19.0
hooks:
- id: zizmor
args:
- "--fix"
# https://github.com/zizmorcore/zizmor-pre-commit/blob/120fe9ac3c965ab7decf67e8b9ca24b274230eed/.pre-commit-hooks.yaml#L10
- "--no-progress"
- repo: https://github.com/editorconfig-checker/editorconfig-checker
rev: v3.6.0
hooks:
Expand Down
2 changes: 1 addition & 1 deletion docker/debian/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:13.2-slim@sha256:91e29de1e4e20f771e97d452c8fa6370716ca4044febbec4838366d459963801
FROM debian:13.2-slim@sha256:4bcb9db66237237d03b55b969271728dd3d955eaaa254b9db8a3db94550b1885

# apt-get update && apt-get install lsb-release -y && lsb_release -a

Expand Down Expand Up @@ -145,7 +145,7 @@
ENV LD_LIBRARY_PATH="/usr/local/lib"
ENV LDFLAGS="$MYLDFLAGS"
ENV CFLAGS="$MYCFLAGS"
ENV CXXFLAGS="$MYCXXFLAGS"

Check warning on line 148 in docker/debian/Dockerfile

View workflow job for this annotation

GitHub Actions / build (debian, debian, docker/debian/Dockerfile, GUI=without)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$MYCXXFLAGS' (did you mean $MYCFLAGS?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

# Configure compile and install GRASS
ENV NUMTHREADS=4
Expand Down Expand Up @@ -207,7 +207,7 @@

# enable GRASS Python session support
## grass --config python-path
ENV PYTHONPATH="/usr/local/grass/etc/python:${PYTHONPATH}"

Check warning on line 210 in docker/debian/Dockerfile

View workflow job for this annotation

GitHub Actions / build (debian, debian, docker/debian/Dockerfile, GUI=without)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$PYTHONPATH' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
# enable GRASS ctypes imports
## grass --config path
ENV LD_LIBRARY_PATH="/usr/local/grass/lib:$LD_LIBRARY_PATH"
Expand Down
31 changes: 27 additions & 4 deletions gui/wxpython/location_wizard/wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,11 @@ def __init__(self, wizard, parent, grassdatabase):
self.bbrowse = self.MakeButton(_("Change"))

# text controls
self.tgisdbase = self.MakeLabel(grassdatabase)
# Show long paths with middle ellipsis and full value in tooltip
self.tgisdbase = self.MakeLabel(
text=grassdatabase, style=wx.ST_ELLIPSIZE_MIDDLE, tooltip=grassdatabase
)
self.tgisdbase.SetMaxSize((400, -1))
self.tlocation = self.MakeTextCtrl("newProject")
self.tlocation.SetFocus()

Expand Down Expand Up @@ -274,7 +278,7 @@ def __init__(self, wizard, parent, grassdatabase):
)
self.sizer.Add(
self.tgisdbase,
flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL,
flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL | wx.EXPAND,
border=5,
pos=(6, 1),
)
Expand Down Expand Up @@ -332,6 +336,7 @@ def OnBrowse(self, event):
if dlg.ShowModal() == wx.ID_OK:
self.grassdatabase = dlg.GetPath()
self.tgisdbase.SetLabel(self.grassdatabase)
self.tgisdbase.SetToolTip(self.grassdatabase)

dlg.Destroy()

Expand Down Expand Up @@ -2502,6 +2507,14 @@ def __init__(self, parent, grassdatabase):
self.wizard.FitToPage(self.datumpage)
size = self.wizard.GetPageSize()
self.wizard.SetPageSize((size[0], size[1] + 75))
# Allow user to resize while keeping sensible minimum size
cur_size = self.wizard.GetSize()
try:
# Set size hints (min size) to current size
self.wizard.SetSizeHints(cur_size[0], cur_size[1])
except Exception:
# Fallback for environments not supporting SetSizeHints
self.wizard.SetMinSize(cur_size)

# new location created?
self.location = None
Expand Down Expand Up @@ -2795,9 +2808,19 @@ def __init__(self, parent, id, title):
if globalvar.wxPythonPhoenix:
Wizard.__init__(self)
self.SetExtraStyle(wx.adv.WIZARD_EX_HELPBUTTON)
self.Create(parent=parent, id=id, title=title)
self.Create(
parent=parent,
id=id,
title=title,
style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER | wx.MAXIMIZE_BOX,
)
else:
pre = wiz.PreWizard()
pre.SetExtraStyle(wx.wizard.WIZARD_EX_HELPBUTTON)
pre.Create(parent=parent, id=id, title=title)
pre.Create(
parent=parent,
id=id,
title=title,
style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER | wx.MAXIMIZE_BOX,
)
self.PostCreate(pre)
2 changes: 1 addition & 1 deletion imagery/i.atcorr/geomcond.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ void GeomCond::posobs(double tu, int nc, int nl)
xt = -(sn * tanx);
yt = sn * tany / cos(x);
teta = asin(yt / rp);
ylat = (atan(((tan(teta))*rp) / re));
ylat = (atan(((tan(teta)) * rp) / re));
ylon = atan(xt / zt);
}

Expand Down
2 changes: 1 addition & 1 deletion imagery/i.fft/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ int main(int argc, char *argv[])
DCELL *cell_real, *cell_imag;
int rows, cols; /* number of rows & columns */
long totsize; /* Total number of data points */
double(
double (
*data)[2]; /* Data structure containing real & complex values of FFT */
int i, j; /* Loop control variables */

Expand Down
2 changes: 1 addition & 1 deletion imagery/i.ifft/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ int main(int argc, char *argv[])
int i, j; /* Loop control variables */
int rows, cols; /* number of rows & columns */
long totsize; /* Total number of data points */
double(
double (
*data)[2]; /* Data structure containing real & complex values of FFT */

G_gisinit(argv[0]);
Expand Down
2 changes: 1 addition & 1 deletion imagery/i.segment/pavl.c
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ void(pavl_assert_insert)(struct pavl_table *table, void *item)

/* Asserts that |pavl_delete()| really removes |item| from |table|,
and returns the removed item. */
void *(pavl_assert_delete)(struct pavl_table *table, void *item)
void *(pavl_assert_delete)(struct pavl_table * table, void *item)
{
void *p = pavl_delete(table, item);

Expand Down
6 changes: 3 additions & 3 deletions imagery/i.zc/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ int main(int argc, char *argv[])
/* get the rows and columns in the current window */
or = Rast_window_rows();
oc = Rast_window_cols();
rows = G_math_max_pow2((long) or);
rows = G_math_max_pow2((long)or);
cols = G_math_max_pow2((long)oc);
size = (rows > cols) ? rows : cols;
totsize = size * size;
Expand Down Expand Up @@ -162,7 +162,7 @@ int main(int argc, char *argv[])

/* Read in cell map values */
G_message(_("Reading raster map..."));
for (i = 0; i < or ; i++) {
for (i = 0; i < or; i++) {
Rast_get_c_row(inputfd, cell_row, i);

for (j = 0; j < oc; j++)
Expand All @@ -187,7 +187,7 @@ int main(int argc, char *argv[])
cell_row = Rast_allocate_c_buf();

/* Write out result to a new cell map */
for (i = 0; i < or ; i++) {
for (i = 0; i < or; i++) {
for (j = 0; j < oc; j++) {
*(cell_row + j) = (CELL)(*(data[1] + i * cols + j));
}
Expand Down
2 changes: 1 addition & 1 deletion include/grass/iostream/imbuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class im_buffer {
T *data;

bool sorted; // true if it is sorted; set when the buffer is sorted
// to prevent sorting it twice
// to prevent sorting it twice

public:
// create a buffer of maxsize n
Expand Down
18 changes: 9 additions & 9 deletions lib/btree2/kdtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ static int kdtree_replace(struct kdtree *t, struct kdnode *r)
double mindist;
int rdir, ordir, dir;
int ld, rd;
struct kdnode *n, *rn, *or ;
struct kdnode *n, *rn, *or;
struct kdstack {
struct kdnode *n;
int dir;
Expand Down Expand Up @@ -925,7 +925,7 @@ static int kdtree_replace(struct kdtree *t, struct kdnode *r)
* repeat until replacement is leaf */
ordir = rdir;
is_leaf = 0;
s[0].n = or ;
s[0].n = or;
s[0].dir = ordir;
top2 = 1;
mindist = -1;
Expand All @@ -938,7 +938,7 @@ static int kdtree_replace(struct kdtree *t, struct kdnode *r)

n = s[top].n;
rn = n;
mindist = or->c[(int) or->dim] - n->c[(int) or->dim];
mindist = or->c[(int)or->dim] - n->c[(int)or->dim];
if (ordir)
mindist = -mindist;

Expand All @@ -963,15 +963,15 @@ static int kdtree_replace(struct kdtree *t, struct kdnode *r)
n = s[top].n;
if ((cmp(rn, n, or->dim) > 0) == ordir) {
rn = n;
mindist = or->c[(int) or->dim] - n->c[(int) or->dim];
mindist = or->c[(int)or->dim] - n->c[(int)or->dim];
if (ordir)
mindist = -mindist;
}

/* look on the other side ? */
dir = s[top].dir;
if (n->dim != or->dim && mindist >= fabs(n->c[(int)n->dim] -
n->c[(int)n->dim])) {
if (n->dim != or->dim &&
mindist >= fabs(n->c[(int)n->dim] - n->c[(int)n->dim])) {
/* go down the other side */
top++;
s[top].n = n->child[!dir];
Expand All @@ -992,10 +992,10 @@ static int kdtree_replace(struct kdtree *t, struct kdnode *r)
#ifdef KD_DEBUG
if (!rn)
G_fatal_error("No replacement");
if (ordir && or->c[(int) or->dim] > rn->c[(int) or->dim])
if (ordir && or->c[(int)or->dim] > rn->c[(int)or->dim])
G_fatal_error("rn is smaller");

if (!ordir && or->c[(int) or->dim] < rn->c[(int) or->dim])
if (!ordir && or->c[(int)or->dim] < rn->c[(int)or->dim])
G_fatal_error("rn is larger");

if (or->child[1]) {
Expand Down Expand Up @@ -1128,7 +1128,7 @@ static int kdtree_replace(struct kdtree *t, struct kdnode *r)

static int kdtree_balance(struct kdtree *t, struct kdnode *r, int bmode)
{
struct kdnode * or ;
struct kdnode *or;
int dir;
int rd, ld;
int old_depth;
Expand Down
11 changes: 9 additions & 2 deletions lib/gis/parser_md_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,24 @@
fputs(escaped, f); \
break

// Newline requires special handling with Markdown line breaks and indentation.
static void G__md_print_escaped_newline(FILE *f)
{
fputs(MD_NEWLINE "\n ", f);
}

void G__md_print_escaped(FILE *f, const char *str)
{
const char *s;

for (s = str; *s; s++) {
switch (*s) {
do_escape('\n', "\\\n");
do_escape('\t', "&nbsp;&nbsp;&nbsp;&nbsp;");
do_escape('<', "&lt;");
do_escape('>', "&gt;");
do_escape('*', "\\*");
case '\n':
G__md_print_escaped_newline(f);
break;
default:
fputc(*s, f);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/vector/dglib/avl.c
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ void(avl_assert_insert)(struct avl_table *table, void *item)

/* Asserts that |avl_delete()| really removes |item| from |table|,
and returns the removed item. */
void *(avl_assert_delete)(struct avl_table *table, void *item)
void *(avl_assert_delete)(struct avl_table * table, void *item)
{
void *p = avl_delete(table, item);

Expand Down
2 changes: 1 addition & 1 deletion lib/vector/dglib/tavl.c
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ void(tavl_assert_insert)(struct tavl_table *table, void *item)

/* Asserts that |tavl_delete()| really removes |item| from |table|,
and returns the removed item. */
void *(tavl_assert_delete)(struct tavl_table *table, void *item)
void *(tavl_assert_delete)(struct tavl_table * table, void *item)
{
void *p = tavl_delete(table, item);

Expand Down
2 changes: 1 addition & 1 deletion locale/po/grasslibs_ar.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: grassmods_ar\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-12-20 19:40+0000\n"
"POT-Creation-Date: 2025-12-27 15:40+0000\n"
"PO-Revision-Date: 2025-08-23 20:17+0000\n"
"Last-Translator: Edouard Choiniere <[email protected]>\n"
"Language-Team: Arabic <https://weblate.osgeo.org/projects/grass-gis/grasslibs/ar/>\n"
Expand Down
2 changes: 1 addition & 1 deletion locale/po/grasslibs_bn.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: grasslibs_bn\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-12-20 19:40+0000\n"
"POT-Creation-Date: 2025-12-27 15:40+0000\n"
"PO-Revision-Date: 2025-08-23 20:17+0000\n"
"Last-Translator: Edouard Choiniere <[email protected]>\n"
"Language-Team: Bengali <https://weblate.osgeo.org/projects/grass-gis/grasslibs/bn/>\n"
Expand Down
2 changes: 1 addition & 1 deletion locale/po/grasslibs_cs.po
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ msgid ""
msgstr ""
"Project-Id-Version: grasslibs_cs\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-12-20 19:40+0000\n"
"POT-Creation-Date: 2025-12-27 15:40+0000\n"
"PO-Revision-Date: 2025-08-23 20:17+0000\n"
"Last-Translator: Edouard Choiniere <[email protected]>\n"
"Language-Team: Czech <https://weblate.osgeo.org/projects/grass-gis/grasslibs/cs/>\n"
Expand Down
2 changes: 1 addition & 1 deletion locale/po/grasslibs_de.po
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ msgid ""
msgstr ""
"Project-Id-Version: grasslibs_de\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-12-20 19:40+0000\n"
"POT-Creation-Date: 2025-12-27 15:40+0000\n"
"PO-Revision-Date: 2025-08-23 20:17+0000\n"
"Last-Translator: Edouard Choiniere <[email protected]>\n"
"Language-Team: German <https://weblate.osgeo.org/projects/grass-gis/grasslibs/de/>\n"
Expand Down
2 changes: 1 addition & 1 deletion locale/po/grasslibs_el.po
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: grasslibs_el\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-12-20 19:40+0000\n"
"POT-Creation-Date: 2025-12-27 15:40+0000\n"
"PO-Revision-Date: 2025-08-23 20:17+0000\n"
"Last-Translator: Edouard Choiniere <[email protected]>\n"
"Language-Team: Greek <https://weblate.osgeo.org/projects/grass-gis/grasslibs/el/>\n"
Expand Down
2 changes: 1 addition & 1 deletion locale/po/grasslibs_es.po
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ msgid ""
msgstr ""
"Project-Id-Version: grasslibs_es\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-12-20 19:40+0000\n"
"POT-Creation-Date: 2025-12-27 15:40+0000\n"
"PO-Revision-Date: 2025-08-26 13:29+0000\n"
"Last-Translator: Edouard Choiniere <[email protected]>\n"
"Language-Team: Spanish <https://weblate.osgeo.org/projects/grass-gis/grasslibs/es/>\n"
Expand Down
2 changes: 1 addition & 1 deletion locale/po/grasslibs_fi.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: grasslibs_fi\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-12-20 19:40+0000\n"
"POT-Creation-Date: 2025-12-27 15:40+0000\n"
"PO-Revision-Date: 2025-08-23 20:17+0000\n"
"Last-Translator: Edouard Choiniere <[email protected]>\n"
"Language-Team: Finnish <https://weblate.osgeo.org/projects/grass-gis/grasslibs/fi/>\n"
Expand Down
2 changes: 1 addition & 1 deletion locale/po/grasslibs_fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ msgid ""
msgstr ""
"Project-Id-Version: grasslibs_fr\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-12-20 19:40+0000\n"
"POT-Creation-Date: 2025-12-27 15:40+0000\n"
"PO-Revision-Date: 2025-12-18 01:06+0000\n"
"Last-Translator: Edouard Choiniere <[email protected]>\n"
"Language-Team: French <https://weblate.osgeo.org/projects/grass-gis/grasslibs/fr/>\n"
Expand Down
Loading
Loading