/[ascend]/trunk/tcltk98/generic/interface/EnvVarProc.h
ViewVC logotype

Contents of /trunk/tcltk98/generic/interface/EnvVarProc.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 67 - (show annotations) (download) (as text)
Wed Nov 30 16:31:29 2005 UTC (14 years, 2 months ago) by johnpye
File MIME type: text/x-chdr
File size: 5195 byte(s)
Standardised the "if seen" #defines to [ASC|ASCTK|ASCPY|ASCXX]_FILENAME_H
Fixed compile on FC3
1 /*
2 * Ascend Environment Variable Imitation Tcl interface
3 * by Ben Allan
4 * Created: 6/3/97
5 * Version: $Revision: 1.4 $
6 * Version control file: $RCSfile: EnvVarProc.h,v $
7 * Date last modified: $Date: 2003/08/23 18:43:06 $
8 * Last modified by: $Author: ballan $
9 *
10 * This file is part of the Ascend Language Interpreter.
11 *
12 * Copyright (C) 1997 Benjamin Andrew Allan
13 *
14 * The Ascend Language Interpreter is free software; you can redistribute
15 * it and/or modify it under the terms of the GNU General Public License as
16 * published by the Free Software Foundation; either version 2 of the
17 * License, or (at your option) any later version.
18 *
19 * The Ascend Language Interpreter is distributed in hope that it will be
20 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with the program; if not, write to the Free Software Foundation,
26 * Inc., 675 Mass Ave, Cambridge, MA 02139 USA. Check the file named
27 * COPYING.
28 */
29
30 /** @file
31 * Ascend Environment Variable Imitation Tcl interface.
32 *
33 * This file exists because win32, among others, can't keep their
34 * POSIX compliance up. In particular, getting and setting
35 * environment vars is exceedingly unreliable. This file implements
36 * a general way to store and fetch multiple paths.
37 * It does not interact in any way the the Tcl global "env" array.
38 * <pre>
39 * To include this header, you must include the following:
40 * #include "tcl.h"
41 * #include "utilities/ascConfig.h"
42 * </pre>
43 */
44
45 #ifndef ASCTK_ENVVARPROC_H
46 #define ASCTK_ENVVARPROC_H
47
48 STDHLF_H(Asc_EnvVarCmd);
49
50 extern int Asc_EnvVarCmd(ClientData cdata, Tcl_Interp *interp,
51 int argc, CONST84 char *argv[]);
52 /**<
53 * <!-- Asc_EnvVarCmd(cdata,interp,argc,argv); -->
54 * This is the tcl callback for our commandline help facility.
55 */
56
57 /** Registered as */
58 #define Asc_EnvVarCmdHN "asc_env"
59 /** Usage */
60 #define Asc_EnvVarCmdHU \
61 "asc_env option args\n\
62 options are append, export, get, import, list, names, put, and set."
63 /** Short help text */
64 #define Asc_EnvVarCmdHS \
65 "asc_env manipulates a database of strings for the ascend application"
66 /** Long help text part 1 */
67 #define Asc_EnvVarCmdHL1 \
68 "\
69 * These strings are only loosely tied to either the C or Tcl environment\n\
70 * on flakey non-UNIX platforms.\n\
71 * The options are as follows:\n\
72 "
73 /** Long help text part 2 */
74 #define Asc_EnvVarCmdHL2 \
75 "\
76 * append var pathelement\n\
77 * Adds pathelement to the ascend environment string var.\n\
78 * Path elements may contain spaces, but should not\n\
79 * contain path dividers.\n\
80 "
81 /** Long help text part 3 */
82 #define Asc_EnvVarCmdHL3 \
83 "\
84 * export var\n\
85 * Adds the definition of var to the Tcl global env array.\n\
86 * This does not LINK the var and Tcl env, so changes\n\
87 * with asc_env may need to be followed by reexporting.\n\
88 * Whether or not the C environment sees changes to Tcl\n\
89 * env depends entirely on the Tcl core implementation.\n\
90 "
91 /** Long help text part 4 */
92 #define Asc_EnvVarCmdHL4 \
93 "\
94 * get var\n\
95 * Returns the ascend environment string var. If var has\n\
96 * more than one element, then the elements are glued\n\
97 * together into a single string using the pathdiv separator.\n\
98 * UNIX pathdiv is : and MS pathdiv is ; .\n\
99 "
100 /** Long help text part 5 */
101 #define Asc_EnvVarCmdHL5 \
102 "\
103 * import var\n\
104 * Sets the ascend environment var using the result of a \n\
105 * call to C getenv(). Tcl env may or may not match.\n\
106 * list var\n\
107 * Returns a Tcl list of the elements stored for ascend var.\n\
108 "
109 /** Long help text part 6 */
110 #define Asc_EnvVarCmdHL6 \
111 "\
112 * names \n\
113 * Takes no arguments and returns the names of known\n\
114 * ascend environment variables as a Tcl list. \n\
115 "
116 /** Long help text part 7 */
117 #define Asc_EnvVarCmdHL7 \
118 "\
119 * put input_string\n\
120 * Parses the input string using the form %s = %s to extract\n\
121 * a varname (before the =) and path value. The path value is\n\
122 * assumed to be separated by the platform value of pathdiv\n\
123 * as defined for getenv above and split accordingly into\n\
124 * pathelements.\n\
125 "
126 /** Long help text part 8 */
127 #define Asc_EnvVarCmdHL8 \
128 "\
129 * set var path \n\
130 * Like putenv, but you have done the split on = for us.\n\
131 * \n\
132 "
133 /** Long help text part 9 */
134 #define Asc_EnvVarCmdHL9 \
135 "\
136 * These commands manage a global array of strings in the process. \n\
137 * This global array is somewhat more intelligent than the average\n\
138 * UNIX environment variable implementation for our purposes. \n\
139 * These strings are accessible to other clients through the C api \n\
140 "
141 /** Long help text part 10 */
142 #define Asc_EnvVarCmdHL10 \
143 "\
144 * in utilities/ascEnvVar.h. We do this because we don't want our \n\
145 * application core including Tcl code, and because Windoze doesn't\n\
146 * handle environment variables reliably. \n\
147 * These functi/ns will not work until the C api has been initialized \n\
148 * elsewhere.\n\
149 "
150
151 #endif /* ASCTK_ENVVARPROC_H */
152

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22