1
0
Fork 0

load programs into upper memory (LH/LOADHIGH);

fix tab completion


Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2269
This commit is contained in:
Sebastian Strohhäcker 2005-08-10 19:53:11 +00:00
parent 15d976410b
commit dd14afd41e
2 changed files with 20 additions and 4 deletions

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: shell_cmds.cpp,v 1.55 2005-07-20 15:27:20 qbix79 Exp $ */
/* $Id: shell_cmds.cpp,v 1.56 2005-08-10 19:53:09 c2woody Exp $ */
#include <string.h>
#include <ctype.h>
@ -712,7 +712,17 @@ void DOS_Shell::CMD_SUBST (char * args) {
}
void DOS_Shell::CMD_LOADHIGH(char *args){
this->ParseLine(args);
Bit16u umb_start=dos_infoblock.GetStartOfUMBChain();
Bit8u umb_flag=dos_infoblock.GetUMBChainState();
Bit8u old_memstrat=DOS_GetMemAllocStrategy()&0xff;
if (umb_start==0x9fff) {
if ((umb_flag&1)==0) DOS_LinkUMBsToMemChain(1);
DOS_SetMemAllocStrategy(0x80); // search in UMBs first
this->ParseLine(args);
Bit8u current_umb_flag=dos_infoblock.GetUMBChainState();
if ((current_umb_flag&1)!=(umb_flag&1)) DOS_LinkUMBsToMemChain(umb_flag);
DOS_SetMemAllocStrategy(old_memstrat); // restore strategy
} else this->ParseLine(args);
}
void DOS_Shell::CMD_CHOICE(char * args){

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: shell_misc.cpp,v 1.38 2005-04-21 21:17:46 qbix79 Exp $ */
/* $Id: shell_misc.cpp,v 1.39 2005-08-10 19:53:11 c2woody Exp $ */
#include <stdlib.h>
#include <string.h>
@ -226,8 +226,14 @@ void DOS_Shell::InputCommand(char * line) {
char mask[DOS_PATHLENGTH];
if (completion_start) {
strcpy(mask, completion_start);
char* dot_pos=strrchr(mask,'.');
char* bs_pos=strrchr(mask,'\\');
char* fs_pos=strrchr(mask,'/');
char* cl_pos=strrchr(mask,':');
// not perfect when line already contains wildcards, but works
strcat(mask, "*.*");
if ((dot_pos-bs_pos>0) && (dot_pos-fs_pos>0) && (dot_pos-cl_pos>0))
strcat(mask, "*");
else strcat(mask, "*.*");
} else {
strcpy(mask, "*.*");
}