Commit graph

1053 commits

Author SHA1 Message Date
gambas
7d6cf08a4b Some fixes in Format$() function.
[INTERPRETER]
* BUG: Translate comments in english.
* BUG: Take '\' escape character into account correctly in format strings.
* BUG: Remove undocumented feature in format strings.
2017-08-30 20:40:17 +02:00
gambas
21bf519dc9 Don't use CLOCK_MONOTONIC_RAW if the constant is not defined.
[INTERPRETER]
* BUG: Don't use CLOCK_MONOTONIC_RAW if the constant is not defined.
2017-08-28 22:08:48 +02:00
gambas
f8358c6fa1 Initialize pseudo-terminal with ICRNL too.
[INTERPRETER]
* BUG: Initialize pseudo-terminal with ICRNL too.
2017-08-28 19:04:25 +02:00
gambas
359471cc30 Initialize master terminal of processes run inside a pseudo-terminal before forking.
[INTEPRETER]
* NEW: Initialize master terminal of processes run inside a pseudo-terminal before forking.
2017-08-26 13:11:59 +02:00
gambas
f45192abb2 Fix pseudo-terminal management again. Now processes run through a terminal set the ECHO flag, and do not clear the OCRNL flag.
[INTERPRETER]
* NEW: Initialize pseudo-terminals with ECHO and don't clear OCRNL flag. This is not compatible with previous versions, as now, by default, printing a NL will become CR+NL through the pseudo-terminal.
  But I didn't succeed in modifying the pseudo-terminal reliably once the child has started. It sometimes fails silently.
* NEW: Check the result of tcsetattr() carefully, as it returns an error only if none of the flags has been set, not just one.

[GB.TERM]
* NEW: Check the result of tcsetattr() carefully, as it returns an error only if none of the flags has been set, not just one.

[GB.FORM.TERMINAL]
* OPT: TerminalView: Reorder some tests in escape codes analyze.
* NEW: TerminalView: The mouse wheel now sends up and down keys when we are not in mouse mode, and if there is nothing to scroll.
2017-08-23 18:10:58 +02:00
gambas
f05e6bc0ca Fix the TerminalView control again, and the way processes are run in pseudo-terminals.
[DEVELOPMENT ENVIRONMENT]
* BUG: Terminal: Replace "\n" by "\r\n" when sending text to the output terminal.

[INTERPRETER]
* NEW: When a process is run with a pseudo-terminal, don't set the ECHO flag, and clear the ONLCR flag.
  That way, the data printed on the standard output is the same as when the process is not run in a pseudo-terminal.

[GB.FORM.TERMINAL]
* BUG: TerminalView: Output filter now works correctly when it receives incomplete data.
* OPT: TerminalViews: Resize the terminal less often when the terminal view is resized.
* NEW: TerminalView: When a process is run inside the terminal, set the ECHO and ONLCR flags automatically.
2017-08-22 13:20:26 +02:00
gambas
ba37aa6da7 Fix pseudo-terminal initialization when running an external process with Exec or Shell.
[INTERPRETER]
* BUG: Fix pseudo-terminal initialization when running an external process with Exec or Shell.

[COMPILER]
* BUG: Fix a typo in 'gbc_trans.h' header.
2017-08-21 13:57:40 +02:00
gambas
91de2cccd5 Flush the process outputs when it stops immediately after having been launched.
[INTERPRETER]
* BUG: Flush the process outputs when it stops immediately after having been launched.
2017-08-21 01:45:59 +02:00
gambas
38a60179aa Fix Process.Wait() (remove debugging messages). 2017-08-18 13:19:10 +02:00
gambas
e1a5412f4f Fix Process.Wait()
[INTERPRETER]
* BUG: Process.Wait() does not freeze anymore when the child process actually ends before checking the end of the process just after having run it.
2017-08-18 13:15:03 +02:00
Tobias Boege
48c951987b [CONFIGURATION]
* NEW: Add (short) commit hash and branch name to gb{a,c,i,x}3 --version when compiled from git
2017-08-15 11:58:48 +02:00
Benoît Minisini
a3410b006f [INTERPRETER]
* NEW: Collection.First is a new property that returns the key of the first element of the collection, or NULL if the collection is void.
* NEW: Collection.Last is a new property that returns the key of the last element of the collection, or NULL if the collection is void.


git-svn-id: svn://localhost/gambas/trunk@8174 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2017-08-08 12:33:47 +00:00
Benoît Minisini
986e7eeb85 [INTERPRETER]
* NEW: Add an API that allows to create an array class before instanciating it.

[GB.DBUS]
* BUG: When marshalling from DBus to Gambas, create the array classes before instanciating them.


git-svn-id: svn://localhost/gambas/trunk@8173 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2017-08-07 13:51:33 +00:00
Benoît Minisini
d42a49b57d [CONFIGURATION]
* NEW: Switch version to 3.10.90.

[GB.DB]
* NEW: Connection.TimeZone is new property that will allow to define the default timezone of dates stored in the database we are connected to. Not implemented yet.


git-svn-id: svn://localhost/gambas/trunk@8168 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2017-07-24 18:53:33 +00:00
Benoît Minisini
5189530aaf [INTERPRETER]
* BUG: Don't raise events just after a process has been started and has just been terminated. Postpone them.


git-svn-id: svn://localhost/gambas/trunk@8142 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2017-06-09 23:00:45 +00:00
Benoît Minisini
cbfcb9fb00 [INTERPRETER]
* BUG: Check if linking with 'librt' is needed to get monotonic clock.


git-svn-id: svn://localhost/gambas/trunk@8139 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2017-05-26 12:26:39 +00:00
Benoît Minisini
cfacf387ec [CONFIGURATION]
* NEW: Add a autoconf check for monotonic clock.

[INTERPRETER]
* BUG: Use a monotonic clock (if possible) to implement the WAIT instruction.


git-svn-id: svn://localhost/gambas/trunk@8138 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2017-05-26 00:20:40 +00:00
Benoît Minisini
c20cbb7972 [COMPILER]
* NEW: New instruction MOVE ... DOWNTO ... that renames a file and erase the destination atomically.

[INTERPRETER]
* NEW: New instruction MOVE ... DOWNTO ... that renames a file and erase the destination atomically.
* BUG: The signal handler now loops until the signal pipe is void.


git-svn-id: svn://localhost/gambas/trunk@8129 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2017-04-27 13:18:35 +00:00
Benoît Minisini
1184d41881 [INTERPRETER]
* BUG: Fix a possible bad serialization of arrays.
* BUG: Don't crash during the unserialisation of an array whose datatype has been incorrectly serialized. Raise an error instead.


git-svn-id: svn://localhost/gambas/trunk@8110 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2017-03-18 12:14:01 +00:00
Benoît Minisini
e68cad85c4 [INTERPRETER]
* NEW: Steam.Watch() is a new method that allows to watch/unwatch a stream for reading and/or writing after it has been opened.


git-svn-id: svn://localhost/gambas/trunk@8104 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2017-02-25 23:10:45 +00:00
Benoît Minisini
82eddfd5c9 [CONFIGURATION]
* NEW: Remove all 'depcomp' files. Apparently they are not used anymore by autoconf.

[INTERPRETER]
* BUG: Fix some gcc 6 warnings.

[GB.DEBUG]
* BUG: Fix some gcc 6 warnings.

[GB.GTK]
* BUG: Fix some gcc 6 warnings.
* BUG: Fix a ';' mistake in a focus management test.

[GB.GTK3]
* BUG: Fix some gcc 6 warnings.
* BUG: Fix a ';' mistake in a focus management test.

[GB.IMAGE]
* BUG: Fix some gcc 6 warnings.


git-svn-id: svn://localhost/gambas/trunk@8101 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2017-02-18 17:24:01 +00:00
Benoît Minisini
661accb890 [INTERPRETER]
* NEW: The GB.SystemHasForked() API now resets the pseudo-random number generator, and the signal handler management pipe.


git-svn-id: svn://localhost/gambas/trunk@8089 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2017-02-11 01:00:44 +00:00
Benoît Minisini
5e49bfbd90 [GB.DB.SQLITE2]
* BUG: Make component compile with gcc 6.

[INTERPRETER]
* BUG: Include <cmath> instead of <math.h> for components written in C++, so that they compile with gcc 6.

[GB.GTK]
* BUG: Make component compile with gcc 6.

[GB.GTK3]
* BUG: Make component compile with gcc 6.

[GB.QT4]
* BUG: Make component compile with gcc 6.

[GB.QT5]
* BUG: Make component compile with gcc 6.


git-svn-id: svn://localhost/gambas/trunk@8088 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2017-02-07 00:08:22 +00:00
Benoît Minisini
b225eba20f [CONFIGURATION]
* NEW: Update copyright year in all source files.


git-svn-id: svn://localhost/gambas/trunk@8056 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2017-01-13 03:29:42 +00:00
Benoît Minisini
f0f6dc3261 [INTERPRETER]
* BUG: Automatically restart mkfifo() and open() system calls when executing the PIPE instruction.


git-svn-id: svn://localhost/gambas/trunk@8053 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2017-01-13 03:22:35 +00:00
Benoît Minisini
6950a075f0 [INTERPRETER]
* BUG: Tasks do not inherit signal handler pipe anymore, they recreate it instead. Otherwise you have interferences with the parent process of the task, and some signals are lost.
* BUG: Buffered streams now take the internal stream flag "available_now" into account. No idea why that was disabled.
* BUG: Standard streams now set the internal stream flag "available_now" if they are not connected to a terminal. Which may not be necessarily accurate, so it is a temporary change.


git-svn-id: svn://localhost/gambas/trunk@8052 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2017-01-11 16:57:44 +00:00
Benoît Minisini
d5f1ac948c [DEVELOPMENT ENVIRONMENT]
* NEW: Update french translation.
* NEW: Support for the new gb.term component.

[INTERPRETER]
* NEW: Add an API that returns the file descriptor associated with a specific stream.

[GB.TERM]
* NEW: New component for terminal management with an API very close to the one provided by the operating system.


git-svn-id: svn://localhost/gambas/trunk@8043 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2017-01-07 00:58:20 +00:00
Benoît Minisini
c4d22f9d24 [INTERPRETER]
* BUG: Forbid continuing and stay in debugger when an unhandled error is raised. This prevent crashes when an error occurs during variable initialization.


git-svn-id: svn://localhost/gambas/trunk@8031 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2016-12-31 12:02:58 +00:00
Benoît Minisini
4e887b93b3 [INTERPRETER]
* BUG: Do not crash anymore when converting a pointer to an anonymous object. Raise an error instead.


git-svn-id: svn://localhost/gambas/trunk@8030 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2016-12-31 12:01:12 +00:00
Benoît Minisini
f2717c4ae8 [INTERPRETER]
* BUG: Remove debugging messages.


git-svn-id: svn://localhost/gambas/trunk@7998 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2016-11-27 02:44:07 +00:00
Benoît Minisini
7989d44979 [INTERPRETER]
* BUG: Close watched process input & outputs as soon as it is killed. Otherwise, running two processes using virtual terminals successively may fail.


git-svn-id: svn://localhost/gambas/trunk@7997 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2016-11-27 02:43:15 +00:00
Benoît Minisini
4aa7d6a268 [INTERPRETER]
* BUG: Debugger does not crash anymore when displaying a static collection-like object.


git-svn-id: svn://localhost/gambas/trunk@7995 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2016-11-24 23:58:11 +00:00
Benoît Minisini
1cf354061c [INTERPRETER]
* BUG: Make CStr() and CDate() mutually coherent, by internally converting to UTC dates only.


git-svn-id: svn://localhost/gambas/trunk@7983 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2016-11-18 14:50:40 +00:00
Benoît Minisini
5d34538e33 [INTERPRETER]
* BUG: Exec with a null program name does not crash anymore.


git-svn-id: svn://localhost/gambas/trunk@7939 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2016-10-28 10:12:09 +00:00
Benoît Minisini
97b8bc2056 [INTERPRETER]
* BUG: The translation file of the project is now always correctly loaded. That was a very old bug.


git-svn-id: svn://localhost/gambas/trunk@7919 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2016-10-01 22:32:42 +00:00
Benoît Minisini
4d50dead00 [INTERPRETER]
* BUG: Correctly call static event handlers when an event is raised.


git-svn-id: svn://localhost/gambas/trunk@7884 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2016-09-01 22:10:26 +00:00
Benoît Minisini
0b222b1a99 [INTERPRETER]
* BUG: Fix detection of errors occuring inside interpreter API.


git-svn-id: svn://localhost/gambas/trunk@7879 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2016-08-30 22:26:15 +00:00
Benoît Minisini
531e7c3e90 [GB.FORM]
* BUG: MenuButton: Take foreground color into account correctly.
* BUG: MenuButton: Clip text so that arrow is always clearly visible.
* BUG: MenuButton: Take the Design property into account correctly.


git-svn-id: svn://localhost/gambas/trunk@7864 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2016-08-26 00:21:27 +00:00
Benoît Minisini
e71801407c [INTERPRETER]
* NEW: Process.CloseInput() is a new method that explicitly closes the process input, as if you send a CTRL+D from the shell. This implements the old process stream closing behaviour that was removed in revision #7622.


git-svn-id: svn://localhost/gambas/trunk@7833 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2016-08-10 18:37:25 +00:00
Benoît Minisini
2a3ecf982d [DEVELOPMENT ENVIRONMENT]
* NEW: Project property dialog: New project arguments interface.
* NEW: Debugger: The project arguments is now selectable with a popup menu.
* BUG: Fix position history behaviour.

[INTERPRETER]
* NEW: Object.Type(), Object.Class() and Object.Is() now work with invalid objects.

[GB.FORM]
* NEW: Completion: Support for TextArea editor.
* NEW: Completion: Editor property is now writable.
* NEW: TableView: Raise a new Hide event when the editor is hidden.

[GB.FORM.EDITOR]
* NEW: TextEditor: CursorAt() is a new method that returns the cursor screen position from a line and a column.

[GB.GTK]
* NEW: TextBox: CursorAt() is a new method that returns the cursor screen position from a text position. The CursorPos property has been removed.
* NEW: ComboBox: CursorAt() is a new method that returns the cursor screen position from a text position. The CursorPos property has been removed.
* NEW: TextArea: CursorAt() is a new method that returns the cursor screen position from a text position. The CursorPos property has been removed.

[GB.GTK3]
* NEW: TextBox: CursorAt() is a new method that returns the cursor screen position from a text position. The CursorPos property has been removed.
* NEW: ComboBox: CursorAt() is a new method that returns the cursor screen position from a text position. The CursorPos property has been removed.
* NEW: TextArea: CursorAt() is a new method that returns the cursor screen position from a text position. The CursorPos property has been removed.

[GB.GUI.BASE]
* BUG: GridView: Newlines in cells with WordWrap property set are now taken into account correctly.

[GB.QT4]
* NEW: TextBox: CursorAt() is a new method that returns the cursor screen position from a text position. The CursorPos property has been removed.
* NEW: ComboBox: CursorAt() is a new method that returns the cursor screen position from a text position. The CursorPos property has been removed.
* NEW: TextArea: CursorAt() is a new method that returns the cursor screen position from a text position. The CursorPos property has been removed.

[GB.QT5]
* NEW: TextBox: CursorAt() is a new method that returns the cursor screen position from a text position. The CursorPos property has been removed.
* NEW: ComboBox: CursorAt() is a new method that returns the cursor screen position from a text position. The CursorPos property has been removed.
* NEW: TextArea: CursorAt() is a new method that returns the cursor screen position from a text position. The CursorPos property has been removed.


git-svn-id: svn://localhost/gambas/trunk@7825 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2016-07-18 03:01:59 +00:00
Benoît Minisini
2d5e1ac26a [INTERPRETER]
* BUG: The error backtrace is now reset only when raising a new error. Consequently, the information is now kept when an error is propagated.


git-svn-id: svn://localhost/gambas/trunk@7807 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2016-07-07 08:50:33 +00:00
Benoît Minisini
f01ea65084 [INTERPRETER]
* BUG: Fix a possible misuse of kill() when calling Process.Kill().


git-svn-id: svn://localhost/gambas/trunk@7792 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2016-05-31 12:11:35 +00:00
Benoît Minisini
9779e9b105 [INTERPRETER]
* NEW: The Stream class now can raise a Resize event. Only the standard input stream (File.In) can raise it.
* NEW: If the startup class defines an Application_Read() or an Application_Resize() event handler, then the standard input stream is attached to it with the "Application" event name, so that these event handlers are used. Otherwise, the standard input stream must be attached and watched manually.


git-svn-id: svn://localhost/gambas/trunk@7785 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2016-05-22 22:03:16 +00:00
Benoît Minisini
d15a425953 [DEVELOPMENT ENVIRONMENT]
* NEW: Finish the redesign of the debug panel.

[INTERPRETER]
* BUG: Fix a stack mismatch leading to a crash in Eval() when an "Unknown symbol" error occurs.

[GB.FORM]
* BUG: SidePanel: The Hide event is now raised after the SidePanel has been actually hidden.


git-svn-id: svn://localhost/gambas/trunk@7754 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2016-05-04 01:38:46 +00:00
Benoît Minisini
89339bf9d5 [INTERPRETER]
* BUG: Don't raise the write callback associated with a watched file descriptor if the read callback has disabled it.


git-svn-id: svn://localhost/gambas/trunk@7748 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2016-04-27 00:05:54 +00:00
Benoît Minisini
3ce6340a09 [INTERPRETER]
* NEW: GB.GetArrayType() is a new API that returns the datatype of the elements of an array class.


git-svn-id: svn://localhost/gambas/trunk@7746 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2016-04-15 21:11:19 +00:00
Benoît Minisini
5366f3391e [INTERPRETER]
* BUG: Fix the GB.Every() API that does not crash anymore.


git-svn-id: svn://localhost/gambas/trunk@7739 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2016-04-13 19:57:48 +00:00
Benoît Minisini
f73ceed778 [INTERPRETER]
* NEW: Stream.Term.Width and Stream.Term.Height are two new properties that return the size of the terminal associated with the stream, if any.
* NEW: As soon as the terminal size is read on any stream with the previous properties, the SIGWINCH signal is watched, and the Application_Resize() public method of the startup class is called each time this signal is catched, meaning that the terminal has been resized.


git-svn-id: svn://localhost/gambas/trunk@7735 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2016-04-10 13:10:25 +00:00
Benoît Minisini
ebe3fdaf0c [INTERPRETER]
* BUG: Subst$() now does not crash anymore when its result is a void string.


git-svn-id: svn://localhost/gambas/trunk@7726 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2016-04-06 13:19:14 +00:00
Benoît Minisini
ff7bbe8a21 [DEVELOPMENT ENVIRONMENT]
* NEW: Add 'gb.form.terminal' to the component list.
* NEW: New component status icons.

[INTERPRETER]
* BUG: Correctly export Stream.Term description.
* NEW: Stream.Term.FlowControl is a new property that allows to set or retrieve if flow control is enabled on a terminal stream.

[GB.GTK]
* NEW: Change the name of 'NewChild' event argument.

[GB.GTK3]
* NEW: Change the name of 'NewChild' event argument.

[GB.QT4]
* NEW: Change the name of 'NewChild' event argument.

[GB.QT5]
* NEW: Change the name of 'NewChild' event argument.

[GB.FORM.TERMINAL]
* NEW: Support for the 'Set title' command.
* NEW: TerminalView now emits the Title event when the terminal requests a title change.
* NEW: Support for flow control. When output is suspended, the terminal contents becomes darker.
* BUG: Correctly update the scrollbar when switching between screens.


git-svn-id: svn://localhost/gambas/trunk@7714 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2016-04-03 10:54:21 +00:00