Skip to content

Commit

Permalink
Start work on v.3.3.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
dtschump committed Sep 10, 2023
1 parent 79e6731 commit 00071ed
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 22 deletions.
23 changes: 6 additions & 17 deletions src/gmic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6589,13 +6589,12 @@ gmic& gmic::_run(const CImgList<char>& commands_line, unsigned int& position,
// Done.
if (!is_get && !std::strcmp("done",item)) {
const CImg<char> &s = callstack.back();
if (s[0]!='*' || (s[1]!='b' && s[1]!='f' && s[1]!='l' && s[1]!='r'))
if (s[0]!='*' || (s[1]!='f' && s[1]!='l' && s[1]!='r'))
error(true,0,0,
"Command 'done': Not associated to a 'for', 'foreach', 'local' or 'repeat' command "
"within the same scope.");

if (s[1]=='b') callstack.remove(); // End a '{ .. }' block
else if (s[1]=='f') {
if (s[1]=='f') {
if (s[4]!='e') { // End a 'for...done' block
unsigned int *const fd = fordones.data(0,nb_fordones - 1);
position = fd[0];
Expand Down Expand Up @@ -13114,16 +13113,6 @@ gmic& gmic::_run(const CImgList<char>& commands_line, unsigned int& position,

if (is_builtin_command) {

// Left brace (not ignored previously, so starts a new generic code block).
if (!is_get && *item=='{' && !item[1]) {
if (is_debug_info && debug_line!=~0U) {
gmic_use_argx;
cimg_snprintf(argx,_argx.width(),"*block#%u",debug_line);
CImg<char>::string(argx).move_to(callstack);
} else CImg<char>::string("*block").move_to(callstack);
continue;
}

// If...[elif]...[else]...endif.
if (!is_get && (!std::strcmp("if",item) || (check_elif && !std::strcmp("elif",item)))) {
gmic_substitute_args(false);
Expand Down Expand Up @@ -13181,7 +13170,7 @@ gmic& gmic::_run(const CImgList<char>& commands_line, unsigned int& position,
break;
}
else if (is_star && s[1]=='l') { callstack_local = l; break; }
else if (!is_star || (s[1]!='i' && s[1]!='b')) break;
else if (!is_star || s[1]!='i') break;
}
const char *stb = 0, *ste = 0;
unsigned int callstack_ind = 0;
Expand Down Expand Up @@ -15071,15 +15060,15 @@ gmic& gmic::_run(const CImgList<char>& commands_line, unsigned int& position,
// Post-check call stack consistency.
if (!is_quit && !is_return) {
const CImg<char>& s = callstack.back();
if (s[0]=='*' && (s[1]=='b' || s[1]=='d' || s[1]=='i' || s[1]=='r' ||
if (s[0]=='*' && (s[1]=='d' || s[1]=='i' || s[1]=='r' ||
(s[1]=='f' && (s[4]!='e' || !is_end_local)) ||
(s[1]=='l' && !is_end_local))) {
unsigned int reference_line = ~0U;
if (cimg_sscanf(s,"*%*[a-z]#%u",&reference_line)==1)
error(true,0,0,
"A '%s' command is missing (for '%s', line #%u), before return point.",
s[1]=='b'?"}":s[1]=='d'?"while":s[1]=='i'?"fi":"done",
s[1]=='b'?"{":s[1]=='d'?"do":s[1]=='i'?"if":s[1]=='r'?"repeat":
s[1]=='d'?"while":s[1]=='i'?"fi":"done",
s[1]=='d'?"do":s[1]=='i'?"if":s[1]=='r'?"repeat":
s[1]=='f'?(s[4]!='e'?"for":"foreach"):"local",
reference_line);
else error(true,0,0,
Expand Down
2 changes: 1 addition & 1 deletion src/gmic.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
*/

#ifndef gmic_version
#define gmic_version 330
#define gmic_version 331

#ifndef gmic_pixel_type
#define gmic_pixel_type float
Expand Down
8 changes: 4 additions & 4 deletions src/gmic_stdlib.gmic
Original file line number Diff line number Diff line change
Expand Up @@ -9300,7 +9300,7 @@ update_deprecate : check "isint($1) && $1>0 && $1<999"

# update_download_version.
# Update file versions on G'MIC download page, with specified version number.
# $1 = version number (e.g. '3.3.0').
# $1 = version number (e.g. '3.3.1').
update_download_version : check "
is_digit(c)=(c>=_'0' && c<=_'9');
ver = ['${1=undefined}'];
Expand Down Expand Up @@ -11006,7 +11006,7 @@ upload_filters :
x "cd "$HOME"/work/src/gmic-community && git pull"

# Define the list of compatible versions.
(330,$_version) sort. discard. store. compat
(330,331,$_version) sort. discard. store. compat

# Import filters from stdlib and community.
files $HOME/work/src/gmic-community/include/*.gmic
Expand Down Expand Up @@ -40695,7 +40695,7 @@ fx_gmicky_preview :
#@gui : from the server logs: <i>IP address of the client; date and time of the request;</i>
#@gui : as well as a short string, supplied through the HTTP protocol <i>"User Agent"</i> header
#@gui : field, which describes the full plugin version as shown in the window title
#@gui : (e.g. "<i>G'MIC-Qt for GIMP 2.10 - Linux 64 bits - 3.3.0</i>").\n\n
#@gui : (e.g. "<i>G'MIC-Qt for GIMP 2.10 - Linux 64 bits - 3.3.1</i>").\n\n
#@gui : Note that this information may solely be used for purely anonymous
#@gui : statistical purposes.
#@gui : "}
Expand Down Expand Up @@ -40724,7 +40724,7 @@ fx_gmicky_preview :
#@gui : - <b>2023/01/16</b> : version <i>3.2.0</i>.\n
#@gui : - <b>2023/06/26</b> : version <i>3.2.6</i>.\n
#@gui : - <span foreground="purple"><b>2023/09/04</b> : version <i>3.3.0</i> (Current stable).</span>\n
##@gui : - <b>2023/10/XX</b> : version <i>3.3.1_pre</i> (Current pre-release).\n
#@gui : - <b>2023/09/10</b> : version <i>3.3.1_pre</i> (Current pre-release).\n
#@gui : "}
#@gui : sep = separator()
#@gui : url = link{"View changelog to upcoming minor version (3.3)","https://discuss.pixls.us/t/on-the-road-to-3-3"}
Expand Down

0 comments on commit 00071ed

Please sign in to comment.