Subversion Repositories SvarDOS

Rev

Rev 366 | Rev 369 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 366 Rev 367
Line 1... Line 1...
1
 
1
 
2
#include <i86.h>
2
#include <i86.h>
3
#include <stdio.h>
3
#include <stdio.h>
4
#include <string.h>
4
#include <string.h>
5
 
5
 
-
 
6
#include "env.h"
-
 
7
 
6
#include "rmod.h"
8
#include "rmod.h"
7
 
9
 
8
#include "rmodinit.h"
10
#include "rmodinit.h"
9
 
11
 
10
 
12
 
Line 163... Line 165...
163
    if (*ptrword != i) continue; /* not belonging to self */
165
    if (*ptrword != i) continue; /* not belonging to self */
164
    return(i);
166
    return(i);
165
  }
167
  }
166
  return(0xffff);
168
  return(0xffff);
167
}
169
}
-
 
170
 
-
 
171
 
-
 
172
/* update rmod's pointer to comspec */
-
 
173
void rmod_updatecomspecptr(unsigned short rmod_seg, unsigned short env_seg) {
-
 
174
  unsigned short far *comspecptr = MK_FP(rmod_seg, RMOD_OFFSET_COMSPECPTR);
-
 
175
  char far *comspecfp = env_lookup(env_seg, "COMSPEC");
-
 
176
  if (comspecfp != NULL) {
-
 
177
    *comspecptr = FP_OFF(comspecfp) + 8; /* +8 to skip the "COMSPEC=" prefix */
-
 
178
  } else {
-
 
179
    *comspecptr = 0;
-
 
180
  }
-
 
181
}