Changeset 27 for trunk/src/kmk/var.c


Ignore:
Timestamp:
Nov 27, 2002, 1:35:20 AM (23 years ago)
Author:
bird
Message:

OS2 / VAC308

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/var.c

    r25 r27  
    8888 */
    8989
     90#ifdef USE_KLIB
     91 #include <kLib/kLib.h>
     92#endif
     93
    9094#include    <ctype.h>
    9195#include    <sys/types.h>
     
    163167} VarPattern;
    164168
    165 typedef struct { 
    166     regex_t        re; 
     169typedef struct {
     170    regex_t        re;
    167171    int            nsub;
    168172    regmatch_t    *matches;
     
    309313    }
    310314    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;
    313320        if ((env = getenv (name)) != NULL) {
     321        #endif
    314322            int         len;
    315323
     
    493501     */
    494502    if (ctxt == VAR_CMD) {
     503        #ifdef USE_KLIB
     504        kEnvSet(name, val);
     505        #else
    495506        setenv(name, val, 1);
     507        #endif
    496508    }
    497509}
     
    15471559                        Boolean rfree;
    15481560                        char*   rval = Var_Parse(tstr, ctxt, err, &rlen, &rfree);
    1549                
     1561
    15501562                        if (rval == var_Error) {
    15511563                                Fatal("Error expanding embedded variable.");
Note: See TracChangeset for help on using the changeset viewer.