Changeset 27 for trunk/src/kmk/var.c
- Timestamp:
- Nov 27, 2002, 1:35:20 AM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/var.c
r25 r27 88 88 */ 89 89 90 #ifdef USE_KLIB 91 #include <kLib/kLib.h> 92 #endif 93 90 94 #include <ctype.h> 91 95 #include <sys/types.h> … … 163 167 } VarPattern; 164 168 165 typedef struct { 166 regex_t re; 169 typedef struct { 170 regex_t re; 167 171 int nsub; 168 172 regmatch_t *matches; … … 309 313 } 310 314 if ((var == NILLNODE) && (flags & FIND_ENV)) { 311 char *env; 312 315 #ifdef USE_KLIB 316 const char *env; 317 if ((env = kEnvGet (name)) != NULL) { 318 #else 319 char *env; 313 320 if ((env = getenv (name)) != NULL) { 321 #endif 314 322 int len; 315 323 … … 493 501 */ 494 502 if (ctxt == VAR_CMD) { 503 #ifdef USE_KLIB 504 kEnvSet(name, val); 505 #else 495 506 setenv(name, val, 1); 507 #endif 496 508 } 497 509 } … … 1547 1559 Boolean rfree; 1548 1560 char* rval = Var_Parse(tstr, ctxt, err, &rlen, &rfree); 1549 1561 1550 1562 if (rval == var_Error) { 1551 1563 Fatal("Error expanding embedded variable.");
Note:
See TracChangeset
for help on using the changeset viewer.