{"id":7331,"date":"2022-12-20T19:37:43","date_gmt":"2022-12-20T22:37:43","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/tcl_pkgrequire-man3\/"},"modified":"2022-12-20T19:37:43","modified_gmt":"2022-12-20T22:37:43","slug":"tcl_pkgrequire-man3","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/tcl_pkgrequire-man3\/","title":{"rendered":"Tcl_PkgRequire (man3)"},"content":{"rendered":"<h1 align=\"center\">Tcl_PkgRequire<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#ARGUMENTS\">ARGUMENTS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#KEYWORDS\">KEYWORDS<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a> <\/p>\n<hr>\n<p>______________________________________________________________________________<\/p>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Tcl_PkgRequire, Tcl_PkgRequireEx, Tcl_PkgRequireProc, Tcl_PkgPresent, Tcl_PkgPresentEx, Tcl_PkgProvide, Tcl_PkgProvideEx \u2212 package version control<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>#include <tcl.h><\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">const char bodies manpages.csv script_extrae_body.sh script.sh usr <b><br \/> Tcl_PkgRequire<\/b>(<i>interp, name, version, exact<\/i>)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">const char bodies manpages.csv script_extrae_body.sh script.sh usr <b><br \/> Tcl_PkgRequireEx<\/b>(<i>interp, name, version, exact, clientDataPtr<\/i>)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">int <b><br \/> Tcl_PkgRequireProc<\/b>(<i>interp, name, objc, objv, clientDataPtr<\/i>)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">const char bodies manpages.csv script_extrae_body.sh script.sh usr <b><br \/> Tcl_PkgPresent<\/b>(<i>interp, name, version, exact<\/i>)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">const char bodies manpages.csv script_extrae_body.sh script.sh usr <b><br \/> Tcl_PkgPresentEx<\/b>(<i>interp, name, version, exact, clientDataPtr<\/i>)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">int <b><br \/> Tcl_PkgProvide<\/b>(<i>interp, name, version<\/i>)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">int <b><br \/> Tcl_PkgProvideEx<\/b>(<i>interp, name, version, clientData<\/i>)<\/p>\n<h2>ARGUMENTS <a name=\"ARGUMENTS\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"41%\">\n<p style=\"margin-top: 1em\">Tcl_Interp <i>*interp<\/i> (in)<\/p>\n<\/td>\n<td width=\"11%\"><\/td>\n<td width=\"37%\">\n<p style=\"margin-top: 1em\">Interpreter where package is needed or available.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"41%\">\n<p>const char <i>*name<\/i> (in)<\/p>\n<\/td>\n<td width=\"11%\"><\/td>\n<td width=\"37%\">\n<p>Name of package.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"41%\">\n<p>const char <i>*version<\/i> (in)<\/p>\n<\/td>\n<td width=\"11%\"><\/td>\n<td width=\"37%\">\n<p>A version string consisting of one or more decimal numbers separated by dots.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"41%\">\n<p>int <i>exact<\/i> (in)<\/p>\n<\/td>\n<td width=\"11%\"><\/td>\n<td width=\"37%\">\n<p>Non-zero means that only the particular version specified by <i>version<\/i> is acceptable. Zero means that newer versions than <i>version<\/i> are also acceptable as long as they have the same major version number as <i>version<\/i>.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"41%\">\n<p>const void <i>*clientData<\/i> (in)<\/p>\n<\/td>\n<td width=\"11%\"><\/td>\n<td width=\"37%\">\n<p>Arbitrary value to be associated with the package.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"41%\">\n<p>void <i>*clientDataPtr<\/i> (out)<\/p>\n<\/td>\n<td width=\"11%\"><\/td>\n<td width=\"37%\">\n<p>Pointer to place to store the value associated with the matching package. It is only changed if the pointer is not NULL and the function completed successfully. The storage can be any pointer type with the same size as a void pointer.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"41%\">\n<p>int <i>objc<\/i> (in)<\/p>\n<\/td>\n<td width=\"11%\"><\/td>\n<td width=\"37%\">\n<p>Number of requirements.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"41%\">\n<p>Tcl_Obj* <i>objv[]<\/i> (in)<\/p>\n<\/td>\n<td width=\"11%\"><\/td>\n<td width=\"37%\">\n<p>Array of requirements.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:63%;\">______________________________________________________________________________<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">These procedures provide C-level interfaces to Tcl\u2019s package and version management facilities.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Tcl_PkgRequire<\/b> is equivalent to the <b>package require<\/b> command, <b>Tcl_PkgPresent<\/b> is equivalent to the <b>package present<\/b> command, and <b>Tcl_PkgProvide<\/b> is equivalent to the <b>package provide<\/b> command.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">See the documentation for the Tcl commands for details on what these procedures do.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If <b>Tcl_PkgPresent<\/b> or <b>Tcl_PkgRequire<\/b> complete successfully they return a pointer to the version string for the version of the package that is provided in the interpreter (which may be different than <i>version<\/i>); if an error occurs they return NULL and leave an error message in the interpreter\u2019s result.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Tcl_PkgProvide<\/b> returns <b>TCL_OK<\/b> if it completes successfully; if an error occurs it returns <b>TCL_ERROR<\/b> and leaves an error message in the interpreter\u2019s result.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Tcl_PkgProvideEx<\/b>, <b>Tcl_PkgPresentEx<\/b> and <b>Tcl_PkgRequireEx<\/b> allow the setting and retrieving of the client data associated with the package. In all other respects they are equivalent to the matching functions.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Tcl_PkgRequireProc<\/b> is the form of <b>package require<\/b> handling multiple requirements. The other forms are present for backward compatibility and translate their invocations to this form.<\/p>\n<h2>KEYWORDS <a name=\"KEYWORDS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">package, present, provide, require, version<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">package(n), Tcl_StaticPackage(3)<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  Tcl_PkgRequire, Tcl_PkgRequireEx, Tcl_PkgRequireProc, Tcl_PkgPresent, Tcl_PkgPresentEx, Tcl_PkgProvide, Tcl_PkgProvideEx \u2212 package version control <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2536],"tags":[2538,3007,3649],"class_list":["post-7331","post","type-post","status-publish","format-standard","hentry","category-3-llamadas-de-bibliotecas","tag-2538","tag-man3","tag-tcl_pkgrequire"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7331","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=7331"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7331\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=7331"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=7331"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=7331"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}