Changeset 134511
- Timestamp:
- Mar 27, 2015, 9:15:41 PM (9 years ago)
- Location:
- trunk/base/src/macports1.0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/base/src/macports1.0/macports.c
r64998 r134511 41 41 #include "sysctl.h" 42 42 43 static int44 macports__version(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj * CONST objv[])45 {46 if (objc != 1) {47 Tcl_WrongNumArgs(interp, 1, objv, NULL);48 return TCL_ERROR;49 }50 Tcl_SetObjResult(interp, Tcl_GetVar2Ex(interp, "macports::autoconf::macports_version", NULL, 0));51 return TCL_OK;52 }53 54 43 int 55 44 Macports_Init(Tcl_Interp *interp) … … 57 46 if (Tcl_InitStubs(interp, "8.4", 0) == NULL) 58 47 return TCL_ERROR; 59 Tcl_CreateObjCommand(interp, "macports::version", macports__version, NULL, NULL);60 48 Tcl_CreateObjCommand(interp, "get_systemconfiguration_proxies", GetSystemConfigurationProxiesCmd, NULL, NULL); 61 49 Tcl_CreateObjCommand(interp, "sysctl", SysctlCmd, NULL, NULL); -
trunk/base/src/macports1.0/macports.tcl
r134508 r134511 81 81 } 82 82 83 ## 84 # Return the version of MacPorts you are running 85 # 86 # This proc never fails and always returns the current version in the format 87 # major.minor.patch. Note that the value of patch will not be meaningful for 88 # trunk releases, but we guarantee that it will compare to be greater than any 89 # released versions from the same major.minor.x series. You should use the 90 # MacPorts-provided Tcl extension "vercmp" to do version number comparisons on 91 # the return value of this function. 92 proc macports::version {} { 93 return ${macports::autoconf::macports_version} 94 } 95 83 96 # Provided UI instantiations 84 97 # For standard messages, the following priorities are defined … … 1327 1340 1328 1341 # Export some utility functions defined here. 1342 $workername alias macports_version macports::version 1329 1343 $workername alias macports_create_thread macports::create_thread 1330 1344 $workername alias getportworkpath_from_buildpath macports::getportworkpath_from_buildpath
Note: See TracChangeset
for help on using the changeset viewer.