/[dtapublic]/projs/trunk/shared_source/c_tclxtens_7_5/vcinfo.c
ViewVC logotype

Annotation of /projs/trunk/shared_source/c_tclxtens_7_5/vcinfo.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 71 - (hide annotations) (download)
Sat Nov 5 11:07:06 2016 UTC (7 years, 3 months ago) by dashley
File MIME type: text/plain
File size: 3136 byte(s)
Set EOL properties appropriately to facilitate simultaneous Linux and Windows development.
1 dashley 71 //$Header$
2     //-------------------------------------------------------------------------------------------------
3     //This file is part of "David T. Ashley's Shared Source Code", a set of shared components
4     //integrated into many of David T. Ashley's projects.
5     //-------------------------------------------------------------------------------------------------
6     //This source code and any program in which it is compiled/used is provided under the MIT License,
7     //reproduced below.
8     //-------------------------------------------------------------------------------------------------
9     //Permission is hereby granted, free of charge, to any person obtaining a copy of
10     //this software and associated documentation files(the "Software"), to deal in the
11     //Software without restriction, including without limitation the rights to use,
12     //copy, modify, merge, publish, distribute, sublicense, and / or sell copies of the
13     //Software, and to permit persons to whom the Software is furnished to do so,
14     //subject to the following conditions :
15     //
16     //The above copyright notice and this permission notice shall be included in all
17     //copies or substantial portions of the Software.
18     //
19     //THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20     //IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21     //FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
22     //AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23     //LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24     //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25     //SOFTWARE.
26     //-------------------------------------------------------------------------------------------------
27     #define MODULE_VCINFO
28    
29     #include <string.h>
30    
31     #include "tcl.h"
32     #include "tcldecls.h"
33    
34     #include "vcinfo.h"
35    
36     #include "build_config.h"
37    
38    
39     //Module implements the "vcinfo" command, which emits all version
40     //control information about the build.
41    
42     int VcinfoCmd(ClientData dummy,
43     Tcl_Interp *interp,
44     int objc,
45     Tcl_Obj *objv[])
46     {
47     Tcl_Obj *rv;
48    
49     //Break into cases based on the number of arguments.
50     if ((objc == 2) && (!strcmp(Tcl_GetString(objv[1]), "-ijutoolsversion")))
51     {
52     //Create a string object, initialized to the version number.
53     rv = Tcl_NewStringObj("v" BUILD_CONFIG_RELEASE_VERSION, -1);
54    
55     //We have a cleanly allocated object. Return it to the caller.
56     Tcl_SetObjResult(interp, rv);
57    
58     return(TCL_OK);
59     }
60     else
61     {
62     Tcl_WrongNumArgs(interp,
63     1,
64     objv,
65     "-ijutoolsversion");
66    
67     return TCL_ERROR;
68     }
69     }
70    
71    
72     //Performs initial registration to the hash table.
73     //
74     void VcinfoInit(Tcl_Interp *interp)
75     {
76     //Register a command named "credits".
77     Tcl_CreateObjCommand(interp,
78     "vcinfo",
79     (Tcl_ObjCmdProc *)VcinfoCmd,
80     NULL,
81     NULL);
82     }
83    
84    
85     const char *VcinfoCversion(void)
86     {
87     return ("$Header$");
88     }
89    
90    
91     const char *VcinfoHversion(void)
92     {
93     return (VCINFO_H_VERSION);
94     }
95    
96     /* End of vcinfo.c */

Properties

Name Value
svn:eol-style native
svn:keywords Header

dashley@gmail.com
ViewVC Help
Powered by ViewVC 1.1.25