Re: [Gimp-developer] Possible Future of ScriptFu/TinyFu with R6RS/Racket
On Thu, 2011-01-20 at 23:01 -0500, Liam R E Quin wrote: On Thu, 2011-01-20 at 15:10 +0100, Michael Natterer wrote: I discussed this with Martin, and the outcome was to have a command layer around the core, and not make it a 1:1 match of undo operations, because undos are very atomic operation, whereas commands rather correspond to undo groups of arbitrary complexity. In Author/Editor we had command groups, so that one command might have a whole sequence of sub-commands but make a single entry in the undo/redo history. The handler chain got to see the outer command as well as the sequence of inner commands, of course. Yes, but still even the most basic, non grouped command might still be triggering a whole series of atomic micro undo operations that would go into an undo group associated with the command. Look at the current set of undo pushing functions in app/core/gimpimage-undo-push.h, which cover the entire set of available user actions and PDB calls. They are really few compared to what variety of manipulations are possible. --mitch ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
[Gimp-developer] Coding Convention Question
Hi, I'm looking at bug #596410 and in order to get to the import source in gimpimage.c, I seem to have to #include ../file/gimp-file.h (to get to the GIMP_FILE_IMPORT_SOURCE_KEY constant). Is it appropriate to include a header file from a sibling directory this way? Thanks, Eric ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
[Gimp-developer] scanfs without field width limits making Gimp crash
Hi! While testing gimp with cppcheck I saw a lot of warnings caused by the usage of scanf and fscanf without specifying a width limit. One example: = [./app/gegl/gimpcurvesconfig.c:392]: (warning) scanf without field width limits can crash with huge input data. To fix this error message add a field width specifier: %s = %20s %i = %3i Sample program that can crash: #include stdio.h int main() { int a; scanf(%i, a); return 0; } To make it crash: perl -e 'print 5x210' | ./a.out = Indeed it's possible to make gimp crash by using a curve file with such big value; you can test by trying to import http://people.debian.org/~naoliv/misc/gimp/curve.cur A full list of fscanf/scanf warnings is available at http://people.debian.org/~naoliv/misc/gimp/scanf.txt Thank you! Best regards, Nelson ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer