Ignore:
Timestamp:
Sep 20, 2002, 10:44:35 AM (16 years ago)
Author:
landonf
Message:

Add more comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port1.0/portutil.tcl

    r655 r712  
    4646# Thus, "options name date" would create procedures named "name"
    4747# and "date" that set global variables "name" and "date", respectively
     48# When an option is modified in any way, options::$option is called,
     49# if it exists
    4850# Arguments: <list of options>
    4951proc options {args} {
     
    9193}
    9294
     95# commands
     96# Accepts a list of arguments, of which several options are created
     97# and used to form a standard set of command options.
    9398proc commands {args} {
    9499    foreach option $args {
     
    97102}
    98103
     104# command
     105# Given a command name, command assembled a string
     106# composed of the command options.
    99107proc command {command} {
    100108    global ${command}.dir ${command}.pre_args ${command}.args ${command}.post_args ${command}.env ${command}.type ${command}.cmd
     
    130138
    131139# default
     140# Sets a variable to the supplied default if it does not exist,
     141# and adds a variable trace. The variable traces allows for delayed
     142# variable and command expansion in the variable's default value.
    132143proc default {option val} {
    133144    global $option option_defaults
     
    146157}
    147158
     159# default_check
     160# trace handler to provide delayed variable & command expansion
     161# for default variable values
    148162proc default_check {optionName index op} {
    149163        global option_defaults $optionName
     
    168182
    169183# variant <provides> [<provides> ...] [requires <requires> [<requires>]]
     184# Portfile level procedure to provide support for declaring variants
    170185proc variant {args} {
    171186    global variants PortInfo
     
    204219########### Misc Utility Functions ###########
    205220
     221# tbool (testbool)
     222# If the variable exists in the calling procedure's namespace
     223# and is set to "yes", return 1. Otherwise, return 0
    206224proc tbool {key} {
    207225    upvar $key $key
     
    214232}
    215233
     234# ldelete
     235# Deletes a value from the supplied list
    216236proc ldelete {list value} {
    217237    upvar $list uplist
     
    222242}
    223243
     244# reinplace
     245# Provides "sed in place" functionality
    224246proc reinplace {oddpattern file}  {
    225247    set backpattern [strsed $oddpattern {g/\//\\\\\//}]
     
    265287}
    266288
     289# filefindbypath
     290# Provides searching of the standard path for included files
    267291proc filefindbypath {fname} {
    268292    global distpath filedir workdir worksrcdir portpath
     
    284308}
    285309
     310# include
    286311# Source a file, looking for it along a standard search path.
    287312proc include {fname} {
Note: See TracChangeset for help on using the changeset viewer.