RCS file: /Volumes/src/cvs/od/proj/darwinports/base/src/port1.0/portutil.tcl,v
retrieving revision 1.144
diff -u -r1.144 portutil.tcl
|
|
|
857 | 857 | ui_debug "$ident registered provides \'$target\', a pre-existing procedure. Target override will not be provided" |
858 | 858 | } else { |
859 | 859 | eval "proc $target {args} \{ \n\ |
860 | | ditem_key $ditem procedure proc-${ident}-${target} |
861 | | eval \"proc proc-${ident}-${target} \{name\} \{ \n\ |
862 | | if \{\\\[catch userproc-${ident}-${target} result\\\]\} \{ \n\ |
| 860 | variable proc_index \n\ |
| 861 | set proc_index \[llength \[ditem_key $ditem proc\]\] \n\ |
| 862 | ditem_key $ditem procedure proc-${ident}-${target}-\${proc_index} |
| 863 | eval \"proc proc-${ident}-${target}-\${proc_index} \{name\} \{ \n\ |
| 864 | if \{\\\[catch userproc-${ident}-${target}-\${proc_index} result\\\]\} \{ \n\ |
863 | 865 | return -code error \\\$result \n\ |
864 | 866 | \} else \{ \n\ |
865 | 867 | return 0 \n\ |
866 | 868 | \} \n\ |
867 | 869 | \}\" \n\ |
868 | 870 | eval \"proc do-$target \{\} \{ $origproc $target\}\" \n\ |
869 | | makeuserproc userproc-${ident}-${target} \$args \n\ |
| 871 | makeuserproc userproc-${ident}-${target}-\${proc_index} \$args \n\ |
870 | 872 | \}" |
871 | 873 | } |
872 | 874 | eval "proc pre-$target {args} \{ \n\ |
873 | | ditem_append $ditem pre proc-pre-${ident}-${target} |
874 | | eval \"proc proc-pre-${ident}-${target} \{name\} \{ \n\ |
875 | | if \{\\\[catch userproc-pre-${ident}-${target} result\\\]\} \{ \n\ |
| 875 | variable proc_index \n\ |
| 876 | set proc_index \[llength \[ditem_key $ditem pre\]\] \n\ |
| 877 | ditem_append $ditem pre proc-pre-${ident}-${target}-\${proc_index} |
| 878 | eval \"proc proc-pre-${ident}-${target}-\${proc_index} \{name\} \{ \n\ |
| 879 | if \{\\\[catch userproc-pre-${ident}-${target}-\${proc_index} result\\\]\} \{ \n\ |
876 | 880 | return -code error \\\$result \n\ |
877 | 881 | \} else \{ \n\ |
878 | 882 | return 0 \n\ |
879 | 883 | \} \n\ |
880 | 884 | \}\" \n\ |
881 | | makeuserproc userproc-pre-${ident}-${target} \$args \n\ |
| 885 | makeuserproc userproc-pre-${ident}-${target}-\${proc_index} \$args \n\ |
882 | 886 | \}" |
883 | 887 | eval "proc post-$target {args} \{ \n\ |
884 | | ditem_append $ditem post proc-post-${ident}-${target} |
885 | | eval \"proc proc-post-${ident}-${target} \{name\} \{ \n\ |
886 | | if \{\\\[catch userproc-post-${ident}-${target} result\\\]\} \{ \n\ |
| 888 | variable proc_index \n\ |
| 889 | set proc_index \[llength \[ditem_key $ditem post\]\] \n\ |
| 890 | ditem_append $ditem post proc-post-${ident}-${target}-\${proc_index} |
| 891 | eval \"proc proc-post-${ident}-${target}-\${proc_index} \{name\} \{ \n\ |
| 892 | if \{\\\[catch userproc-post-${ident}-${target}-\${proc_index} result\\\]\} \{ \n\ |
887 | 893 | return -code error \\\$result \n\ |
888 | 894 | \} else \{ \n\ |
889 | 895 | return 0 \n\ |
890 | 896 | \} \n\ |
891 | 897 | \}\" \n\ |
892 | | makeuserproc userproc-post-${ident}-${target} \$args \n\ |
| 898 | makeuserproc userproc-post-${ident}-${target}-\${proc_index} \$args \n\ |
893 | 899 | \}" |
894 | 900 | } |
895 | 901 | eval "ditem_append $ditem provides $args" |