Commit graph

37 commits

Author SHA1 Message Date
Benoît Minisini
ad19937a82 [INTERPRETER]
* NEW: Add a gb.ShortNumber format to Format$().
* NEW: Use that format for converting Single to String.
* BUG: Check the internal conversion special class method everywhere an 
  object is converted.

[GB.DEBUG]
* NEW: Use gb.ShortNumber to display Single values.


git-svn-id: svn://localhost/gambas/trunk@3414 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-12-30 03:17:37 +00:00
Benoît Minisini
a79dead4f4 [INTERPRETER]
* BUG: The Val() and IsXXX() functions algorithm has been fixed. Now the 
  string is trimmed before being converted. Thousand separators are really 
  valid only to separate thousands. Extra non-space characters at the end
  of the string make the conversion fail.


git-svn-id: svn://localhost/gambas/trunk@3382 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-12-20 03:26:00 +00:00
Benoît Minisini
09c9f29ce0 [INTERPRETER]
* BUG: Fix a possible compilation problem.


git-svn-id: svn://localhost/gambas/trunk@3361 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-12-13 14:38:58 +00:00
Benoît Minisini
cf16f17a91 [INTERPRETER]
* BUG: Use isfinite() instead of deprecated finitef() functions.
* BUG: Replace "Static array" error message by "Embedded array".


git-svn-id: svn://localhost/gambas/trunk@3343 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-12-05 11:33:22 +00:00
Benoît Minisini
6a15492e9c [INTERPRETER]
* NEW: The scaring change. IsByte(), IsShort(), IsSingle(), IsString(), 
  IsPointer(), IsObject() and IsVariant() have been removed. IsNull() has
  been kept unchanged.
* NEW: IsInteger() now returns if a string can be converted to an Integer
  number.
* NEW: IsLong() now returns if a string can be converted to an Integer or a
  Long number.
* NEW: IsFloat() now returns if a string can be converted to a Float, but
  not an Integer or a Long.
* NEW: IsNumber() now returns if a string can be converted to an Integer, a
  Long or a Float.
* NEW: IsDate() now returns if a string can be converted to a Date.
* NEW: Str(True) and Str(False) now use the translation of the "True" and
  "False" string, if they exist in the current project.
* NEW: Val() now uses the translation of the "True" and "False" string, if 
  they exist in the current project.


git-svn-id: svn://localhost/gambas/trunk@3329 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-11-27 23:00:08 +00:00
Benoît Minisini
d997caf779 [INTERPRETER]
* NEW: Automatic conversion between all array classes.


git-svn-id: svn://localhost/gambas/trunk@3325 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-11-27 01:27:23 +00:00
Benoît Minisini
662e4282bf [INTERPRETER]
* NEW: The argument of Byte@(), Short@()... functions now can be a string.
  Then the address of the string in memory is used.
* BUG: Structures allocated with the NEW operator are correctly freed now.
* NEW: READ and WRITE now can deal with structures and embedded arrays.
* NEW: Dir?() synonymous has been removed.


git-svn-id: svn://localhost/gambas/trunk@3322 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-11-26 20:30:58 +00:00
Benoît Minisini
8873a0e1cc [DEVELOPMENT ENVIRONMENT]
* BUG: Correctly handle all compiler error messages.

[INTERPRETER]
* NEW: Full management of the Single datatype.
* BUG: VarPtr() now works on Single local variables.
* BUG: Remove useless Tag property. It is defined in the Stream class now.
* BUG: Correctly free the Tag property in the Stream class.

[GB.GTK]
* BUG: Rich-text string management has been fixed. The ampersand character, 
  the "&", ">" and "<" entites are correctly interpreted now.

[GB.NET.CURL]
* BUG: Remove useless Tag property. It is defined in the Stream class now.

[EXAMPLES]
* NEW: The WebBrowser example has a download manager now.


git-svn-id: svn://localhost/gambas/trunk@3296 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-11-16 01:49:18 +00:00
Benoît Minisini
aa1fe3bb1a [INTERPRETER]
* BUG: Variants can be constant strings (in database drivers for example). 
  So keep the constant string datatype when undoing the variant. 
  Otherwise, the constant string will be assumed to be a Gambas string, and 
  will be  deallocated, which leads to a crash.


git-svn-id: svn://localhost/gambas/trunk@3270 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-10-31 16:21:24 +00:00
Benoît Minisini
70abf8b89c [INTERPRETER]
* NEW: Conversion between Integer or Long and Pointer is possible now.
* OPT: A little optimizations in extern function management.


git-svn-id: svn://localhost/gambas/trunk@3040 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-07-14 11:55:32 +00:00
Benoît Minisini
3054690743 [CONFIGURATION]
* NEW: Print a summary of warning messages after each component 
  compilation.

[INTERPRETER]
* BUG: StrPtr() with a length argument now works correctly.
* NEW: Support for callbacks: when converting a function to a Pointer, an 
  internal closure is created with the libffi library. The pointer then can 
  be sent to any extern function as function pointer argument.
* BUG: Opening memory stream should work in all cases now.


git-svn-id: svn://localhost/gambas/trunk@3038 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-07-14 01:50:18 +00:00
Benoît Minisini
727701cdeb [CONFIGURATION]
* NEW: Bytecode version has been incremented, so all projects need to be 
  recompiled!

[INTERPRETER]
* OPT: Many little optimizations.
* OPT: Avoid calls to setjmp() when it is possible.
* OPT: Do not encode the stack drop inside the CALL instruction. 
  Executables are a bit larger, but a little speed is gained.

[COMPILER]
* OPT: Do not encode the stack drop inside the CALL instruction. 
  Executables are a bit larger, but a little speed is gained.


git-svn-id: svn://localhost/gambas/trunk@3013 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-06-18 00:14:53 +00:00
Benoît Minisini
a32166b185 [INTERPRETER]
* OPT: Many optimizations again.
* BUG: Fix an unitialized variable in string to float conversion routine.
* BUG: Handle extern functions that return a pointer.


git-svn-id: svn://localhost/gambas/trunk@3003 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-06-13 12:03:29 +00:00
Benoît Minisini
405f8f89fe [INTERPRETER]
* OPT: Some optimizations again in memory allocator, object releasing 
  routine, arithmetic operators, class variable reader, line-by-line stream
  reader, class symbol sort routine.
* BUG: Using constant strings inside variant, like database drivers, works
  correctly again and does not crash the interpreter anymore.


git-svn-id: svn://localhost/gambas/trunk@2996 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-06-08 23:08:04 +00:00
Benoît Minisini
b3db598050 [DEVELOPMENT ENVIRONMENT]
* BUG: Breakpoints are correctly reset when opening a new project.

[INTERPRETER]
* BUG: The GB.NewString(), GB.NewZeroString() and GB.TempString() API 
  signature has changed. All components have been updated accordingly.
* OPT: Many optimizations to speed up the interpreter.

[GB.EVAL]
* NEW: During syntax highlighting, the first character of class names is
  automatically converted to uppercase.


git-svn-id: svn://localhost/gambas/trunk@2992 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-06-04 23:48:53 +00:00
Benoît Minisini
2c2ad90faf [INTERPRETER]
* OPT: Start some optimizations in conversion routines.


git-svn-id: svn://localhost/gambas/trunk@2989 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-06-02 23:23:50 +00:00
Benoît Minisini
1f592094a6 [CONFIGURATION]
* NEW: Bytecode version has been increased, and so all projects must be 
  recompiled.

[INTERPRETER]
* OPT: Objects that do not raise events do not allocate the event 
  management structure anymore. That save four pointers by object.
* NEW: Structure management is done, and embedded (static) structures are
  handled too.
* BUG: Static array management was fixed.
* NEW: All functions synonymous whose name ends with a question mark have 
  been removed.

[COMPILER]
* OPT: Some optimization again.
* BUG: EXTERN declarations compile again.

[GB.DB.SQLITE2]
* BUG: Fix a misuse of GB.NewString().


git-svn-id: svn://localhost/gambas/trunk@2970 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-05-26 22:01:28 +00:00
Benoît Minisini
b0a0c52af0 [INTERPRETER]
* NEW: More work on structure support.
* BUG: Fix optimization in error management.

[COMPILER]
* OPT: More optimizations. The Gambas 3 compiler is faster to compile the 
  Gambas 3 IDE than the Gambas 2 compiler to compile the Gambas 2 IDE, 
  which is smaller!
* NEW: Do not compute variable position and size, as it is done by the 
  interpreter anyway.

[GB.EVAL]
* NEW: Use the same optimizations as the compiler in the parser.

[GB.XML.RPC]
* BUG: The component compiles again.



git-svn-id: svn://localhost/gambas/trunk@2964 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-05-25 11:19:00 +00:00
Benoît Minisini
117f2ac635 [INTERPRETER]
* NEW: New GB.NewZeroString() API to create a Gambas string from a 
  null-terminated string. Components were modified to use it.
* OPT: Many optimizations everywhere.

[COMPILER]
* OPT: Many optimizations. The compiler should be noticeably faster.


git-svn-id: svn://localhost/gambas/trunk@2953 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-05-22 18:02:34 +00:00
Benoît Minisini
a2850ebc91 [CONFIGURATION]
* BUG: Do not compile database manager anymore, it has been deprecated.
* BUG: Compile the gb.dbus component.

[INTERPRETER]
* NEW: Pointer is a real datatype now.
* NEW: Static arrays came back. They are now like real array classes, 
  except that they are not resizable.
* NEW: IsPointer() is a new function that tells if an expression is a 
  pointer.
* NEW: All XXXX?() function synonymous were removed. Use the IsXXXX() 
  version instead.
* NEW: Remove now useless source files.

[COMPILER]
* NEW: Static arrays came back, with actually the same syntax as before.

[EXAMPLES]
* BUG: Fix the examples according to the new array syntax.



git-svn-id: svn://localhost/gambas/trunk@2949 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-05-19 12:43:57 +00:00
Benoît Minisini
a8efb8045f [INTERPRETER]
* NEW: Support for "static" arrays is finally removed.

[COMPILER]
* NEW: Support for "static" arrays is finally removed.



git-svn-id: svn://localhost/gambas/trunk@2945 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-05-14 21:30:54 +00:00
Benoît Minisini
47d0aa711c [CONFIGURATION]
* NEW: Architecture detection.
* NEW: Updated libtool macros.

[DEVELOPMENT ENVIRONMENT]
* NEW: Highlight the current procedure in the editor procedure popup.

[INTERPRETER]
* BUG: Alignment fixes for the ARM architecture.

[GB.DRAW]
* NEW: Start implementing the new Paint interface.

[GB.GTK]
* BUG: GridView.Clear is now correctly implemented.


git-svn-id: svn://localhost/gambas/trunk@2505 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2009-12-24 02:02:05 +00:00
Benoît Minisini
83d84d7ee5 [DEVELOPMENT ENVIRONMENT]
* NEW: Support for the Index class interface changes.
* BUG: CSV import does not crash anymore when the imported file size is 
  lower than 64K.
* BUG: Do not crash if a component is not installed.

[INTERPRETER]
* BUG: Error.Text does not split the error message and its argument in 
  debug mode.
* BUG: Fix many breaks in strict aliasing rules.

[SCRIPTER]
* BUG: Do not crash if a component is not installed.

[GB.DB]
* NEW: Better support for postgresql schemas.
* NEW: Connection.Quote() takes one more optional boolean argument that 
  tells if we want to quote a table name. In that case, schemas are taken 
  into account.
* NEW: Connection.FormatBlob() is a new function that returns a string that 
  can be used as a blob contents in a SQL expression.
* NEW: Index.Fields now returns a string array of index fields.
* NEW: Index.Add() second argument is now a string array of index fields.


git-svn-id: svn://localhost/gambas/trunk@2442 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2009-11-28 01:22:00 +00:00
Benoît Minisini
f65184802d [CONFIGURATION]
* NEW: Update copyright and license string in all source files.


git-svn-id: svn://localhost/gambas/trunk@2241 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2009-08-17 10:41:51 +00:00
Benoît Minisini
caa1b5aac6 [INTERPRETER]
* NEW: The _unknown() method is now correctly called when reading *and* 
  writing unknown properties. _unknown() is called with no arguments when
  reading the property, and with one argument (the new property value) when 
  writing it.
* BUG: Classes declared in the Gambas part of a component now should 
  correctly override classes declared in the C/C++ part.

[GB.DBUS]
* NEW: Hide native methods of the DBus class.
* NEW: The syntax for calling a method is:
  DBus[<Application>][<Object>,<Interface>].<Method>(<Arguments>)
  <Application> can be prefixed by "system://" to access the system bus.
* NEW: Properties are readable and writable with this syntax:
  DBus[<Application>][<Object>,<Interface>].<Property>
* NEW: DBusVariant is a new class that allows to send a Variant to a DBus 
  method by specifying is DBus type. Otherwise, when using Variant 
  directly, the associated DBus type is guessed automatically, which may 
  not be accurate is some cases.


git-svn-id: svn://localhost/gambas/trunk@2218 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2009-08-05 16:14:08 +00:00
Benoît Minisini
a3d6ba73e5 [INTERPRETER]
* NEW: Do not use "boolean" anymore. Use "bool" instead.

[COMPILER]
* NEW: Do not use "boolean" anymore. Use "bool" instead.



git-svn-id: svn://localhost/gambas/trunk@2091 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2009-07-08 19:57:50 +00:00
Benoît Minisini
99730a185f [CONFIGURATION]
* NEW: Use colorgcc if it is present. Beware that ccache removes the 
  colors.

[DEVELOPMENT ENVIRONMENT]
* BUG: Fix the output console search.
* BUG: When making a package, ignore the charset translation errors while 
  printing the commands output.
* NEW: Support for the Khmer language.

[WIKI CGI SCRIPT]
* NEW: Support for the macedonian language.

[INTERPRETER]
* BUG: Fix the interpreter for gcc 4.3.
* NEW: Prints the gcc version used for compiling the interpreter when 
  running 'gbx2 -h'.
* BUG: Fix the initialization of standard input/output streams.

[COMPILER]
* BUG: Fix a compilation warning on FILE_set_chown.

[GB.GTK]
* BUG: Initialize correctly the gControl class.
* BUG: Draw.Tile now works correctly.
* BUG: Fix the vertical alignment management.
* BUG: The alignment of a GridView cell with a picture only is correct now.

[GB.QT]
* BUG: Choose the right moc executable when both QT3 and QT4 are installed 
  on the system.
* BUG: Fix the system tray icons for KDE 3.5.10. :-)
* BUG: The alignment of a GridView cell with a picture only is correct now.


git-svn-id: svn://localhost/gambas/trunk@1493 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2008-08-14 19:42:27 +00:00
Laurent Carlier
cc8399d17e Code cleanup, remove obsolete and uneeded specific OpenBSD code.
git-svn-id: svn://localhost/gambas/trunk@1491 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2008-08-08 14:41:57 +00:00
Benoît Minisini
8dc0172592 [INTERPRETER]
* BUG: Fixed an optimization in variants that was not 64-bits aware.


git-svn-id: svn://localhost/gambas/trunk@1230 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2008-03-23 00:51:50 +00:00
Benoît Minisini
c9dd8bcefe [INTERPRETER]
* BUG: Fixes the string management optimizations.
* OPT: Optimization of the string search function (InStr, RInstr).
* OPT: Optimization of the Split() function.
* OPT: Optimization of local variables initialization when entering a
  method.

[GB.NET.SMTP]
* BUG: Fixes the Makefile.am file so that the component compiles if the 
  glib library is installed in a non-standard directory.

[GB.QTE.EXT]
* BUG: Fixes the gb.qte.ext.component file.



git-svn-id: svn://localhost/gambas/trunk@1203 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2008-03-19 23:50:34 +00:00
Benoît Minisini
3d80d44a4a [WIKI CGI SCRIPT]
* BUG: Some little layout fixes.

[INTERPRETER]
* OPT: Read the user home directory only if the current uid has changed. 
  Otherwise, cache it into memory.
* OPT: String memory management has been optimized.
* OPT: Some little optimizations there and there.
* NEW: A new interpreter option, "-k", that prevents shared library to be
  unloaded until the process terminates. That can be useful when 
  debugging with valgrind.
* OPT: System.Language property was optimized.
* OPT: The gb_error.c file is now compiled with -O3.

[GB.GTK]
* BUG: Disable the management of input methods in TextBox and TextArea
  controls, so that the input methods are not disturbed. Consequently;
  SCIM and Bridged SCIM work again.
* BUG: You can read keyboard events properties in a Form KeyPress or 
  KeyRelease event handler correctly now.



git-svn-id: svn://localhost/gambas/trunk@1199 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2008-03-19 14:32:30 +00:00
Benoît Minisini
7b01d12f31 [INTERPRETER]
* OPT: Optimizations in string comparison operators.
* OPT: Optimizations in string allocations.
* OPT: Optimizations in Left$(), Mid$(), Right$() and Len().
* OPT: Optimizations of calls to native methods when the number of 
  arguments is fixed, and when no argument conversion is needed.
* OPT: Optimizations of INPUT and LINE INPUT, by using an internal buffer
  instead of reading the stream one byte at a time.
* BUG: Fixed the new error management.
* BUG: Fixed a possible spurious error when reading a file from an archive.

[GB.EVAL]
* BUG: Use the same new error management than the interpreter.

[GB.QT]
* BUG: The DrawingArea control now should draw its border correctly without
  erasing its contents.


git-svn-id: svn://localhost/gambas/trunk@1041 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2008-01-27 14:00:04 +00:00
Benoît Minisini
ec7ab0c811 [CONFIGURATION]
* NEW: Support for installing control icons in native components.

[64 BITS]
* BUG: Fixed some uses of long datatype in the gb.qt.ext component, the 
  Splitter and the Container class of gb.qt.
* BUG: Fixed some declarations in the gb.net.curl component.
* NEW: Pointer[] is a new class that represents an array of Pointer values.
* BUG: All gb.qt, gb.gtk and gb.desktop methods that deal with X11 Window 
  identifiers now use Pointer and Pointer[] datatypes instead of Integer 
  and Integer[].
* BUG: The Embedder example was updated according to the change above.

[INTERPRETER]
* BUG: Fixed the static array management that was broken by the 64 bits
  changes.

[GB.DEBUG]
* BUG: Debug.Write now does nothing if Debug.Start has not been called.

[GB.GTK]
* BUG: Fixed the implementation of the Message class that was broken.
* BUG: Fixed a crash in the Watcher class.
* BUG: Fixed the Image.Flip() and Image.Mirror() methods.
* BUG: Fixed a potential crash in timer management.
* NEW: The GridView Select event was implemented.


git-svn-id: svn://localhost/gambas/trunk@1033 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2008-01-23 19:56:18 +00:00
Benoît Minisini
4c02c6d338 ******** Merged /branches/64bits r918:1003 into /trunk
[CONFIGURATION]
* NEW: 64 bits port.

[EXAMPLES]
* BUG: Fixed the AnalogWatch example.

[WIKI CGI SCRIPT]
* NEW: Some little cosmetic changes.

[INTERPRETER]
* NEW: The extern function implementation has been redesigned and is now
  based on libffi, so that it works on 64 bits system. Because of a flaw in
  the compiler design, projects that use the Pointer datatype must be
  recompiled to be used on a 64 bits system. This flaw will be fixed in
  Gambas 3.
* OPT: Put some tables into read-only memory. About 1000 bytes are saved
  for each running interpreter, except the first one.
* BUG: Does not crash anymore if a component cannot be loaded.
* NEW: Spanish translation updated.
* NEW: A new interpreter API for returning a pointer.

[COMPILER]
* BUG: Correctly compiles LONG constants inside code.

[GB.DEBUG]
* BUG: Compiles and links the gb.debug components with the thread
  libraries.

[GB.DB.SQLITE3]
* BUG: Getting the primary index of a table without primary index is safe
  now.

[GB.GTK]
* BUG: Modified the GLib priority of watched descriptors, as the main loop 
  could enter in a loop in which user interface events were not managed.
* BUG: Message boxes use application title without crashing now.

[GB.OPENGL]
* BUG: Disable dead code.

[GB.QT.EXT]
* BUG: TextEdit.TextWidth and TextEdit.TextHeight were not declared as
  read-only properties.

[GB.XML.XSLT]
* BUG: XSLT class is now declared as being not creatable.


git-svn-id: svn://localhost/gambas/trunk@1006 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2008-01-17 21:39:26 +00:00
Laurent Carlier
7cc7c5eaaa Remove a lot of OS_OPENBSD check, move a lot of strcpy to strlcpy, strcat to strlcat and sprintf to snprintf. Only few of them are left.
git-svn-id: svn://localhost/gambas/trunk@919 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2008-01-06 20:06:44 +00:00
Laurent Carlier
19bf23a739 More work on OpenBSD port, it's need more work to be complete :-/
git-svn-id: svn://localhost/gambas/trunk@913 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2008-01-05 01:18:28 +00:00
Benoît Minisini
ba19f3c1dd * Copy https://gambas.svn.sourceforge.net/svnroot/gambas/2.0 to https://gambas.svn.sourceforge.net/svnroot/gambas/gambas
git-svn-id: svn://localhost/gambas/trunk@893 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2007-12-30 16:41:49 +00:00