Index: generic/nsf.c =================================================================== diff -u -r8db56ce1f1dff5e22768c59df1b9039e961c6267 -r08c14f3a4f29db5d12e22097927ceb81bb0abc20 --- generic/nsf.c (.../nsf.c) (revision 8db56ce1f1dff5e22768c59df1b9039e961c6267) +++ generic/nsf.c (.../nsf.c) (revision 08c14f3a4f29db5d12e22097927ceb81bb0abc20) @@ -6800,9 +6800,20 @@ } /* - * Non Positional Parameter + *---------------------------------------------------------------------- + * ParamDefsFormatOption -- + * + * Append a parameter option to the nameStringObj representing the + * syntax of the parameter definition. + * + * Results: + * None. + * + * Side effects: + * none + * + *---------------------------------------------------------------------- */ - static void ParamDefsFormatOption(Tcl_Interp *interp, Tcl_Obj *nameStringObj, CONST char *option, int *colonWritten, int *firstOption) { @@ -6818,6 +6829,21 @@ Tcl_AppendLimitedToObj(nameStringObj, option, -1, INT_MAX, NULL); } +/* + *---------------------------------------------------------------------- + * ParamDefsFormat -- + * + * Produce a Tcl_Obj representing a single parameter in the syntax + * of the parameter definition. + * + * Results: + * Tcl_Obj + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ static Tcl_Obj * ParamDefsFormat(Tcl_Interp *interp, NsfParam CONST *paramsPtr) { int first, colonWritten; @@ -6887,6 +6913,21 @@ return listObj; } +/* + *---------------------------------------------------------------------- + * ParamDefsList -- + * + * Produce a Tcl_ListObj containing the names ot the parameters + * based on a parameter structure. + * + * Results: + * Tcl_Obj + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ static Tcl_Obj * ParamDefsList(Tcl_Interp *interp, NsfParam CONST *paramsPtr) { Tcl_Obj *listObj = Tcl_NewListObj(0, NULL); @@ -6898,6 +6939,20 @@ return listObj; } +/* + *---------------------------------------------------------------------- + * ParamGetType -- + * + * Obtain the type of a single parameter and return it as a string. + * + * Results: + * Type of the parameter in form of a string + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ static CONST char * ParamGetType(NsfParam CONST *paramPtr) { CONST char *result = "value"; @@ -6925,6 +6980,22 @@ return result; } +/* + *---------------------------------------------------------------------- + * ParamGetDomain -- + * + * Obtain the domain of a single parameter and return it as a + * string. The domain is an approximate type used in the parameter + * syntax. + * + * Results: + * Domain of the parameter in form of a string + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ static CONST char * ParamGetDomain(NsfParam CONST *paramPtr) { CONST char *result = "value"; @@ -6944,6 +7015,23 @@ return result; } +/* + *---------------------------------------------------------------------- + * ParamDefsSyntax -- + * + * Return the parameter definitions of a sequence of parameters in + * the form of the "parametersyntax", inspired by the Tcl manual + * pages. + * + * Results: + * Tcl_Obj containing the parameter syntax + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + static Tcl_Obj * ParamDefsSyntax(Tcl_Interp *interp, NsfParam CONST *paramPtr) { Tcl_Obj *argStringObj = Tcl_NewStringObj("", 0); @@ -6978,9 +7066,24 @@ return argStringObj; } +/* + *---------------------------------------------------------------------- + * ParsedParamFree -- + * + * Free the provided information of the parsed parameters. + * + * Results: + * None. + * + * Side effects: + * Freed Memory. + * + *---------------------------------------------------------------------- + */ static void ParsedParamFree(NsfParsedParam *parsedParamPtr) { - /*fprintf(stderr, "ParsedParamFree %p, npargs %p\n", parsedParamPtr, parsedParamPtr->paramDefs);*/ + /*fprintf(stderr, "ParsedParamFree %p, npargs %p\n", + parsedParamPtr, parsedParamPtr->paramDefs);*/ if (parsedParamPtr->paramDefs) { ParamDefsFree(parsedParamPtr->paramDefs); }