summaryrefslogtreecommitdiff
path: root/lib/utilities
diff options
context:
space:
mode:
authorAndrej Shadura <andrewsh@debian.org>2018-05-08 16:00:42 +0200
committerAndrej Shadura <andrewsh@debian.org>2018-05-08 16:00:42 +0200
commit2fc4dd61e5607569909548975eaf54cef87be96e (patch)
tree19417eb5639eacffcfac6d9de53e0ab464010503 /lib/utilities
parent47aa8b00b2b11df13a100489e0f904a4947177ef (diff)
New upstream version 1.4.9
Diffstat (limited to 'lib/utilities')
-rw-r--r--lib/utilities/asciichart.tcl9
-rw-r--r--lib/utilities/baseconverter.tcl15
-rw-r--r--lib/utilities/eightsegment.tcl7
-rw-r--r--lib/utilities/hexeditdlg.tcl23
-rw-r--r--lib/utilities/notes.tcl15
-rw-r--r--lib/utilities/rs232debugger.tcl32
-rw-r--r--lib/utilities/speccalc.tcl13
-rw-r--r--lib/utilities/symbol_viewer.tcl13
-rw-r--r--lib/utilities/table_of_instructions.tcl23
9 files changed, 91 insertions, 59 deletions
diff --git a/lib/utilities/asciichart.tcl b/lib/utilities/asciichart.tcl
index bc44f3e..bb6cdf5 100644
--- a/lib/utilities/asciichart.tcl
+++ b/lib/utilities/asciichart.tcl
@@ -1,10 +1,13 @@
#!/usr/bin/tclsh
-# Part of MCU 8051 IDE ( http://mcu8051ide.sf.net )
+# Part of MCU 8051 IDE ( http://http://www.moravia-microsystems.com/mcu8051ide )
############################################################################
# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 by Martin Ošmera #
# martin.osmera@gmail.com #
# #
+# Copyright (C) 2014 by Moravia Microsystems, s.r.o. #
+# martin.osmera@moravia-microsystems.com #
+# #
# This program is free software; you can redistribute it and#or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
@@ -32,8 +35,8 @@ set _ASCIICHART_TCL _
# --------------------------------------------------------------------------
class AsciiChart {
- common ascii_chr_count 0 ;# Int: Counter of object instances
- common ASCII_TABLE ;# Array of List: ASCII table
+ public common ascii_chr_count 0 ;# Int: Counter of object instances
+ public common ASCII_TABLE ;# Array of List: ASCII table
array set ASCII_TABLE {
0 {NUL ^@ \\0 {Null character}}
1 {SOH ^A {} {Start of Header}}
diff --git a/lib/utilities/baseconverter.tcl b/lib/utilities/baseconverter.tcl
index 82d656a..8c605a6 100644
--- a/lib/utilities/baseconverter.tcl
+++ b/lib/utilities/baseconverter.tcl
@@ -1,10 +1,13 @@
#!/usr/bin/tclsh
-# Part of MCU 8051 IDE ( http://mcu8051ide.sf.net )
+# Part of MCU 8051 IDE ( http://http://www.moravia-microsystems.com/mcu8051ide )
############################################################################
# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 by Martin Ošmera #
# martin.osmera@gmail.com #
# #
+# Copyright (C) 2014 by Moravia Microsystems, s.r.o. #
+# martin.osmera@moravia-microsystems.com #
+# #
# This program is free software; you can redistribute it and#or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
@@ -34,10 +37,10 @@ set _BASECONVERTER_TCL _
class BaseConverter {
## COMMON
- common base_c_count 0 ;# Int: Counter of class instances
- common INITIAL_HEIGHT 130 ;# Int: Initial heightof the window in pixels
- common INITIAL_WIDTH 150 ;# Int: Initial width of the window in pixels
- common EXTENDED_WIDTH 340 ;# Int: Width of the window when it is in extended mode
+ public common base_c_count 0 ;# Int: Counter of class instances
+ public common INITIAL_HEIGHT 130 ;# Int: Initial heightof the window in pixels
+ public common INITIAL_WIDTH 150 ;# Int: Initial width of the window in pixels
+ public common EXTENDED_WIDTH 340 ;# Int: Width of the window when it is in extended mode
# On MS Windows these values has to be a bit different
if {$::MICROSOFT_WINDOWS} {
@@ -46,7 +49,7 @@ class BaseConverter {
set EXTENDED_WIDTH 355
}
# Font entryboxes
- common entry_font [font create \
+ public common entry_font [font create \
-size -12 \
-family $::DEFAULT_FIXED_FONT \
-weight bold \
diff --git a/lib/utilities/eightsegment.tcl b/lib/utilities/eightsegment.tcl
index 601d078..6bbefbb 100644
--- a/lib/utilities/eightsegment.tcl
+++ b/lib/utilities/eightsegment.tcl
@@ -1,10 +1,13 @@
#!/usr/bin/tclsh
-# Part of MCU 8051 IDE ( http://mcu8051ide.sf.net )
+# Part of MCU 8051 IDE ( http://http://www.moravia-microsystems.com/mcu8051ide )
############################################################################
# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 by Martin Ošmera #
# martin.osmera@gmail.com #
# #
+# Copyright (C) 2014 by Moravia Microsystems, s.r.o. #
+# martin.osmera@moravia-microsystems.com #
+# #
# This program is free software; you can redistribute it and#or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
@@ -32,7 +35,7 @@ set _EIGHTSEGMENT_TCL _
# --------------------------------------------------------------------------
class EightSegment {
- common ld_ed_count 0 ;# Int: Counter of object instances
+ public common ld_ed_count 0 ;# Int: Counter of object instances
private variable obj_idx ;# Int: Current object ID
private variable win ;# Widget: Dialog window
diff --git a/lib/utilities/hexeditdlg.tcl b/lib/utilities/hexeditdlg.tcl
index c18df59..a93f736 100644
--- a/lib/utilities/hexeditdlg.tcl
+++ b/lib/utilities/hexeditdlg.tcl
@@ -1,10 +1,13 @@
#!/usr/bin/tclsh
-# Part of MCU 8051 IDE ( http://mcu8051ide.sf.net )
+# Part of MCU 8051 IDE ( http://http://www.moravia-microsystems.com/mcu8051ide )
############################################################################
# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 by Martin Ošmera #
# martin.osmera@gmail.com #
# #
+# Copyright (C) 2014 by Moravia Microsystems, s.r.o. #
+# martin.osmera@moravia-microsystems.com #
+# #
# This program is free software; you can redistribute it and#or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
@@ -33,25 +36,25 @@ set _HEXEDITDLG_TCL _
# --------------------------------------------------------------------------
class HexEditDlg {
- common count 0 ;# Instance counter
- common win_pos {+0+0} ;# Window position (+X+Y)
- common mode {hex} ;# View mode {hex dec oct}
- common cell {0} ;# Current cell (0 - 0xFFFF)
- common current_view {left} ;# Focused view {left right}
+ public common count 0 ;# Instance counter
+ public common win_pos {+0+0} ;# Window position (+X+Y)
+ public common mode {hex} ;# View mode {hex dec oct}
+ public common cell {0} ;# Current cell (0 - 0xFFFF)
+ public common current_view {left} ;# Focused view {left right}
# Font for mode combobox
- common mode_cb_font [font create \
+ public common mode_cb_font [font create \
-family {Helvetica} \
-size [expr {int(-17 * $::font_size_factor)}] \
-weight bold \
]
# General normal size bold font
- common bold_font [font create \
+ public common bold_font [font create \
-family $::DEFAULT_FIXED_FONT \
-size [expr {int(-12 * $::font_size_factor)}] \
-weight bold \
]
# Status bar tips for main menu for XDATA mode
- common HELPFILE_XDATA {
+ public common HELPFILE_XDATA {
{
{Load IHEX8 file into editor and simulator XDATA memory}
{}
@@ -76,7 +79,7 @@ class HexEditDlg {
}
}
# Status bar tips for main menu for CODE mode
- common HELPFILE_CODE {
+ public common HELPFILE_CODE {
{
{Load IHEX8 file into editor and simulator XDATA memory}
{Save current content of program (CODE) memory to IHEX8 file}
diff --git a/lib/utilities/notes.tcl b/lib/utilities/notes.tcl
index d74b652..333dba9 100644
--- a/lib/utilities/notes.tcl
+++ b/lib/utilities/notes.tcl
@@ -1,10 +1,13 @@
#!/usr/bin/tclsh
-# Part of MCU 8051 IDE ( http://mcu8051ide.sf.net )
+# Part of MCU 8051 IDE ( http://http://www.moravia-microsystems.com/mcu8051ide )
############################################################################
# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 by Martin Ošmera #
# martin.osmera@gmail.com #
# #
+# Copyright (C) 2014 by Moravia Microsystems, s.r.o. #
+# martin.osmera@moravia-microsystems.com #
+# #
# This program is free software; you can redistribute it and#or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
@@ -33,17 +36,17 @@ set _NOTES_TCL _
class Notes {
## COMMON
- common count 0 ;# Int: Counter of object instances
- common bgcolor {#EEEE55} ;# Color: Background color for title bar and window border
- common bgcolor2 {#FFFF88} ;# Color: Background color for the canvas widget
+ public common count 0 ;# Int: Counter of object instances
+ public common bgcolor {#EEEE55} ;# Color: Background color for title bar and window border
+ public common bgcolor2 {#FFFF88} ;# Color: Background color for the canvas widget
# Font: For inserted text
- common canvas_text_font [font create \
+ public common canvas_text_font [font create \
-family $::DEFAULT_FIXED_FONT \
-size [expr {int(-14 * $::font_size_factor)}] \
-weight bold \
]
# List: Popup menu for the canvas widget
- common MENU {
+ public common MENU {
{radiobutton "Pencil" {} ::Notes::__mode {P}
"change_mode P" 0}
{radiobutton "Line" {} ::Notes::__mode {L}
diff --git a/lib/utilities/rs232debugger.tcl b/lib/utilities/rs232debugger.tcl
index af2354b..0f26901 100644
--- a/lib/utilities/rs232debugger.tcl
+++ b/lib/utilities/rs232debugger.tcl
@@ -1,10 +1,13 @@
#!/usr/bin/tclsh
-# Part of MCU 8051 IDE ( http://mcu8051ide.sf.net )
+# Part of MCU 8051 IDE ( http://http://www.moravia-microsystems.com/mcu8051ide )
############################################################################
# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 by Martin Ošmera #
# martin.osmera@gmail.com #
# #
+# Copyright (C) 2014 by Moravia Microsystems, s.r.o. #
+# martin.osmera@moravia-microsystems.com #
+# #
# This program is free software; you can redistribute it and#or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
@@ -34,41 +37,41 @@ set _RS232DEBUGGER_TCL _
class RS232Debugger {
## COMMON
- common count 0 ;# Int: Counter of class instances
+ public common count 0 ;# Int: Counter of class instances
# Font: Big bold font
- common bold_font [font create \
+ public common bold_font [font create \
-family {helvetica} \
-size [expr {int(-12 * $::font_size_factor)}] \
-weight {bold} \
]
# Font: Tiny normal font
- common tiny_font [font create \
+ public common tiny_font [font create \
-family {helvetica} \
-size [expr {int(-9 * $::font_size_factor)}] \
-weight {normal} \
]
# Font: Tiny bold font
- common tiny_font_bold [font create \
+ public common tiny_font_bold [font create \
-family {helvetica} \
-size [expr {int(-9 * $::font_size_factor)}] \
-weight {bold} \
]
# Font: Normal font
- common normal_font [font create \
+ public common normal_font [font create \
-family {helvetica} \
-size [expr {int(-11 * $::font_size_factor)}] \
-weight {normal} \
]
# Font: Also normal font, but a bit larger
- common big_font [font create \
+ public common big_font [font create \
-family {helvetica} \
-size [expr {int(-12 * $::font_size_factor)}] \
-weight {normal} \
]
# Int: Pool interval for selected RS232 interface
- common POOL_INTERVAL 50 ;# mili-seconds
+ public common POOL_INTERVAL 50 ;# mili-seconds
# List of Int: Available baud rates for RS232
- common available_baud_rates {
+ public common available_baud_rates {
50 75 110 134 150 200
300 600 1200 1800 2400 4800
9600 19200 38400 57600 115200 230400
@@ -76,7 +79,7 @@ class RS232Debugger {
}
# List: Configuration list
- common config_list $::CONFIG(RS232_DEBUGGER)
+ public common config_list $::CONFIG(RS232_DEBUGGER)
## PRIVATE
@@ -1101,7 +1104,12 @@ class RS232Debugger {
# @return void
public method receive_data {} {
# Read binary data
- set data [read $channel]
+ if {[catch {
+ set data [read $channel]
+ }]} then {
+ unknown_port_io_error
+ return
+ }
# Discard the data if reception is not enabled
if {!$reception_enabled} {
@@ -1293,7 +1301,7 @@ class RS232Debugger {
-parent $win \
-title [mc "IO Error"] \
-type ok -icon warning \
- -message [mc "There is something wrong with the port. Closing connection and disabling reception on this channel !"]
+ -message [mc "There is something wrong with the port. Closing connection and disabling reception on this channel!"]
update
}
diff --git a/lib/utilities/speccalc.tcl b/lib/utilities/speccalc.tcl
index 49db83b..d13e1ed 100644
--- a/lib/utilities/speccalc.tcl
+++ b/lib/utilities/speccalc.tcl
@@ -1,10 +1,13 @@
#!/usr/bin/tclsh
-# Part of MCU 8051 IDE ( http://mcu8051ide.sf.net )
+# Part of MCU 8051 IDE ( http://http://www.moravia-microsystems.com/mcu8051ide )
############################################################################
# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 by Martin Ošmera #
# martin.osmera@gmail.com #
# #
+# Copyright (C) 2014 by Moravia Microsystems, s.r.o. #
+# martin.osmera@moravia-microsystems.com #
+# #
# This program is free software; you can redistribute it and#or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
@@ -38,14 +41,14 @@ set _SPECCALC_TCL _
class SpecCalc {
## COMMON
- common count 0 ;# Int: Counter of class instances
- common diagram_counter 0 ;# Int: Counter of diagram dialogues instances
+ public common count 0 ;# Int: Counter of class instances
+ public common diagram_counter 0 ;# Int: Counter of diagram dialogues instances
# List of pages descriptors for PagesManager
- common page_list {
+ public common page_list {
loops timer01 timer2 spi
}
# Configuration list
- common config $::CONFIG(SPEC_CALC)
+ public common config $::CONFIG(SPEC_CALC)
## PRIVATE
private variable win ;# Widget: The dialog window
diff --git a/lib/utilities/symbol_viewer.tcl b/lib/utilities/symbol_viewer.tcl
index c46b8ac..f67a8ac 100644
--- a/lib/utilities/symbol_viewer.tcl
+++ b/lib/utilities/symbol_viewer.tcl
@@ -1,10 +1,13 @@
#!/usr/bin/tclsh
-# Part of MCU 8051 IDE ( http://mcu8051ide.sf.net )
+# Part of MCU 8051 IDE ( http://http://www.moravia-microsystems.com/mcu8051ide )
############################################################################
# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 by Martin Ošmera #
# martin.osmera@gmail.com #
# #
+# Copyright (C) 2014 by Moravia Microsystems, s.r.o. #
+# martin.osmera@moravia-microsystems.com #
+# #
# This program is free software; you can redistribute it and#or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
@@ -34,15 +37,15 @@ set _SYMBOL_VIEWER_TCL _
class SymbolViewer {
## Class variables
# Int: Counter of object intances
- common count 0
+ public common count 0
# Font: Just normal font used in the table
- common normal_font [font create \
+ public common normal_font [font create \
-family $::DEFAULT_FIXED_FONT \
-size [expr {int(-14 * $::font_size_factor)}] \
-weight normal \
]
# Font: Bold font (the same size as $normal_font)
- common bold_font [font create \
+ public common bold_font [font create \
-family $::DEFAULT_FIXED_FONT \
-size [expr {int(-14 * $::font_size_factor)}] \
-weight bold \
@@ -52,7 +55,7 @@ class SymbolViewer {
set bold_font $normal_font
}
# Dialog configuration
- common config_list $::CONFIG(SYMBOL_VIEWER_CONFIG)
+ public common config_list $::CONFIG(SYMBOL_VIEWER_CONFIG)
## Private object variables
private variable obj_idx ;# Int: Current object number
diff --git a/lib/utilities/table_of_instructions.tcl b/lib/utilities/table_of_instructions.tcl
index b6587b2..3dc1597 100644
--- a/lib/utilities/table_of_instructions.tcl
+++ b/lib/utilities/table_of_instructions.tcl
@@ -1,10 +1,13 @@
#!/usr/bin/tclsh
-# Part of MCU 8051 IDE ( http://mcu8051ide.sf.net )
+# Part of MCU 8051 IDE ( http://http://www.moravia-microsystems.com/mcu8051ide )
############################################################################
# Copyright (C) 2011 by Martin Ošmera #
# martin.osmera@gmail.com #
# #
+# Copyright (C) 2014 by Moravia Microsystems, s.r.o. #
+# martin.osmera@moravia-microsystems.com #
+# #
# This program is free software; you can redistribute it and#or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
@@ -32,30 +35,30 @@ set _TABLE_OF_INSTRUCTIONS_TCL _
# --------------------------------------------------------------------------
class TableOfInstructions {
- common tbl_of_inst_count 0 ;# Int: Counter of object instances
- common oprs_color {#00DD00} ;# RGB Color: Number of operands
- common len_color {#00AA55} ;# RGB Color: Instruction length
- common time_color {#8800DD} ;# RGB Color: Time to execute
- common ins_color {#0000DD} ;# RGB Color: Instruction mnemonics
+ public common tbl_of_inst_count 0 ;# Int: Counter of object instances
+ public common oprs_color {#00DD00} ;# RGB Color: Number of operands
+ public common len_color {#00AA55} ;# RGB Color: Instruction length
+ public common time_color {#8800DD} ;# RGB Color: Time to execute
+ public common ins_color {#0000DD} ;# RGB Color: Instruction mnemonics
# Font for instruction name
- common instruction_font [font create \
+ public common instruction_font [font create \
-family {helvetica} \
-size [expr {int(-10 * $::font_size_factor)}] \
]
# Font for numbers below the instruction name
- common number_font [font create \
+ public common number_font [font create \
-family {helvetica} \
-size [expr {int(-10 * $::font_size_factor)}] \
-weight {bold} \
]
# Font for labels in details frame (normal)
- common details_n_font [font create \
+ public common details_n_font [font create \
-family {helvetica} \
-size [expr {int(-12 * $::font_size_factor)}] \
]
# Font for labels in details frame (bold)
- common details_b_font [font create \
+ public common details_b_font [font create \
-family {helvetica} \
-size [expr {int(-12 * $::font_size_factor)}] \
-weight {bold} \