Ignore:
Timestamp:
Apr 21, 2007, 8:33:35 AM (18 years ago)
Author:
bird
Message:

hacking...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ash-messup/var.h

    r637 r879  
    7171};
    7272
    73 
     73/*
    7474struct localvar *localvars;
    7575
     
    9292extern struct var vhistsize;
    9393#endif
     94*/
    9495
    9596/*
     
    99100 */
    100101
    101 #define ifsval()        (vifs.text + 4)
    102 #define ifsset()        ((vifs.flags & VUNSET) == 0)
    103 #define mailval()       (vmail.text + 5)
    104 #define mpathval()      (vmpath.text + 9)
     102#define ifsval()        (psh->vifs.text + 4)
     103#define ifsset()        ((psh->vifs.flags & VUNSET) == 0)
     104#define mailval()       (psh->vmail.text + 5)
     105#define mpathval()      (psh->vmpath.text + 9)
    105106#ifdef _MSC_VER
    106 #define pathval()       (vpath.text[5] ? &vpath.text[5] : &vpath2.text[5])
     107#define pathval()       (psh->vpath.text[5] ? &psh->vpath.text[5] : &psh->vpath2.text[5])
    107108#else
    108 #define pathval()       (vpath.text + 5)
     109#define pathval()       (psh->vpath.text + 5)
    109110#endif
    110 #define ps1val()        (vps1.text + 4)
    111 #define ps2val()        (vps2.text + 4)
    112 #define ps4val()        (vps4.text + 4)
    113 #define optindval()     (voptind.text + 7)
     111#define ps1val()        (psh->vps1.text + 4)
     112#define ps2val()        (psh->vps2.text + 4)
     113#define ps4val()        (psh->vps4.text + 4)
     114#define optindval()     (psh->voptind.text + 7)
    114115#ifndef SMALL
    115 #define histsizeval()   (vhistsize.text + 9)
    116 #define termval()       (vterm.text + 5)
     116#define histsizeval()   (psh->vhistsize.text + 9)
     117#define termval()       (psh->vterm.text + 5)
    117118#endif
    118119
    119120#if ATTY
    120 #define attyset()       ((vatty.flags & VUNSET) == 0)
     121#define attyset()       ((psh->vatty.flags & VUNSET) == 0)
    121122#endif
    122 #define mpathset()      ((vmpath.flags & VUNSET) == 0)
     123#define mpathset()      ((psh->vmpath.flags & VUNSET) == 0)
    123124
    124 void initvar(void);
    125 void setvar(const char *, const char *, int);
    126 void setvareq(char *, int);
     125void initvar(struct shinstance *);
     126void setvar(struct shinstance *, const char *, const char *, int);
     127void setvareq(struct shinstance *, char *, int);
    127128struct strlist;
    128 void listsetvar(struct strlist *, int);
    129 char *lookupvar(const char *);
    130 char *bltinlookup(const char *, int);
    131 char **environment(void);
    132 void shprocvar(void);
    133 int showvars(const char *, int, int);
    134 int exportcmd(int, char **);
    135 int localcmd(int, char **);
    136 void mklocal(const char *, int);
    137 void listmklocal(struct strlist *, int);
    138 void poplocalvars(void);
    139 int setvarcmd(int, char **);
    140 int unsetcmd(int, char **);
    141 int unsetvar(const char *, int);
    142 int setvarsafe(const char *, const char *, int);
    143 void print_quoted(const char *);
     129void listsetvar(struct shinstance *, struct strlist *, int);
     130char *lookupvar(struct shinstance *, const char *);
     131char *bltinlookup(struct shinstance *, const char *, int);
     132char **environment(struct shinstance *);
     133void shprocvar(struct shinstance *);
     134int showvars(struct shinstance *, const char *, int, int);
     135int exportcmd(struct shinstance *, int, char **);
     136int localcmd(struct shinstance *, int, char **);
     137void mklocal(struct shinstance *, const char *, int);
     138void listmklocal(struct shinstance *, struct strlist *, int);
     139void poplocalvars(struct shinstance *);
     140int setvarcmd(struct shinstance *, int, char **);
     141int unsetcmd(struct shinstance *, int, char **);
     142int unsetvar(struct shinstance *, const char *, int);
     143int setvarsafe(struct shinstance *, const char *, const char *, int);
     144void print_quoted(struct shinstance *, const char *);
Note: See TracChangeset for help on using the changeset viewer.