Coming next: Leonardo 3.4

We know that the currently distributed version of Leonardo does not allow you to compile *any* C program due to its restrictions, but we are working hard to improve it.

This is a list of all changes that will be available in the next version of Leonardo and are currently being tested. As soon as changes to Leonardo are done, they are reported in this page (last changes are red.) If you have suggestions and comments, feel free to email us.

  • C preprocessor:
    • A macro definition do not require macro identifiers appearing in its token sequence to be already defined as in previous Leonardo versions
    • Added full #if, #elif, #endif and defined() management
    • Added full management of operators # and ##
    • Fixed bug related to the directive #include macro_name
    • Improved legibility of preprocessed C sources
    • fixed bugs in macro replacements
    • fixed bug related to the presence of C++ comments in macro definitions (as suggested by Jon Kleiser)
  • C compiler:
    • Fixed bug related to the external linkage of objects: now tentative definitions override previous declarations with storage class 'extern' and no definition (with initializer) is required.
    • A pointer can be now explicitly converted both to signed long int and unsigned long int (and not only signed long int as in previous Leonardo versions)
    • fixed bug related to the numeric promotion of float actual parameters to double in case of variadic function arguments (e.g. printf("%f",(double)1.25) now works correctly)
    • removed "unused variable" warnings for extern variables
    • fixed bug related to the case statement
    • fixed bug related to the concatenation of string tokens
    • fixed bug related to the equality of '\r' and '\n' (now '\n'==0x0A.)
  • C standard libraries (new fully reversible library functions and improvements; new headers are green:)
    • <assert.h>: assert
    • <time.h>: time, mktime, asctime, difftime, ctime, gmtime, localtime, strftime
    • <math.h>:
      • frexp, fmod, modf, atan2, ldexp
      • full errno management
    • <errno.h>: errno and macros (EDOM, ERANGE, etc.)
    • <locale.h>: setlocale, localeconv (dummy functions for ANSI C compatibility)
    • <stdlib.h>:
      • bsearch, atoi, atol, atof, strtod, strtoul, strtol, abs, labs, div, ldiv
      • system, getenv, mblen and wctomb (dummy macros for ANSI C compatibility)
      • fixed bug in realloc
    • <setjmp.h>: setjmp, longjmp (this was really hard to reverse!)
    • <string.h>:
      • strerror, memmove, memcmp, memchr, memset, strncpy, strstr, strcoll, strpbrk, strncmp, strspn, strcspn, strrchr, strncat, strtok
      • strcat, strcpy, strlen, strchr, strcmp and memcpy have been re-written as native functions
    • <stdio.h>:
      • fgets, gets (even if deprecated), getchar, putc, fputs, perror, vsprintf, vfprintf, vprintf, sscanf, sprintf, rewind, fread, fwrite, fseek, ftell, fgetc, getc, fputc, puts, putchar, getchar, ungetc, freopen
      • no more restrictions on the printf family format string
      • fixed bug related to the returned value of the printf and scanf families
      • fixed stream closing bug
    • <size_t.h>: size_t is now correctly unsigned long
    • dummy macros __FILE__ and __LINE__ for ANSI C compatibility
  • Inference engine:
    • memory access fault tests are now performed by the system when accessing illegal strings provided by the user in SmallText, NodeLabel, NodeName and ArcLabel
  • Graphic User Interface:
    • Generic text windows are now automatically zoomed when opened
    • Text documents created in a C Project are no more automatically closed when the C project window is closed
    • Changed Kb to KB in the message bar
    • Changed color and font of text in the dialog for creating a new file into a C project
    • Capitalized first letters in menu items (as suggested by Jon Kleiser)
    • Added runtime message dialog shown in case of error in non debug mode
  • Miscellaneous:
    • New version code for Leonardo 3.4 executable files (Leonardo 3.4 does not run executable files created with previous Leonardo versions)
    • Fixed reversibility error in Leonardo system calls GetArc and GetNodePos
    • System header "editors.h" renamed as "syscall.h" and no more automatically included by the C preprocessor
    • System header "keyboard.h" merged into syscall.h and removed
    • Added macros LEONARDO and __VERSION__ defined in visualizer.h
    • Removed macro PointerTo from visualizer.h
    • Fixed subtle bug in the implementation of the Reingold/Tilford tree drawing algorithm
    • Fixed wrong font constant IDs in visualizer.h

[Leonardo Home Page]