OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [libgui/] [library/] [ulset.tcl] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
# ulset.tcl - Set labels based on info from gettext.
2
# Copyright (C) 1997 Cygnus Solutions.
3
# Written by Tom Tromey <tromey@cygnus.com>.
4
 
5
# Extract underline and label info from a descriptor string.  Any
6
# underline in the descriptor is extracted, and the next character's
7
# index is used as the -underline value.  There can only be one _ in
8
# the label.
9
proc extract_label_info {option label} {
10
  set uList [split $label _]
11
  if {[llength $uList] > 2} then {
12
    error "too many underscores in label \"$label\""
13
  }
14
 
15
  if {[llength $uList] == 1} then {
16
    set ul -1
17
  } else {
18
    set ul [string length [lindex $uList 0]]
19
  }
20
 
21
  return [list $option [join $uList {}] -underline $ul]
22
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.