summaryrefslogtreecommitdiff
path: root/apps/plugins/puzzles/src/grid.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/puzzles/src/grid.c')
-rw-r--r--apps/plugins/puzzles/src/grid.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/apps/plugins/puzzles/src/grid.c b/apps/plugins/puzzles/src/grid.c
index 4929b5c7d3..52648e5a92 100644
--- a/apps/plugins/puzzles/src/grid.c
+++ b/apps/plugins/puzzles/src/grid.c
@@ -1529,8 +1529,8 @@ static void grid_size_triangular(int width, int height,
1529 *yextent = height * vec_y; 1529 *yextent = height * vec_y;
1530} 1530}
1531 1531
1532static char *grid_validate_desc_triangular(grid_type type, int width, 1532static const char *grid_validate_desc_triangular(grid_type type, int width,
1533 int height, const char *desc) 1533 int height, const char *desc)
1534{ 1534{
1535 /* 1535 /*
1536 * Triangular grids: an absent description is valid (indicating 1536 * Triangular grids: an absent description is valid (indicating
@@ -2855,8 +2855,9 @@ static char *grid_new_desc_penrose(grid_type type, int width, int height, random
2855 return dupstr(gd); 2855 return dupstr(gd);
2856} 2856}
2857 2857
2858static char *grid_validate_desc_penrose(grid_type type, int width, int height, 2858static const char *grid_validate_desc_penrose(grid_type type,
2859 const char *desc) 2859 int width, int height,
2860 const char *desc)
2860{ 2861{
2861 int tilesize = PENROSE_TILESIZE, startsz, depth, xoff, yoff, aoff, inner_radius; 2862 int tilesize = PENROSE_TILESIZE, startsz, depth, xoff, yoff, aoff, inner_radius;
2862 double outer_radius; 2863 double outer_radius;
@@ -3032,8 +3033,8 @@ char *grid_new_desc(grid_type type, int width, int height, random_state *rs)
3032 } 3033 }
3033} 3034}
3034 3035
3035char *grid_validate_desc(grid_type type, int width, int height, 3036const char *grid_validate_desc(grid_type type, int width, int height,
3036 const char *desc) 3037 const char *desc)
3037{ 3038{
3038 if (type == GRID_PENROSE_P2 || type == GRID_PENROSE_P3) { 3039 if (type == GRID_PENROSE_P2 || type == GRID_PENROSE_P3) {
3039 return grid_validate_desc_penrose(type, width, height, desc); 3040 return grid_validate_desc_penrose(type, width, height, desc);
@@ -3048,7 +3049,7 @@ char *grid_validate_desc(grid_type type, int width, int height,
3048 3049
3049grid *grid_new(grid_type type, int width, int height, const char *desc) 3050grid *grid_new(grid_type type, int width, int height, const char *desc)
3050{ 3051{
3051 char *err = grid_validate_desc(type, width, height, desc); 3052 const char *err = grid_validate_desc(type, width, height, desc);
3052 if (err) assert(!"Invalid grid description."); 3053 if (err) assert(!"Invalid grid description.");
3053 3054
3054 return grid_news[type](width, height, desc); 3055 return grid_news[type](width, height, desc);