Skip to content
Tcl Source Code Artifact [9fd5908d3a]
Login

Artifact [9fd5908d3a]

Artifact 9fd5908d3a19dca21d5bf01835b566e2aeeb614b:

Ticket change [9fd5908d3a] - Ticket [1446696fffffffff|1446696fff] <i>Tcl_ParseArgv as a useful non-Tk version of Tk_ParseArgv</i> status still Open with 4 other changes by sbromle on 2006-06-15 05:45:08.
D 2006-06-15T05:45:08
J icomment Logged\sIn:\sYES\s\nuser_id=1472195\n\nYep.\sNaviserver's\stclobjv.c\sseems\sto\sprovide\ssimilar\nfunctionality,\swithout\sthe\sneed\sto\smake\sa\slocal\scopy\sof\sthe\nobjects.\sIt\sgets\saround\sthis\sby\sparsing\sboth\soptions\sand\narguments\sin\sthe\scall,\swhereas\sthe\stclArgv\sversion\s(based\son\nTkArgv.c)\sparses\sonly\sthe\soptions,\sand\srepacks\sthe\sarray\nleaving\sonly\sarguments\sand\sunknown\soptions.\sThis\sability\sto\nleave\sunknown\sarguments\sand\soptions\son\sthe\sobjv\sarray\sis\nuseful\swhen\sone\swants\sto\sstrip\sdifferent\soptions\swith\ndifferent\sfunctions\s(though\sI\sadmit,\sI\shaven't\sneeded\sto\sdo\nso\smyself\sas\sof\syet.)\n\nFrom\sa\susability\sperspective\sI'm\ssure\sboth\sapproaches\sare\nvalid.\sI\shave\sa\sfew\squestions\sthat\scould\shelp\sbring\sme\sup\sto\nspeed\son\sthe\snaviserver\sversion:\n(i)\sDoes\sthe\sorder\sof\soptions\smatter?\n(ii)\sCan\soptions\sbe\sinterspersed\swith\sarguments?\n(iii)\sWhat\shappens\sin\sthe\scase\sof\sunknown\sarguments?\n(iv)\sIs\sthere\san\sautomatically\sgenerated\shelp?\n(v)\sDo\sall\sarguments\shave\sto\sbe\sknown\sin\sadvance?\nEquivalently,\scan\sthe\snumber\sof\sarguments\sbe\sdynamic,\ndepending\son,\ssay,\sthe\svalue\sof\soptions?\s(tclArgv\sallows\nthis\sas\sthe\sarguments\sare\sjust\srepackaged\sfor\ssubsequent\nparsing\sby\sthe\scaller).\n\nMy\sbias\s(at\sleast\sin\sterms\sof\sfor\sinclusion\ninto\sTcl\sproper)\sis\sthat\sthe\sfunction\sbe\sas\sstand-alone\sand\nas\ssimple\sas\spossible.\sIn\sthis\ssense,\sthe\stclArgv.c\sfile\nbelow\smight\sbe\sseen\sas\sa\smore\sclosed-form\ssolution\sthan\sthe\ntclobjv.c\sversion\swith\sits\sadditional\stypedefs\sand\nsubfunctions.\sMoreover,\stclArgv.[hc]\sare\sthe\sonly\stwo\sfiles\nneeded\sto\sadd\sthis\sfunctionality\sto\sany\sproject\s(which\swe\nuse\s\squite\scleanly\snow\scompiled\sup\sas\sa\sshared\slibrary).\nPerhaps\sthe\snaviserver\stclobjv\scould\sbe\seasily\ssimplified\sas\nwell.\sI\swelcome\scomments\son\sthese\spoints.\n\nShould\stclArgv.c\sbe\sdeemed\ssufficiently\suseful\sfor\nconsideration\sfor\sinclusion\sinto\sTcl\sproper,\sI'd\sbe\shappy\sto\nrecode\sa\sGetIndexFromObject\sversion\sof\stclArgv.c\sif\sthis\sis\na\ssticking\spoint.\n\n
J login sbromle
J mimetype text/plain
J username sbromle
K 1446696fffffffffffffffffffffffffffffffff
U sbromle
Z bda5853487bfa3cb0fe7201f2be76320